From skayser at users.sourceforge.net Wed Apr 1 00:30:12 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 22:30:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4122] csw/mgar/pkg/cpan/Mail-IMAPClient/trunk Message-ID: Revision: 4122 http://gar.svn.sourceforge.net/gar/?rev=4122&view=rev Author: skayser Date: 2009-03-31 22:30:12 +0000 (Tue, 31 Mar 2009) Log Message: ----------- pm_mailimapclient: version bumped, changed to garv2 Modified Paths: -------------- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec Property Changed: ---------------- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/ Property changes on: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile 2009-03-31 22:30:12 UTC (rev 4122) @@ -1,7 +1,7 @@ GARNAME = Mail-IMAPClient -GARVERSION = 2.2.9 +GARVERSION = 3.15 CATEGORIES = cpan -AUTHOR = DJKERNEN +AUTHOR = MARKOV DESCRIPTION = IMAP Client API define BLURB @@ -9,8 +9,14 @@ scripts to interact with IMAP message stores. endef -DISTFILES += CSWpmmailimapclient.gspec CSWpmmailimapclient.depend +PACKAGES = CSWpmmailimapclient +CATALOGNAME = pm_mailimapclient +ARCHALL = 1 -DEPENDS += cpan/Parse-RecDescent +LICENSE = COPYRIGHT +# Don't know about those yet +#DEPENDS += cpan/Parse-RecDescent +#DEPENDS += cpan/Digest-HMAC + include gar/category.mk Modified: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums 2009-03-31 22:30:12 UTC (rev 4122) @@ -1,3 +1 @@ -29ea00ff47fc77d307f24efdf8ba40f8 download/CSWpmmailimapclient.gspec -737756fbcd7276890f88420cfd4760d5 download/CSWpmmailimapclient.depend -21c1901d55a2d57f73840cad478c665d download/Mail-IMAPClient-2.2.9.tar.gz +85450b57f77f92f8dda9ecf8ff046a1e download/Mail-IMAPClient-3.15.tar.gz Deleted: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend 2009-03-31 22:30:12 UTC (rev 4122) @@ -1 +0,0 @@ -P CSWpmparserecdescent pm_parserecdescent - %var bitname pm_parserecdescent Deleted: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec 2009-03-31 22:30:12 UTC (rev 4122) @@ -1,5 +0,0 @@ -%var bitname pm_mailimapclient -%var pkgname CSWpmmailimapclient -%var arch all -%include url file://%{PKGLIB}/csw_cpan.gspec -%copyright url file://%{WORKSRC}/Copying This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 01:04:47 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:04:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4123] csw/mgar/pkg/cpan Message-ID: Revision: 4123 http://gar.svn.sourceforge.net/gar/?rev=4123&view=rev Author: skayser Date: 2009-03-31 23:04:47 +0000 (Tue, 31 Mar 2009) Log Message: ----------- File-Next: initial commit Added Paths: ----------- csw/mgar/pkg/cpan/File-Next/ csw/mgar/pkg/cpan/File-Next/branches/ csw/mgar/pkg/cpan/File-Next/tags/ csw/mgar/pkg/cpan/File-Next/trunk/ csw/mgar/pkg/cpan/File-Next/trunk/Makefile csw/mgar/pkg/cpan/File-Next/trunk/checksums csw/mgar/pkg/cpan/File-Next/trunk/files/ Property changes on: csw/mgar/pkg/cpan/File-Next/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/cpan/File-Next/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/File-Next/trunk/Makefile (rev 0) +++ csw/mgar/pkg/cpan/File-Next/trunk/Makefile 2009-03-31 23:04:47 UTC (rev 4123) @@ -0,0 +1,18 @@ +GARNAME = File-Next +GARVERSION = 1.02 +CATEGORIES = cpan +AUTHOR = PETDANCE + +DESCRIPTION = File-finding iterator +define BLURB +File::Next is a lightweight, taint-safe file-finding module. It's lightweight +and has no non-core prerequisites. +endef + +PACKAGES = CSWpmfilenext +CATALOGNAME = pm_filenext +ARCHALL = 1 + +LICENSE = + +include gar/category.mk Added: csw/mgar/pkg/cpan/File-Next/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/File-Next/trunk/checksums (rev 0) +++ csw/mgar/pkg/cpan/File-Next/trunk/checksums 2009-03-31 23:04:47 UTC (rev 4123) @@ -0,0 +1 @@ +ad2800827fd053f556e5e18fe9d50202 download/File-Next-1.02.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 01:09:06 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:09:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4124] csw/mgar/pkg/cpan Message-ID: Revision: 4124 http://gar.svn.sourceforge.net/gar/?rev=4124&view=rev Author: skayser Date: 2009-03-31 23:09:06 +0000 (Tue, 31 Mar 2009) Log Message: ----------- ack: initial commit Added Paths: ----------- csw/mgar/pkg/cpan/ack/ csw/mgar/pkg/cpan/ack/branches/ csw/mgar/pkg/cpan/ack/tags/ csw/mgar/pkg/cpan/ack/trunk/ csw/mgar/pkg/cpan/ack/trunk/Makefile csw/mgar/pkg/cpan/ack/trunk/checksums csw/mgar/pkg/cpan/ack/trunk/files/ Property changes on: csw/mgar/pkg/cpan/ack/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/cpan/ack/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/Makefile (rev 0) +++ csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-03-31 23:09:06 UTC (rev 4124) @@ -0,0 +1,19 @@ +GARNAME = ack +GARVERSION = 1.88 +CATEGORIES = cpan +AUTHOR = PETDANCE + +DESCRIPTION = A tool like grep, aimed at programmers +define BLURB +ack is a tool like grep, aimed at programmers with large trees of heterogeneous +source code. ack is written purely in Perl, and takes advantage of the power of +Perl's regular expressions. +endef + +PACKAGES = CSWack +CATALOGNAME = ack +ARCHALL = 1 + +LICENSE = COPYRIGHT + +include gar/category.mk Added: csw/mgar/pkg/cpan/ack/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/checksums (rev 0) +++ csw/mgar/pkg/cpan/ack/trunk/checksums 2009-03-31 23:09:06 UTC (rev 4124) @@ -0,0 +1 @@ +a1aad025ac94d582628ee72872d44c94 download/ack-1.88.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 01:52:30 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:52:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4125] csw/mgar/pkg/cpan/ack/trunk/Makefile Message-ID: Revision: 4125 http://gar.svn.sourceforge.net/gar/?rev=4125&view=rev Author: skayser Date: 2009-03-31 23:52:30 +0000 (Tue, 31 Mar 2009) Log Message: ----------- ack: only install ack itself Modified Paths: -------------- csw/mgar/pkg/cpan/ack/trunk/Makefile Modified: csw/mgar/pkg/cpan/ack/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-03-31 23:09:06 UTC (rev 4124) +++ csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-03-31 23:52:30 UTC (rev 4125) @@ -3,17 +3,26 @@ CATEGORIES = cpan AUTHOR = PETDANCE -DESCRIPTION = A tool like grep, aimed at programmers +DESCRIPTION = grep-like text finder, aimed at programmers define BLURB -ack is a tool like grep, aimed at programmers with large trees of heterogeneous -source code. ack is written purely in Perl, and takes advantage of the power of -Perl's regular expressions. + ack is a tool like grep, aimed at programmers with large trees of + heterogeneous source code. ack is written purely in Perl, and takes + advantage of the power of Perl's regular expressions. endef PACKAGES = CSWack CATALOGNAME = ack ARCHALL = 1 -LICENSE = COPYRIGHT +LICENSE = +INSTALL_SCRIPTS = custom + include gar/category.mk + +install-custom: + @ginstall -d $(DESTDIR)$(bindir) + @ginstall -d $(DESTDIR)$(mandir)/man1 + @cp $(WORKSRC)/ack $(DESTDIR)$(bindir) + @pod2man --section=1 $(WORKSRC)/ack > $(DESTDIR)$(mandir)/man1/ack.1 + @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 1 01:55:01 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:55:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4126] csw/mgar/pkg/cvsps/trunk/Makefile Message-ID: Revision: 4126 http://gar.svn.sourceforge.net/gar/?rev=4126&view=rev Author: bdwalton Date: 2009-03-31 23:55:01 +0000 (Tue, 31 Mar 2009) Log Message: ----------- apply RPATH correction to address mantis #3528 Modified Paths: -------------- csw/mgar/pkg/cvsps/trunk/Makefile Modified: csw/mgar/pkg/cvsps/trunk/Makefile =================================================================== --- csw/mgar/pkg/cvsps/trunk/Makefile 2009-03-31 23:52:30 UTC (rev 4125) +++ csw/mgar/pkg/cvsps/trunk/Makefile 2009-03-31 23:55:01 UTC (rev 4126) @@ -32,6 +32,9 @@ TEST_SCRIPTS = +# to fix mantis bug #3528 +RUNPATHQUOTE = 1 + CONFIGURE_ARGS = $(DIRPATHS) --with-zlib=/opt/csw include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 1 02:17:10 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 01 Apr 2009 00:17:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4127] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4127 http://gar.svn.sourceforge.net/gar/?rev=4127&view=rev Author: bdwalton Date: 2009-04-01 00:17:10 +0000 (Wed, 01 Apr 2009) Log Message: ----------- address mantis bug #3539 (improperly quoted RPATH) Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-03-31 23:55:01 UTC (rev 4126) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-01 00:17:10 UTC (rev 4127) @@ -94,6 +94,9 @@ # software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 +# properly quote RPATH to address mantis bug #3539 +RUNPATHQUOTE = 1 + CONFIGURE_ARGS = $(DIRPATHS) --with-shell=$(bindir)/bash CONFIGURE_ARGS += --with-perl=$(bindir)/perl CONFIGURE_ARGS += --with-tcltk=$(bindir)/wish This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 14:36:16 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 01 Apr 2009 12:36:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4128] csw/mgar/pkg/cpan/ack/trunk/Makefile Message-ID: Revision: 4128 http://gar.svn.sourceforge.net/gar/?rev=4128&view=rev Author: skayser Date: 2009-04-01 12:36:16 +0000 (Wed, 01 Apr 2009) Log Message: ----------- ack: added license and changelog Modified Paths: -------------- csw/mgar/pkg/cpan/ack/trunk/Makefile Modified: csw/mgar/pkg/cpan/ack/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-04-01 00:17:10 UTC (rev 4127) +++ csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-04-01 12:36:16 UTC (rev 4128) @@ -14,8 +14,6 @@ CATALOGNAME = ack ARCHALL = 1 -LICENSE = - INSTALL_SCRIPTS = custom include gar/category.mk @@ -23,6 +21,12 @@ install-custom: @ginstall -d $(DESTDIR)$(bindir) @ginstall -d $(DESTDIR)$(mandir)/man1 + @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) @cp $(WORKSRC)/ack $(DESTDIR)$(bindir) @pod2man --section=1 $(WORKSRC)/ack > $(DESTDIR)$(mandir)/man1/ack.1 + @cp $(WORKSRC)/Changes $(DESTDIR)$(docdir)/$(GARNAME)/changelog @$(MAKECOOKIE) + +pre-merge-modulated: + @$(WORKSRC)/ack --version | sed -n '/^Copyright/,$$p' > $(WORKSRC)/COPYING + @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 18:50:50 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 01 Apr 2009 16:50:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4129] csw/mgar/pkg Message-ID: Revision: 4129 http://gar.svn.sourceforge.net/gar/?rev=4129&view=rev Author: skayser Date: 2009-04-01 16:50:50 +0000 (Wed, 01 Apr 2009) Log Message: ----------- vttest: initial commit Added Paths: ----------- csw/mgar/pkg/vttest/ csw/mgar/pkg/vttest/branches/ csw/mgar/pkg/vttest/tags/ csw/mgar/pkg/vttest/trunk/ csw/mgar/pkg/vttest/trunk/Makefile csw/mgar/pkg/vttest/trunk/checksums csw/mgar/pkg/vttest/trunk/files/ Property changes on: csw/mgar/pkg/vttest/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/vttest/trunk/Makefile =================================================================== --- csw/mgar/pkg/vttest/trunk/Makefile (rev 0) +++ csw/mgar/pkg/vttest/trunk/Makefile 2009-04-01 16:50:50 UTC (rev 4129) @@ -0,0 +1,25 @@ +GARNAME = vttest +GARVERSION = 20071216 +CATEGORIES = utils + +DESCRIPTION = Tool for testing VT100 compatibility of terminals +define BLURB +This is a program to test the compatibility (or to demonstrate the +non-compatibility) of so-called "VT100-compatible" terminals. Additional tests +(past version 1.7) are provided for analysis of vt220, vt420 terminals, as well +as variants of xterm. +endef + +MASTER_SITES = ftp://invisible-island.net/vttest/ +DISTFILES = $(GARNAME)-$(GARVERSION).tgz + +UFILES_REGEX = $(GARNAME)-(\d+).tgz + +TEST_SCRIPTS = + +CONFIGURE_ARGS = $(DIRPATHS) + +# No RUNPATH needed, vttest only links against system libs +LINKER_FLAGS = + +include gar/category.mk Added: csw/mgar/pkg/vttest/trunk/checksums =================================================================== --- csw/mgar/pkg/vttest/trunk/checksums (rev 0) +++ csw/mgar/pkg/vttest/trunk/checksums 2009-04-01 16:50:50 UTC (rev 4129) @@ -0,0 +1 @@ +490cebc85e531c833dcf14c32790184b download/vttest-20071216.tgz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 19:01:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 17:01:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4131] csw/mgar/pkg/chrpath/trunk/ Message-ID: Revision: 4131 http://gar.svn.sourceforge.net/gar/?rev=4131&view=rev Author: valholla Date: 2009-04-01 17:01:20 +0000 (Wed, 01 Apr 2009) Log Message: ----------- svnprop garv2 checkin Property Changed: ---------------- csw/mgar/pkg/chrpath/trunk/ Property changes on: csw/mgar/pkg/chrpath/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 19:00:29 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 17:00:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4130] csw/mgar/pkg Message-ID: Revision: 4130 http://gar.svn.sourceforge.net/gar/?rev=4130&view=rev Author: valholla Date: 2009-04-01 17:00:29 +0000 (Wed, 01 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/chrpath/ csw/mgar/pkg/chrpath/Makefile csw/mgar/pkg/chrpath/branches/ csw/mgar/pkg/chrpath/tags/ csw/mgar/pkg/chrpath/trunk/ csw/mgar/pkg/chrpath/trunk/Makefile csw/mgar/pkg/chrpath/trunk/checksums csw/mgar/pkg/chrpath/trunk/files/ csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff Added: csw/mgar/pkg/chrpath/Makefile =================================================================== --- csw/mgar/pkg/chrpath/Makefile (rev 0) +++ csw/mgar/pkg/chrpath/Makefile 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/chrpath/trunk/Makefile =================================================================== --- csw/mgar/pkg/chrpath/trunk/Makefile (rev 0) +++ csw/mgar/pkg/chrpath/trunk/Makefile 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,40 @@ +GARNAME = chrpath +GARVERSION = 0.13 +CATEGORIES = utils + +DESCRIPTION = A program to fix/change runpaths +define BLURB +endef + +MASTER_SITES = http://directory.fsf.org/project/chrpath/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +PACKAGES = CSWchrpath +CATALOGNAME_CSWchrpath = chrpath +SPKG_DESC_CSWchrpath = $(DESCRIPTION) + +PATCHFILES = chrpath_0.13-2.diff +PATCHDIR = $(WORKSRC) + + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +NOISALIST = 1 + +CONFIGURE_ARGS = $(DIRPATHS) + +## There are no tests for this +## runtest.ksh is broken manual test required +TEST_SCRIPTS = skip + +test-skip: + $(DONADA) + +post-configure-modulated: + @(perl -i -plne 's|docdir = .*|docdir = $(prefix)/share/doc/$(GARNAME)|'\ + $(WORKSRC)/Makefile) + +include gar/category.mk Added: csw/mgar/pkg/chrpath/trunk/checksums =================================================================== --- csw/mgar/pkg/chrpath/trunk/checksums (rev 0) +++ csw/mgar/pkg/chrpath/trunk/checksums 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,2 @@ +b73072a8fbba277558c50364b65bb407 download/chrpath-0.13.tar.gz +963e8a8a27f91bf1f7a37c66750f60d7 download/chrpath_0.13-2.diff Added: csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff =================================================================== --- csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff (rev 0) +++ csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,8899 @@ +--- chrpath-0.13.orig/Makefile.in ++++ chrpath-0.13/Makefile.in +@@ -1,6 +1,8 @@ +-# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am ++# Makefile.in generated by automake 1.8.5 from Makefile.am. ++# @configure_input@ + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -10,75 +12,189 @@ + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A + # PARTICULAR PURPOSE. + ++ at SET_MAKE@ + +-SHELL = @SHELL@ ++ ++SOURCES = $(chrpath_SOURCES) + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +-prefix = @prefix@ +-exec_prefix = @exec_prefix@ +- +-bindir = @bindir@ +-sbindir = @sbindir@ +-libexecdir = @libexecdir@ +-datadir = @datadir@ +-sysconfdir = @sysconfdir@ +-sharedstatedir = @sharedstatedir@ +-localstatedir = @localstatedir@ +-libdir = @libdir@ +-infodir = @infodir@ +-mandir = @mandir@ +-includedir = @includedir@ +-oldincludedir = /usr/include +- +-DESTDIR = +- + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +- + top_builddir = . +- +-ACLOCAL = @ACLOCAL@ +-AUTOCONF = @AUTOCONF@ +-AUTOMAKE = @AUTOMAKE@ +-AUTOHEADER = @AUTOHEADER@ +- ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd + INSTALL = @INSTALL@ +-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +-INSTALL_DATA = @INSTALL_DATA@ +-INSTALL_SCRIPT = @INSTALL_SCRIPT@ +-transform = @program_transform_name@ +- ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) + NORMAL_INSTALL = : + PRE_INSTALL = : + POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_triplet = @host@ ++bin_PROGRAMS = chrpath$(EXEEXT) ++DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ ++ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ ++ config.guess config.sub depcomp install-sh ltmain.sh missing \ ++ mkinstalldirs ++subdir = . ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ ++ $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ++ configure.lineno configure.status.lineno ++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs ++CONFIG_HEADER = config.h ++CONFIG_CLEAN_FILES = ++am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" ++binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) ++PROGRAMS = $(bin_PROGRAMS) ++am_chrpath_OBJECTS = chrpath.$(OBJEXT) killrpath.$(OBJEXT) \ ++ main.$(OBJEXT) elf.$(OBJEXT) ++chrpath_OBJECTS = $(am_chrpath_OBJECTS) ++chrpath_LDADD = $(LDADD) ++DEFAULT_INCLUDES = -I. -I$(srcdir) -I. ++depcomp = $(SHELL) $(top_srcdir)/depcomp ++am__depfiles_maybe = depfiles ++ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/chrpath.Po ./$(DEPDIR)/elf.Po \ ++ at AMDEP_TRUE@ ./$(DEPDIR)/killrpath.Po ./$(DEPDIR)/main.Po ++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++CCLD = $(CC) ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++SOURCES = $(chrpath_SOURCES) ++DIST_SOURCES = $(chrpath_SOURCES) ++RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ++ html-recursive info-recursive install-data-recursive \ ++ install-exec-recursive install-info-recursive \ ++ install-recursive installcheck-recursive installdirs-recursive \ ++ pdf-recursive ps-recursive uninstall-info-recursive \ ++ uninstall-recursive ++man1dir = $(mandir)/man1 ++NROFF = nroff ++MANS = $(man_MANS) ++docDATA_INSTALL = $(INSTALL_DATA) ++DATA = $(doc_DATA) ++ETAGS = etags ++CTAGS = ctags ++DIST_SUBDIRS = $(SUBDIRS) ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++distdir = $(PACKAGE)-$(VERSION) ++top_distdir = $(distdir) ++am__remove_distdir = \ ++ { test ! -d $(distdir) \ ++ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ++ && rm -fr $(distdir); }; } ++DIST_ARCHIVES = $(distdir).tar.gz ++GZIP_ENV = --best ++distuninstallcheck_listfiles = find . -type f -print ++distcleancheck_listfiles = find . -type f -print ++ACLOCAL = @ACLOCAL@ ++AMDEP_FALSE = @AMDEP_FALSE@ ++AMDEP_TRUE = @AMDEP_TRUE@ ++AMTAR = @AMTAR@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AWK = @AWK@ + CC = @CC@ ++CCDEPMODE = @CCDEPMODE@ ++CFLAGS = @CFLAGS@ ++CPP = @CPP@ ++CPPFLAGS = @CPPFLAGS@ ++CYGPATH_W = @CYGPATH_W@ ++DEFS = @DEFS@ ++DEPDIR = @DEPDIR@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++EXEEXT = @EXEEXT@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++LDFLAGS = @LDFLAGS@ + LDRPATH = @LDRPATH@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ ++MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ++MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ ++OBJEXT = @OBJEXT@ + PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++SET_MAKE = @SET_MAKE@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ + VERSION = @VERSION@ +- ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_STRIP = @ac_ct_STRIP@ ++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ ++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ ++am__include = @am__include@ ++am__leading_dot = @am__leading_dot@ ++am__quote = @am__quote@ ++bindir = @bindir@ ++build = @build@ ++build_alias = @build_alias@ ++build_cpu = @build_cpu@ ++build_os = @build_os@ ++build_vendor = @build_vendor@ ++datadir = @datadir@ ++exec_prefix = @exec_prefix@ ++host = @host@ ++host_alias = @host_alias@ ++host_cpu = @host_cpu@ ++host_os = @host_os@ ++host_vendor = @host_vendor@ ++includedir = @includedir@ ++infodir = @infodir@ ++install_sh = @install_sh@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++localstatedir = @localstatedir@ ++mandir = @mandir@ ++mkdir_p = @mkdir_p@ ++oldincludedir = @oldincludedir@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++sbindir = @sbindir@ ++sharedstatedir = @sharedstatedir@ ++sysconfdir = @sysconfdir@ ++target = @target@ ++target_alias = @target_alias@ ++target_cpu = @target_cpu@ ++target_os = @target_os@ ++target_vendor = @target_vendor@ + SUBDIRS = testsuite deb +- + docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION) +- + doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README +- +-bin_PROGRAMS = chrpath +- + man_MANS = chrpath.1 +- +-chrpath_SOURCES = chrpath.c killrpath.c main.c elf.c protos.h +- ++chrpath_SOURCES = \ ++ chrpath.c \ ++ killrpath.c \ ++ main.c \ ++ elf.c \ ++ protos.h + + EXTRA_DIST = ChangeLog.usermap $(man_MANS) +- + CLEANFILES = *.bb *.bbg *.da *.gcov testsuite/*.bb testsuite/*.bbg + + # ChangeLog autogenerated from CVS log messages +@@ -90,142 +206,121 @@ + # --usermap ... Make usernames with names/emails in given file + # --ignore ChangeLog Don't log changes to the ChangeLog itself + CVS2CL = cvs2cl +-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +-CONFIG_HEADER = config.h +-CONFIG_CLEAN_FILES = +-PROGRAMS = $(bin_PROGRAMS) +- +- +-DEFS = @DEFS@ -I. -I$(srcdir) -I. +-CPPFLAGS = @CPPFLAGS@ +-LDFLAGS = @LDFLAGS@ +-LIBS = @LIBS@ +-chrpath_OBJECTS = chrpath.o killrpath.o main.o elf.o +-chrpath_LDADD = $(LDADD) +-chrpath_DEPENDENCIES = +-chrpath_LDFLAGS = +-CFLAGS = @CFLAGS@ +-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-CCLD = $(CC) +-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +-man1dir = $(mandir)/man1 +-MANS = $(man_MANS) +- +-NROFF = nroff +-DATA = $(doc_DATA) +- +-DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ +-Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 config.guess \ +-config.h.in config.sub configure configure.ac install-sh ltmain.sh \ +-missing mkinstalldirs +- +- +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +- +-TAR = tar +-GZIP_ENV = --best +-SOURCES = $(chrpath_SOURCES) +-OBJECTS = $(chrpath_OBJECTS) ++all: config.h ++ $(MAKE) $(AM_MAKEFLAGS) all-recursive + +-all: all-redirect + .SUFFIXES: +-.SUFFIXES: .S .c .o .s +-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile +- +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +- cd $(top_builddir) \ +- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status +- +-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4 +- cd $(srcdir) && $(ACLOCAL) ++.SUFFIXES: .c .o .obj ++am--refresh: ++ @: ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ ++ cd $(srcdir) && $(AUTOMAKE) --gnu \ ++ && exit 0; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ ++ cd $(top_srcdir) && \ ++ $(AUTOMAKE) --gnu Makefile ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ echo ' $(SHELL) ./config.status'; \ ++ $(SHELL) ./config.status;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ ++ esac; + +-config.status: $(srcdir)/configure.ac $(CONFIG_STATUS_DEPENDENCIES) ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ++ ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +-config.h: stamp-h ++config.h: stamp-h1 + @if test ! -f $@; then \ +- rm -f stamp-h; \ +- $(MAKE) stamp-h; \ ++ rm -f stamp-h1; \ ++ $(MAKE) stamp-h1; \ + else :; fi +-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status +- cd $(top_builddir) \ +- && CONFIG_FILES= CONFIG_HEADERS=config.h \ +- $(SHELL) ./config.status +- @echo timestamp > stamp-h 2> /dev/null +-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in +- @if test ! -f $@; then \ +- rm -f $(srcdir)/stamp-h.in; \ +- $(MAKE) $(srcdir)/stamp-h.in; \ +- else :; fi +-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOHEADER) +- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null +- +-mostlyclean-hdr: + +-clean-hdr: ++stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status ++ @rm -f stamp-h1 ++ cd $(top_builddir) && $(SHELL) ./config.status config.h ++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(top_srcdir) && $(AUTOHEADER) ++ rm -f stamp-h1 ++ touch $@ + + distclean-hdr: +- -rm -f config.h +- +-maintainer-clean-hdr: +- +-mostlyclean-binPROGRAMS: +- +-clean-binPROGRAMS: +- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +- +-distclean-binPROGRAMS: +- +-maintainer-clean-binPROGRAMS: +- ++ -rm -f config.h stamp-h1 + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(bindir) ++ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ +- if test -f $$p; then \ +- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ +- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ ++ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ ++ if test -f $$p \ ++ ; then \ ++ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ ++ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ ++ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + + uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) +- list='$(bin_PROGRAMS)'; for p in $$list; do \ +- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ ++ @list='$(bin_PROGRAMS)'; for p in $$list; do \ ++ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ ++ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +-.c.o: +- $(COMPILE) -c $< +- +-.s.o: +- $(COMPILE) -c $< +- +-.S.o: +- $(COMPILE) -c $< ++clean-binPROGRAMS: ++ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ++chrpath$(EXEEXT): $(chrpath_OBJECTS) $(chrpath_DEPENDENCIES) ++ @rm -f chrpath$(EXEEXT) ++ $(LINK) $(chrpath_LDFLAGS) $(chrpath_OBJECTS) $(chrpath_LDADD) $(LIBS) + + mostlyclean-compile: +- -rm -f *.o core *.core +- +-clean-compile: ++ -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c + +-maintainer-clean-compile: ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/chrpath.Po at am__quote@ ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/elf.Po at am__quote@ ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/killrpath.Po at am__quote@ ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@ + +-chrpath: $(chrpath_OBJECTS) $(chrpath_DEPENDENCIES) +- @rm -f chrpath +- $(LINK) $(chrpath_LDFLAGS) $(chrpath_OBJECTS) $(chrpath_LDADD) $(LIBS) +- +-install-man1: +- $(mkinstalldirs) $(DESTDIR)$(man1dir) +- @list='$(man1_MANS)'; \ +- l2='$(man_MANS)'; for i in $$l2; do \ ++.c.o: ++ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ ++ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++ at am__fastdepCC_FALSE@ $(COMPILE) -c $< ++ ++.c.obj: ++ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ ++ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++ at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ++uninstall-info-am: ++install-man1: $(man1_MANS) $(man_MANS) ++ @$(NORMAL_INSTALL) ++ test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" ++ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ ++ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ ++ for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ +@@ -234,50 +329,53 @@ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ case "$$ext" in \ ++ 1*) ;; \ ++ *) ext='1' ;; \ ++ esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ +- echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ +- $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ ++ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ ++ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +- + uninstall-man1: +- @list='$(man1_MANS)'; \ +- l2='$(man_MANS)'; for i in $$l2; do \ ++ @$(NORMAL_UNINSTALL) ++ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ ++ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ ++ for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ case "$$ext" in \ ++ 1*) ;; \ ++ *) ext='1' ;; \ ++ esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ +- echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ +- rm -f $(DESTDIR)$(man1dir)/$$inst; \ ++ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ ++ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +-install-man: $(MANS) +- @$(NORMAL_INSTALL) +- $(MAKE) $(AM_MAKEFLAGS) install-man1 +-uninstall-man: +- @$(NORMAL_UNINSTALL) +- $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 +- + install-docDATA: $(doc_DATA) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(docdir) ++ test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" + @list='$(doc_DATA)'; for p in $$list; do \ +- if test -f $(srcdir)/$$p; then \ +- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p"; \ +- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p; \ +- else if test -f $$p; then \ +- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p"; \ +- $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p; \ +- fi; fi; \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ f="`echo $$p | sed -e 's|^.*/||'`"; \ ++ echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ ++ $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ + done + + uninstall-docDATA: + @$(NORMAL_UNINSTALL) +- list='$(doc_DATA)'; for p in $$list; do \ +- rm -f $(DESTDIR)$(docdir)/$$p; \ ++ @list='$(doc_DATA)'; for p in $$list; do \ ++ f="`echo $$p | sed -e 's|^.*/||'`"; \ ++ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(docdir)/$$f"; \ + done + + # This directory's subdirectories are mostly independent; you can cd +@@ -286,13 +384,8 @@ + # (1) if the variable is set in `config.status', edit `config.status' + # (which will cause the Makefiles to be regenerated when you run `make'); + # (2) otherwise, pass the desired values on the `make' command line. +- +- at SET_MAKE@ +- +-all-recursive install-data-recursive install-exec-recursive \ +-installdirs-recursive install-recursive uninstall-recursive \ +-check-recursive installcheck-recursive info-recursive dvi-recursive: +- @set fnord $(MAKEFLAGS); amf=$$2; \ ++$(RECURSIVE_TARGETS): ++ @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -312,13 +405,18 @@ + + mostlyclean-recursive clean-recursive distclean-recursive \ + maintainer-clean-recursive: +- @set fnord $(MAKEFLAGS); amf=$$2; \ ++ @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ +- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ +- rev="$$subdir $$rev"; \ +- test "$$subdir" = "." && dot_seen=yes; \ ++ case "$@" in \ ++ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ ++ *) list='$(SUBDIRS)' ;; \ ++ esac; \ ++ rev=''; for subdir in $$list; do \ ++ if test "$$subdir" = "."; then :; else \ ++ rev="$$subdir $$rev"; \ ++ fi; \ + done; \ +- test "$$dot_seen" = "no" && rev=". $$rev"; \ ++ rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ +@@ -334,189 +432,318 @@ + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done ++ctags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ ++ done + +-tags: TAGS +- +-ID: $(HEADERS) $(SOURCES) $(LISP) +- list='$(SOURCES) $(HEADERS)'; \ +- unique=`for i in $$list; do echo $$i; done | \ +- awk ' { files[$$0] = 1; } \ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ +- here=`pwd` && cd $(srcdir) \ +- && mkid -f$$here/ID $$unique $(LISP) ++ mkid -fID $$unique ++tags: TAGS + +-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) ++TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ ++ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ ++ include_option=--etags-include; \ ++ empty_fix=.; \ ++ else \ ++ include_option=--include; \ ++ empty_fix=; \ ++ fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +- if test "$$subdir" = .; then :; else \ +- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ +- fi; \ ++ if test "$$subdir" = .; then :; else \ ++ test ! -f $$subdir/TAGS || \ ++ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ ++ fi; \ + done; \ +- list='$(SOURCES) $(HEADERS)'; \ +- unique=`for i in $$list; do echo $$i; done | \ +- awk ' { files[$$0] = 1; } \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ +- test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) +- +-mostlyclean-tags: +- +-clean-tags: ++ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique; \ ++ fi ++ctags: CTAGS ++CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ test -z "$(CTAGS_ARGS)$$tags$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$tags $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && cd $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) $$here + + distclean-tags: +- -rm -f TAGS ID +- +-maintainer-clean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +-distdir = $(PACKAGE)-$(VERSION) +-top_distdir = $(distdir) +- +-# This target untars the dist file and tries a VPATH configuration. Then +-# it guarantees that the distribution is self-contained by making another +-# tarfile. +-distcheck: dist +- -rm -rf $(distdir) +- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz +- mkdir $(distdir)/=build +- mkdir $(distdir)/=inst +- dc_install_base=`cd $(distdir)/=inst && pwd`; \ +- cd $(distdir)/=build \ +- && ../configure --srcdir=.. --prefix=$$dc_install_base \ +- && $(MAKE) $(AM_MAKEFLAGS) \ +- && $(MAKE) $(AM_MAKEFLAGS) dvi \ +- && $(MAKE) $(AM_MAKEFLAGS) check \ +- && $(MAKE) $(AM_MAKEFLAGS) install \ +- && $(MAKE) $(AM_MAKEFLAGS) installcheck \ +- && $(MAKE) $(AM_MAKEFLAGS) dist +- -rm -rf $(distdir) +- @banner="$(distdir).tar.gz is ready for distribution"; \ +- dashes=`echo "$$banner" | sed s/./=/g`; \ +- echo "$$dashes"; \ +- echo "$$banner"; \ +- echo "$$dashes" +-dist: distdir +- -chmod -R a+r $(distdir) +- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) +- -rm -rf $(distdir) +-dist-all: distdir +- -chmod -R a+r $(distdir) +- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) +- -rm -rf $(distdir) + distdir: $(DISTFILES) +- -rm -rf $(distdir) ++ $(am__remove_distdir) + mkdir $(distdir) +- -chmod 777 $(distdir) +- @for file in $(DISTFILES); do \ +- d=$(srcdir); \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ++ list='$(DISTFILES)'; for file in $$list; do \ ++ case $$file in \ ++ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ++ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ++ esac; \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ++ dir="/$$dir"; \ ++ $(mkdir_p) "$(distdir)$$dir"; \ ++ else \ ++ dir=''; \ ++ fi; \ + if test -d $$d/$$file; then \ +- cp -pr $$d/$$file $(distdir)/$$file; \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ fi; \ ++ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +- || cp -p $$d/$$file $(distdir)/$$file || :; \ ++ || cp -p $$d/$$file $(distdir)/$$file \ ++ || exit 1; \ + fi; \ + done +- for subdir in $(SUBDIRS); do \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -d $(distdir)/$$subdir \ +- || mkdir $(distdir)/$$subdir \ ++ test -d "$(distdir)/$$subdir" \ ++ || mkdir "$(distdir)/$$subdir" \ + || exit 1; \ +- chmod 777 $(distdir)/$$subdir; \ +- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ ++ (cd $$subdir && \ ++ $(MAKE) $(AM_MAKEFLAGS) \ ++ top_distdir="../$(top_distdir)" \ ++ distdir="../$(distdir)/$$subdir" \ ++ distdir) \ + || exit 1; \ + fi; \ + done +-chrpath.o: chrpath.c config.h protos.h +-elf.o: elf.c config.h protos.h +-killrpath.o: killrpath.c config.h protos.h +-main.o: main.c config.h protos.h ++ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ++ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ++ || chmod -R a+r $(distdir) ++dist-gzip: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++dist-bzip2: distdir ++ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ++ $(am__remove_distdir) ++ ++dist-tarZ: distdir ++ $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z ++ $(am__remove_distdir) ++ ++dist-shar: distdir ++ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz ++ $(am__remove_distdir) ++ ++dist-zip: distdir ++ -rm -f $(distdir).zip ++ zip -rq $(distdir).zip $(distdir) ++ $(am__remove_distdir) ++ ++dist dist-all: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) + +-info-am: +-info: info-recursive +-dvi-am: +-dvi: dvi-recursive ++# This target untars the dist file and tries a VPATH configuration. Then ++# it guarantees that the distribution is self-contained by making another ++# tarfile. ++distcheck: dist ++ case '$(DIST_ARCHIVES)' in \ ++ *.tar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ ++ *.tar.bz2*) \ ++ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ ++ *.tar.Z*) \ ++ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ ++ *.shar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ ++ *.zip*) \ ++ unzip $(distdir).zip ;;\ ++ esac ++ chmod -R a-w $(distdir); chmod a+w $(distdir) ++ mkdir $(distdir)/_build ++ mkdir $(distdir)/_inst ++ chmod a-w $(distdir) ++ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ++ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ++ && cd $(distdir)/_build \ ++ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ++ $(DISTCHECK_CONFIGURE_FLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \ ++ && $(MAKE) $(AM_MAKEFLAGS) check \ ++ && $(MAKE) $(AM_MAKEFLAGS) install \ ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ++ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ++ distuninstallcheck \ ++ && chmod -R a-w "$$dc_install_base" \ ++ && ({ \ ++ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ++ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ++ } || { rm -rf "$$dc_destdir"; exit 1; }) \ ++ && rm -rf "$$dc_destdir" \ ++ && $(MAKE) $(AM_MAKEFLAGS) dist \ ++ && rm -rf $(DIST_ARCHIVES) \ ++ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ++ $(am__remove_distdir) ++ @(echo "$(distdir) archives ready for distribution: "; \ ++ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ ++ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' ++distuninstallcheck: ++ @cd $(distuninstallcheck_dir) \ ++ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ++ || { echo "ERROR: files left after uninstall:" ; \ ++ if test -n "$(DESTDIR)"; then \ ++ echo " (check DESTDIR support)"; \ ++ fi ; \ ++ $(distuninstallcheck_listfiles) ; \ ++ exit 1; } >&2 ++distcleancheck: distclean ++ @if test '$(srcdir)' = . ; then \ ++ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ++ exit 1 ; \ ++ fi ++ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ++ || { echo "ERROR: files left in build directory after distclean:" ; \ ++ $(distcleancheck_listfiles) ; \ ++ exit 1; } >&2 + check-am: all-am + check: check-recursive +-installcheck-am: +-installcheck: installcheck-recursive +-all-recursive-am: config.h +- $(MAKE) $(AM_MAKEFLAGS) all-recursive +- +-install-exec-am: install-binPROGRAMS ++all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h ++installdirs: installdirs-recursive ++installdirs-am: ++ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \ ++ test -z "$$dir" || $(mkdir_p) "$$dir"; \ ++ done ++install: install-recursive + install-exec: install-exec-recursive +- +-install-data-am: install-man install-docDATA + install-data: install-data-recursive ++uninstall: uninstall-recursive + + install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +-install: install-recursive +-uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-docDATA +-uninstall: uninstall-recursive +-all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h +-all-redirect: all-recursive-am +-install-strip: +- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +-installdirs: installdirs-recursive +-installdirs-am: +- $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 \ +- $(DESTDIR)$(docdir) +- + ++installcheck: installcheck-recursive ++install-strip: ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ `test -z '$(STRIP)' || \ ++ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + mostlyclean-generic: + + clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + + distclean-generic: +- -rm -f Makefile $(CONFIG_CLEAN_FILES) +- -rm -f config.cache config.log stamp-h stamp-h[0-9]* ++ -rm -f $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: +-mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ +- mostlyclean-compile mostlyclean-tags \ +- mostlyclean-generic ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++clean: clean-recursive + +-mostlyclean: mostlyclean-recursive ++clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +-clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ +- clean-generic mostlyclean-am ++distclean: distclean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-hdr distclean-tags + +-clean: clean-recursive ++dvi: dvi-recursive + +-distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ +- distclean-tags distclean-generic clean-am ++dvi-am: + +-distclean: distclean-recursive +- -rm -f config.status ++html: html-recursive + +-maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ +- maintainer-clean-compile maintainer-clean-tags \ +- maintainer-clean-generic distclean-am +- @echo "This command is intended for maintainers to use;" +- @echo "it deletes files that may require special tools to rebuild." ++info: info-recursive ++ ++info-am: ++ ++install-data-am: install-docDATA install-man ++ ++install-exec-am: install-binPROGRAMS ++ ++install-info: install-info-recursive ++ ++install-man: install-man1 ++ ++installcheck-am: + + maintainer-clean: maintainer-clean-recursive +- -rm -f config.status ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf $(top_srcdir)/autom4te.cache ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic + +-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +-mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +-mostlyclean-compile distclean-compile clean-compile \ +-maintainer-clean-compile install-man1 uninstall-man1 install-man \ +-uninstall-man uninstall-docDATA install-docDATA install-data-recursive \ +-uninstall-data-recursive install-exec-recursive \ +-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +-all-recursive check-recursive installcheck-recursive info-recursive \ +-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +-dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +-install-exec-am install-exec install-data-am install-data install-am \ +-install uninstall-am uninstall all-redirect all-am all installdirs-am \ +-installdirs mostlyclean-generic distclean-generic clean-generic \ +-maintainer-clean-generic clean mostlyclean distclean maintainer-clean ++mostlyclean: mostlyclean-recursive ++ ++mostlyclean-am: mostlyclean-compile mostlyclean-generic ++ ++pdf: pdf-recursive ++ ++pdf-am: ++ ++ps: ps-recursive ++ ++ps-am: ++ ++uninstall-am: uninstall-binPROGRAMS uninstall-docDATA \ ++ uninstall-info-am uninstall-man ++ ++uninstall-info: uninstall-info-recursive ++ ++uninstall-man: uninstall-man1 ++ ++.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ ++ check-am clean clean-binPROGRAMS clean-generic clean-recursive \ ++ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ ++ dist-shar dist-tarZ dist-zip distcheck distclean \ ++ distclean-compile distclean-generic distclean-hdr \ ++ distclean-recursive distclean-tags distcleancheck distdir \ ++ distuninstallcheck dvi dvi-am html html-am info info-am \ ++ install install-am install-binPROGRAMS install-data \ ++ install-data-am install-docDATA install-exec install-exec-am \ ++ install-info install-info-am install-man install-man1 \ ++ install-strip installcheck installcheck-am installdirs \ ++ installdirs-am maintainer-clean maintainer-clean-generic \ ++ maintainer-clean-recursive mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ ++ tags tags-recursive uninstall uninstall-am \ ++ uninstall-binPROGRAMS uninstall-docDATA uninstall-info-am \ ++ uninstall-man uninstall-man1 + + + debs: +@@ -526,7 +753,6 @@ + log: ChangeLog.usermap + $(CVS2CL) -b --gmt --log-opts "-d'2001-01-01< now'" --window 7200 \ + --usermap ChangeLog.usermap --ignore ChangeLog -f ChangeLog +- + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- chrpath-0.13.orig/acinclude.m4 ++++ chrpath-0.13/acinclude.m4 +@@ -22,7 +22,7 @@ + AC_DEFUN(CHRPATH_LDRPATH_OPTION, + [AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl + case "$target" in +- *-linux*) ++ *-linux*|*-gnu*|*-k*bsd*-gnu) + LDRPATH=-Wl,-rpath, + ;; + *-*-irix*|*-*-osf*) +--- chrpath-0.13.orig/aclocal.m4 ++++ chrpath-0.13/aclocal.m4 +@@ -1,115 +1,916 @@ +-dnl aclocal.m4 generated automatically by aclocal 1.4-p4 ++# generated automatically by aclocal 1.8.5 -*- Autoconf -*- + +-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +-dnl This file is free software; the Free Software Foundation +-dnl gives unlimited permission to copy and/or distribute it, +-dnl with or without modifications, as long as this notice is preserved. +- +-dnl This program is distributed in the hope that it will be useful, +-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +-dnl PARTICULAR PURPOSE. +- +-dnl +-dnl Add macros +-dnl JAPHAR_GREP_CFLAGS +-dnl +- +-dnl +-dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) +-dnl +-dnl From Japhar. Report changes to japhar at hungry.com +-dnl +-AC_DEFUN(JAPHAR_GREP_CFLAGS, +-[case "$CFLAGS" in +-"$1" | "$1 "* | *" $1" | *" $1 "* ) +- ifelse($#, 3, [$3], [:]) +- ;; +-*) +- $2 +- ;; +-esac +-]) +- +-AC_DEFUN(CHRPATH_LDRPATH_OPTION, +-[AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl +-case "$target" in +- *-linux*) +- LDRPATH=-Wl,-rpath, +- ;; +- *-*-irix*|*-*-osf*) +- LDRPATH="-rpath " +- ;; +- *-*-hpux*) +- # Hm, this seem to set runpath on ia64, not rpath +- LDRPATH="-Wl,+b," +- ;; +- *-*-darwin*) +- # No idea how to add rpath/runpath on Darwin +- LDRPATH="" +- ;; +- *) +- LDRPATH="-R " +- ;; +-esac +-AC_SUBST(LDRPATH) +-]) +- +-# Do all the work for Automake. This macro actually does too much -- +-# some checks are only needed if your package does certain things. +-# But this isn't really a big deal. ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ++# Free Software Foundation, Inc. ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++# -*- Autoconf -*- ++# Copyright (C) 2002, 2003 Free Software Foundation, Inc. ++# Generated from amversion.in; do not edit by hand. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ ++# AM_AUTOMAKE_VERSION(VERSION) ++# ---------------------------- ++# Automake X.Y traces this macro to ensure aclocal.m4 has been ++# generated from the m4 files accompanying Automake X.Y. ++AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) ++ ++# AM_SET_CURRENT_AUTOMAKE_VERSION ++# ------------------------------- ++# Call AM_AUTOMAKE_VERSION so it can be traced. ++# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. ++AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], ++ [AM_AUTOMAKE_VERSION([1.8.5])]) ++ ++# AM_AUX_DIR_EXPAND ++ ++# Copyright (C) 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets ++# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to ++# `$srcdir', `$srcdir/..', or `$srcdir/../..'. ++# ++# Of course, Automake must honor this variable whenever it calls a ++# tool from the auxiliary directory. The problem is that $srcdir (and ++# therefore $ac_aux_dir as well) can be either absolute or relative, ++# depending on how configure is run. This is pretty annoying, since ++# it makes $ac_aux_dir quite unusable in subdirectories: in the top ++# source directory, any form will work fine, but in subdirectories a ++# relative path needs to be adjusted first. ++# ++# $ac_aux_dir/missing ++# fails when called from a subdirectory if $ac_aux_dir is relative ++# $top_srcdir/$ac_aux_dir/missing ++# fails if $ac_aux_dir is absolute, ++# fails when called from a subdirectory in a VPATH build with ++# a relative $ac_aux_dir ++# ++# The reason of the latter failure is that $top_srcdir and $ac_aux_dir ++# are both prefixed by $srcdir. In an in-source build this is usually ++# harmless because $srcdir is `.', but things will broke when you ++# start a VPATH build or use an absolute $srcdir. ++# ++# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, ++# iff we strip the leading $srcdir from $ac_aux_dir. That would be: ++# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` ++# and then we would define $MISSING as ++# MISSING="\${SHELL} $am_aux_dir/missing" ++# This will work as long as MISSING is not called from configure, because ++# unfortunately $(top_srcdir) has no meaning in configure. ++# However there are other variables, like CC, which are often used in ++# configure, and could therefore not use this "fixed" $ac_aux_dir. ++# ++# Another solution, used here, is to always expand $ac_aux_dir to an ++# absolute PATH. The drawback is that using absolute paths prevent a ++# configured tree to be moved without reconfiguration. ++ ++AC_DEFUN([AM_AUX_DIR_EXPAND], ++[dnl Rely on autoconf to set up CDPATH properly. ++AC_PREREQ([2.50])dnl ++# expand $ac_aux_dir to an absolute path ++am_aux_dir=`cd $ac_aux_dir && pwd` ++]) ++ ++# AM_CONDITIONAL -*- Autoconf -*- ++ ++# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 6 ++ ++# AM_CONDITIONAL(NAME, SHELL-CONDITION) ++# ------------------------------------- ++# Define a conditional. ++AC_DEFUN([AM_CONDITIONAL], ++[AC_PREREQ(2.52)dnl ++ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ++ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ++AC_SUBST([$1_TRUE]) ++AC_SUBST([$1_FALSE]) ++if $2; then ++ $1_TRUE= ++ $1_FALSE='#' ++else ++ $1_TRUE='#' ++ $1_FALSE= ++fi ++AC_CONFIG_COMMANDS_PRE( ++[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ++ AC_MSG_ERROR([conditional "$1" was never defined. ++Usually this means the macro was only invoked conditionally.]) ++fi])]) ++ ++# serial 7 -*- Autoconf -*- ++ ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++ ++# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ++# written in clear, in which case automake, when reading aclocal.m4, ++# will think it sees a *use*, and therefore will trigger all it's ++# C support machinery. Also note that it means that autoscan, seeing ++# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + +-# serial 1 + +-dnl Usage: +-dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +-AC_DEFUN(AM_INIT_AUTOMAKE, +-[AC_REQUIRE([AC_PROG_INSTALL]) +-PACKAGE=[$1] +-AC_SUBST(PACKAGE) +-VERSION=[$2] +-AC_SUBST(VERSION) +-dnl test to see if srcdir already configured +-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ++# _AM_DEPENDENCIES(NAME) ++# ---------------------- ++# See how the compiler implements dependency checking. ++# NAME is "CC", "CXX", "GCJ", or "OBJC". ++# We try a few techniques and use that to set a single cache variable. ++# ++# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was ++# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular ++# dependency, and given that the user is not expected to run this macro, ++# just rely on AC_PROG_CC. ++AC_DEFUN([_AM_DEPENDENCIES], ++[AC_REQUIRE([AM_SET_DEPDIR])dnl ++AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl ++AC_REQUIRE([AM_MAKE_INCLUDE])dnl ++AC_REQUIRE([AM_DEP_TRACK])dnl ++ ++ifelse([$1], CC, [depcc="$CC" am_compiler_list=], ++ [$1], CXX, [depcc="$CXX" am_compiler_list=], ++ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], ++ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], ++ [depcc="$$1" am_compiler_list=]) ++ ++AC_CACHE_CHECK([dependency style of $depcc], ++ [am_cv_$1_dependencies_compiler_type], ++[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ++ # We make a subdir and do the tests there. Otherwise we can end up ++ # making bogus files that we don't know about and never remove. For ++ # instance it was reported that on HP-UX the gcc test will end up ++ # making a dummy file named `D' -- because `-MD' means `put the output ++ # in D'. ++ mkdir conftest.dir ++ # Copy depcomp to subdir because otherwise we won't find it if we're ++ # using a relative directory. ++ cp "$am_depcomp" conftest.dir ++ cd conftest.dir ++ # We will build objects and dependencies in a subdirectory because ++ # it helps to detect inapplicable dependency modes. For instance ++ # both Tru64's cc and ICC support -MD to output dependencies as a ++ # side effect of compilation, but ICC will put the dependencies in ++ # the current directory while Tru64 will put them in the object ++ # directory. ++ mkdir sub ++ ++ am_cv_$1_dependencies_compiler_type=none ++ if test "$am_compiler_list" = ""; then ++ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` ++ fi ++ for depmode in $am_compiler_list; do ++ # Setup a source with many dependencies, because some compilers ++ # like to wrap large dependency lists on column 80 (with \), and ++ # we should not choose a depcomp mode which is confused by this. ++ # ++ # We need to recreate these files for each test, as the compiler may ++ # overwrite some of them when testing with obscure command lines. ++ # This happens at least with the AIX C compiler. ++ : > sub/conftest.c ++ for i in 1 2 3 4 5 6; do ++ echo '#include "conftst'$i'.h"' >> sub/conftest.c ++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with ++ # Solaris 8's {/usr,}/bin/sh. ++ touch sub/conftst$i.h ++ done ++ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf ++ ++ case $depmode in ++ nosideeffect) ++ # after this tag, mechanisms are not by side-effect, so they'll ++ # only be used when explicitly requested ++ if test "x$enable_dependency_tracking" = xyes; then ++ continue ++ else ++ break ++ fi ++ ;; ++ none) break ;; ++ esac ++ # We check with `-c' and `-o' for the sake of the "dashmstdout" ++ # mode. It turns out that the SunPro C++ compiler does not properly ++ # handle `-M -o', and we need to detect this. ++ if depmode=$depmode \ ++ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ++ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ++ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ ++ >/dev/null 2>conftest.err && ++ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ++ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ++ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then ++ # icc doesn't choke on unknown options, it will just issue warnings ++ # or remarks (even with -Werror). So we grep stderr for any message ++ # that says an option was ignored or not supported. ++ # When given -MP, icc 7.0 and 7.1 complain thusly: ++ # icc: Command line warning: ignoring option '-M'; no argument required ++ # The diagnosis changed in icc 8.0: ++ # icc: Command line remark: option '-MP' not supported ++ if (grep 'ignoring option' conftest.err || ++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else ++ am_cv_$1_dependencies_compiler_type=$depmode ++ break ++ fi ++ fi ++ done ++ ++ cd .. ++ rm -rf conftest.dir ++else ++ am_cv_$1_dependencies_compiler_type=none ++fi ++]) ++AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) ++AM_CONDITIONAL([am__fastdep$1], [ ++ test "x$enable_dependency_tracking" != xno \ ++ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ++]) ++ ++ ++# AM_SET_DEPDIR ++# ------------- ++# Choose a directory name for dependency files. ++# This macro is AC_REQUIREd in _AM_DEPENDENCIES ++AC_DEFUN([AM_SET_DEPDIR], ++[AC_REQUIRE([AM_SET_LEADING_DOT])dnl ++AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ++]) ++ ++ ++# AM_DEP_TRACK ++# ------------ ++AC_DEFUN([AM_DEP_TRACK], ++[AC_ARG_ENABLE(dependency-tracking, ++[ --disable-dependency-tracking speeds up one-time build ++ --enable-dependency-tracking do not reject slow dependency extractors]) ++if test "x$enable_dependency_tracking" != xno; then ++ am_depcomp="$ac_aux_dir/depcomp" ++ AMDEPBACKSLASH='\' ++fi ++AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) ++AC_SUBST([AMDEPBACKSLASH]) ++]) ++ ++# Generate code to set up dependency tracking. -*- Autoconf -*- ++ ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++#serial 2 ++ ++# _AM_OUTPUT_DEPENDENCY_COMMANDS ++# ------------------------------ ++AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], ++[for mf in $CONFIG_FILES; do ++ # Strip MF so we end up with the name of the file. ++ mf=`echo "$mf" | sed -e 's/:.*$//'` ++ # Check whether this is an Automake generated Makefile or not. ++ # We used to match only the files named `Makefile.in', but ++ # some people rename them; so instead we look at the file content. ++ # Grep'ing the first line is not enough: some people post-process ++ # each Makefile.in and add a new line on top of each file to say so. ++ # So let's grep whole file. ++ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then ++ dirpart=`AS_DIRNAME("$mf")` ++ else ++ continue ++ fi ++ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue ++ # Extract the definition of DEP_FILES from the Makefile without ++ # running `make'. ++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` ++ test -z "$DEPDIR" && continue ++ # When using ansi2knr, U may be empty or an underscore; expand it ++ U=`sed -n 's/^U = //p' < "$mf"` ++ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" ++ # We invoke sed twice because it is the simplest approach to ++ # changing $(DEPDIR) to its actual value in the expansion. ++ for file in `sed -n ' ++ /^DEP_FILES = .*\\\\$/ { ++ s/^DEP_FILES = // ++ :loop ++ s/\\\\$// ++ p ++ n ++ /\\\\$/ b loop ++ p ++ } ++ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ ++ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do ++ # Make sure the directory exists. ++ test -f "$dirpart/$file" && continue ++ fdir=`AS_DIRNAME(["$file"])` ++ AS_MKDIR_P([$dirpart/$fdir]) ++ # echo "creating $dirpart/$file" ++ echo '# dummy' > "$dirpart/$file" ++ done ++done ++])# _AM_OUTPUT_DEPENDENCY_COMMANDS ++ ++ ++# AM_OUTPUT_DEPENDENCY_COMMANDS ++# ----------------------------- ++# This macro should only be invoked once -- use via AC_REQUIRE. ++# ++# This code is only required when automatic dependency tracking ++# is enabled. FIXME. This creates each `.P' file that we will ++# need in order to bootstrap the dependency handling code. ++AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ++[AC_CONFIG_COMMANDS([depfiles], ++ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], ++ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ++]) ++ ++# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- ++ ++# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 7 ++ ++# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. ++AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) ++ ++# Do all the work for Automake. -*- Autoconf -*- ++ ++# This macro actually does too much some checks are only needed if ++# your package does certain things. But this isn't really a big deal. ++ ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 11 ++ ++# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) ++# AM_INIT_AUTOMAKE([OPTIONS]) ++# ----------------------------------------------- ++# The call with PACKAGE and VERSION arguments is the old style ++# call (pre autoconf-2.50), which is being phased out. PACKAGE ++# and VERSION should now be passed to AC_INIT and removed from ++# the call to AM_INIT_AUTOMAKE. ++# We support both call styles for the transition. After ++# the next Automake release, Autoconf can make the AC_INIT ++# arguments mandatory, and then we can depend on a new Autoconf ++# release and drop the old call support. ++AC_DEFUN([AM_INIT_AUTOMAKE], ++[AC_PREREQ([2.58])dnl ++dnl Autoconf wants to disallow AM_ names. We explicitly allow ++dnl the ones we care about. ++m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl ++AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl ++AC_REQUIRE([AC_PROG_INSTALL])dnl ++# test to see if srcdir already configured ++if test "`cd $srcdir && pwd`" != "`pwd`" && ++ test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +-ifelse([$3],, +-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +-AC_REQUIRE([AM_SANITY_CHECK]) +-AC_REQUIRE([AC_ARG_PROGRAM]) +-dnl FIXME This is truly gross. +-missing_dir=`cd $ac_aux_dir && pwd` +-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +-AC_REQUIRE([AC_PROG_MAKE_SET])]) ++ ++# test whether we have cygpath ++if test -z "$CYGPATH_W"; then ++ if (cygpath --version) >/dev/null 2>/dev/null; then ++ CYGPATH_W='cygpath -w' ++ else ++ CYGPATH_W=echo ++ fi ++fi ++AC_SUBST([CYGPATH_W]) ++ ++# Define the identity of the package. ++dnl Distinguish between old-style and new-style calls. ++m4_ifval([$2], ++[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl ++ AC_SUBST([PACKAGE], [$1])dnl ++ AC_SUBST([VERSION], [$2])], ++[_AM_SET_OPTIONS([$1])dnl ++ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl ++ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl ++ ++_AM_IF_OPTION([no-define],, ++[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ++ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl ++ ++# Some tools Automake needs. ++AC_REQUIRE([AM_SANITY_CHECK])dnl ++AC_REQUIRE([AC_ARG_PROGRAM])dnl ++AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) ++AM_MISSING_PROG(AUTOCONF, autoconf) ++AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) ++AM_MISSING_PROG(AUTOHEADER, autoheader) ++AM_MISSING_PROG(MAKEINFO, makeinfo) ++AM_MISSING_PROG(AMTAR, tar) ++AM_PROG_INSTALL_SH ++AM_PROG_INSTALL_STRIP ++AC_REQUIRE([AM_PROG_MKDIR_P])dnl ++# We need awk for the "check" target. The system "awk" is bad on ++# some platforms. ++AC_REQUIRE([AC_PROG_AWK])dnl ++AC_REQUIRE([AC_PROG_MAKE_SET])dnl ++AC_REQUIRE([AM_SET_LEADING_DOT])dnl ++ ++_AM_IF_OPTION([no-dependencies],, ++[AC_PROVIDE_IFELSE([AC_PROG_CC], ++ [_AM_DEPENDENCIES(CC)], ++ [define([AC_PROG_CC], ++ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl ++AC_PROVIDE_IFELSE([AC_PROG_CXX], ++ [_AM_DEPENDENCIES(CXX)], ++ [define([AC_PROG_CXX], ++ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ++]) ++]) ++ ++ ++# When config.status generates a header, we must update the stamp-h file. ++# This file resides in the same directory as the config header ++# that is generated. The stamp files are numbered to have different names. ++ ++# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the ++# loop where config.status creates the headers, so we can generate ++# our stamp files there. ++AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], ++[# Compute $1's index in $config_headers. ++_am_stamp_count=1 ++for _am_header in $config_headers :; do ++ case $_am_header in ++ $1 | $1:* ) ++ break ;; ++ * ) ++ _am_stamp_count=`expr $_am_stamp_count + 1` ;; ++ esac ++done ++echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) ++ ++# AM_PROG_INSTALL_SH ++# ------------------ ++# Define $install_sh. ++ ++# Copyright (C) 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++AC_DEFUN([AM_PROG_INSTALL_SH], ++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ++install_sh=${install_sh-"$am_aux_dir/install-sh"} ++AC_SUBST(install_sh)]) ++ ++# -*- Autoconf -*- ++# Copyright (C) 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 1 ++ ++# Check whether the underlying file-system supports filenames ++# with a leading dot. For instance MS-DOS doesn't. ++AC_DEFUN([AM_SET_LEADING_DOT], ++[rm -rf .tst 2>/dev/null ++mkdir .tst 2>/dev/null ++if test -d .tst; then ++ am__leading_dot=. ++else ++ am__leading_dot=_ ++fi ++rmdir .tst 2>/dev/null ++AC_SUBST([am__leading_dot])]) ++ ++# Add --enable-maintainer-mode option to configure. ++# From Jim Meyering ++ ++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 3 ++ ++AC_DEFUN([AM_MAINTAINER_MODE], ++[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ++ dnl maintainer-mode is disabled by default ++ AC_ARG_ENABLE(maintainer-mode, ++[ --enable-maintainer-mode enable make rules and dependencies not useful ++ (and sometimes confusing) to the casual installer], ++ USE_MAINTAINER_MODE=$enableval, ++ USE_MAINTAINER_MODE=no) ++ AC_MSG_RESULT([$USE_MAINTAINER_MODE]) ++ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) ++ MAINT=$MAINTAINER_MODE_TRUE ++ AC_SUBST(MAINT)dnl ++] ++) ++ ++AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) ++ ++# Check to see how 'make' treats includes. -*- Autoconf -*- ++ ++# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 2 ++ ++# AM_MAKE_INCLUDE() ++# ----------------- ++# Check to see how make treats includes. ++AC_DEFUN([AM_MAKE_INCLUDE], ++[am_make=${MAKE-make} ++cat > confinc << 'END' ++am__doit: ++ @echo done ++.PHONY: am__doit ++END ++# If we don't find an include directive, just comment out the code. ++AC_MSG_CHECKING([for style of include used by $am_make]) ++am__include="#" ++am__quote= ++_am_result=none ++# First try GNU make style include. ++echo "include confinc" > confmf ++# We grep out `Entering directory' and `Leaving directory' ++# messages which can occur if `w' ends up in MAKEFLAGS. ++# In particular we don't look at `^make:' because GNU make might ++# be invoked under some other name (usually "gmake"), in which ++# case it prints its new name instead of `make'. ++if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then ++ am__include=include ++ am__quote= ++ _am_result=GNU ++fi ++# Now try BSD make style include. ++if test "$am__include" = "#"; then ++ echo '.include "confinc"' > confmf ++ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then ++ am__include=.include ++ am__quote="\"" ++ _am_result=BSD ++ fi ++fi ++AC_SUBST([am__include]) ++AC_SUBST([am__quote]) ++AC_MSG_RESULT([$_am_result]) ++rm -f confinc confmf ++]) ++ ++# -*- Autoconf -*- ++ ++ ++# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 3 ++ ++# AM_MISSING_PROG(NAME, PROGRAM) ++# ------------------------------ ++AC_DEFUN([AM_MISSING_PROG], ++[AC_REQUIRE([AM_MISSING_HAS_RUN]) ++$1=${$1-"${am_missing_run}$2"} ++AC_SUBST($1)]) ++ ++ ++# AM_MISSING_HAS_RUN ++# ------------------ ++# Define MISSING if not defined so far and test if it supports --run. ++# If it does, set am_missing_run to use it, otherwise, to nothing. ++AC_DEFUN([AM_MISSING_HAS_RUN], ++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ++test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" ++# Use eval to expand $SHELL ++if eval "$MISSING --run true"; then ++ am_missing_run="$MISSING --run " ++else ++ am_missing_run= ++ AC_MSG_WARN([`missing' script is too old or missing]) ++fi ++]) ++ ++# AM_PROG_MKDIR_P ++# --------------- ++# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. ++ ++# Copyright (C) 2003, 2004 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories ++# created by `make install' are always world readable, even if the ++# installer happens to have an overly restrictive umask (e.g. 077). ++# This was a mistake. There are at least two reasons why we must not ++# use `-m 0755': ++# - it causes special bits like SGID to be ignored, ++# - it may be too restrictive (some setups expect 775 directories). ++# ++# Do not use -m 0755 and let people choose whatever they expect by ++# setting umask. ++# ++# We cannot accept any implementation of `mkdir' that recognizes `-p'. ++# Some implementations (such as Solaris 8's) are not thread-safe: if a ++# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' ++# concurrently, both version can detect that a/ is missing, but only ++# one can create it and the other will error out. Consequently we ++# restrict ourselves to GNU make (using the --version option ensures ++# this.) ++AC_DEFUN([AM_PROG_MKDIR_P], ++[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then ++ # Keeping the `.' argument allows $(mkdir_p) to be used without ++ # argument. Indeed, we sometimes output rules like ++ # $(mkdir_p) $(somedir) ++ # where $(somedir) is conditionally defined. ++ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more ++ # expensive solution, as it forces Make to start a sub-shell.) ++ mkdir_p='mkdir -p -- .' ++else ++ # On NextStep and OpenStep, the `mkdir' command does not ++ # recognize any option. It will interpret all options as ++ # directories to create, and then abort because `.' already ++ # exists. ++ for d in ./-p ./--version; ++ do ++ test -d $d && rmdir $d ++ done ++ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. ++ if test -f "$ac_aux_dir/mkinstalldirs"; then ++ mkdir_p='$(mkinstalldirs)' ++ else ++ mkdir_p='$(install_sh) -d' ++ fi ++fi ++AC_SUBST([mkdir_p])]) ++ ++# Helper functions for option handling. -*- Autoconf -*- ++ ++# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 2 ++ ++# _AM_MANGLE_OPTION(NAME) ++# ----------------------- ++AC_DEFUN([_AM_MANGLE_OPTION], ++[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) ++ ++# _AM_SET_OPTION(NAME) ++# ------------------------------ ++# Set option NAME. Presently that only means defining a flag for this option. ++AC_DEFUN([_AM_SET_OPTION], ++[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) ++ ++# _AM_SET_OPTIONS(OPTIONS) ++# ---------------------------------- ++# OPTIONS is a space-separated list of Automake options. ++AC_DEFUN([_AM_SET_OPTIONS], ++[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) ++ ++# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) ++# ------------------------------------------- ++# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. ++AC_DEFUN([_AM_IF_OPTION], ++[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + + # + # Check to make sure that the build environment is sane. + # + +-AC_DEFUN(AM_SANITY_CHECK, ++# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 3 ++ ++# AM_SANITY_CHECK ++# --------------- ++AC_DEFUN([AM_SANITY_CHECK], + [AC_MSG_CHECKING([whether build environment is sane]) + # Just in case + sleep 1 +-echo timestamp > conftestfile ++echo timestamp > conftest.file + # Do `set' in a subshell so we don't clobber the current shell's + # arguments. Must try -L first in case configure is actually a + # symlink; some systems play weird games with the mod time of symlinks + # (eg FreeBSD returns the mod time of the symlink's containing + # directory). + if ( +- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` +- if test "[$]*" = "X"; then ++ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` ++ if test "$[*]" = "X"; then + # -L didn't work. +- set X `ls -t $srcdir/configure conftestfile` ++ set X `ls -t $srcdir/configure conftest.file` + fi +- if test "[$]*" != "X $srcdir/configure conftestfile" \ +- && test "[$]*" != "X conftestfile $srcdir/configure"; then ++ rm -f conftest.file ++ if test "$[*]" != "X $srcdir/configure conftest.file" \ ++ && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a +@@ -119,7 +920,7 @@ + alias in your environment]) + fi + +- test "[$]2" = conftestfile ++ test "$[2]" = conftest.file + ) + then + # Ok. +@@ -128,78 +929,45 @@ + AC_MSG_ERROR([newly created file is older than distributed files! + Check your system clock]) + fi +-rm -f conftest* + AC_MSG_RESULT(yes)]) + +-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +-dnl The program must properly implement --version. +-AC_DEFUN(AM_MISSING_PROG, +-[AC_MSG_CHECKING(for working $2) +-# Run test in a subshell; some versions of sh will print an error if +-# an executable is not found, even if stderr is redirected. +-# Redirect stdin to placate older versions of autoconf. Sigh. +-if ($2 --version) < /dev/null > /dev/null 2>&1; then +- $1=$2 +- AC_MSG_RESULT(found) +-else +- $1="$3/missing $2" +- AC_MSG_RESULT(missing) +-fi +-AC_SUBST($1)]) ++# AM_PROG_INSTALL_STRIP + +-# Like AC_CONFIG_HEADER, but automatically create stamp file. +- +-AC_DEFUN(AM_CONFIG_HEADER, +-[AC_PREREQ([2.12]) +-AC_CONFIG_HEADER([$1]) +-dnl When config.status generates a header, we must update the stamp-h file. +-dnl This file resides in the same directory as the config header +-dnl that is generated. We must strip everything past the first ":", +-dnl and everything past the last "/". +-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +-<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +-<>; do +- case " <<$>>CONFIG_HEADERS " in +- *" <<$>>am_file "*<<)>> +- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx +- ;; +- esac +- am_indx=`expr "<<$>>am_indx" + 1` +-done<<>>dnl>>) +-changequote([,]))]) ++# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +-# Add --enable-maintainer-mode option to configure. +-# From Jim Meyering +- +-# serial 1 +- +-AC_DEFUN(AM_MAINTAINER_MODE, +-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) +- dnl maintainer-mode is disabled by default +- AC_ARG_ENABLE(maintainer-mode, +-[ --enable-maintainer-mode enable make rules and dependencies not useful +- (and sometimes confusing) to the casual installer], +- USE_MAINTAINER_MODE=$enableval, +- USE_MAINTAINER_MODE=no) +- AC_MSG_RESULT($USE_MAINTAINER_MODE) +- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) +- MAINT=$MAINTAINER_MODE_TRUE +- AC_SUBST(MAINT)dnl +-] +-) +- +-# Define a conditional. +- +-AC_DEFUN(AM_CONDITIONAL, +-[AC_SUBST($1_TRUE) +-AC_SUBST($1_FALSE) +-if $2; then +- $1_TRUE= +- $1_FALSE='#' +-else +- $1_TRUE='#' +- $1_FALSE= +-fi]) ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# One issue with vendor `install' (even GNU) is that you can't ++# specify the program used to strip binaries. This is especially ++# annoying in cross-compiling environments, where the build's strip ++# is unlikely to handle the host's binaries. ++# Fortunately install-sh will honor a STRIPPROG variable, so we ++# always use install-sh in `make install-strip', and initialize ++# STRIPPROG with the value of the STRIP variable (set by the user). ++AC_DEFUN([AM_PROG_INSTALL_STRIP], ++[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl ++# Installed binaries are usually stripped using `strip' when the user ++# run `make install-strip'. However `strip' might not be the right ++# tool to use in cross-compilation environments, therefore Automake ++# will honor the `STRIP' environment variable to overrule this program. ++dnl Don't test for $cross_compiling = yes, because it might be `maybe'. ++if test "$cross_compiling" != no; then ++ AC_CHECK_TOOL([STRIP], [strip], :) ++fi ++INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" ++AC_SUBST([INSTALL_STRIP_PROGRAM])]) + ++m4_include([acinclude.m4]) +--- chrpath-0.13.orig/config.guess ++++ chrpath-0.13/config.guess +@@ -1,9 +1,9 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +-timestamp='2002-03-20' ++timestamp='2005-08-03' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -17,13 +17,15 @@ + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + ++ + # Originally written by Per Bothner . + # Please send patches to . Submit a context + # diff and a properly formatted ChangeLog entry. +@@ -53,7 +55,7 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO +@@ -66,11 +68,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -88,30 +90,42 @@ + exit 1 + fi + ++trap 'exit 1' 1 2 15 + +-dummy=dummy-$$ +-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 ++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a ++# compiler to aid in system detection is discouraged as it requires ++# temporary files to be created and, as you can see below, it is a ++# headache to deal with in a portable fashion. + +-# CC_FOR_BUILD -- compiler used by this script. + # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still + # use `HOST_CC' if defined, but it is deprecated. + +-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in +- ,,) echo "int dummy(){}" > $dummy.c ; ++# Portable tmp directory creation inspired by the Autoconf team. ++ ++set_cc_for_build=' ++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ++: ${TMPDIR=/tmp} ; ++ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ++dummy=$tmp/dummy ; ++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; ++case $CC_FOR_BUILD,$HOST_CC,$CC in ++ ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do +- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; +- if test $? = 0 ; then ++ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; +- rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac' ++esac ; set_cc_for_build= ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi at noc.rutgers.edu 1994-08-24) +@@ -142,6 +156,7 @@ + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in ++ armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; +@@ -167,141 +182,125 @@ + ;; + esac + # The OS release +- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ # Debian GNU/NetBSD machines have a different userland, and ++ # thus, need a distinct triplet. However, they do not need ++ # kernel version information, so it can be replaced with a ++ # suitable tag, in the style of linux-gnu. ++ case "${UNAME_VERSION}" in ++ Debian*) ++ release='-gnu' ++ ;; ++ *) ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ ;; ++ esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mipseb-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerppc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac ++ # According to Compaq, /usr/sbin/psrinfo has been available on ++ # OSF/1 and Tru64 systems produced since 1995. I hope that ++ # covers most systems running today. This code pipes the CPU ++ # types through head -n 1, so we only detect the type of CPU 0. ++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` ++ case "$ALPHA_CPU_TYPE" in ++ "EV4 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "EV4.5 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "LCA4 (21066/21068)") ++ UNAME_MACHINE="alpha" ;; ++ "EV5 (21164)") ++ UNAME_MACHINE="alphaev5" ;; ++ "EV5.6 (21164A)") ++ UNAME_MACHINE="alphaev56" ;; ++ "EV5.6 (21164PC)") ++ UNAME_MACHINE="alphapca56" ;; ++ "EV5.7 (21164PC)") ++ UNAME_MACHINE="alphapca57" ;; ++ "EV6 (21264)") ++ UNAME_MACHINE="alphaev6" ;; ++ "EV6.7 (21264A)") ++ UNAME_MACHINE="alphaev67" ;; ++ "EV6.8CB (21264C)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8AL (21264B)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8CX (21264D)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.9A (21264/EV69A)") ++ UNAME_MACHINE="alphaev69" ;; ++ "EV7 (21364)") ++ UNAME_MACHINE="alphaev7" ;; ++ "EV7.9 (21364A)") ++ UNAME_MACHINE="alphaev79" ;; ++ esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- cat <$dummy.s +- .data +-\$Lformat: +- .byte 37,100,45,37,120,10,0 # "%d-%x\n" +- +- .text +- .globl main +- .align 4 +- .ent main +-main: +- .frame \$30,16,\$26,0 +- ldgp \$29,0(\$27) +- .prologue 1 +- .long 0x47e03d80 # implver \$0 +- lda \$2,-1 +- .long 0x47e20c21 # amask \$2,\$1 +- lda \$16,\$Lformat +- mov \$0,\$17 +- not \$1,\$18 +- jsr \$26,printf +- ldgp \$29,0(\$26) +- mov 0,\$16 +- jsr \$26,exit +- .end main +-EOF +- eval $set_cc_for_build +- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null +- if test "$?" = 0 ; then +- case `./$dummy` in +- 0-0) +- UNAME_MACHINE="alpha" +- ;; +- 1-0) +- UNAME_MACHINE="alphaev5" +- ;; +- 1-1) +- UNAME_MACHINE="alphaev56" +- ;; +- 1-101) +- UNAME_MACHINE="alphapca56" +- ;; +- 2-303) +- UNAME_MACHINE="alphaev6" +- ;; +- 2-307) +- UNAME_MACHINE="alphaev67" +- ;; +- 2-1307) +- UNAME_MACHINE="alphaev68" +- ;; +- esac +- fi +- rm -f $dummy.s $dummy +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm:riscos:*:*|arm:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -309,25 +308,32 @@ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; ++ exit ;; ++ DRS?6000:unix:4.0:6*) ++ echo sparc-icl-nx6 ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) ++ case `/usr/bin/uname -p` in ++ sparc) echo sparc-icl-nx7; exit ;; ++ esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -336,10 +342,10 @@ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 +@@ -351,10 +357,10 @@ + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac +- exit 0 ;; ++ exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor +@@ -365,37 +371,40 @@ + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 +- exit 0 ;; ++ exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -419,27 +428,33 @@ + exit (-1); + } + EOF +- $CC_FOR_BUILD $dummy.c -o $dummy \ +- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && rm -f $dummy.c $dummy && exit 0 +- rm -f $dummy.c $dummy ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax +- exit 0 ;; ++ exit ;; ++ Motorola:*:4.3:PL8-*) ++ echo powerpc-harris-powermax ++ exit ;; ++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) ++ echo powerpc-harris-powermax ++ exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix +- exit 0 ;; ++ exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 +- exit 0 ;; ++ exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 +- exit 0 ;; ++ exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` +@@ -455,29 +470,29 @@ + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +- exit 0 ;; ++ exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 +- exit 0 ;; ++ exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd +- exit 0 ;; ++ exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` +- exit 0 ;; ++ exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. +- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id +- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix +- exit 0 ;; ++ exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` +@@ -485,7 +500,7 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build +@@ -500,15 +515,18 @@ + exit(0); + } + EOF +- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 +- rm -f $dummy.c $dummy +- echo rs6000-ibm-aix3.2.5 ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi +- exit 0 ;; ++ exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then +@@ -522,28 +540,28 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix +- exit 0 ;; ++ exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 +- exit 0 ;; ++ exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to +- exit 0 ;; # report: romp-ibm BSD 4.3 ++ exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx +- exit 0 ;; ++ exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 +- exit 0 ;; ++ exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd +- exit 0 ;; ++ exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 +- exit 0 ;; ++ exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in +@@ -599,17 +617,37 @@ + exit (0); + } + EOF +- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` +- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi +- rm -f $dummy.c $dummy @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Wed Apr 1 21:52:50 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Wed, 01 Apr 2009 19:52:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4132] csw/mgar/pkg/java/ajcdigester/trunk/Makefile Message-ID: Revision: 4132 http://gar.svn.sourceforge.net/gar/?rev=4132&view=rev Author: wbonnet Date: 2009-04-01 19:52:49 +0000 (Wed, 01 Apr 2009) Log Message: ----------- Remove dependencies to ajccollect Modified Paths: -------------- csw/mgar/pkg/java/ajcdigester/trunk/Makefile Modified: csw/mgar/pkg/java/ajcdigester/trunk/Makefile =================================================================== --- csw/mgar/pkg/java/ajcdigester/trunk/Makefile 2009-04-01 17:01:20 UTC (rev 4131) +++ csw/mgar/pkg/java/ajcdigester/trunk/Makefile 2009-04-01 19:52:49 UTC (rev 4132) @@ -25,7 +25,7 @@ SPKG_DESC_CSWajcdigesterdoc = $(DESCRIPTION) documentation package # Defines dependencies -REQUIRED_PKGS_CSWajcdigester = CSWajclogging CSWajccollect CSWajcbeanutils +REQUIRED_PKGS_CSWajcdigester = CSWajclogging CSWajcbeanutils # Defines package content PKGFILES_CSWajcdigester = $(prefix)/share/doc/$(GARNAME)/License.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 1 21:58:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 01 Apr 2009 19:58:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4133] csw/mgar/pkg/m4/trunk Message-ID: Revision: 4133 http://gar.svn.sourceforge.net/gar/?rev=4133&view=rev Author: dmichelsen Date: 2009-04-01 19:58:08 +0000 (Wed, 01 Apr 2009) Log Message: ----------- m4: Update tp 1.4.13, move to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/m4/trunk/Makefile csw/mgar/pkg/m4/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec Property Changed: ---------------- csw/mgar/pkg/m4/trunk/ Property changes on: csw/mgar/pkg/m4/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/m4/trunk/Makefile =================================================================== --- csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 19:52:49 UTC (rev 4132) +++ csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 19:58:08 UTC (rev 4133) @@ -1,5 +1,5 @@ GARNAME = m4 -GARVERSION = 1.4.11 +GARVERSION = 1.4.13 CATEGORIES = utils DESCRIPTION = GNU m4 Unix macro processor @@ -12,17 +12,19 @@ MASTER_SITES = ftp://ftp.gnu.org/gnu/m4/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWgm4,) +PACKAGE = CSWgm4 + +SPKG_SOURCEURL = http://www.gnu.org/software/m4/ + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +REQUIRED_PKGS = CSWlibsigsegv + CONFIGURE_ARGS = $(DIRPATHS) --program-prefix=g TEST_SCRIPTS = +EXTRA_MERGE_EXCLUDE_FILES = $(libdir)/charset.alias + include gar/category.mk - -post-install: - @rm -f $(DESTDIR)$(libdir)/charset.alias - @rm -f $(DESTDIR)$(sharedstatedir)/info/dir - @$(MAKECOOKIE) Modified: csw/mgar/pkg/m4/trunk/checksums =================================================================== --- csw/mgar/pkg/m4/trunk/checksums 2009-04-01 19:52:49 UTC (rev 4132) +++ csw/mgar/pkg/m4/trunk/checksums 2009-04-01 19:58:08 UTC (rev 4133) @@ -1,2 +1 @@ -988aa098326d5f2b5b5aa4b3efe8d528 download/m4-1.4.11.tar.gz -322e3b9fbcb90ab77c20c60d23757728 download/CSWgm4.gspec +e9e36108b5f9855a82ca4a07ebc0fd2e download/m4-1.4.13.tar.gz Deleted: csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec =================================================================== --- csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec 2009-04-01 19:52:49 UTC (rev 4132) +++ csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec 2009-04-01 19:58:08 UTC (rev 4133) @@ -1,4 +0,0 @@ -%var bitname gm4 -%var pkgname CSWgm4 -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 1 22:23:29 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 01 Apr 2009 20:23:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4134] csw/mgar/pkg/m4/trunk/Makefile Message-ID: Revision: 4134 http://gar.svn.sourceforge.net/gar/?rev=4134&view=rev Author: dmichelsen Date: 2009-04-01 20:23:29 +0000 (Wed, 01 Apr 2009) Log Message: ----------- gm4: Fix package name Modified Paths: -------------- csw/mgar/pkg/m4/trunk/Makefile Modified: csw/mgar/pkg/m4/trunk/Makefile =================================================================== --- csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 19:58:08 UTC (rev 4133) +++ csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 20:23:29 UTC (rev 4134) @@ -13,7 +13,7 @@ MASTER_SITES = ftp://ftp.gnu.org/gnu/m4/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PACKAGE = CSWgm4 +PACKAGES = CSWgm4 SPKG_SOURCEURL = http://www.gnu.org/software/m4/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:00:46 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:00:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4135] csw/mgar/pkg/python/trunk Message-ID: Revision: 4135 http://gar.svn.sourceforge.net/gar/?rev=4135&view=rev Author: valholla Date: 2009-04-01 21:00:45 +0000 (Wed, 01 Apr 2009) Log Message: ----------- bugfix 3510 and 3579 Modified Paths: -------------- csw/mgar/pkg/python/trunk/Makefile csw/mgar/pkg/python/trunk/checksums csw/mgar/pkg/python/trunk/files/modules.diff Modified: csw/mgar/pkg/python/trunk/Makefile =================================================================== --- csw/mgar/pkg/python/trunk/Makefile 2009-04-01 20:23:29 UTC (rev 4134) +++ csw/mgar/pkg/python/trunk/Makefile 2009-04-01 21:00:45 UTC (rev 4135) @@ -47,12 +47,15 @@ DEPENDS += lib/db DEPENDS += lib/gdbm +NOISALIST = 1 +LD_OPTIONS = -R/opt/csw/lib +export LD_OPTIONS CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-shared CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --enable-unicode=ucs4 CONFIGURE_ARGS += --with-fpectl -CONFIGURE_ARGS += LDFLAGS='-R/opt/csw/lib/\$ISALIST -R/opt/csw/lib -L/opt/csw/lib' +CONFIGURE_ARGS += LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib' PKGFILES_CSWidle = $(libdir)/python(\d+(?:\.\d+)*)/idlelib/.* PKGFILES_CSWidle += $(bindir)/idle Modified: csw/mgar/pkg/python/trunk/checksums =================================================================== --- csw/mgar/pkg/python/trunk/checksums 2009-04-01 20:23:29 UTC (rev 4134) +++ csw/mgar/pkg/python/trunk/checksums 2009-04-01 21:00:45 UTC (rev 4135) @@ -3,7 +3,7 @@ 5664b3970307d7d39d8d4061e7dccbb0 download/libpython2.5.so.1.0-isa-i386 42dd6523beb94a805d5764ae1276091c download/faqwiz.diff 33f4094ee46ce865d3973a197f3fb4a0 download/makesetup.diff -5bc782aa89e5bc218ec154c68aa6801b download/modules.diff +ff716b13c8b0965f92550732151e545a download/modules.diff 369c5593c0c0edda03f3c1844788dbee download/multiprocess.diff 05724da367b025ce525de2bb704af6e3 download/pyport.diff 296f46fb4a6a392093120cd86675309b download/setup.diff Modified: csw/mgar/pkg/python/trunk/files/modules.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-01 20:23:29 UTC (rev 4134) +++ csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-01 21:00:45 UTC (rev 4135) @@ -6,10 +6,10 @@ -#_curses _cursesmodule.c -lcurses -ltermcap +*shared* -+_curses _cursesmodule.c -lcurses -ltermcap ++_curses _cursesmodule.c -R/opt/csw/lib -L/opt/csw/lib -lncurses -lxtermcap # Wrapper for the panel library that's part of ncurses and SYSV curses. -#_curses_panel _curses_panel.c -lpanel -lncurses -+_curses_panel _curses_panel.c -lpanel -lcurses -ltermcap ++_curses_panel _curses_panel.c -R/opt/csw/lib -L/opt/csw/lib -lpanel -lncurses -lxtermcap # Generic (SunOS / SVR4) dynamic loading module. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:06:38 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:06:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4136] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4136 http://gar.svn.sourceforge.net/gar/?rev=4136&view=rev Author: valholla Date: 2009-04-01 21:06:38 +0000 (Wed, 01 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/checksums Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:00:45 UTC (rev 4135) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:06:38 UTC (rev 4136) @@ -20,15 +20,15 @@ php5_bin = $(php5_root)/bin php5_lib = $(php5_root)/lib -MASTER_SITES = http://us.php.net/distributions/ +MASTER_SITES = http://us.php.net/distributions/ SPKG_SOURCEURL = http://www.php.net/downloads.php -DISTFILES += $(GARNAME)-$(GARVERSION).tar.bz2 +DISTFILES += $(GARNAME)-$(GARVERSION).tar.bz2 -INSTALL_ENV += INSTALL_ROOT=$(DESTDIR) -PHP5ROOT = $(DESTDIR)$(prefix)/php5 +INSTALL_ENV += INSTALL_ROOT=$(DESTDIR) +PHP5ROOT = $(DESTDIR)$(prefix)/php5 -STRIP_DIRS += $(PHP5ROOT)/lib/php/extensions/*/ -STRIP_DIRS += $(PHP5ROOT)/bin +STRIP_DIRS += $(PHP5ROOT)/lib/php/extensions/*/ +STRIP_DIRS += $(PHP5ROOT)/bin # Auxilliary files DISTFILES += php.ini.CSW phpext pear.conf.CSW @@ -53,6 +53,7 @@ PKGFILES_CSWphp5devel += $(prefix)/php5/man/.* PATCHFILES += configure.diff +#PATCHFILES += php-bug-45557-fix.diff # PHP Extensions EXTDIRLIST = $(shell ls -d extensions/*) @@ -62,6 +63,7 @@ EXTRA_LIB += $(prefix)/bdb44/lib EXTRA_INC += $(prefix)/bdb44/lib +NOISALIST = 1 DISTFILES += fixme.sh CONFIGURE_ARGS += --prefix=$(prefix)/php5 Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:00:45 UTC (rev 4135) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:06:38 UTC (rev 4136) @@ -6,7 +6,8 @@ 89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh 8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall 41ec540885de7c34625768aa1fb9682b download/fixme.sh -ab08e2ba62667bf13fa236099e433e84 download/configure.diff +55567f364408f345f387a749fd73c09e download/configure.diff +a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff 2206431e47c2075c0b9c4a12de5cf791 download/odbc.diff 230126f76ee6400ccf225bb6a8243532 download/pdopgsql.diff 13db46097c9686302bebf160e2d26ed2 download/pgsql.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:07:39 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:07:39 +0000 Subject: [csw-devel] SF.net SVN: gar:[4137] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4137 http://gar.svn.sourceforge.net/gar/?rev=4137&view=rev Author: valholla Date: 2009-04-01 21:07:39 +0000 (Wed, 01 Apr 2009) Log Message: ----------- bugfix 3499 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:06:38 UTC (rev 4136) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:07:39 UTC (rev 4137) @@ -53,7 +53,7 @@ PKGFILES_CSWphp5devel += $(prefix)/php5/man/.* PATCHFILES += configure.diff -#PATCHFILES += php-bug-45557-fix.diff +PATCHFILES += php-bug-45557-fix.diff # PHP Extensions EXTDIRLIST = $(shell ls -d extensions/*) Added: csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff =================================================================== --- csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff (rev 0) +++ csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff 2009-04-01 21:07:39 UTC (rev 4137) @@ -0,0 +1,60 @@ +diff -up php-5.2.9/ext/libxml/libxml.c.visibility php-5.2.9/ext/libxml/libxml.c +--- php-5.2.9/ext/libxml/libxml.c.visibility 2008-01-30 16:31:42.000000000 +0100 ++++ php-5.2.9/ext/libxml/libxml.c 2008-07-18 20:23:14.000000000 +0200 +@@ -523,7 +523,7 @@ static void php_libxml_internal_error_ha + } + } + +-void php_libxml_ctx_error(void *ctx, const char *msg, ...) ++PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...) + { + va_list args; + va_start(args, msg); +@@ -531,7 +531,7 @@ void php_libxml_ctx_error(void *ctx, con + va_end(args); + } + +-void php_libxml_ctx_warning(void *ctx, const char *msg, ...) ++PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...) + { + va_list args; + va_start(args, msg); +@@ -974,7 +974,7 @@ PHP_LIBXML_API int php_libxml_decrement_ + return ret_refcount; + } + +-void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC) ++PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC) + { + if (!node) { + return; +@@ -1010,7 +1010,7 @@ void php_libxml_node_free_resource(xmlNo + } + } + +-void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC) ++PHP_LIBXML_API void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC) + { + int ret_refcount = -1; + xmlNodePtr nodep; +diff -up php-5.2.9/ext/libxml/php_libxml.h.visibility php-5.2.9/ext/libxml/php_libxml.h +--- php-5.2.9/ext/libxml/php_libxml.h.visibility 2008-01-30 12:31:47.000000000 +0100 ++++ php-5.2.9/ext/libxml/php_libxml.h 2008-07-18 20:23:01.000000000 +0200 +@@ -84,12 +84,12 @@ PHP_LIBXML_API int php_libxml_decrement_ + PHP_LIBXML_API xmlNodePtr php_libxml_import_node(zval *object TSRMLS_DC); + PHP_LIBXML_API int php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node export_function); + /* When an explicit freeing of node and children is required */ +-void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC); ++PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC); + /* When object dtor is called as node may still be referenced */ +-void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC); ++PHP_LIBXML_API void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC); + PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...); +-void php_libxml_ctx_warning(void *ctx, const char *msg, ...); +-void php_libxml_ctx_error(void *ctx, const char *msg, ...); ++PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...); ++PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...); + PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s); + PHP_LIBXML_API zval *php_libxml_switch_context(zval *context TSRMLS_DC); + PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg TSRMLS_DC); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:09:11 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:09:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4138] csw/mgar/pkg/php5/trunk/checksums Message-ID: Revision: 4138 http://gar.svn.sourceforge.net/gar/?rev=4138&view=rev Author: valholla Date: 2009-04-01 21:09:11 +0000 (Wed, 01 Apr 2009) Log Message: ----------- checksum file Modified Paths: -------------- csw/mgar/pkg/php5/trunk/checksums Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:07:39 UTC (rev 4137) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:09:11 UTC (rev 4138) @@ -6,7 +6,7 @@ 89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh 8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall 41ec540885de7c34625768aa1fb9682b download/fixme.sh -55567f364408f345f387a749fd73c09e download/configure.diff +ab08e2ba62667bf13fa236099e433e84 download/configure.diff a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff 2206431e47c2075c0b9c4a12de5cf791 download/odbc.diff 230126f76ee6400ccf225bb6a8243532 download/pdopgsql.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Wed Apr 1 23:10:54 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:10:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4139] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4139 http://gar.svn.sourceforge.net/gar/?rev=4139&view=rev Author: chninkel Date: 2009-04-01 21:10:52 +0000 (Wed, 01 Apr 2009) Log Message: ----------- cadaver: updated to 0.23.2 Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/Makefile csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Removed Paths: ------------- csw/mgar/pkg/cadaver/trunk/files/destdir.patch Property Changed: ---------------- csw/mgar/pkg/cadaver/trunk/ Property changes on: csw/mgar/pkg/cadaver/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cadaver/trunk/Makefile =================================================================== --- csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,5 +1,19 @@ +##################################################################### +# OpenCSW build recipe for cadaver +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = cadaver -GARVERSION = 0.22.5 +GARVERSION = 0.23.2 CATEGORIES = net DESCRIPTION = WebDAV commandline tool @@ -8,6 +22,14 @@ operations (copy/move), collection deletion/creation, property manipulation, and locking operations. endef +PACKAGES = CSWcadav + +REQUIRED_PKGS = CSWggettextrt CSWiconv CSWneon CSWosslrt CSWreadline CSWzlib CSWgcrypt CSWgnutls CSWgpgerr + + + +###### Upstream and opencsw files information ####### + MASTER_SITES = http://www.webdav.org/cadaver/ UPSTREAM_MASTER_SITES = http://www.webdav.org/cadaver/ @@ -15,15 +37,15 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWcadav,prototype depend) +DISTFILES += CSWcadav.prototype DISTFILES += changelog.CSW # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -# add destdir support to makefile -PATCHFILES = destdir.patch +##### Build and installation information ##### + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-nls @@ -31,6 +53,6 @@ include gar/category.mk -post-install: - @ginstall -D $(WORKDIR)/changelog.CSW $(DESTDIR)$(docdir)/$(GARNAME)/changelog.CSW +post-merge: + @ginstall -D $(DOWNLOADDIR)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,6 +1,3 @@ -e9fade983dd7b18d33230967051fcfe0 download/cadaver-0.22.5.tar.gz -e888b8bbd86f5b49d2e8b20b757d1acb download/CSWcadav.gspec +5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -73eefde72fd7d75082c96874f520e78d download/CSWcadav.depend -8fbd80b2a48a1341ced1b9d0919977c7 download/changelog.CSW -bb9626371527a54b88a01eaab55742cf download/destdir.patch +66c58979dc055ea9b233ec8530c41870 download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,3 +1,9 @@ +cadaver (0.23.2,REV=2009.03.30) unstable + + * New upstream version. + + -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 + cadaver (0.22.5,REV=2009.02.15) unstable * Changed gettext dependancy to follow gettext package split Deleted: csw/mgar/pkg/cadaver/trunk/files/destdir.patch =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/destdir.patch 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/files/destdir.patch 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,20 +0,0 @@ -diff --speed-large-files --minimal -Nru cadaver-0.22.3.orig/Makefile.in cadaver-0.22.3/Makefile.in ---- cadaver-0.22.3.orig/Makefile.in 2005-12-31 07:57:37.000000000 -0500 -+++ cadaver-0.22.3/Makefile.in 2006-07-11 05:14:56.576413000 -0400 -@@ -71,12 +71,12 @@ - - install: $(TARGET) install-nls - @echo "Creating directories..." -- $(INSTALL) -d $(bindir) -- $(INSTALL) -d $(man1dir) -+ $(INSTALL) -d $(DESTDIR)/$(bindir) -+ $(INSTALL) -d $(DESTDIR)/$(man1dir) - @echo "Installing $(TARGET) executable..." -- $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) -+ $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)/$(bindir)/$(TARGET) - @echo "Installing man page..." -- $(INSTALL_DATA) $(top_srcdir)/doc/cadaver.1 $(man1dir)/cadaver.1 -+ $(INSTALL_DATA) $(top_srcdir)/doc/cadaver.1 $(DESTDIR)/$(man1dir)/cadaver.1 - - install-nls: - @cd po && $(MAKE) install This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:19:28 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:19:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4140] csw/mgar/pkg/mod_python/trunk/Makefile Message-ID: Revision: 4140 http://gar.svn.sourceforge.net/gar/?rev=4140&view=rev Author: valholla Date: 2009-04-01 21:19:28 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isalist fix Modified Paths: -------------- csw/mgar/pkg/mod_python/trunk/Makefile Modified: csw/mgar/pkg/mod_python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-01 21:10:52 UTC (rev 4139) +++ csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-01 21:19:28 UTC (rev 4140) @@ -30,6 +30,7 @@ CONFIGURE_ARGS += --with-flex=$(bindir)/flex-2.5.35 CONFIGURE_ARGS += --with-python-src=../python +NOISALIST = 1 include gar/category.mk DESTDOC = $(DESTDIR)$(docdir)/ap2_modpython This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:20:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:20:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4141] csw/mgar/pkg/cmake/trunk Message-ID: Revision: 4141 http://gar.svn.sourceforge.net/gar/?rev=4141&view=rev Author: valholla Date: 2009-04-01 21:20:21 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix and misc changes Modified Paths: -------------- csw/mgar/pkg/cmake/trunk/Makefile csw/mgar/pkg/cmake/trunk/checksums Property Changed: ---------------- csw/mgar/pkg/cmake/trunk/ Property changes on: csw/mgar/pkg/cmake/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cmake/trunk/Makefile =================================================================== --- csw/mgar/pkg/cmake/trunk/Makefile 2009-04-01 21:19:28 UTC (rev 4140) +++ csw/mgar/pkg/cmake/trunk/Makefile 2009-04-01 21:20:21 UTC (rev 4141) @@ -1,5 +1,5 @@ GARNAME = cmake -GARVERSION = 2.6.2 +GARVERSION = 2.6.3 CATEGORIES = devel DESCRIPTION = Cross-platform make @@ -15,19 +15,25 @@ UPSTREAM_MASTER_SITES = http://www.cmake.org/files/ MASTER_SITES = http://www.cmake.org/files/v2.6/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWcmake) -# We define upstream file regex so we can be notifed of new upstream software release +PACKAGES = CSWcmake +CATALOGNAME_CSWcmake = cmake +SPKG_DESC_CSWcmake = $(DESCRIPTION) + +REQUIRED_PKGS_CSWcmake = CSWcurlrt CSWexpat CSWlibidn CSWoldaprt +REQUIRED_PKGS_CSWcmake += CSWosslrt CSWxmlrpc-c CSWzlib + +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) datadir = /share/$(GARNAME)-$(GARVERSION) sharedstatedir = /share docdir = /share/doc/$(GARNAME)-$(GARVERSION) +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) --docdir=$(docdir) -SKIPTEST = 1 - include gar/category.mk FIXCONFIG_DIRS += $(DESTDIR)$(prefix)/share/$(GARNAME)-$(GARVERSION)/Modules @@ -40,12 +46,29 @@ @echo "Docdir: $(docdir)" # Do NOT include the CSW include pathes here (cd $(WORKSRC); /usr/bin/env \ - CFLAGS="$($(GARCOMPILER)_CC_$(GARFLAVOR))" \ - CXXFLAGS="$($(GARCOMPILER)_CXX_$(GARFLAVOR))" \ + CFLAGS="$($(GARCOMPILER)_CC_$(GARFLAVOR)) -I/opt/csw/include" \ + CXXFLAGS="$($(GARCOMPILER)_CXX_$(GARFLAVOR)) -I/opt/csw/include" \ + LDFLAGS="-L/opt/csw/lib -R/opt/csw/lib/$$ISALIST -R/opt/csw/lib" \ ./bootstrap \ --prefix=$(prefix) \ --datadir=$(datadir) \ --docdir=$(docdir) \ --mandir=/man \ + --system-libs \ ) @$(MAKECOOKIE) + +post-configure-modulated: + @(echo "==> Forcing use of system libraries") + @(echo "=====> curl, expat, xmlrpc, and zlib") + @(perl -i -plne 's/USE_SYSTEM_CURL:BOOL=OFF/USE_SYSTEM_CURL:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @(perl -i -plne 's/USE_SYSTEM_EXPAT:BOOL=OFF/USE_SYSTEM_EXPAT:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @(perl -i -plne 's/USE_SYSTEM_XMLRPC:BOOL=OFF/USE_SYSTEM_XMLRPC:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @(perl -i -plne 's/USE_SYSTEM_ZLIB:BOOL=OFF/USE_SYSTEM_ZLIB:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @$(MAKECOOKIE) + + Modified: csw/mgar/pkg/cmake/trunk/checksums =================================================================== --- csw/mgar/pkg/cmake/trunk/checksums 2009-04-01 21:19:28 UTC (rev 4140) +++ csw/mgar/pkg/cmake/trunk/checksums 2009-04-01 21:20:21 UTC (rev 4141) @@ -1,2 +1,2 @@ -9e82aa3beb991aa8e5797cf330618d42 download/cmake-2.6.2.tar.gz +5ba47a94ce276f326abca1fd72a7e7c6 download/cmake-2.6.3.tar.gz 871d267960a850d05e99246f5c438e62 download/CSWcmake.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:20:47 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:20:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4142] csw/mgar/pkg/gd/trunk/Makefile Message-ID: Revision: 4142 http://gar.svn.sourceforge.net/gar/?rev=4142&view=rev Author: valholla Date: 2009-04-01 21:20:47 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gd/trunk/Makefile Modified: csw/mgar/pkg/gd/trunk/Makefile =================================================================== --- csw/mgar/pkg/gd/trunk/Makefile 2009-04-01 21:20:21 UTC (rev 4141) +++ csw/mgar/pkg/gd/trunk/Makefile 2009-04-01 21:20:47 UTC (rev 4142) @@ -25,11 +25,12 @@ REQUIRED_PKGS_CSWgd = CSWexpat CSWfconfig CSWftype2 CSWiconv REQUIRED_PKGS_CSWgd += CSWjpeg CSWpng CSWxpm CSWzlib -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 BUILD64 = 1 -NO_ISAEXEC = 1 +NO_ISAEXEC = 0 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-libiconv-prefix=$(prefix) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:21:07 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:21:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4143] csw/mgar/pkg/gnupg/trunk/Makefile Message-ID: Revision: 4143 http://gar.svn.sourceforge.net/gar/?rev=4143&view=rev Author: valholla Date: 2009-04-01 21:21:07 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gnupg/trunk/Makefile Modified: csw/mgar/pkg/gnupg/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg/trunk/Makefile 2009-04-01 21:20:47 UTC (rev 4142) +++ csw/mgar/pkg/gnupg/trunk/Makefile 2009-04-01 21:21:07 UTC (rev 4143) @@ -19,6 +19,7 @@ # new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +RUNPATHQUOTE = 1 BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:21:34 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:21:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4144] csw/mgar/pkg/gnupg2/trunk/Makefile Message-ID: Revision: 4144 http://gar.svn.sourceforge.net/gar/?rev=4144&view=rev Author: valholla Date: 2009-04-01 21:21:33 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gnupg2/trunk/Makefile Modified: csw/mgar/pkg/gnupg2/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-01 21:21:07 UTC (rev 4143) +++ csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-01 21:21:33 UTC (rev 4144) @@ -25,6 +25,7 @@ # new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +RUNPATHQUOTE = 1 BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) @@ -40,7 +41,7 @@ # Needed for nanosleep() EXTRA_LINKER_FLAGS += -lrt -REQUIRED_PKGS = CSWlibksba CSWgpgerr CSWgcrypt CSWlibassuan +REQUIRED_PKGS = CSWlibksba CSWgpgerr CSWgcrypt REQUIRED_PKGS += CSWcurlrt CSWoldaprt CSWzlib CSWpth CSWlibidn REQUIRED_PKGS += CSWbzip2 CSWreadline CSWggettextrt CSWiconv CSWosslrt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:22:04 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:22:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4145] csw/mgar/pkg/gnupg_minimal/trunk/Makefile Message-ID: Revision: 4145 http://gar.svn.sourceforge.net/gar/?rev=4145&view=rev Author: valholla Date: 2009-04-01 21:22:04 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gnupg_minimal/trunk/Makefile Modified: csw/mgar/pkg/gnupg_minimal/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg_minimal/trunk/Makefile 2009-04-01 21:21:33 UTC (rev 4144) +++ csw/mgar/pkg/gnupg_minimal/trunk/Makefile 2009-04-01 21:22:04 UTC (rev 4145) @@ -14,7 +14,7 @@ PACKAGES = CSWgnupgminimal CATALOGNAME_CSWgnupgminimal = gnupg_minimal SPKG_DESC_CSWgnupgminimal = $(DESCRIPTION) -#PKGFILES_CSWgnupgminimal = .*/bin/.* +PKGFILES_CSWgnupgminimal = .*/bin/.* REQUIRED_PKGS_CSWgnupgminimal = CSWbzip2 CSWcurlrt CSWggettextrt CSWiconv REQUIRED_PKGS_CSWgnupgminimal += CSWoldaprt CSWreadline CSWzlib @@ -57,6 +57,7 @@ CONFIGURE_ARGS += --disable-dns-pka CONFIGURE_ARGS += --disable-dns-cert +RUNPATHQUOTE = 1 TEST_TARGET = check include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Wed Apr 1 23:43:58 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:43:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4146] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4146 http://gar.svn.sourceforge.net/gar/?rev=4146&view=rev Author: chninkel Date: 2009-04-01 21:43:58 +0000 (Wed, 01 Apr 2009) Log Message: ----------- cadaver: updated changelog Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:22:04 UTC (rev 4145) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:43:58 UTC (rev 4146) @@ -1,3 +1,3 @@ 5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -66c58979dc055ea9b233ec8530c41870 download/changelog.CSW +af240ee7947d504a6b3e517352d0d883 download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:22:04 UTC (rev 4145) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:43:58 UTC (rev 4146) @@ -1,6 +1,7 @@ -cadaver (0.23.2,REV=2009.03.30) unstable +cadaver (0.23.2,REV=2009.04.01) unstable * New upstream version. + * Dropped destdir.patch as DESTDIR support has been added upstream. -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:52:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:52:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4147] csw/mgar/pkg/mysql-python/trunk/Makefile Message-ID: Revision: 4147 http://gar.svn.sourceforge.net/gar/?rev=4147&view=rev Author: valholla Date: 2009-04-01 21:52:31 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isalist Modified Paths: -------------- csw/mgar/pkg/mysql-python/trunk/Makefile Modified: csw/mgar/pkg/mysql-python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-01 21:43:58 UTC (rev 4146) +++ csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-01 21:52:31 UTC (rev 4147) @@ -33,7 +33,9 @@ mysql_prefix = $(prefix)/mysql5 mysql_bindir = $(mysql_prefix)/bin -LD_OPTIONS := -R/opt/csw/mysql5/lib/mysql/\$$ISALIST $(LD_OPTIONS) +NOISALIST = 1 +LD_OPTIONS := -R/opt/csw/mysql5/lib/mysql/\$$ISALIST:/opt/csw/lib/\$$ISALIST PATH := $(mysql_bindir):$(PATH) -export LD_OPTIONS PATH +LDFLAGS = +export LD_OPTIONS PATH LDFLAGS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:54:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:54:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4148] csw/mgar/pkg/pysetuptools/trunk/Makefile Message-ID: Revision: 4148 http://gar.svn.sourceforge.net/gar/?rev=4148&view=rev Author: valholla Date: 2009-04-01 21:54:18 +0000 (Wed, 01 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/pysetuptools/trunk/Makefile Modified: csw/mgar/pkg/pysetuptools/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-01 21:52:31 UTC (rev 4147) +++ csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-01 21:54:18 UTC (rev 4148) @@ -3,7 +3,8 @@ CATEGORIES = lang SPKG_SOURCEURL = http://peak.telecommunity.com/DevCenter/setuptools - +PYSETUPTOOLS_VERSION := $(shell echo $(GARVERSION) | sed -e 's/[a-z].*//') +PYSETUPTOOLS_RELEASE := $(shell echo $(GARVERSION) | sed -e 's/^[0-9].[0-9]*//') DESCRIPTION = Distribution Utiltiies for Python define BLURB Distribution Utilities for Python @@ -34,3 +35,6 @@ include gar/category.mk +SPKG_VERSION := $(PYSETUPTOOLS_VERSION) +SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(PYSETUPTOOLS_RELEASE) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:55:22 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:55:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4149] csw/mgar/pkg/pysqlite/trunk/Makefile Message-ID: Revision: 4149 http://gar.svn.sourceforge.net/gar/?rev=4149&view=rev Author: valholla Date: 2009-04-01 21:55:22 +0000 (Wed, 01 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/pysqlite/trunk/Makefile Modified: csw/mgar/pkg/pysqlite/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-01 21:54:18 UTC (rev 4148) +++ csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-01 21:55:22 UTC (rev 4149) @@ -2,6 +2,9 @@ GARVERSION = 1.1.8a CATEGORIES = lang +PYSQLITE_VERSION := $(shell echo $(GARVERSION) | sed -e 's/[a-z]//g') +PYSQLITE_RELEASE := $(shell echo $(GARVERSION) | sed -e 's/[^a-z]//g') + DESCRIPTION = SQLite 1.x support for Python define BLURB SQLite support for Python @@ -21,6 +24,7 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) +NOISALIST = 1 CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = @@ -31,3 +35,6 @@ include gar/category.mk +SPKG_VERSION := $(PYSQLITE_VERSION) +SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(PYSQLITE_RELEASE) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:57:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:57:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4150] csw/mgar/pkg/xchat/trunk/Makefile Message-ID: Revision: 4150 http://gar.svn.sourceforge.net/gar/?rev=4150&view=rev Author: valholla Date: 2009-04-01 21:57:21 +0000 (Wed, 01 Apr 2009) Log Message: ----------- housekeeping Modified Paths: -------------- csw/mgar/pkg/xchat/trunk/Makefile Modified: csw/mgar/pkg/xchat/trunk/Makefile =================================================================== --- csw/mgar/pkg/xchat/trunk/Makefile 2009-04-01 21:55:22 UTC (rev 4149) +++ csw/mgar/pkg/xchat/trunk/Makefile 2009-04-01 21:57:21 UTC (rev 4150) @@ -25,9 +25,12 @@ REQUIRED_PKGS_CSWxchat += CSWggettextrt CSWglib2 CSWgtk2 CSWiconv CSWlibatk REQUIRED_PKGS_CSWxchat += CSWlibcairo CSWlibdbus CSWlibxft2 CSWlibxrender REQUIRED_PKGS_CSWxchat += CSWosslrt CSWpango CSWpng CSWsunmath CSWzlib -REQUIRED_PKGS_CSWxchat-pl = CSWxchat CSWperl -REQUIRED_PKGS_CSWxchat-py = CSWxchat CSWpython -REQUIRED_PKGS_CSWxchat-tcl = CSWxchat CSWtcl +REQUIRED_PKGS_CSWxchat-pl = CSWxchat CSWperl CSWosslrt CSWglib2 +REQUIRED_PKGS_CSWxchat-pl += CSWggettextrt CSWlibntlm +REQUIRED_PKGS_CSWxchat-py = CSWxchat CSWpython CSWosslrt CSWglib2 +REQUIRED_PKGS_CSWxchat-py += CSWggettextrt CSWlibntlm +REQUIRED_PKGS_CSWxchat-tcl = CSWxchat CSWtcl CSWosslrt CSWglib2 +REQUIRED_PKGS_CSWxchat-tcl += CSWggettextrt CSWlibntlm PKGFILES_CSWxchat-pl = $(libdir)/.*/perl.so PKGFILES_CSWxchat-py = $(libdir)/.*/python.so PKGFILES_CSWxchat-tcl = $(libdir)/.*/tcl.so @@ -40,6 +43,8 @@ PATCHFILES = xc286-smallfixes.diff PATCHFILES += xchat26-compiletime.diff +LDFLAGS = +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-openssl=$(prefix) CONFIGURE_ARGS += --enable-threads=solaris This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 00:11:59 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 22:11:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4151] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4151 http://gar.svn.sourceforge.net/gar/?rev=4151&view=rev Author: valholla Date: 2009-04-01 22:11:59 +0000 (Wed, 01 Apr 2009) Log Message: ----------- curses fix Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:57:21 UTC (rev 4150) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 22:11:59 UTC (rev 4151) @@ -61,7 +61,8 @@ # BerkeleyDB EXTRA_LIB += $(prefix)/bdb44/lib -EXTRA_INC += $(prefix)/bdb44/lib +EXTRA_INC += $(prefix)/bdb44/include +EXTRA_CFLAGS = $(prefix)/include/ncursesw NOISALIST = 1 DISTFILES += fixme.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 03:43:51 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 01:43:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4152] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4152 http://gar.svn.sourceforge.net/gar/?rev=4152&view=rev Author: valholla Date: 2009-04-02 01:43:50 +0000 (Thu, 02 Apr 2009) Log Message: ----------- admin scripts Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-bcmath=shared PKGFILES_CSWphp5bcmath = .*/lib/php/extensions/.*/bcmath.* + +define CSWphp5bcmath_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling bcmath extension" + +perl -i -plne 's|;extension=bcmath.so|extension=bcmath.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5bcmath_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling bcmath extension" + +perl -i -plne 's|extension=bcmath.so|;extension=bcmath.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-bz2=shared,$(prefix) PKGFILES_CSWphp5bz2 = .*/lib/php/extensions/.*/bz2.* + +define CSWphp5bz2_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling bz2 extension" + +perl -i -plne 's|;extension=bz2.so|extension=bz2.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5bz2_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling bz2 extension" + +perl -i -plne 's|extension=bz2.so|;extension=bz2.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-calendar=shared PKGFILES_CSWphp5calendar = .*/lib/php/extensions/.*/calendar.* + +define CSWphp5calendar_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling calendar extension" + +perl -i -plne 's|;extension=calendar.so|extension=calendar.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5calendar_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling calendar extension" + +perl -i -plne 's|extension=calendar.so|;extension=calendar.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-ctype=shared PKGFILES_CSWphp5ctype = .*/lib/php/extensions/.*/ctype.* + +define CSWphp5ctype_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ctype extension" + +perl -i -plne 's|;extension=ctype.so|extension=ctype.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ctype_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ctype extension" + +perl -i -plne 's|extension=ctype.so|;extension=ctype.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-curlwrappers PKGFILES_CSWphp5curl = .*/lib/php/extensions/.*/curl.* + +define CSWphp5curl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling curl extension" + +perl -i -plne 's|;extension=curl.so|extension=curl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5curl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling curl extension" + +perl -i -plne 's|extension=curl.so|;extension=curl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -14,3 +14,30 @@ PKGFILES_CSWphp5dba = .*/lib/php/extensions/.*/dba\.so PKGFILES_CSWphp5dba += .*/lib/php/extensions/.*/dba\.a + +define CSWphp5dba_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling dba extension" + +perl -i -plne 's|;extension=dba.so|extension=dba.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5dba_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling dba extension" + +perl -i -plne 's|extension=dba.so|;extension=dba.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-dbase=shared PKGFILES_CSWphp5dbase = .*/lib/php/extensions/.*/dbase.* + +define CSWphp5dbase_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling dbase extension" + +perl -i -plne 's|;extension=dbase.so|extension=dbase.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5dbase_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling dbase extension" + +perl -i -plne 's|extension=dbase.so|;extension=dbase.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5dom = .*/lib/php/extensions/.*/dom.* + +define CSWphp5dom_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling dom extension" + +perl -i -plne 's|;extension=dom.so|extension=dom.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5dom_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling dom extension" + +perl -i -plne 's|extension=dom.so|;extension=dom.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -12,3 +12,30 @@ export CPPFLAGS PKGFILES_CSWphp5exif = .*/lib/php/extensions/.*/exif.* + +define CSWphp5exif_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling exif extension" + +perl -i -plne 's|;extension=exif.so|extension=exif.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5exif_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling exif extension" + +perl -i -plne 's|extension=exif.so|;extension=exif.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-pcre-dir=$(prefix) PKGFILES_CSWphp5filter = .*/lib/php/extensions/.*/filter.* + +define CSWphp5filter_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling filter extension" + +perl -i -plne 's|;extension=filter.so|extension=filter.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5filter_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling filter extension" + +perl -i -plne 's|extension=filter.so|;extension=filter.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-ftp=shared PKGFILES_CSWphp5ftp = .*/lib/php/extensions/.*/ftp.* + +define CSWphp5ftp_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ftp extension" + +perl -i -plne 's|;extension=ftp.so|extension=ftp.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ftp_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ftp extension" + +perl -i -plne 's|extension=ftp.so|;extension=ftp.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -20,3 +20,30 @@ CONFIGURE_ARGS += --enable-gd-jis-conv PKGFILES_CSWphp5gd = .*/lib/php/extensions/.*/gd.* + +define CSWphp5gd_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling gd extension" + +perl -i -plne 's|;extension=gd.so|extension=gd.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5gd_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling gd extension" + +perl -i -plne 's|extension=gd.so|;extension=gd.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-gettext=shared,$(prefix) PKGFILES_CSWphp5gettext = .*/lib/php/extensions/.*/gettext.* + +define CSWphp5gettext_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling gettext extension" + +perl -i -plne 's|;extension=gettext.so|extension=gettext.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5gettext_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling gettext extension" + +perl -i -plne 's|extension=gettext.so|;extension=gettext.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-gmp=shared,$(prefix) PKGFILES_CSWphp5gmp = .*/lib/php/extensions/.*/gmp.* + +define CSWphp5gmp_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling gmp extension" + +perl -i -plne 's|;extension=gmp.so|extension=gmp.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5gmp_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling gmp extension" + +perl -i -plne 's|extension=gmp.so|;extension=gmp.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-hash=shared PKGFILES_CSWphp5hash = .*/lib/php/extensions/.*/hash.* + +define CSWphp5hash_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling hash extension" + +perl -i -plne 's|;extension=hash.so|extension=hash.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5hash_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling hash extension" + +perl -i -plne 's|extension=hash.so|;extension=hash.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -16,3 +16,30 @@ #PATCHFILES += iconv.diff PKGFILES_CSWphp5iconv = .*/lib/php/extensions/.*/iconv.* + +define CSWphp5iconv_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling iconv extension" + +perl -i -plne 's|;extension=iconv.so|extension=iconv.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5iconv_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling iconv extension" + +perl -i -plne 's|extension=iconv.so|;extension=iconv.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-imap-ssl=$(prefix) PKGFILES_CSWphp5imap = .*/lib/php/extensions/.*/imap.* + +define CSWphp5imap_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling imap extension" + +perl -i -plne 's|;extension=imap.so|extension=imap.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5imap_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling imap extension" + +perl -i -plne 's|extension=imap.so|;extension=imap.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-json=shared PKGFILES_CSWphp5json = .*/lib/php/extensions/.*/json.* + +define CSWphp5json_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling json extension" + +perl -i -plne 's|;extension=json.so|extension=json.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5json_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling json extension" + +perl -i -plne 's|extension=json.so|;extension=json.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,31 @@ CONFIGURE_ARGS += --with-ldap-sasl=$(prefix) PKGFILES_CSWphp5ldap = .*/lib/php/extensions/.*/ldap.* + + +define CSWphp5ldap_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ldap extension" + +perl -i -plne 's|;extension=ldap.so|extension=ldap.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ldap_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ldap extension" + +perl -i -plne 's|extension=ldap.so|;extension=ldap.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --enable-mbregex=shared PKGFILES_CSWphp5mbstring = .*/lib/php/extensions/.*/mbstring.* + +define CSWphp5mbstring_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mbstring extension" + +perl -i -plne 's|;extension=mbstring.so|extension=mbstring.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mbstring_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mbstring extension" + +perl -i -plne 's|extension=mbstring.so|;extension=mbstring.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mcrypt=shared,$(prefix) PKGFILES_CSWphp5mcrypt = .*/lib/php/extensions/.*/mcrypt.* + +define CSWphp5mcrypt_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mcrypt extension" + +perl -i -plne 's|;extension=mcrypt.so|extension=mcrypt.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mcrypt_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mcrypt extension" + +perl -i -plne 's|extension=mcrypt.so|;extension=mcrypt.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mhash=shared,$(prefix) PKGFILES_CSWphp5mhash = .*/lib/php/extensions/.*/mhash.* + +define CSWphp5mhash_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mhash extension" + +perl -i -plne 's|;extension=mhash.so|extension=mhash.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mhash_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mhash extension" + +perl -i -plne 's|extension=mhash.so|;extension=mhash.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mime-magic=shared PKGFILES_CSWphp5mimemagic = .*/lib/php/extensions/.*/mime_magic.* + +define CSWphp5mimemagic_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mime_magic extension" + +perl -i -plne 's|;extension=mime_magic.so|extension=mime_magic.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mimemagic_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mime_magic extension" + +perl -i -plne 's|extension=mime_magic.so|;extension=mime_magic.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mssql=shared,$(prefix) PKGFILES_CSWphp5mssql = .*/lib/php/extensions/.*/mssql.* + +define CSWphp5mssql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mssql extension" + +perl -i -plne 's|;extension=mssql.so|extension=mssql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mssql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mssql extension" + +perl -i -plne 's|extension=mssql.so|;extension=mssql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ PKGFILES_CSWphp5mysql = .*/lib/php/extensions/.*/mysql\.so PKGFILES_CSWphp5mysql += .*/lib/php/extensions/.*/mysql\.a + +define CSWphp5mysql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mysql extension" + +perl -i -plne 's|;extension=mysql.so|extension=mysql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mysql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mysql extension" + +perl -i -plne 's|extension=mysql.so|;extension=mysql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mysqli=shared,$(bindir)/mysql_config PKGFILES_CSWphp5mysqli = .*/lib/php/extensions/.*/mysqli.* + +define CSWphp5mysqli_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mysqli extension" + +perl -i -plne 's|;extension=mysqli.so|extension=mysqli.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mysqli_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mysqli extension" + +perl -i -plne 's|extension=mysqli.so|;extension=mysqli.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-ncurses=shared,$(prefix) PKGFILES_CSWphp5ncurses = .*/lib/php/extensions/.*/ncurses.* + +define CSWphp5ncurses_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ncurses extension" + +perl -i -plne 's|;extension=ncurses.so|extension=ncurses.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ncurses_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ncurses extension" + +perl -i -plne 's|extension=ncurses.so|;extension=ncurses.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-unixODBC=shared,$(prefix) PKGFILES_CSWphp5odbc = .*/lib/php/extensions/.*/odbc.* + +define CSWphp5odbc_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling odbc extension" + +perl -i -plne 's|;extension=odbc.so|extension=odbc.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5odbc_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling odbc extension" + +perl -i -plne 's|extension=odbc.so|;extension=odbc.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-openssl=shared,$(prefix) PKGFILES_CSWphp5openssl = .*/lib/php/extensions/.*/openssl.* + +define CSWphp5openssl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling openssl extension" + +perl -i -plne 's|;extension=openssl.so|extension=openssl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5openssl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling openssl extension" + +perl -i -plne 's|extension=openssl.so|;extension=openssl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-pcntl=shared PKGFILES_CSWphp5pcntl = .*/lib/php/extensions/.*/pcntl.* + +define CSWphp5pcntl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pcntl extension" + +perl -i -plne 's|;extension=pcntl.so|extension=pcntl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pcntl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pcntl extension" + +perl -i -plne 's|extension=pcntl.so|;extension=pcntl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-zlib-dir=$(prefix) PKGFILES_CSWphp5pdomysql = .*/lib/php/extensions/.*/pdo_mysql.* + +define CSWphp5pdomysql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_mysql extension" + +perl -i -plne 's|;extension=pdo_mysql.so|extension=pdo_mysql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdomysql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_mysql extension" + +perl -i -plne 's|extension=pdo_mysql.so|;extension=pdo_mysql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) PKGFILES_CSWphp5pdoodbc = .*/lib/php/extensions/.*/pdo_odbc.* + +define CSWphp5pdoodbc_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_odbc extension" + +perl -i -plne 's|;extension=pdo_odbc.so|extension=pdo_odbc.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdoodbc_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_odbc extension" + +perl -i -plne 's|extension=pdo_odbc.so|;extension=pdo_odbc.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-pdo-pgsql=shared,$(prefix)/postgresql PKGFILES_CSWphp5pdopgsql = .*/lib/php/extensions/.*/pdo_pgsql.* + +define CSWphp5pdopgsql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_pgsql extension" + +perl -i -plne 's|;extension=pdo_pgsql.so|extension=pdo_pgsql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdopgsql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_pgsql extension" + +perl -i -plne 's|extension=pdo_pgsql.so|;extension=pdo_pgsql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-pdo-sqlite=shared PKGFILES_CSWphp5pdosqlite = .*/lib/php/extensions/.*/pdo_sqlite.* + +define CSWphp5pdosqlite_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_sqlite extension" + +perl -i -plne 's|;extension=pdo_sqlite.so|extension=pdo_sqlite.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdosqlite_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_sqlite extension" + +perl -i -plne 's|extension=pdo_sqlite.so|;extension=pdo_sqlite.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-pgsql=shared,$(prefix)/postgresql PKGFILES_CSWphp5pgsql = .*/lib/php/extensions/.*/pgsql.* + +define CSWphp5pgsql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pgsql extension" + +perl -i -plne 's|;extension=pgsql.so|extension=pgsql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pgsql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pgsql extension" + +perl -i -plne 's|extension=pgsql.so|;extension=pgsql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-posix=shared PKGFILES_CSWphp5posix = .*/lib/php/extensions/.*/posix.* + +define CSWphp5posix_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling posix extension" + +perl -i -plne 's|;extension=posix.so|extension=posix.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5posix_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling posix extension" + +perl -i -plne 's|extension=posix.so|;extension=posix.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-pspell=shared,$(prefix) PKGFILES_CSWphp5pspell = .*/lib/php/extensions/.*/pspell.* + +define CSWphp5pspell_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pspell extension" + +perl -i -plne 's|;extension=pspell.so|extension=pspell.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pspell_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pspell extension" + +perl -i -plne 's|extension=pspell.so|;extension=pspell.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-readline=shared,/opt/csw PKGFILES_CSWphp5readline = .*/lib/php/extensions/.*/readline.* + +define CSWphp5readline_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling readline extension" + +perl -i -plne 's|;extension=readline.so|extension=readline.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5readline_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling readline extension" + +perl -i -plne 's|extension=readline.so|;extension=readline.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-session=shared PKGFILES_CSWphp5session = .*/lib/php/extensions/.*/session.* + +define CSWphp5session_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling session extension" + +perl -i -plne 's|;extension=session.so|extension=session.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5session_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling session extension" + +perl -i -plne 's|extension=session.so|;extension=session.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-shmop=shared PKGFILES_CSWphp5shmop = .*/lib/php/extensions/.*/shmop.* + +define CSWphp5shmop_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling shmop extension" + +perl -i -plne 's|;extension=shmop.so|extension=shmop.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5shmop_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling shmop extension" + +perl -i -plne 's|extension=shmop.so|;extension=shmop.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -6,3 +6,29 @@ CONFIGURE_ARGS += --enable-simplexml CONFIGURE_ARGS += --with-libxml-dir=$(prefix) +define CSWphp5simplexml_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling simplexml extension" + +perl -i -plne 's|;extension=simplexml.so|extension=simplexml.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5simplexml_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling simplexml extension" + +perl -i -plne 's|extension=simplexml.so|;extension=simplexml.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-snmp=shared,$(prefix) PKGFILES_CSWphp5snmp = .*/lib/php/extensions/.*/snmp.* + +define CSWphp5snmp_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling snmp extension" + +perl -i -plne 's|;extension=snmp.so|extension=snmp.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5snmp_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling snmp extension" + +perl -i -plne 's|extension=snmp.so|;extension=snmp.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5soap = .*/lib/php/extensions/.*/soap.* + +define CSWphp5soap_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling soap extension" + +perl -i -plne 's|;extension=soap.so|extension=soap.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5soap_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling soap extension" + +perl -i -plne 's|extension=soap.so|;extension=soap.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sockets=shared PKGFILES_CSWphp5sockets = .*/lib/php/extensions/.*/sockets.* + +define CSWphp5sockets_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sockets extension" + +perl -i -plne 's|;extension=sockets.so|extension=sockets.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sockets_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sockets extension" + +perl -i -plne 's|extension=sockets.so|;extension=sockets.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --enable-sqlite-utf8 PKGFILES_CSWphp5sqlite = .*/lib/php/extensions/.*/sqlite.* + +define CSWphp5sqlite_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sqlite extension" + +perl -i -plne 's|;extension=sqlite.so|extension=sqlite.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sqlite_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sqlite extension" + +perl -i -plne 's|extension=sqlite.so|;extension=sqlite.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sysvsem=shared PKGFILES_CSWphp5sysvmsg = .*/lib/php/extensions/.*/sysvmsg.* + +define CSWphp5sysvmsg_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sysvmsg extension" + +perl -i -plne 's|;extension=sysvmsg.so|extension=sysvmsg.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sysvmsg_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sysvmsg extension" + +perl -i -plne 's|extension=sysvmsg.so|;extension=sysvmsg.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sysvsem=shared PKGFILES_CSWphp5sysvsem = .*/lib/php/extensions/.*/sysvsem.* + +define CSWphp5sysvsem_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sysvsem extension" + +perl -i -plne 's|;extension=sysvsem.so|extension=sysvsem.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sysvsem_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sysvsem extension" + +perl -i -plne 's|extension=sysvsem.so|;extension=sysvsem.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sysvshm=shared PKGFILES_CSWphp5sysvshm = .*/lib/php/extensions/.*/sysvshm.* + +define CSWphp5sysvshm_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sysvshm extension" + +perl -i -plne 's|;extension=sysvshm.so|extension=sysvshm.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sysvshm_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sysvshm extension" + +perl -i -plne 's|extension=sysvshm.so|;extension=sysvshm.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-tidy=shared,$(prefix) PKGFILES_CSWphp5tidy = .*/lib/php/extensions/.*/tidy.* + +define CSWphp5tidy_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling tidy extension" + +perl -i -plne 's|;extension=tidy.so|extension=tidy.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5tidy_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling tidy extension" + +perl -i -plne 's|extension=tidy.so|;extension=tidy.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-tokenizer=shared PKGFILES_CSWphp5tokenizer = .*/lib/php/extensions/.*/tokenizer.* + +define CSWphp5tokenizer_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling tokenizer extension" + +perl -i -plne 's|;extension=tokenizer.so|extension=tokenizer.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5tokenizer_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling tokenizer extension" + +perl -i -plne 's|extension=tokenizer.so|;extension=tokenizer.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-libexpat-dir=$(prefix) PKGFILES_CSWphp5wddx = .*/lib/php/extensions/.*/wddx.* + +define CSWphp5wddx_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling wddx extension" + +perl -i -plne 's|;extension=wddx.so|extension=wddx.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5wddx_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling wddx extension" + +perl -i -plne 's|extension=wddx.so|;extension=wddx.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -3,3 +3,4 @@ CONFIGURE_ARGS += --enable-xml CONFIGURE_ARGS += --with-libxml-dir=$(prefix) CONFIGURE_ARGS += --with-libexpat-dir=$(prefix) + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5xmlreader = .*/lib/php/extensions/.*/xmlreader.* + +define CSWphp5xmlreader_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xmlreader extension" + +perl -i -plne 's|;extension=xmlreader.so|extension=xmlreader.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xmlreader_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xmlreader extension" + +perl -i -plne 's|extension=xmlreader.so|;extension=xmlreader.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -12,3 +12,30 @@ CONFIGURE_ARGS += --with-libexpat-dir=$(prefix) PKGFILES_CSWphp5xmlrpc = .*/lib/php/extensions/.*/xmlrpc.* + +define CSWphp5xmlrpc_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xmlrpc extension" + +perl -i -plne 's|;extension=xmlrpc.so|extension=xmlrpc.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xmlrpc_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xmlrpc extension" + +perl -i -plne 's|extension=xmlrpc.so|;extension=xmlrpc.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5xmlwriter = .*/lib/php/extensions/.*/xmlwriter.* + +define CSWphp5xmlwriter_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xmlwriter extension" + +perl -i -plne 's|;extension=xmlwriter.so|extension=xmlwriter.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xmlwriter_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xmlwriter extension" + +perl -i -plne 's|extension=xmlwriter.so|;extension=xmlwriter.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-xsl=shared,$(prefix) PKGFILES_CSWphp5xsl = .*/lib/php/extensions/.*/xsl.* + +define CSWphp5xsl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xsl extension" + +perl -i -plne 's|;extension=xsl.so|extension=xsl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xsl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xsl extension" + +perl -i -plne 's|extension=xsl.so|;extension=xsl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-zlib-dir=$(prefix) PKGFILES_CSWphp5zip = .*/lib/php/extensions/.*/zip.* + +define CSWphp5zip_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling zip extension" + +perl -i -plne 's|;extension=zip.so|extension=zip.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5zip_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling zip extension" + +perl -i -plne 's|extension=zip.so|;extension=zip.so|' ${PHP_INI} + +exit 0 +endef + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 07:10:53 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 05:10:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4153] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4153 http://gar.svn.sourceforge.net/gar/?rev=4153&view=rev Author: valholla Date: 2009-04-02 05:10:51 +0000 (Thu, 02 Apr 2009) Log Message: ----------- isalist Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-02 01:43:50 UTC (rev 4152) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-02 05:10:51 UTC (rev 4153) @@ -85,6 +85,8 @@ EXTRA_INC += $(JDK)/include SVNLIB = $(prefix)/lib/svn +NOISALIST = 1 +LDFLAGS = CONFIGURE_ARGS = $(DIRPATHS) --libdir=$(SVNLIB) --libexecdir=$(SVNLIB) CONFIGURE_ARGS += --with-gnu-ld=yes CONFIGURE_ARGS += --with-apr=$(prefix)/apache2/bin/apr-config This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 08:26:32 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 06:26:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4154] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4154 http://gar.svn.sourceforge.net/gar/?rev=4154&view=rev Author: valholla Date: 2009-04-02 06:26:31 +0000 (Thu, 02 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/checksums csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile csw/mgar/pkg/php5/trunk/files/php.ini.CSW Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -62,7 +62,7 @@ # BerkeleyDB EXTRA_LIB += $(prefix)/bdb44/lib EXTRA_INC += $(prefix)/bdb44/include -EXTRA_CFLAGS = $(prefix)/include/ncursesw +EXTRA_CFLAGS = -I$(prefix)/include/ncursesw NOISALIST = 1 DISTFILES += fixme.sh Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-02 06:26:31 UTC (rev 4154) @@ -1,5 +1,5 @@ 280d6cda7f72a4fc6de42fda21ac2db7 download/php-5.2.9.tar.bz2 -72e4984625252fc0a0c2199a820b7563 download/php.ini.CSW +160963de6006c558963e5bc37584bf15 download/php.ini.CSW 90ae3cef3692d7e566c47d89fe39c43d download/phpext d4c93751890b989c5a7b04acb5845fd9 download/pear.conf.CSW de56d3571f4484284d106af158bffc38 download/CSWphp5_ext_enable.sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling bcmath extension" -perl -i -plne 's|;extension=bcmath.so|extension=bcmath.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"bcmath\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=bcmath.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=bcmath.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=bcmath.so|extension=bcmath.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=bcmath.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"bcmath\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling bcmath extension" -perl -i -plne 's|extension=bcmath.so|;extension=bcmath.so|' ${PHP_INI} +perl -i -plne 's|extension=bcmath.so|;extension=bcmath.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"bcmath\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling bz2 extension" -perl -i -plne 's|;extension=bz2.so|extension=bz2.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"bz2\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=bz2.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=bz2.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=bz2.so|extension=bz2.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=bz2.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"bz2\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling bz2 extension" -perl -i -plne 's|extension=bz2.so|;extension=bz2.so|' ${PHP_INI} +perl -i -plne 's|extension=bz2.so|;extension=bz2.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"bz2\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling calendar extension" -perl -i -plne 's|;extension=calendar.so|extension=calendar.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"calendar\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=calendar.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=calendar.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=calendar.so|extension=calendar.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=calendar.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"calendar\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling calendar extension" -perl -i -plne 's|extension=calendar.so|;extension=calendar.so|' ${PHP_INI} +perl -i -plne 's|extension=calendar.so|;extension=calendar.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"calendar\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ctype extension" -perl -i -plne 's|;extension=ctype.so|extension=ctype.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ctype\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ctype.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ctype.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ctype.so|extension=ctype.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ctype.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ctype\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ctype extension" -perl -i -plne 's|extension=ctype.so|;extension=ctype.so|' ${PHP_INI} +perl -i -plne 's|extension=ctype.so|;extension=ctype.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ctype\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling curl extension" -perl -i -plne 's|;extension=curl.so|extension=curl.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"curl\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=curl.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=curl.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=curl.so|extension=curl.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=curl.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"curl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling curl extension" -perl -i -plne 's|extension=curl.so|;extension=curl.so|' ${PHP_INI} +perl -i -plne 's|extension=curl.so|;extension=curl.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"curl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -23,8 +23,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling dba extension" -perl -i -plne 's|;extension=dba.so|extension=dba.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"dba\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=dba.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=dba.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=dba.so|extension=dba.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=dba.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"dba\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -36,8 +66,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling dba extension" -perl -i -plne 's|extension=dba.so|;extension=dba.so|' ${PHP_INI} +perl -i -plne 's|extension=dba.so|;extension=dba.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"dba\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling dbase extension" -perl -i -plne 's|;extension=dbase.so|extension=dbase.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"dbase\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=dbase.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=dbase.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=dbase.so|extension=dbase.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=dbase.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"dbase\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling dbase extension" -perl -i -plne 's|extension=dbase.so|;extension=dbase.so|' ${PHP_INI} +perl -i -plne 's|extension=dbase.so|;extension=dbase.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"dbase\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling dom extension" -perl -i -plne 's|;extension=dom.so|extension=dom.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"dom\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=dom.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=dom.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=dom.so|extension=dom.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=dom.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"dom\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling dom extension" -perl -i -plne 's|extension=dom.so|;extension=dom.so|' ${PHP_INI} +perl -i -plne 's|extension=dom.so|;extension=dom.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"dom\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -21,8 +21,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling exif extension" -perl -i -plne 's|;extension=exif.so|extension=exif.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"exif\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=exif.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=exif.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=exif.so|extension=exif.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=exif.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"exif\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -34,8 +64,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling exif extension" -perl -i -plne 's|extension=exif.so|;extension=exif.so|' ${PHP_INI} +perl -i -plne 's|extension=exif.so|;extension=exif.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"exif\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -1,39 +1,5 @@ PHP5EXT_NAME = filter -PACKAGES += CSWphp5filter - -CATALOGNAME_CSWphp5filter = php5_filter -SPKG_DESC_CSWphp5filter = filter Extention for PHP5 -REQUIRED_PKGS_CSWphp5filter = CSWphp5 CSWpcrert - CONFIGURE_ARGS += --enable-filter=shared CONFIGURE_ARGS += --with-pcre-dir=$(prefix) -PKGFILES_CSWphp5filter = .*/lib/php/extensions/.*/filter.* - -define CSWphp5filter_postinstall -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Post Install <===]" -echo " ===> Enabling filter extension" - -perl -i -plne 's|;extension=filter.so|extension=filter.so|' ${PHP_INI} - -exit 0 -endef - -define CSWphp5filter_preremove -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Pre Remove <===]" -echo " ===> Disabling filter extension" - -perl -i -plne 's|extension=filter.so|;extension=filter.so|' ${PHP_INI} - -exit 0 -endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ftp extension" -perl -i -plne 's|;extension=ftp.so|extension=ftp.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ftp\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ftp.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ftp.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ftp.so|extension=ftp.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ftp.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ftp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ftp extension" -perl -i -plne 's|extension=ftp.so|;extension=ftp.so|' ${PHP_INI} +perl -i -plne 's|extension=ftp.so|;extension=ftp.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ftp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -29,8 +29,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling gd extension" -perl -i -plne 's|;extension=gd.so|extension=gd.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"gd\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=gd.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=gd.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=gd.so|extension=gd.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=gd.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"gd\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -42,8 +72,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling gd extension" -perl -i -plne 's|extension=gd.so|;extension=gd.so|' ${PHP_INI} +perl -i -plne 's|extension=gd.so|;extension=gd.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"gd\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling gettext extension" -perl -i -plne 's|;extension=gettext.so|extension=gettext.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"gettext\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=gettext.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=gettext.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=gettext.so|extension=gettext.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=gettext.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"gettext\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling gettext extension" -perl -i -plne 's|extension=gettext.so|;extension=gettext.so|' ${PHP_INI} +perl -i -plne 's|extension=gettext.so|;extension=gettext.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"gettext\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling gmp extension" -perl -i -plne 's|;extension=gmp.so|extension=gmp.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"gmp\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=gmp.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=gmp.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=gmp.so|extension=gmp.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=gmp.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"gmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling gmp extension" -perl -i -plne 's|extension=gmp.so|;extension=gmp.so|' ${PHP_INI} +perl -i -plne 's|extension=gmp.so|;extension=gmp.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"gmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling hash extension" -perl -i -plne 's|;extension=hash.so|extension=hash.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"hash\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=hash.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=hash.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=hash.so|extension=hash.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=hash.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"hash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling hash extension" -perl -i -plne 's|extension=hash.so|;extension=hash.so|' ${PHP_INI} +perl -i -plne 's|extension=hash.so|;extension=hash.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"hash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -25,8 +25,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling iconv extension" -perl -i -plne 's|;extension=iconv.so|extension=iconv.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"iconv\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=iconv.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=iconv.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=iconv.so|extension=iconv.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=iconv.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"iconv\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -38,8 +68,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling iconv extension" -perl -i -plne 's|extension=iconv.so|;extension=iconv.so|' ${PHP_INI} +perl -i -plne 's|extension=iconv.so|;extension=iconv.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"iconv\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling imap extension" -perl -i -plne 's|;extension=imap.so|extension=imap.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"imap\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=imap.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=imap.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=imap.so|extension=imap.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=imap.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"imap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling imap extension" -perl -i -plne 's|extension=imap.so|;extension=imap.so|' ${PHP_INI} +perl -i -plne 's|extension=imap.so|;extension=imap.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"imap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling json extension" -perl -i -plne 's|;extension=json.so|extension=json.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"json\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=json.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=json.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=json.so|extension=json.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=json.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"json\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling json extension" -perl -i -plne 's|extension=json.so|;extension=json.so|' ${PHP_INI} +perl -i -plne 's|extension=json.so|;extension=json.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"json\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ldap extension" -perl -i -plne 's|;extension=ldap.so|extension=ldap.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ldap\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ldap.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ldap.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ldap.so|extension=ldap.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ldap.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ldap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ldap extension" -perl -i -plne 's|extension=ldap.so|;extension=ldap.so|' ${PHP_INI} +perl -i -plne 's|extension=ldap.so|;extension=ldap.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ldap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mbstring extension" -perl -i -plne 's|;extension=mbstring.so|extension=mbstring.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mbstring\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mbstring.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mbstring.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mbstring.so|extension=mbstring.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mbstring.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mbstring\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mbstring extension" -perl -i -plne 's|extension=mbstring.so|;extension=mbstring.so|' ${PHP_INI} +perl -i -plne 's|extension=mbstring.so|;extension=mbstring.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mbstring\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mcrypt extension" -perl -i -plne 's|;extension=mcrypt.so|extension=mcrypt.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mcrypt\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mcrypt.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mcrypt.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mcrypt.so|extension=mcrypt.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mcrypt.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mcrypt\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mcrypt extension" -perl -i -plne 's|extension=mcrypt.so|;extension=mcrypt.so|' ${PHP_INI} +perl -i -plne 's|extension=mcrypt.so|;extension=mcrypt.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mcrypt\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mhash extension" -perl -i -plne 's|;extension=mhash.so|extension=mhash.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mhash\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mhash.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mhash.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mhash.so|extension=mhash.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mhash.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mhash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mhash extension" -perl -i -plne 's|extension=mhash.so|;extension=mhash.so|' ${PHP_INI} +perl -i -plne 's|extension=mhash.so|;extension=mhash.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mhash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -10,7 +10,7 @@ PKGFILES_CSWphp5mimemagic = .*/lib/php/extensions/.*/mime_magic.* -define CSWphp5mimemagic_postinstall +define CSWphp5mime_magic_postinstall #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini @@ -18,12 +18,42 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mime_magic extension" -perl -i -plne 's|;extension=mime_magic.so|extension=mime_magic.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mime_magic\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mime_magic.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mime_magic.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mime_magic.so|extension=mime_magic.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mime_magic.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mime_magic\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef -define CSWphp5mimemagic_preremove +define CSWphp5mime_magic_preremove #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mime_magic extension" -perl -i -plne 's|extension=mime_magic.so|;extension=mime_magic.so|' ${PHP_INI} +perl -i -plne 's|extension=mime_magic.so|;extension=mime_magic.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mime_magic\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mssql extension" -perl -i -plne 's|;extension=mssql.so|extension=mssql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mssql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mssql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mssql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mssql.so|extension=mssql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mssql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mssql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mssql extension" -perl -i -plne 's|extension=mssql.so|;extension=mssql.so|' ${PHP_INI} +perl -i -plne 's|extension=mssql.so|;extension=mssql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mssql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mysql extension" -perl -i -plne 's|;extension=mysql.so|extension=mysql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mysql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mysql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mysql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mysql.so|extension=mysql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mysql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mysql extension" -perl -i -plne 's|extension=mysql.so|;extension=mysql.so|' ${PHP_INI} +perl -i -plne 's|extension=mysql.so|;extension=mysql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mysqli extension" -perl -i -plne 's|;extension=mysqli.so|extension=mysqli.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mysqli\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mysqli.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mysqli.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mysqli.so|extension=mysqli.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mysqli.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mysqli\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mysqli extension" -perl -i -plne 's|extension=mysqli.so|;extension=mysqli.so|' ${PHP_INI} +perl -i -plne 's|extension=mysqli.so|;extension=mysqli.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mysqli\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ncurses extension" -perl -i -plne 's|;extension=ncurses.so|extension=ncurses.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ncurses\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ncurses.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ncurses.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ncurses.so|extension=ncurses.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ncurses.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ncurses\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ncurses extension" -perl -i -plne 's|extension=ncurses.so|;extension=ncurses.so|' ${PHP_INI} +perl -i -plne 's|extension=ncurses.so|;extension=ncurses.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ncurses\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling odbc extension" -perl -i -plne 's|;extension=odbc.so|extension=odbc.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"odbc\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=odbc.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=odbc.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=odbc.so|extension=odbc.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=odbc.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"odbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling odbc extension" -perl -i -plne 's|extension=odbc.so|;extension=odbc.so|' ${PHP_INI} +perl -i -plne 's|extension=odbc.so|;extension=odbc.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"odbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling openssl extension" -perl -i -plne 's|;extension=openssl.so|extension=openssl.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"openssl\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=openssl.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=openssl.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=openssl.so|extension=openssl.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=openssl.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"openssl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling openssl extension" -perl -i -plne 's|extension=openssl.so|;extension=openssl.so|' ${PHP_INI} +perl -i -plne 's|extension=openssl.so|;extension=openssl.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"openssl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling pcntl extension" -perl -i -plne 's|;extension=pcntl.so|extension=pcntl.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pcntl\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pcntl.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pcntl.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pcntl.so|extension=pcntl.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pcntl.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pcntl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling pcntl extension" -perl -i -plne 's|extension=pcntl.so|;extension=pcntl.so|' ${PHP_INI} +perl -i -plne 's|extension=pcntl.so|;extension=pcntl.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pcntl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -17,10 +17,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_mysql extension" +echo " ===> Enabling pdomysql extension" -perl -i -plne 's|;extension=pdo_mysql.so|extension=pdo_mysql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdomysql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdomysql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdomysql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdomysql.so|extension=pdomysql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdomysql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdomysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -30,10 +60,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_mysql extension" +echo " ===> Disabling pdomysql extension" -perl -i -plne 's|extension=pdo_mysql.so|;extension=pdo_mysql.so|' ${PHP_INI} +perl -i -plne 's|extension=pdomysql.so|;extension=pdomysql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdomysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -16,10 +16,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_odbc extension" +echo " ===> Enabling pdoodbc extension" -perl -i -plne 's|;extension=pdo_odbc.so|extension=pdo_odbc.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdoodbc\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdoodbc.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdoodbc.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdoodbc.so|extension=pdoodbc.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdoodbc.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdoodbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -29,10 +59,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_odbc extension" +echo " ===> Disabling pdoodbc extension" -perl -i -plne 's|extension=pdo_odbc.so|;extension=pdo_odbc.so|' ${PHP_INI} +perl -i -plne 's|extension=pdoodbc.so|;extension=pdoodbc.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdoodbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,10 +18,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_pgsql extension" +echo " ===> Enabling pdopgsql extension" -perl -i -plne 's|;extension=pdo_pgsql.so|extension=pdo_pgsql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdopgsql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdopgsql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdopgsql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdopgsql.so|extension=pdopgsql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdopgsql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdopgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,10 +61,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_pgsql extension" +echo " ===> Disabling pdopgsql extension" -perl -i -plne 's|extension=pdo_pgsql.so|;extension=pdo_pgsql.so|' ${PHP_INI} +perl -i -plne 's|extension=pdopgsql.so|;extension=pdopgsql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdopgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -16,10 +16,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_sqlite extension" +echo " ===> Enabling pdosqlite extension" -perl -i -plne 's|;extension=pdo_sqlite.so|extension=pdo_sqlite.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdosqlite\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdosqlite.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdosqlite.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdosqlite.so|extension=pdosqlite.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdosqlite.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdosqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -29,10 +59,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_sqlite extension" +echo " ===> Disabling pdosqlite extension" -perl -i -plne 's|extension=pdo_sqlite.so|;extension=pdo_sqlite.so|' ${PHP_INI} +perl -i -plne 's|extension=pdosqlite.so|;extension=pdosqlite.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdosqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling pgsql extension" -perl -i -plne 's|;extension=pgsql.so|extension=pgsql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pgsql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pgsql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pgsql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pgsql.so|extension=pgsql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pgsql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling pgsql extension" -perl -i -plne 's|extension=pgsql.so|;extension=pgsql.so|' ${PHP_INI} +perl -i -plne 's|extension=pgsql.so|;extension=pgsql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling posix extension" -perl -i -plne 's|;extension=posix.so|extension=posix.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"posix\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=posix.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=posix.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=posix.so|extension=posix.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=posix.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"posix\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling posix extension" -perl -i -plne 's|extension=posix.so|;extension=posix.so|' ${PHP_INI} +perl -i -plne 's|extension=posix.so|;extension=posix.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"posix\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling pspell extension" -perl -i -plne 's|;extension=pspell.so|extension=pspell.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pspell\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pspell.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pspell.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pspell.so|extension=pspell.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pspell.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pspell\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling pspell extension" -perl -i -plne 's|extension=pspell.so|;extension=pspell.so|' ${PHP_INI} +perl -i -plne 's|extension=pspell.so|;extension=pspell.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pspell\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling readline extension" -perl -i -plne 's|;extension=readline.so|extension=readline.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"readline\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=readline.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=readline.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=readline.so|extension=readline.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=readline.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"readline\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling readline extension" -perl -i -plne 's|extension=readline.so|;extension=readline.so|' ${PHP_INI} +perl -i -plne 's|extension=readline.so|;extension=readline.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"readline\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -1 +1,65 @@ @ ( echo "==> Not configuring recode see README in extensions/php5_recode" ) +define CSWphp5recode_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling recode extension" + +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"recode\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=recode.so +****************************************************************************** +_EOF_ +exit 0 +fi + +if grep 'extension=recode.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=recode.so|extension=recode.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=recode.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"recode\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + +exit 0 +endef + +define CSWphp5recode_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling recode extension" + +perl -i -plne 's|extension=recode.so|;extension=recode.so|' $${PHP_INI} + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"recode\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + +exit 0 +endef Modified: csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling session extension" -perl -i -plne 's|;extension=session.so|extension=session.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"session\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=session.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=session.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=session.so|extension=session.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=session.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"session\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling session extension" -perl -i -plne 's|extension=session.so|;extension=session.so|' ${PHP_INI} +perl -i -plne 's|extension=session.so|;extension=session.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"session\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling shmop extension" -perl -i -plne 's|;extension=shmop.so|extension=shmop.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"shmop\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=shmop.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=shmop.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=shmop.so|extension=shmop.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=shmop.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"shmop\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling shmop extension" -perl -i -plne 's|extension=shmop.so|;extension=shmop.so|' ${PHP_INI} +perl -i -plne 's|extension=shmop.so|;extension=shmop.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"shmop\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -14,8 +14,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling simplexml extension" -perl -i -plne 's|;extension=simplexml.so|extension=simplexml.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"simplexml\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=simplexml.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=simplexml.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=simplexml.so|extension=simplexml.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=simplexml.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"simplexml\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -27,8 +57,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling simplexml extension" -perl -i -plne 's|extension=simplexml.so|;extension=simplexml.so|' ${PHP_INI} +perl -i -plne 's|extension=simplexml.so|;extension=simplexml.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"simplexml\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling snmp extension" -perl -i -plne 's|;extension=snmp.so|extension=snmp.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"snmp\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=snmp.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=snmp.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=snmp.so|extension=snmp.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=snmp.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"snmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling snmp extension" -perl -i -plne 's|extension=snmp.so|;extension=snmp.so|' ${PHP_INI} +perl -i -plne 's|extension=snmp.so|;extension=snmp.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"snmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling soap extension" -perl -i -plne 's|;extension=soap.so|extension=soap.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"soap\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=soap.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=soap.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=soap.so|extension=soap.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=soap.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"soap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling soap extension" -perl -i -plne 's|extension=soap.so|;extension=soap.so|' ${PHP_INI} +perl -i -plne 's|extension=soap.so|;extension=soap.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"soap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling sockets extension" -perl -i -plne 's|;extension=sockets.so|extension=sockets.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"sockets\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=sockets.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=sockets.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=sockets.so|extension=sockets.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=sockets.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"sockets\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling sockets extension" -perl -i -plne 's|extension=sockets.so|;extension=sockets.so|' ${PHP_INI} +perl -i -plne 's|extension=sockets.so|;extension=sockets.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"sockets\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling sqlite extension" -perl -i -plne 's|;extension=sqlite.so|extension=sqlite.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"sqlite\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=sqlite.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=sqlite.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=sqlite.so|extension=sqlite.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=sqlite.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"sqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling sqlite extension" -perl -i -plne 's|extension=sqlite.so|;extension=sqlite.so|' ${PHP_INI} +perl -i -plne 's|extension=sqlite.so|;extension=sqlite.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"sqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 10:57:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 08:57:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4155] csw/mgar/pkg/figlet/trunk Message-ID: Revision: 4155 http://gar.svn.sourceforge.net/gar/?rev=4155&view=rev Author: dmichelsen Date: 2009-04-02 08:57:40 +0000 (Thu, 02 Apr 2009) Log Message: ----------- figlet: Make sure GAR CFLAGS are used, dynamic gspec Modified Paths: -------------- csw/mgar/pkg/figlet/trunk/Makefile csw/mgar/pkg/figlet/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec Property Changed: ---------------- csw/mgar/pkg/figlet/trunk/ Property changes on: csw/mgar/pkg/figlet/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/figlet/trunk/Makefile =================================================================== --- csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 08:57:40 UTC (rev 4155) @@ -17,8 +17,11 @@ MASTER_SITES += ftp://ftp.figlet.org/pub/figlet/fonts/ # ours.tar.gz is already in the figlet distribution DISTFILES += contributed.tar.gz international.tar.gz ms-dos.tar.gz -DISTFILES += $(call admfiles,CSWfiglet) +SPKG_SOURCEURL = http://www.figlet.org + +LICENSE = LICENSE + DISTNAME = $(GARNAME)$(RELEASE) # We define upstream file regex so we can be notifed of new upstream software release @@ -30,7 +33,7 @@ APPDIR = $(sharedstatedir)/$(GARNAME) DEFAULTFONTDIR = $(APPDIR)/fonts -BUILD_OVERRIDE_DIRS = CC DEFAULTFONTDIR +BUILD_OVERRIDE_DIRS = CC CFLAGS DEFAULTFONTDIR # FIGlet doesn't have tests TEST_SCRIPTS = Modified: csw/mgar/pkg/figlet/trunk/checksums =================================================================== --- csw/mgar/pkg/figlet/trunk/checksums 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/figlet/trunk/checksums 2009-04-02 08:57:40 UTC (rev 4155) @@ -1,5 +1,4 @@ -9fcf4f1651b8e6d3f56f1ef665285b2e download/figlet222.tar.gz +5f84ad52d092d5db4ad5916df767646b download/figlet222.tar.gz 6e2dec4499f7a7fe178522e02e0b6cd1 download/contributed.tar.gz b2d53f7e251014adcdb4d407c47f90ef download/international.tar.gz 49aa57ab989e8d952be037414b0bbbe4 download/ms-dos.tar.gz -8ccf6bb63ce609750b65ba1e74aa2ca2 download/CSWfiglet.gspec Deleted: csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec =================================================================== --- csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec 2009-04-02 08:57:40 UTC (rev 4155) @@ -1,4 +0,0 @@ -%var bitname figlet -%var pkgname CSWfiglet -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 10:58:46 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 08:58:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4156] csw/mgar/gar/v2/gar.lib.mk Message-ID: Revision: 4156 http://gar.svn.sourceforge.net/gar/?rev=4156&view=rev Author: dmichelsen Date: 2009-04-02 08:58:46 +0000 (Thu, 02 Apr 2009) Log Message: ----------- mGAR v2: Increase wget timeout to honour slow FTP sites Modified Paths: -------------- csw/mgar/gar/v2/gar.lib.mk Modified: csw/mgar/gar/v2/gar.lib.mk =================================================================== --- csw/mgar/gar/v2/gar.lib.mk 2009-04-02 08:57:40 UTC (rev 4155) +++ csw/mgar/gar/v2/gar.lib.mk 2009-04-02 08:58:46 UTC (rev 4156) @@ -90,16 +90,16 @@ # download an http URL (colons omitted) http//%: - @wget $(WGET_OPTS) -T 10 -c -P $(PARTIALDIR) http://$* + @wget $(WGET_OPTS) -T 30 -c -P $(PARTIALDIR) http://$* https//%: - @wget $(WGET_OPTS) -T 10 -c -P $(PARTIALDIR) https://$* + @wget $(WGET_OPTS) -T 30 -c -P $(PARTIALDIR) https://$* # download an ftp URL (colons omitted) #ftp//%: -# @wget -T 10 -c --passive-ftp -P $(PARTIALDIR) ftp://$* +# @wget -T 30 -c --passive-ftp -P $(PARTIALDIR) ftp://$* ftp//%: - @wget $(WGET_OPTS) -T 10 -c -P $(PARTIALDIR) ftp://$* + @wget $(WGET_OPTS) -T 30 -c -P $(PARTIALDIR) ftp://$* # link to a local copy of the file # (absolute path) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 13:26:02 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 11:26:02 +0000 Subject: [csw-devel] SF.net SVN: gar:[4157] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4157 http://gar.svn.sourceforge.net/gar/?rev=4157&view=rev Author: dmichelsen Date: 2009-04-02 11:26:02 +0000 (Thu, 02 Apr 2009) Log Message: ----------- mGAR v2: Rewrote passing of runtime linker path via LD_OPTIONS instead of LDFLAGS Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-02 08:58:46 UTC (rev 4156) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-02 11:26:02 UTC (rev 4157) @@ -442,31 +442,25 @@ # however not expanded during compilation, so linker-pathes must directly be accessible # without expansion and needs to be differentiated between 32 and 64 bit, therefore # the links 32 and 64. -ifndef NORUNPATH -_ADD_RUNPATH = 1 -endif -ifeq ($(origin LINKER_FLAGS), undefined) -ifdef NOISALIST -LINKER_FLAGS = $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))$(if $(_ADD_RUNPATH), -R$(abspath $(ELIB)/$(MM_LIBDIR)))) $(EXTRA_LINKER_FLAGS) -else +ifndef NORUNPATH # If we use $ISALIST it is a good idea to also add $MM_LIBDIR as there # may not be a subdirectory for the 32-bit standard case (this would normally # be a symlink of the form lib/sparcv8 -> . and lib/i386 -> .). This is most likely # the case for libraries in $(EXTRA_LIBS) for which no links generated in CSWcommon. -# The quoting of $ISALIST is unfortunately dependend on how often the linker flags -# are expanded until execution. The definition here is suitable for autotools. -# For other buildtools it may be suitable to add definitions with other quotings. -RUNPATHQUOTE ?= 2 -ifeq ($(RUNPATHQUOTE),1) - _Q = \\\$$\$$ -else - _Q = \\\\\\\$$\$$ +RUNPATH_DIRS ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_DIRS) + +ifndef NOISALIST +RUNPATH_ISALIST ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_ISALIST) endif -LINKER_FLAGS = $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))$(if $(_ADD_RUNPATH), -R$(ELIB)/$(_Q)ISALIST -R$(abspath $(ELIB)/$(MM_LIBDIR)))) $(EXTRA_LINKER_FLAGS) + +# Iterate over all directories in RUNPATH_DIRS, prefix each directory with one +# with $ISALIST if it exists in RUNPATH_ISALIST, then append remaining dirs from RUNPATH_ISALIST +RUNPATH_LINKER_FLAGS ?= $(foreach D,$(RUNPATH_DIRS),$(addprefix -R,$(addsuffix /\$$ISALIST,$(filter $D,$(RUNPATH_ISALIST))) $D)) $(addprefix -R,$(filter-out $(RUNPATH_DIRS),$(RUNPATH_ISALIST))) $(EXTRA_RUNPATH_LINKER_FLAGS) endif -endif +LINKER_FLAGS ?= $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))) $(EXTRA_LINKER_FLAGS) + CC_HOME = $($(GARCOMPILER)_CC_HOME) CC = $($(GARCOMPILER)_CC) CXX = $($(GARCOMPILER)_CXX) @@ -477,12 +471,12 @@ ASFLAGS ?= $(strip $($(GARCOMPILER)_AS_FLAGS) $(EXTRA_ASFLAGS)) OPTFLAGS ?= $(strip $($(GARCOMPILER)_CC_FLAGS) $(EXTRA_OPTFLAGS)) -#GCC3_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) -#GCC4_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) -#SOS11_LD_OPTIONS = $(strip $(EXTRA_SOS11_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) -#SOS12_LD_OPTIONS = $(strip $(EXTRA_SOS12_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) +GCC3_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +GCC4_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +SOS11_LD_OPTIONS = $(strip $(EXTRA_SOS11_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) +SOS12_LD_OPTIONS = $(strip $(EXTRA_SOS12_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) -#LD_OPTIONS = $($(GARCOMPILER)_LD_OPTIONS) +LD_OPTIONS ?= $($(GARCOMPILER)_LD_OPTIONS) $(RUNPATH_LINKER_FLAGS) # LD_OPTIONS considered harmful. Disable for the moment. #LDOPT_LIBS ?= $(libdir) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 14:15:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 12:15:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4158] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4158 http://gar.svn.sourceforge.net/gar/?rev=4158&view=rev Author: dmichelsen Date: 2009-04-02 12:15:19 +0000 (Thu, 02 Apr 2009) Log Message: ----------- mGAR v2: Apply MM_LIBDIR as late as possible Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-02 11:26:02 UTC (rev 4157) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-02 12:15:19 UTC (rev 4158) @@ -448,15 +448,15 @@ # may not be a subdirectory for the 32-bit standard case (this would normally # be a symlink of the form lib/sparcv8 -> . and lib/i386 -> .). This is most likely # the case for libraries in $(EXTRA_LIBS) for which no links generated in CSWcommon. -RUNPATH_DIRS ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_DIRS) +RUNPATH_DIRS ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_DIRS) ifndef NOISALIST -RUNPATH_ISALIST ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_ISALIST) +RUNPATH_ISALIST ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_ISALIST) endif # Iterate over all directories in RUNPATH_DIRS, prefix each directory with one # with $ISALIST if it exists in RUNPATH_ISALIST, then append remaining dirs from RUNPATH_ISALIST -RUNPATH_LINKER_FLAGS ?= $(foreach D,$(RUNPATH_DIRS),$(addprefix -R,$(addsuffix /\$$ISALIST,$(filter $D,$(RUNPATH_ISALIST))) $D)) $(addprefix -R,$(filter-out $(RUNPATH_DIRS),$(RUNPATH_ISALIST))) $(EXTRA_RUNPATH_LINKER_FLAGS) +RUNPATH_LINKER_FLAGS ?= $(foreach D,$(RUNPATH_DIRS),$(addprefix -R,$(addsuffix /\$$ISALIST,$(filter $D,$(RUNPATH_ISALIST))) $(abspath $D/$(MM_LIBDIR)))) $(addprefix -R,$(filter-out $(RUNPATH_DIRS),$(RUNPATH_ISALIST))) $(EXTRA_RUNPATH_LINKER_FLAGS) endif LINKER_FLAGS ?= $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))) $(EXTRA_LINKER_FLAGS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:06:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:06:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4159] csw/mgar/pkg/figlet/trunk/Makefile Message-ID: Revision: 4159 http://gar.svn.sourceforge.net/gar/?rev=4159&view=rev Author: dmichelsen Date: 2009-04-02 13:06:50 +0000 (Thu, 02 Apr 2009) Log Message: ----------- figlet: Don't include any runtime linker path Modified Paths: -------------- csw/mgar/pkg/figlet/trunk/Makefile Modified: csw/mgar/pkg/figlet/trunk/Makefile =================================================================== --- csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 12:15:19 UTC (rev 4158) +++ csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 13:06:50 UTC (rev 4159) @@ -40,6 +40,8 @@ INSTALL_SCRIPTS = custom +NORUNPATH = 1 + include gar/category.mk # The install part from the Makefile is completely unrelocatable :-( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:23:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:23:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4160] csw/mgar/pkg/flex_new/trunk/Makefile Message-ID: Revision: 4160 http://gar.svn.sourceforge.net/gar/?rev=4160&view=rev Author: dmichelsen Date: 2009-04-02 13:23:59 +0000 (Thu, 02 Apr 2009) Log Message: ----------- flex_new: Don't use ISALIST in runtime linker path Modified Paths: -------------- csw/mgar/pkg/flex_new/trunk/Makefile Modified: csw/mgar/pkg/flex_new/trunk/Makefile =================================================================== --- csw/mgar/pkg/flex_new/trunk/Makefile 2009-04-02 13:06:50 UTC (rev 4159) +++ csw/mgar/pkg/flex_new/trunk/Makefile 2009-04-02 13:23:59 UTC (rev 4160) @@ -23,6 +23,7 @@ REQUIRED_PKGS = CSWggettextrt CSWiconv +NOISALIST = 1 CONFIGURE_ARGS = --prefix=$(libexecdir)/$(GARNAME)-$(GARVERSION) TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:30:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:30:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4161] csw/mgar/pkg/less/trunk/Makefile Message-ID: Revision: 4161 http://gar.svn.sourceforge.net/gar/?rev=4161&view=rev Author: dmichelsen Date: 2009-04-02 13:30:34 +0000 (Thu, 02 Apr 2009) Log Message: ----------- less: Don't use ISALIST in runtime linker path Modified Paths: -------------- csw/mgar/pkg/less/trunk/Makefile Modified: csw/mgar/pkg/less/trunk/Makefile =================================================================== --- csw/mgar/pkg/less/trunk/Makefile 2009-04-02 13:23:59 UTC (rev 4160) +++ csw/mgar/pkg/less/trunk/Makefile 2009-04-02 13:30:34 UTC (rev 4161) @@ -18,6 +18,7 @@ REQUIRED_PKGS = CSWncurses CSWggettextrt +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) TEST_TARGET = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:38:56 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:38:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4162] csw/mgar/pkg/gtar/trunk/Makefile Message-ID: Revision: 4162 http://gar.svn.sourceforge.net/gar/?rev=4162&view=rev Author: dmichelsen Date: 2009-04-02 13:38:56 +0000 (Thu, 02 Apr 2009) Log Message: ----------- gtar: Don't use ISALIST in runtime linker path Modified Paths: -------------- csw/mgar/pkg/gtar/trunk/Makefile Modified: csw/mgar/pkg/gtar/trunk/Makefile =================================================================== --- csw/mgar/pkg/gtar/trunk/Makefile 2009-04-02 13:30:34 UTC (rev 4161) +++ csw/mgar/pkg/gtar/trunk/Makefile 2009-04-02 13:38:56 UTC (rev 4162) @@ -26,6 +26,7 @@ REQUIRED_PKGS = CSWggettextrt CSWiconv +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) --program-prefix=g TEST_SCRIPTS = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 2 16:28:44 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 02 Apr 2009 14:28:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4163] csw/mgar/pkg/cvsps/trunk/Makefile Message-ID: Revision: 4163 http://gar.svn.sourceforge.net/gar/?rev=4163&view=rev Author: bdwalton Date: 2009-04-02 14:28:44 +0000 (Thu, 02 Apr 2009) Log Message: ----------- remove RUNPATHQUOTE setting now that LD_OPTIONS is used Modified Paths: -------------- csw/mgar/pkg/cvsps/trunk/Makefile Modified: csw/mgar/pkg/cvsps/trunk/Makefile =================================================================== --- csw/mgar/pkg/cvsps/trunk/Makefile 2009-04-02 13:38:56 UTC (rev 4162) +++ csw/mgar/pkg/cvsps/trunk/Makefile 2009-04-02 14:28:44 UTC (rev 4163) @@ -32,9 +32,6 @@ TEST_SCRIPTS = -# to fix mantis bug #3528 -RUNPATHQUOTE = 1 - CONFIGURE_ARGS = $(DIRPATHS) --with-zlib=/opt/csw include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From ggunselm at emporia.edu Thu Apr 2 17:22:44 2009 From: ggunselm at emporia.edu (Glen Gunselman) Date: Thu, 02 Apr 2009 10:22:44 -0500 Subject: [csw-devel] Orca and friends packages In-Reply-To: <625385e30903201821y4f2e219o772856b94a260f86@mail.gmail.com> References: <49BF8E3F.CC54.005D.3@emporia.edu> <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> <49BFE579.CC54.005D.3@emporia.edu> <91D22A54-32E7-40FF-A6D1-BE3252D91D92@opencsw.org> <49C3F3E8.CC54.005D.3@emporia.edu> <625385e30903201821y4f2e219o772856b94a260f86@mail.gmail.com> Message-ID: <49D491F4.CC54.005D.3@emporia.edu> Peter, Thanks, pkgutil was able to install package. Glen >>> Peter Bonivart 3/20/2009 8:21 PM >>> 2009/3/21 Glen Gunselman : > Is this a symptom of using "test packages" and I need to manually install > the dependancies, or have I missed a step or two, or is there some work on > your end that I need to wait for? There's another way of installing mentioned on that page: pkgutil -t http://mirror.opencsw.org/opencsw/testing/`uname -p`/`uname -r` -i Have you tried that? -- /peter _______________________________________________ devel mailing list devel at lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdwalton at users.sourceforge.net Thu Apr 2 18:50:22 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 02 Apr 2009 16:50:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4164] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4164 http://gar.svn.sourceforge.net/gar/?rev=4164&view=rev Author: bdwalton Date: 2009-04-02 16:50:17 +0000 (Thu, 02 Apr 2009) Log Message: ----------- remove RUNPATHQUOTE now that LD_OPTIONS is doing the -R bits. Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-02 14:28:44 UTC (rev 4163) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-02 16:50:17 UTC (rev 4164) @@ -94,9 +94,6 @@ # software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -# properly quote RPATH to address mantis bug #3539 -RUNPATHQUOTE = 1 - CONFIGURE_ARGS = $(DIRPATHS) --with-shell=$(bindir)/bash CONFIGURE_ARGS += --with-perl=$(bindir)/perl CONFIGURE_ARGS += --with-tcltk=$(bindir)/wish This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 2 21:55:35 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 02 Apr 2009 19:55:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4165] csw/mgar/pkg/xmlto/trunk/Makefile Message-ID: Revision: 4165 http://gar.svn.sourceforge.net/gar/?rev=4165&view=rev Author: bdwalton Date: 2009-04-02 19:55:35 +0000 (Thu, 02 Apr 2009) Log Message: ----------- disable runpath; add missing dependency on bash Modified Paths: -------------- csw/mgar/pkg/xmlto/trunk/Makefile Modified: csw/mgar/pkg/xmlto/trunk/Makefile =================================================================== --- csw/mgar/pkg/xmlto/trunk/Makefile 2009-04-02 16:50:17 UTC (rev 4164) +++ csw/mgar/pkg/xmlto/trunk/Makefile 2009-04-02 19:55:35 UTC (rev 4165) @@ -7,7 +7,7 @@ REQUIRED_PKGS = CSWsgmlcommon CSWxmlcommon CSWlibxml2 CSWdocbookdtds REQUIRED_PKGS += CSWdocbookxsl CSWlibxslt CSWflex CSWw3m CSWmktemp -REQUIRED_PKGS += CSWggetopt +REQUIRED_PKGS += CSWggetopt CSWbash DESCRIPTION = An XSL toolchain front end. define BLURB @@ -24,6 +24,9 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 +# we don't link to anything besides libc and libm. +NORUNPATH = 1 + pre-configure: @(cd $(WORKSRC); \ touch doc/xmlto.xml doc/xmlif.xml ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 22:01:17 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 20:01:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4166] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4166 http://gar.svn.sourceforge.net/gar/?rev=4166&view=rev Author: valholla Date: 2009-04-02 20:01:16 +0000 (Thu, 02 Apr 2009) Log Message: ----------- fix for bugs 3587,3479,and 3499 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdo/files/ Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -111,5 +111,8 @@ pre-fetch: $(foreach F,$(EXTFILES),$(shell cp $(F) $(DOWNLOADDIR))) +post-merge-modulated: + @(grm -fr $(DESTDIR)/.[a-z]*) + # System Rules/Configuration include gar/category.mk Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"bcmath\" +* WARNING: Could not enable Extension "bcmath" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"bcmath\" +* NOTICE: Successfully Enabled Extension "bcmath" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"bcmath\" +* NOTICE: Successfully Disabled Extension "bcmath" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"bz2\" +* WARNING: Could not enable Extension "bz2" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"bz2\" +* NOTICE: Successfully Enabled Extension "bz2" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"bz2\" +* NOTICE: Successfully Disabled Extension "bz2" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"calendar\" +* WARNING: Could not enable Extension "calendar" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"calendar\" +* NOTICE: Successfully Enabled Extension "calendar" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"calendar\" +* NOTICE: Successfully Disabled Extension "calendar" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ctype\" +* WARNING: Could not enable Extension "ctype" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ctype\" +* NOTICE: Successfully Enabled Extension "ctype" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ctype\" +* NOTICE: Successfully Disabled Extension "ctype" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"curl\" +* WARNING: Could not enable Extension "curl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"curl\" +* NOTICE: Successfully Enabled Extension "curl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"curl\" +* NOTICE: Successfully Disabled Extension "curl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -28,7 +28,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"dba\" +* WARNING: Could not enable Extension "dba" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -47,7 +47,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"dba\" +* NOTICE: Successfully Enabled Extension "dba" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -70,7 +70,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"dba\" +* NOTICE: Successfully Disabled Extension "dba" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"dbase\" +* WARNING: Could not enable Extension "dbase" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"dbase\" +* NOTICE: Successfully Enabled Extension "dbase" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"dbase\" +* NOTICE: Successfully Disabled Extension "dbase" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"dom\" +* WARNING: Could not enable Extension "dom" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"dom\" +* NOTICE: Successfully Enabled Extension "dom" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"dom\" +* NOTICE: Successfully Disabled Extension "dom" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -26,7 +26,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"exif\" +* WARNING: Could not enable Extension "exif" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -45,7 +45,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"exif\" +* NOTICE: Successfully Enabled Extension "exif" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -68,7 +68,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"exif\" +* NOTICE: Successfully Disabled Extension "exif" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ftp\" +* WARNING: Could not enable Extension "ftp" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ftp\" +* NOTICE: Successfully Enabled Extension "ftp" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ftp\" +* NOTICE: Successfully Disabled Extension "ftp" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -34,7 +34,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"gd\" +* WARNING: Could not enable Extension "gd" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -53,7 +53,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"gd\" +* NOTICE: Successfully Enabled Extension "gd" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -76,7 +76,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"gd\" +* NOTICE: Successfully Disabled Extension "gd" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"gettext\" +* WARNING: Could not enable Extension "gettext" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"gettext\" +* NOTICE: Successfully Enabled Extension "gettext" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"gettext\" +* NOTICE: Successfully Disabled Extension "gettext" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"gmp\" +* WARNING: Could not enable Extension "gmp" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"gmp\" +* NOTICE: Successfully Enabled Extension "gmp" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"gmp\" +* NOTICE: Successfully Disabled Extension "gmp" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"hash\" +* WARNING: Could not enable Extension "hash" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"hash\" +* NOTICE: Successfully Enabled Extension "hash" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"hash\" +* NOTICE: Successfully Disabled Extension "hash" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -30,7 +30,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"iconv\" +* WARNING: Could not enable Extension "iconv" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -49,7 +49,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"iconv\" +* NOTICE: Successfully Enabled Extension "iconv" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -72,7 +72,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"iconv\" +* NOTICE: Successfully Disabled Extension "iconv" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"imap\" +* WARNING: Could not enable Extension "imap" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"imap\" +* NOTICE: Successfully Enabled Extension "imap" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"imap\" +* NOTICE: Successfully Disabled Extension "imap" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"json\" +* WARNING: Could not enable Extension "json" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"json\" +* NOTICE: Successfully Enabled Extension "json" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"json\" +* NOTICE: Successfully Disabled Extension "json" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ldap\" +* WARNING: Could not enable Extension "ldap" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ldap\" +* NOTICE: Successfully Enabled Extension "ldap" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ldap\" +* NOTICE: Successfully Disabled Extension "ldap" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mbstring\" +* WARNING: Could not enable Extension "mbstring" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mbstring\" +* NOTICE: Successfully Enabled Extension "mbstring" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mbstring\" +* NOTICE: Successfully Disabled Extension "mbstring" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mcrypt\" +* WARNING: Could not enable Extension "mcrypt" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mcrypt\" +* NOTICE: Successfully Enabled Extension "mcrypt" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mcrypt\" +* NOTICE: Successfully Disabled Extension "mcrypt" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mhash\" +* WARNING: Could not enable Extension "mhash" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mhash\" +* NOTICE: Successfully Enabled Extension "mhash" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mhash\" +* NOTICE: Successfully Disabled Extension "mhash" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mime_magic\" +* WARNING: Could not enable Extension "mime_magic" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mime_magic\" +* NOTICE: Successfully Enabled Extension "mime_magic" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mime_magic\" +* NOTICE: Successfully Disabled Extension "mime_magic" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mssql\" +* WARNING: Could not enable Extension "mssql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mssql\" +* NOTICE: Successfully Enabled Extension "mssql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mssql\" +* NOTICE: Successfully Disabled Extension "mssql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mysql\" +* WARNING: Could not enable Extension "mysql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mysql\" +* NOTICE: Successfully Enabled Extension "mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mysql\" +* NOTICE: Successfully Disabled Extension "mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mysqli\" +* WARNING: Could not enable Extension "mysqli" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mysqli\" +* NOTICE: Successfully Enabled Extension "mysqli" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mysqli\" +* NOTICE: Successfully Disabled Extension "mysqli" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ncurses\" +* WARNING: Could not enable Extension "ncurses" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ncurses\" +* NOTICE: Successfully Enabled Extension "ncurses" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ncurses\" +* NOTICE: Successfully Disabled Extension "ncurses" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"odbc\" +* WARNING: Could not enable Extension "odbc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"odbc\" +* NOTICE: Successfully Enabled Extension "odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"odbc\" +* NOTICE: Successfully Disabled Extension "odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"openssl\" +* WARNING: Could not enable Extension "openssl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"openssl\" +* NOTICE: Successfully Enabled Extension "openssl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"openssl\" +* NOTICE: Successfully Disabled Extension "openssl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pcntl\" +* WARNING: Could not enable Extension "pcntl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pcntl\" +* NOTICE: Successfully Enabled Extension "pcntl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pcntl\" +* NOTICE: Successfully Disabled Extension "pcntl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Added: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -0,0 +1,75 @@ +PHP5EXT_NAME = pdo + +PACKAGES += CSWphp5pdo + +CATALOGNAME_CSWphp5pdo = php5_pdo +SPKG_DESC_CSWphp5pdo = pdo Extention for PHP5 +REQUIRED_PKGS_CSWphp5pdo = CSWphp5 + +PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* +PKGFILES_CSWphp5pdo += .*/lib/php/extensions/.*/pdo\.a* + +define CSWphp5pdo_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo extension" + +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension "pdo" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdo.so +****************************************************************************** +_EOF_ +exit 0 +fi + +if grep 'extension=pdo.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo.so|extension=pdo.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension "pdo" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + +exit 0 +endef + +define CSWphp5pdo_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo extension" + +perl -i -plne 's|extension=pdo.so|;extension=pdo.so|' $${PHP_INI} + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension "pdo" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + +exit 0 +endef Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdomysql = php5_pdomysql SPKG_DESC_CSWphp5pdomysql = pdomysql Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib +REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib CSWphp5pdo CONFIGURE_ARGS += --with-pdo-mysql=shared,$(prefix) CONFIGURE_ARGS += --with-zlib-dir=$(prefix) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdomysql\" +* WARNING: Could not enable Extension "pdomysql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdomysql\" +* NOTICE: Successfully Enabled Extension "pdomysql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdomysql\" +* NOTICE: Successfully Disabled Extension "pdomysql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdoodbc = php5_pdoodbc SPKG_DESC_CSWphp5pdoodbc = pdoodbc Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc +REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc CSWphp5pdo CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdoodbc\" +* WARNING: Could not enable Extension "pdoodbc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdoodbc\" +* NOTICE: Successfully Enabled Extension "pdoodbc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdoodbc\" +* NOTICE: Successfully Disabled Extension "pdoodbc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdopgsql = php5_pdopgsql SPKG_DESC_CSWphp5pdopgsql = pdopgsql Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq +REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq CSWphp5pdo PATCHFILES += pdopgsql.diff @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdopgsql\" +* WARNING: Could not enable Extension "pdopgsql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdopgsql\" +* NOTICE: Successfully Enabled Extension "pdopgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdopgsql\" +* NOTICE: Successfully Disabled Extension "pdopgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite SPKG_DESC_CSWphp5pdosqlite = pdosqlite Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 +REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdosqlite\" +* WARNING: Could not enable Extension "pdosqlite" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdosqlite\" +* NOTICE: Successfully Enabled Extension "pdosqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdosqlite\" +* NOTICE: Successfully Disabled Extension "pdosqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pgsql\" +* WARNING: Could not enable Extension "pgsql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pgsql\" +* NOTICE: Successfully Enabled Extension "pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pgsql\" +* NOTICE: Successfully Disabled Extension "pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"posix\" +* WARNING: Could not enable Extension "posix" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"posix\" +* NOTICE: Successfully Enabled Extension "posix" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"posix\" +* NOTICE: Successfully Disabled Extension "posix" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pspell\" +* WARNING: Could not enable Extension "pspell" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pspell\" +* NOTICE: Successfully Enabled Extension "pspell" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pspell\" +* NOTICE: Successfully Disabled Extension "pspell" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"readline\" +* WARNING: Could not enable Extension "readline" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"readline\" +* NOTICE: Successfully Enabled Extension "readline" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"readline\" +* NOTICE: Successfully Disabled Extension "readline" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -12,7 +12,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"recode\" +* WARNING: Could not enable Extension "recode" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -31,7 +31,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"recode\" +* NOTICE: Successfully Enabled Extension "recode" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -54,7 +54,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"recode\" +* NOTICE: Successfully Disabled Extension "recode" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"session\" +* WARNING: Could not enable Extension "session" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"session\" +* NOTICE: Successfully Enabled Extension "session" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"session\" +* NOTICE: Successfully Disabled Extension "session" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"shmop\" +* WARNING: Could not enable Extension "shmop" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"shmop\" +* NOTICE: Successfully Enabled Extension "shmop" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"shmop\" +* NOTICE: Successfully Disabled Extension "shmop" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -19,7 +19,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"simplexml\" +* WARNING: Could not enable Extension "simplexml" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -38,7 +38,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"simplexml\" +* NOTICE: Successfully Enabled Extension "simplexml" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -61,7 +61,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"simplexml\" +* NOTICE: Successfully Disabled Extension "simplexml" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"snmp\" +* WARNING: Could not enable Extension "snmp" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"snmp\" +* NOTICE: Successfully Enabled Extension "snmp" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"snmp\" +* NOTICE: Successfully Disabled Extension "snmp" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"soap\" +* WARNING: Could not enable Extension "soap" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"soap\" +* NOTICE: Successfully Enabled Extension "soap" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"soap\" +* NOTICE: Successfully Disabled Extension "soap" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sockets\" +* WARNING: Could not enable Extension "sockets" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sockets\" +* NOTICE: Successfully Enabled Extension "sockets" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sockets\" +* NOTICE: Successfully Disabled Extension "sockets" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sqlite\" +* WARNING: Could not enable Extension "sqlite" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sqlite\" +* NOTICE: Successfully Enabled Extension "sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sqlite\" +* NOTICE: Successfully Disabled Extension "sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sysvmsg\" +* WARNING: Could not enable Extension "sysvmsg" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sysvmsg\" +* NOTICE: Successfully Enabled Extension "sysvmsg" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sysvmsg\" +* NOTICE: Successfully Disabled Extension "sysvmsg" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sysvsem\" +* WARNING: Could not enable Extension "sysvsem" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sysvsem\" +* NOTICE: Successfully Enabled Extension "sysvsem" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sysvsem\" +* NOTICE: Successfully Disabled Extension "sysvsem" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sysvshm\" +* WARNING: Could not enable Extension "sysvshm" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sysvshm\" +* NOTICE: Successfully Enabled Extension "sysvshm" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sysvshm\" +* NOTICE: Successfully Disabled Extension "sysvshm" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"tidy\" +* WARNING: Could not enable Extension "tidy" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"tidy\" +* NOTICE: Successfully Enabled Extension "tidy" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"tidy\" +* NOTICE: Successfully Disabled Extension "tidy" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"tokenizer\" +* WARNING: Could not enable Extension "tokenizer" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"tokenizer\" +* NOTICE: Successfully Enabled Extension "tokenizer" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"tokenizer\" +* NOTICE: Successfully Disabled Extension "tokenizer" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"wddx\" +* WARNING: Could not enable Extension "wddx" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"wddx\" +* NOTICE: Successfully Enabled Extension "wddx" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"wddx\" +* NOTICE: Successfully Disabled Extension "wddx" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -17,7 +17,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xml\" +* WARNING: Could not enable Extension "xml" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -36,7 +36,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xml\" +* NOTICE: Successfully Enabled Extension "xml" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -59,7 +59,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xml\" +* NOTICE: Successfully Disabled Extension "xml" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xmlreader\" +* WARNING: Could not enable Extension "xmlreader" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xmlreader\" +* NOTICE: Successfully Enabled Extension "xmlreader" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xmlreader\" +* NOTICE: Successfully Disabled Extension "xmlreader" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -26,7 +26,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xmlrpc\" +* WARNING: Could not enable Extension "xmlrpc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -45,7 +45,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xmlrpc\" +* NOTICE: Successfully Enabled Extension "xmlrpc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -68,7 +68,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xmlrpc\" +* NOTICE: Successfully Disabled Extension "xmlrpc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xmlwriter\" +* WARNING: Could not enable Extension "xmlwriter" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xmlwriter\" +* NOTICE: Successfully Enabled Extension "xmlwriter" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xmlwriter\" +* NOTICE: Successfully Disabled Extension "xmlwriter" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xsl\" +* WARNING: Could not enable Extension "xsl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xsl\" +* NOTICE: Successfully Enabled Extension "xsl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xsl\" +* NOTICE: Successfully Disabled Extension "xsl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"zip\" +* WARNING: Could not enable Extension "zip" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"zip\" +* NOTICE: Successfully Enabled Extension "zip" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"zip\" +* NOTICE: Successfully Disabled Extension "zip" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -16,7 +16,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"zlib\" +* WARNING: Could not enable Extension "zlib" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -35,7 +35,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"zlib\" +* NOTICE: Successfully Enabled Extension "zlib" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -58,7 +58,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"zlib\" +* NOTICE: Successfully Disabled Extension "zlib" * in $${PHP_INI} * * You will need to restart your web server to finish the removal This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 2 22:26:54 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 02 Apr 2009 20:26:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4167] csw/mgar/pkg/apache2/trunk Message-ID: Revision: 4167 http://gar.svn.sourceforge.net/gar/?rev=4167&view=rev Author: idogan23 Date: 2009-04-02 20:26:54 +0000 (Thu, 02 Apr 2009) Log Message: ----------- apache2_manual: fixed packaging bug in prototype file Modified Paths: -------------- csw/mgar/pkg/apache2/trunk/checksums csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype Modified: csw/mgar/pkg/apache2/trunk/checksums =================================================================== --- csw/mgar/pkg/apache2/trunk/checksums 2009-04-02 20:01:16 UTC (rev 4166) +++ csw/mgar/pkg/apache2/trunk/checksums 2009-04-02 20:26:54 UTC (rev 4167) @@ -19,7 +19,7 @@ 405bc4df4662e9faebe34f9b6a093d14 download/CSWap2suexec.postinstall 36128341749fa79f9942f4156b85f5b6 download/CSWap2suexec.preremove cb25d4b9c4e32f9e308c84824a4ca8f3 download/CSWapache2-manual.gspec -b189b99501543416dec017d0ba555f9c download/CSWapache2-manual.prototype +03d560ad0cd320ead33dc6fa2e72ad4c download/CSWapache2-manual.prototype 020f593630a0d59a4e398814e0e02c0f download/CSWapache2-devel.gspec 557c1d7fea8d6cd6674be399c0ab10d5 download/CSWapache2-devel.prototype 61b6b11aa70677da9386e90c3b5ba21c download/CSWapache2.killproc Modified: csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype =================================================================== --- csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype 2009-04-02 20:01:16 UTC (rev 4166) +++ csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype 2009-04-02 20:26:54 UTC (rev 4167) @@ -658,7 +658,7 @@ f none /opt/csw/apache2/share/manual/rewrite/index.html 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_tech.html.en 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/index.html.en 0644 root bin -f none opt/csw/apache2/share/manual/rewrite/rewrite_flags.html 0644 root bin +f none /opt/csw/apache2/share/manual/rewrite/rewrite_flags.html 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_guide_advanced.html.en 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_guide.html.en 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_flags.html.en 0644 root bin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 02:13:00 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 00:13:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4168] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4168 http://gar.svn.sourceforge.net/gar/?rev=4168&view=rev Author: valholla Date: 2009-04-03 00:13:00 +0000 (Fri, 03 Apr 2009) Log Message: ----------- remove extra paths Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 20:26:54 UTC (rev 4167) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-03 00:13:00 UTC (rev 4168) @@ -83,6 +83,7 @@ # Disable Tests (report submitted to PHP QA) SKIPTEST = 1 +ENABLE_CHECK = 0 # SAPI Specific Rules STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec @@ -100,6 +101,8 @@ ginstall -m 0644 \ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc + @(grm -fr $(DESTDIR)/.[a-z]*) + @(grm -fr $(DESTDIR)/$(php5_lib)/.[a-z]*) @$(MAKECOOKIE) post-configure-modulated: @@ -111,8 +114,5 @@ pre-fetch: $(foreach F,$(EXTFILES),$(shell cp $(F) $(DOWNLOADDIR))) -post-merge-modulated: - @(grm -fr $(DESTDIR)/.[a-z]*) - # System Rules/Configuration include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 02:40:44 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 00:40:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4169] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4169 http://gar.svn.sourceforge.net/gar/?rev=4169&view=rev Author: valholla Date: 2009-04-03 00:40:43 +0000 (Fri, 03 Apr 2009) Log Message: ----------- typo in sysvmsg module Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-03 00:13:00 UTC (rev 4168) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-03 00:40:43 UTC (rev 4169) @@ -102,7 +102,6 @@ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc @(grm -fr $(DESTDIR)/.[a-z]*) - @(grm -fr $(DESTDIR)/$(php5_lib)/.[a-z]*) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-03 00:13:00 UTC (rev 4168) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-03 00:40:43 UTC (rev 4169) @@ -6,7 +6,7 @@ SPKG_DESC_CSWphp5sysvmsg = sysvmsg Extention for PHP5 REQUIRED_PKGS_CSWphp5sysvmsg = CSWphp5 -CONFIGURE_ARGS += --enable-sysvsem=shared +CONFIGURE_ARGS += --enable-sysvmsg=shared PKGFILES_CSWphp5sysvmsg = .*/lib/php/extensions/.*/sysvmsg.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 03:32:44 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 01:32:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4170] csw/mgar/pkg/mod_python/trunk Message-ID: Revision: 4170 http://gar.svn.sourceforge.net/gar/?rev=4170&view=rev Author: valholla Date: 2009-04-03 01:32:44 +0000 (Fri, 03 Apr 2009) Log Message: ----------- isalist Modified Paths: -------------- csw/mgar/pkg/mod_python/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/mod_python/trunk/files/fixme.sh Modified: csw/mgar/pkg/mod_python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-03 00:40:43 UTC (rev 4169) +++ csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-03 01:32:44 UTC (rev 4170) @@ -24,17 +24,26 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +LD_OPTIONS = +LDFLAGS = -L/opt/csw/lib +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-apxs=$(prefix)/apache2/sbin/apxs CONFIGURE_ARGS += --with-python=$(bindir)/python CONFIGURE_ARGS += --with-flex=$(bindir)/flex-2.5.35 CONFIGURE_ARGS += --with-python-src=../python -NOISALIST = 1 include gar/category.mk DESTDOC = $(DESTDIR)$(docdir)/ap2_modpython +DISTFILES += fixme.sh +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + + post-install-modulated: @install -d $(DESTDOC) @for file in COPYRIGHT CREDITS LICENSE NEWS NOTICE README ; do \ Copied: csw/mgar/pkg/mod_python/trunk/files/fixme.sh (from rev 3986, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/mod_python/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/mod_python/trunk/files/fixme.sh 2009-04-03 01:32:44 UTC (rev 4170) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 04:18:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 02:18:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4171] csw/mgar/pkg/python/trunk Message-ID: Revision: 4171 http://gar.svn.sourceforge.net/gar/?rev=4171&view=rev Author: valholla Date: 2009-04-03 02:18:31 +0000 (Fri, 03 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/python/trunk/checksums csw/mgar/pkg/python/trunk/files/modules.diff csw/mgar/pkg/python/trunk/files/python-config-in.diff csw/mgar/pkg/python/trunk/files/site.diff Modified: csw/mgar/pkg/python/trunk/checksums =================================================================== --- csw/mgar/pkg/python/trunk/checksums 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/checksums 2009-04-03 02:18:31 UTC (rev 4171) @@ -3,10 +3,10 @@ 5664b3970307d7d39d8d4061e7dccbb0 download/libpython2.5.so.1.0-isa-i386 42dd6523beb94a805d5764ae1276091c download/faqwiz.diff 33f4094ee46ce865d3973a197f3fb4a0 download/makesetup.diff -ff716b13c8b0965f92550732151e545a download/modules.diff +b389061e5a556feab6b20a08dad7ea23 download/modules.diff 369c5593c0c0edda03f3c1844788dbee download/multiprocess.diff 05724da367b025ce525de2bb704af6e3 download/pyport.diff 296f46fb4a6a392093120cd86675309b download/setup.diff -e1cb8bf39625613272c210c71274b1e0 download/site.diff +918c25923436792b353fac29acc88c22 download/site.diff 9b45df21739387380ba2f5737a443170 download/configure.diff -fae0bb9b9a5a21d755c971d2fce9b592 download/python-config-in.diff +60ffb8b1ad45d337f57b94c5a703e62a download/python-config-in.diff Modified: csw/mgar/pkg/python/trunk/files/modules.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-03 02:18:31 UTC (rev 4171) @@ -6,10 +6,10 @@ -#_curses _cursesmodule.c -lcurses -ltermcap +*shared* -+_curses _cursesmodule.c -R/opt/csw/lib -L/opt/csw/lib -lncurses -lxtermcap ++_curses _cursesmodule.c -R/opt/csw/lib -L/opt/csw/lib -lncursesw -lxtermcap # Wrapper for the panel library that's part of ncurses and SYSV curses. -#_curses_panel _curses_panel.c -lpanel -lncurses -+_curses_panel _curses_panel.c -R/opt/csw/lib -L/opt/csw/lib -lpanel -lncurses -lxtermcap ++_curses_panel _curses_panel.c -R/opt/csw/lib -L/opt/csw/lib -lpanel -lncursesw -lxtermcap # Generic (SunOS / SVR4) dynamic loading module. Modified: csw/mgar/pkg/python/trunk/files/python-config-in.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/python-config-in.diff 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/files/python-config-in.diff 2009-04-03 02:18:31 UTC (rev 4171) @@ -5,6 +5,6 @@ if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) + if opt == '--ldflags': -+ libs.insert(0, '-L/opt/csw/lib -R/opt/csw/lib/$ISALIST') ++ libs.insert(0, '-R/opt/csw/lib -L/opt/csw/lib') print ' '.join(libs) Modified: csw/mgar/pkg/python/trunk/files/site.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/site.diff 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/files/site.diff 2009-04-03 02:18:31 UTC (rev 4171) @@ -10,16 +10,16 @@ + "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", + "python2.5", -+ "site-python")) ++ "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", + "python2.3", -+ "site-python")) ++ "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", + "python2.1", -+ "site-python")) ++ "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", -+ "site-python", -+ "site-python")) ++ "python", ++ "site-packages")) else: sitedirs.append(prefix) sitedirs.append(os.path.join(prefix, "lib", "site-packages")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wahwah at users.sourceforge.net Fri Apr 3 08:32:57 2009 From: wahwah at users.sourceforge.net (wahwah at users.sourceforge.net) Date: Fri, 03 Apr 2009 06:32:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4172] csw/mgar/pkg Message-ID: Revision: 4172 http://gar.svn.sourceforge.net/gar/?rev=4172&view=rev Author: wahwah Date: 2009-04-03 06:32:57 +0000 (Fri, 03 Apr 2009) Log Message: ----------- Adding PyYAML library Modified Paths: -------------- csw/mgar/pkg/pyyaml/trunk/Makefile csw/mgar/pkg/pyyaml/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pyyaml/ Property Changed: ---------------- csw/mgar/pkg/pyyaml/trunk/ csw/mgar/pkg/pyyaml/trunk/Makefile Property changes on: csw/mgar/pkg/pyyaml/trunk ___________________________________________________________________ Modified: svn:ignore - cookies download work + cookies download work Modified: csw/mgar/pkg/pyyaml/trunk/Makefile =================================================================== --- csw/mgar/pkg/template/trunk/Makefile 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/pyyaml/trunk/Makefile 2009-04-03 06:32:57 UTC (rev 4172) @@ -1,24 +1,51 @@ -GARNAME = mypkg -GARVERSION = 1.0 +# Copyright 2009 OpenCSW +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +GARNAME = pyyaml +GARVERSION = 3.08 CATEGORIES = lib -DESCRIPTION = This is a useful library +PROJ_NAME = PyYAML + +DESCRIPTION = YAML parser and emitter for Python define BLURB - It does stuff with things + PyYAML is a YAML parser and emitter for the Python programming language. + + PyYAML features: + + * a complete YAML 1.1 parser. In particular, PyYAML can parse all examples + from the specification. The parsing algorithm is simple enough to be a + reference for YAML parser implementors. + * Unicode support including UTF-8/UTF-16 input/output and \u escape + sequences. + * low-level event-based parser and emitter API (like SAX). + * high-level API for serializing and deserializing native Python + objects (like DOM or pickle). + * support for all types from the YAML types repository. A + simple extension API is provided. + * both pure-Python and fast LibYAML-based parsers and + emitters. + * relatively sensible error messages. endef -MASTER_SITES = -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +MASTER_SITES = http://pyyaml.org/download/pyyaml/ +DISTFILES = $(PROJ_NAME)-$(GARVERSION).tar.gz +WORKSRC = $(WORKDIR)/$(PROJ_NAME)-$(GARVERSION) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -CONFIGURE_ARGS = $(DIRPATHS) +ARCHALL = 1 +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = pyyaml +TEST_SCRIPTS = +INSTALL_SCRIPTS = pyyaml -# Remove the following rules and uncomment the -# include before building. -all: .DEFAULT -.DEFAULT: - @true +build-pyyaml: + (cd $(WORKSRC); python setup.py build) -#include gar/category.mk +install-pyyaml: + (cd $(WORKSRC); python setup.py install --root=$(DESTDIR)) + +include gar/category.mk Property changes on: csw/mgar/pkg/pyyaml/trunk/Makefile ___________________________________________________________________ Added: svn:keywords + Id Header Modified: csw/mgar/pkg/pyyaml/trunk/checksums =================================================================== --- csw/mgar/pkg/template/trunk/checksums 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/pyyaml/trunk/checksums 2009-04-03 06:32:57 UTC (rev 4172) @@ -0,0 +1 @@ +a4163a2017fa57f448c66815511fa555 download/PyYAML-3.08.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 18:17:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 16:17:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4173] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4173 http://gar.svn.sourceforge.net/gar/?rev=4173&view=rev Author: valholla Date: 2009-04-03 16:17:12 +0000 (Fri, 03 Apr 2009) Log Message: ----------- fix extension install admin scripts Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -10,7 +10,7 @@ PKGFILES_CSWphp5mimemagic = .*/lib/php/extensions/.*/mime_magic.* -define CSWphp5mime_magic_postinstall +define CSWphp5mimemagic_postinstall #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini @@ -53,7 +53,7 @@ exit 0 endef -define CSWphp5mime_magic_preremove +define CSWphp5mimemagic_preremove #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -17,33 +17,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdomysql extension" +echo " ===> Enabling pdo_mysql extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdomysql" +* WARNING: Could not enable Extension "pdo_mysql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdomysql.so +* extension=pdo_mysql.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdomysql.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdomysql.so|extension=pdomysql.so|' $${PHP_INI} +if grep 'extension=pdo_mysql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_mysql.so|extension=pdo_mysql.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdomysql.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_mysql.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdomysql" +* NOTICE: Successfully Enabled Extension "pdo_mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -60,13 +60,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdomysql extension" +echo " ===> Disabling pdo_mysql extension" -perl -i -plne 's|extension=pdomysql.so|;extension=pdomysql.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_mysql.so|;extension=pdo_mysql.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdomysql" +* NOTICE: Successfully Disabled Extension "pdo_mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -16,33 +16,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdoodbc extension" +echo " ===> Enabling pdo_odbc extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdoodbc" +* WARNING: Could not enable Extension "pdo_odbc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdoodbc.so +* extension=pdo_odbc.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdoodbc.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdoodbc.so|extension=pdoodbc.so|' $${PHP_INI} +if grep 'extension=pdo_odbc.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_odbc.so|extension=pdo_odbc.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdoodbc.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_odbc.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdoodbc" +* NOTICE: Successfully Enabled Extension "pdo_odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -59,13 +59,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdoodbc extension" +echo " ===> Disabling pdo_odbc extension" -perl -i -plne 's|extension=pdoodbc.so|;extension=pdoodbc.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_odbc.so|;extension=pdo_odbc.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdoodbc" +* NOTICE: Successfully Disabled Extension "pdo_odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -18,33 +18,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdopgsql extension" +echo " ===> Enabling pdo_pgsql extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdopgsql" +* WARNING: Could not enable Extension "pdo_pgsql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdopgsql.so +* extension=pdo_pgsql.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdopgsql.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdopgsql.so|extension=pdopgsql.so|' $${PHP_INI} +if grep 'extension=pdo_pgsql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_pgsql.so|extension=pdo_pgsql.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdopgsql.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_pgsql.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdopgsql" +* NOTICE: Successfully Enabled Extension "pdo_pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -61,13 +61,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdopgsql extension" +echo " ===> Disabling pdo_pgsql extension" -perl -i -plne 's|extension=pdopgsql.so|;extension=pdopgsql.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_pgsql.so|;extension=pdo_pgsql.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdopgsql" +* NOTICE: Successfully Disabled Extension "pdo_pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -16,33 +16,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdosqlite extension" +echo " ===> Enabling pdo_sqlite extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdosqlite" +* WARNING: Could not enable Extension "pdo_sqlite" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdosqlite.so +* extension=pdo_sqlite.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdosqlite.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdosqlite.so|extension=pdosqlite.so|' $${PHP_INI} +if grep 'extension=pdo_sqlite.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_sqlite.so|extension=pdo_sqlite.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdosqlite.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_sqlite.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdosqlite" +* NOTICE: Successfully Enabled Extension "pdo_sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -59,13 +59,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdosqlite extension" +echo " ===> Disabling pdo_sqlite extension" -perl -i -plne 's|extension=pdosqlite.so|;extension=pdosqlite.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_sqlite.so|;extension=pdo_sqlite.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdosqlite" +* NOTICE: Successfully Disabled Extension "pdo_sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -1,65 +1 @@ @ ( echo "==> Not configuring recode see README in extensions/php5_recode" ) -define CSWphp5recode_postinstall -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Post Install <===]" -echo " ===> Enabling recode extension" - -if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then - /bin/true -else - cat << _EOF_ -****************************************************************************** -* WARNING: Could not enable Extension "recode" -* You will need to enable it by hand as follows: -* -* open $${PHP_INI} in your favorite text editor -* Add the following line to the file, save, and restart your web server -* extension=recode.so -****************************************************************************** -_EOF_ -exit 0 -fi - -if grep 'extension=recode.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=recode.so|extension=recode.so|' $${PHP_INI} -else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=recode.so|' $${PHP_INI} - fi - -cat << _EOF_ -****************************************************************************** -* NOTICE: Successfully Enabled Extension "recode" -* in $${PHP_INI} -* -* You will need to restart your web server to finish the install -****************************************************************************** -_EOF_ - - -exit 0 -endef - -define CSWphp5recode_preremove -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Pre Remove <===]" -echo " ===> Disabling recode extension" - -perl -i -plne 's|extension=recode.so|;extension=recode.so|' $${PHP_INI} - -cat << _EOF_ -****************************************************************************** -* NOTICE: Successfully Disabled Extension "recode" -* in $${PHP_INI} -* -* You will need to restart your web server to finish the removal -****************************************************************************** -_EOF_ - -exit 0 -endef This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 00:43:32 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Fri, 03 Apr 2009 22:43:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4174] csw/mgar/pkg/exiftool/trunk Message-ID: Revision: 4174 http://gar.svn.sourceforge.net/gar/?rev=4174&view=rev Author: hson Date: 2009-04-03 22:43:32 +0000 (Fri, 03 Apr 2009) Log Message: ----------- exiftool: Upgrade to 7.73 Modified Paths: -------------- csw/mgar/pkg/exiftool/trunk/Makefile csw/mgar/pkg/exiftool/trunk/checksums Modified: csw/mgar/pkg/exiftool/trunk/Makefile =================================================================== --- csw/mgar/pkg/exiftool/trunk/Makefile 2009-04-03 16:17:12 UTC (rev 4173) +++ csw/mgar/pkg/exiftool/trunk/Makefile 2009-04-03 22:43:32 UTC (rev 4174) @@ -1,5 +1,5 @@ GARNAME = exiftool -GARVERSION = 7.69 +GARVERSION = 7.73 CATEGORIES = cpan DESCRIPTION = Read, Write and Edit Image File Meta Information Modified: csw/mgar/pkg/exiftool/trunk/checksums =================================================================== --- csw/mgar/pkg/exiftool/trunk/checksums 2009-04-03 16:17:12 UTC (rev 4173) +++ csw/mgar/pkg/exiftool/trunk/checksums 2009-04-03 22:43:32 UTC (rev 4174) @@ -1,2 +1,2 @@ -a20279271732877dd967ed2caa697882 download/Image-ExifTool-7.69.tar.gz +427d0107f6b40b0110757aaefd7cd8c8 download/Image-ExifTool-7.73.tar.gz 13f9aae615a5de5e3c145b374950a75c download/CSWexiftool.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Sat Apr 4 02:42:48 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Sat, 04 Apr 2009 00:42:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4175] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4175 http://gar.svn.sourceforge.net/gar/?rev=4175&view=rev Author: bdwalton Date: 2009-04-04 00:42:48 +0000 (Sat, 04 Apr 2009) Log Message: ----------- add missing perl dependency. Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-03 22:43:32 UTC (rev 4174) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-04 00:42:48 UTC (rev 4175) @@ -29,6 +29,7 @@ REQUIRED_PKGS_CSWgit = CSWzlib CSWperl CSWrsync CSWcurlrt CSWosslrt REQUIRED_PKGS_CSWgit += CSWossh CSWiconv CSWexpat CSWbash CSWpmerror +REQUIRED_PKGS_CSWgit += CSWpmtermreadkey REQUIRED_PKGS_CSWgitk = CSWgit CSWtk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 4 05:29:16 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 04 Apr 2009 03:29:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4176] csw/mgar/pkg/pth/trunk Message-ID: Revision: 4176 http://gar.svn.sourceforge.net/gar/?rev=4176&view=rev Author: valholla Date: 2009-04-04 03:29:16 +0000 (Sat, 04 Apr 2009) Log Message: ----------- checkin patch Modified Paths: -------------- csw/mgar/pkg/pth/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff Modified: csw/mgar/pkg/pth/trunk/checksums =================================================================== --- csw/mgar/pkg/pth/trunk/checksums 2009-04-04 00:42:48 UTC (rev 4175) +++ csw/mgar/pkg/pth/trunk/checksums 2009-04-04 03:29:16 UTC (rev 4176) @@ -1,3 +1,3 @@ 9cb4a25331a4c4db866a31cbe507c793 download/pth-2.0.7.tar.gz 0969fbb8ae032c8c1a08ff1c839a8c1c download/CSWpth.gspec -d7abc5f4f304d19371e3667de4810e48 download/patch_pth_fdsetsize64.diff +58bbe7bfde0cf264c073b5a3d5d3845f download/patch_pth_fdsetsize64.diff Added: csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff =================================================================== --- csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff (rev 0) +++ csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff 2009-04-04 03:29:16 UTC (rev 4176) @@ -0,0 +1,39 @@ +--- pth-2.0.7/configure.o 2009-04-03 21:48:07.888815157 -0500 ++++ pth-2.0.7/configure 2009-04-03 21:50:45.969836100 -0500 +@@ -19603,7 +19603,7 @@ + echo $ECHO_N "checking for default value of FD_SETSIZE... $ECHO_C" >&6 + cross_compiling=no + if test "$cross_compiling" = yes; then +- ac_fdsetsize=1024 ++ ac_fdsetsize=65536 + + else + cat >conftest.$ac_ext <<_ACEOF +@@ -19652,7 +19652,7 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) +-ac_fdsetsize=1024 ++ac_fdsetsize=65536 + fi + rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +@@ -19666,12 +19666,13 @@ + if test "${with_fdsetsize+set}" = set; then + withval="$with_fdsetsize" + +-case $withval in +- [1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]) PTH_FDSETSIZE=$withval ;; +- * ) { { echo "$as_me:$LINENO: error: invalid FD_SETSIZE specified -- allowed: 10-9999" >&5 ++ if test $withval -ge 10 -a test $withval -le 65536; then ++ PTH_FDSETSIZE=$withval ++ else ++ { { echo "$as_me:$LINENO: error: invalid FD_SETSIZE specified -- allowed: 10-9999" >&5 + echo "$as_me: error: invalid FD_SETSIZE specified -- allowed: 10-9999" >&2;} +- { (exit 1); exit 1; }; } ;; +-esac ++ { (exit 1); exit 1; }; } ++fi + CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PTH_FDSETSIZE" + echo "$as_me:$LINENO: checking for overridden FD_SETSIZE value" >&5 + echo $ECHO_N "checking for overridden FD_SETSIZE value... $ECHO_C" >&6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sat Apr 4 16:11:09 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 04 Apr 2009 14:11:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4177] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4177 http://gar.svn.sourceforge.net/gar/?rev=4177&view=rev Author: chninkel Date: 2009-04-04 14:11:08 +0000 (Sat, 04 Apr 2009) Log Message: ----------- cadaver: updated changelog Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-04 03:29:16 UTC (rev 4176) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-04 14:11:08 UTC (rev 4177) @@ -1,3 +1,3 @@ 5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -af240ee7947d504a6b3e517352d0d883 download/changelog.CSW +9deb0d89879fd18151fdd8a5472f194d download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-04 03:29:16 UTC (rev 4176) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-04 14:11:08 UTC (rev 4177) @@ -1,4 +1,4 @@ -cadaver (0.23.2,REV=2009.04.01) unstable +cadaver (0.23.2,REV=2009.04.04) unstable * New upstream version. * Dropped destdir.patch as DESTDIR support has been added upstream. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 4 17:51:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 04 Apr 2009 15:51:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4178] csw/mgar/pkg/pysqlite/trunk/Makefile Message-ID: Revision: 4178 http://gar.svn.sourceforge.net/gar/?rev=4178&view=rev Author: valholla Date: 2009-04-04 15:51:06 +0000 (Sat, 04 Apr 2009) Log Message: ----------- ISALIST fix Modified Paths: -------------- csw/mgar/pkg/pysqlite/trunk/Makefile Modified: csw/mgar/pkg/pysqlite/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-04 14:11:08 UTC (rev 4177) +++ csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-04 15:51:06 UTC (rev 4178) @@ -17,19 +17,20 @@ PACKAGES = CSWpysqlite CATALOGNAME_CSWpysqlite = pysqlite SPKG_DESC_CSWpysqlite = SQLite 1.x support for Python -REQUIRED_PKGS_CSWpysqlite = CSWpython CSWsqlite3 +REQUIRED_PKGS_CSWpysqlite = CSWpython CSWsqlite3rt # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=54058 UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -NOISALIST = 1 +EXTRA_CPPFLAGS = -I/opt/csw/include CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = INSTALL_SCRIPTS = $(WORKSRC)/setup.py + INSTALL_ARGS = --root=$(DESTDIR) INSTALL_ARGS += --prefix=$(prefix) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 4 17:51:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 04 Apr 2009 15:51:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4179] csw/mgar/pkg/pysqlite2/trunk/Makefile Message-ID: Revision: 4179 http://gar.svn.sourceforge.net/gar/?rev=4179&view=rev Author: valholla Date: 2009-04-04 15:51:23 +0000 (Sat, 04 Apr 2009) Log Message: ----------- ISALIST fix Modified Paths: -------------- csw/mgar/pkg/pysqlite2/trunk/Makefile Modified: csw/mgar/pkg/pysqlite2/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-04 15:51:06 UTC (rev 4178) +++ csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-04 15:51:23 UTC (rev 4179) @@ -11,7 +11,7 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpysqlite2 -REQUIRED_PKGS_CSWpysqlite2 = CSWpython CSWsqlite3 +REQUIRED_PKGS_CSWpysqlite2 = CSWpython CSWsqlite3rt CATALOGNAME_CSWpysqlite2 = pysqlite2 SPKG_DESC_CSWpysqlite2 = SQLite3 support for Python This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From jake_goerzen at users.sourceforge.net Sat Apr 4 20:01:29 2009 From: jake_goerzen at users.sourceforge.net (jake_goerzen at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:01:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4180] csw/mgar/pkg/libsdl/trunk Message-ID: Revision: 4180 http://gar.svn.sourceforge.net/gar/?rev=4180&view=rev Author: jake_goerzen Date: 2009-04-04 18:01:29 +0000 (Sat, 04 Apr 2009) Log Message: ----------- update to mGAR v2 Modified Paths: -------------- csw/mgar/pkg/libsdl/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype Property Changed: ---------------- csw/mgar/pkg/libsdl/trunk/ Property changes on: csw/mgar/pkg/libsdl/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/libsdl/trunk/Makefile =================================================================== --- csw/mgar/pkg/libsdl/trunk/Makefile 2009-04-04 15:51:23 UTC (rev 4179) +++ csw/mgar/pkg/libsdl/trunk/Makefile 2009-04-04 18:01:29 UTC (rev 4180) @@ -10,9 +10,11 @@ endef MASTER_SITES = http://www.libsdl.org/release/ -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibsdl, prototype) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += $(call admfiles,CSWlibsdl) +REQUIRED_PKGS = CSWiconv + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Deleted: csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype =================================================================== --- csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype 2009-04-04 15:51:23 UTC (rev 4179) +++ csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype 2009-04-04 18:01:29 UTC (rev 4180) @@ -1,222 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sdl-config 0755 root bin -d none /opt/csw/include/SDL 0755 root bin -f none /opt/csw/include/SDL/SDL.h 0644 root bin -f none /opt/csw/include/SDL/SDL_active.h 0644 root bin -f none /opt/csw/include/SDL/SDL_audio.h 0644 root bin -f none /opt/csw/include/SDL/SDL_byteorder.h 0644 root bin -f none /opt/csw/include/SDL/SDL_cdrom.h 0644 root bin -f none /opt/csw/include/SDL/SDL_config.h 0644 root bin -f none /opt/csw/include/SDL/SDL_cpuinfo.h 0644 root bin -f none /opt/csw/include/SDL/SDL_endian.h 0644 root bin -f none /opt/csw/include/SDL/SDL_error.h 0644 root bin -f none /opt/csw/include/SDL/SDL_events.h 0644 root bin -f none /opt/csw/include/SDL/SDL_getenv.h 0644 root bin -f none /opt/csw/include/SDL/SDL_joystick.h 0644 root bin -f none /opt/csw/include/SDL/SDL_keyboard.h 0644 root bin -f none /opt/csw/include/SDL/SDL_keysym.h 0644 root bin -f none /opt/csw/include/SDL/SDL_loadso.h 0644 root bin -f none /opt/csw/include/SDL/SDL_main.h 0644 root bin -f none /opt/csw/include/SDL/SDL_mouse.h 0644 root bin -f none /opt/csw/include/SDL/SDL_mutex.h 0644 root bin -f none /opt/csw/include/SDL/SDL_name.h 0644 root bin -f none /opt/csw/include/SDL/SDL_opengl.h 0644 root bin -f none /opt/csw/include/SDL/SDL_platform.h 0644 root bin -f none /opt/csw/include/SDL/SDL_quit.h 0644 root bin -f none /opt/csw/include/SDL/SDL_rwops.h 0644 root bin -f none /opt/csw/include/SDL/SDL_stdinc.h 0644 root bin -f none /opt/csw/include/SDL/SDL_syswm.h 0644 root bin -f none /opt/csw/include/SDL/SDL_thread.h 0644 root bin -f none /opt/csw/include/SDL/SDL_timer.h 0644 root bin -f none /opt/csw/include/SDL/SDL_types.h 0644 root bin -f none /opt/csw/include/SDL/SDL_version.h 0644 root bin -f none /opt/csw/include/SDL/SDL_video.h 0644 root bin -f none /opt/csw/include/SDL/begin_code.h 0644 root bin -f none /opt/csw/include/SDL/close_code.h 0644 root bin -d none /opt/csw/lib 0755 root bin -f none /opt/csw/lib/libSDL-1.2.so.0.11.2 0755 root bin -s none /opt/csw/lib/libSDL-1.2.so.0=libSDL-1.2.so.0.11.2 -s none /opt/csw/lib/libSDL.so=libSDL-1.2.so.0.11.2 -d none /opt/csw/lib/pkgconfig 0755 root bin -f none /opt/csw/lib/pkgconfig/sdl.pc 0644 root bin -d none /opt/csw/share 0755 root bin -d none /opt/csw/share/aclocal 0755 root bin -f none /opt/csw/share/aclocal/sdl.m4 0644 root bin -d none /opt/csw/share/man/man3 0755 root bin -f none /opt/csw/share/man/man3/SDLKey.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ActiveEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_AddTimer.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_AudioCVT.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_AudioSpec.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_BlitSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_BuildAudioCVT.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CD.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDClose.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDEject.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDNumDrives.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDOpen.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDPause.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDPlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDPlayTracks.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDResume.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDStatus.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDStop.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDtrack.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CloseAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Color.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondBroadcast.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondSignal.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondWait.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondWaitTimeout.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ConvertAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ConvertSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateCond.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateMutex.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateRGBSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateRGBSurfaceFrom.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateSemaphore.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateThread.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Delay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DestroyCond.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DestroyMutex.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DestroySemaphore.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DisplayFormat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DisplayFormatAlpha.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DisplayYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_EnableKeyRepeat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_EnableUNICODE.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Event.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_EventState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ExposeEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FillRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Flip.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeWAV.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_GetAttribute.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_GetProcAddress.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_LoadLibrary.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_SetAttribute.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_SwapBuffers.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GLattr.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetAppState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetAudioStatus.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetClipRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetError.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetEventFilter.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetGamma.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetGammaRamp.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetKeyName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetKeyState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetModState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetMouseState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetRGB.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetRGBA.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetRelativeMouseState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetThreadID.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetTicks.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetVideoInfo.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetVideoSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Init.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_InitSubSystem.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyAxisEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyBallEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyButtonEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyHatEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickClose.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickEventState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetAxis.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetBall.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetButton.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetHat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickIndex.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumAxes.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumBalls.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumButtons.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumHats.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickOpen.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickOpened.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickUpdate.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_KeyboardEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_KillThread.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ListModes.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LoadBMP.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LoadWAV.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LockAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LockSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LockYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MapRGB.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MapRGBA.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MixAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MouseButtonEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MouseMotionEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_NumJoysticks.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_OpenAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Overlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Palette.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PauseAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PeepEvents.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PixelFormat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PollEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PumpEvents.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PushEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Quit.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_QuitEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_QuitSubSystem.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_RWFromFile.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Rect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_RemoveTimer.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ResizeEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SaveBMP.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemPost.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemTryWait.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemValue.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemWait.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemWaitTimeout.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetAlpha.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetClipRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetColorKey.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetColors.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetEventFilter.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetGamma.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetGammaRamp.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetModState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetPalette.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetTimer.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetVideoMode.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ShowCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Surface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SysWMEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ThreadID.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UnlockAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UnlockSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UnlockYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UpdateRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UpdateRects.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UserEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_VideoDriverName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_VideoInfo.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_VideoModeOK.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_GetCaption.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_GrabInput.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_IconifyWindow.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_SetCaption.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_SetIcon.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_ToggleFullScreen.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WaitEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WaitThread.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WarpMouse.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WasInit.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_keysym.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_mutexP.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_mutexV.3 0644 root bin -i copyright=CSWlibsdl.copyright -i depend=CSWlibsdl.depend -i pkginfo=CSWlibsdl.pkginfo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:02:21 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:02:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4181] csw/mgar/pkg/libnids/trunk Message-ID: Revision: 4181 http://gar.svn.sourceforge.net/gar/?rev=4181&view=rev Author: hson Date: 2009-04-04 18:02:20 +0000 (Sat, 04 Apr 2009) Log Message: ----------- libnids: Patch configure when not using LD_OPTIONS, split other patches into their own files Modified Paths: -------------- csw/mgar/pkg/libnids/trunk/Makefile csw/mgar/pkg/libnids/trunk/checksums Added Paths: ----------- csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff csw/mgar/pkg/libnids/trunk/files/checksum.c.diff csw/mgar/pkg/libnids/trunk/files/configure.diff csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff csw/mgar/pkg/libnids/trunk/files/utils.c.diff Removed Paths: ------------- csw/mgar/pkg/libnids/trunk/files/mainpatch Modified: csw/mgar/pkg/libnids/trunk/Makefile =================================================================== --- csw/mgar/pkg/libnids/trunk/Makefile 2009-04-04 18:01:29 UTC (rev 4180) +++ csw/mgar/pkg/libnids/trunk/Makefile 2009-04-04 18:02:20 UTC (rev 4181) @@ -4,7 +4,11 @@ DESCRIPTION = implementation of an e-component of network intrusion detection define BLURB - Long description + Libnids is a library that provides a functionality of one of NIDS + (Network Intrusion Detection System) components, namely E-component. It means + that libnids code watches all local network traffic, cooks received datagrams + a bit (quite a bit ;)), and provides convenient information on them to + analyzing modules of NIDS. endef SF_PROJ = $(GARNAME) @@ -20,14 +24,12 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = +PATCHFILES = Makfile.in.diff +PATCHFILES += checksum.c.diff +PATCHFILES += configure.diff +PATCHFILES += ip_options.c.diff +PATCHFILES += utils.c.diff -#GARCOMPILER = GCC3 - -PATCHFILES = mainpatch - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-shared Modified: csw/mgar/pkg/libnids/trunk/checksums =================================================================== --- csw/mgar/pkg/libnids/trunk/checksums 2009-04-04 18:01:29 UTC (rev 4180) +++ csw/mgar/pkg/libnids/trunk/checksums 2009-04-04 18:02:20 UTC (rev 4181) @@ -1,2 +1,6 @@ af35e8ef403a0ca95df2da94db856428 download/libnids-1.23.tar.gz -eded3e75e8a25acf7922ba0e7593ecb1 download/mainpatch +5c4890d30fb6d8666f8aa8987d6b4b24 download/Makfile.in.diff +1eb0e1c82b9855f7526d63323741aec6 download/checksum.c.diff +875c511f86f39a0b13131f4d3246a35a download/configure.diff +d98069814fe6b17ea8c07aecc76e4386 download/ip_options.c.diff +276ccbd2caeab913432fe749d6a0c020 download/utils.c.diff Added: csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,75 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/Makefile.in libnids-1.23/src/Makefile.in +--- libnids-1.23.orig/src/Makefile.in 2008-02-21 11:40:19.000000000 +0100 ++++ libnids-1.23/src/Makefile.in 2009-03-11 00:03:28.000000000 +0100 +@@ -16,7 +16,7 @@ + LIBSHARED = libnids.so.1.23 + + CC = @CC@ +-CFLAGS = @CFLAGS@ -W -Wall -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ ++CFLAGS = @CFLAGS@ -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ + LDFLAGS = @LDFLAGS@ + + PCAP_CFLAGS = @PCAP_CFLAGS@ +@@ -40,43 +40,43 @@ + # How to write the following rules compactly and portably ? + # gmake accepts "%_pic.o: %.c", bsd make does not. + checksum_pic.o: checksum.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ + ip_fragment_pic.o: ip_fragment.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ + ip_options_pic.o: ip_options.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ + killtcp_pic.o: killtcp.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ + libnids_pic.o: libnids.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ + scan_pic.o: scan.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ + tcp_pic.o: tcp.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ + util_pic.o: util.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ + allpromisc_pic.o: allpromisc.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ + hash_pic.o: hash.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ + + + $(LIBSTATIC): $(OBJS) + ar -cr $@ $(OBJS) + $(RANLIB) $@ + $(LIBSHARED): $(OBJS_SHARED) +- $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) ++ $(LD) -G -h $(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) + + _install install: $(LIBSTATIC) +- ../mkinstalldirs $(install_prefix)$(libdir) +- ../mkinstalldirs $(install_prefix)$(includedir) +- ../mkinstalldirs $(install_prefix)$(mandir)/man3 +- $(INSTALL) -c -m 644 libnids.a $(install_prefix)$(libdir) +- $(INSTALL) -c -m 644 nids.h $(install_prefix)$(includedir) +- $(INSTALL) -c -m 644 libnids.3 $(install_prefix)$(mandir)/man3 ++ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(libdir) ++ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(includedir) ++ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(mandir)/man3 ++ $(INSTALL) -c -m 644 libnids.a $(DESTDIR)$(install_prefix)$(libdir) ++ $(INSTALL) -c -m 644 nids.h $(DESTDIR)$(install_prefix)$(includedir) ++ $(INSTALL) -c -m 644 libnids.3 $(DESTDIR)$(install_prefix)$(mandir)/man3 + _installshared installshared: install $(LIBSHARED) +- $(INSTALL) -c -m 755 $(LIBSHARED) $(install_prefix)$(libdir) +- ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.so ++ $(INSTALL) -c -m 755 $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir) ++ ln -s -f $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir)/libnids.so + + clean: + rm -f *.o *~ $(LIBSTATIC) $(LIBSHARED) Added: csw/mgar/pkg/libnids/trunk/files/checksum.c.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/checksum.c.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/checksum.c.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,46 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/checksum.c libnids-1.23/src/checksum.c +--- libnids-1.23.orig/src/checksum.c 2005-02-08 16:46:11.000000000 +0100 ++++ libnids-1.23/src/checksum.c 2009-03-11 12:38:07.808047165 +0100 +@@ -25,7 +25,7 @@ + return 0; + } + +-#if ( __i386__ || __i386 ) ++#if ( __i386__ || __i386 ) && __GNUC__ + // all asm procedures are copied from Linux 2.0.36 and 2.2.10 kernels + + /* +@@ -120,7 +120,7 @@ + By Jorge Cwik , adapted for linux by Arnt + Gulbrandsen. + */ +-inline u_short ip_fast_csum(u_char * iph, u_int ihl) ++u_short ip_fast_csum(u_char * iph, u_int ihl) + { + u_int sum; + if (dontchksum(((struct ip*)iph)->ip_src.s_addr)) +@@ -191,13 +191,13 @@ + this routine is used for miscellaneous IP-like checksums, mainly in + icmp.c + */ +-inline u_short ++u_short + ip_compute_csum(u_char * buff, int len) + { + return (csum_fold(csum_partial(buff, len, 0))); + } + +-inline u_short ++u_short + my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr) + { + if (dontchksum(saddr)) +@@ -205,7 +205,7 @@ + return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP, + csum_partial((char *)th, len, 0)); + } +-inline u_short ++u_short + my_udp_check(void *u, int len, u_int saddr, u_int daddr) + { + if (dontchksum(saddr)) Added: csw/mgar/pkg/libnids/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/configure.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/configure.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,20 @@ +--- ../build-global/libnids-1.23/configure 2006-05-01 19:14:51.000000000 +0200 ++++ libnids-1.23/configure 2009-04-04 19:03:29.185337901 +0200 +@@ -4288,7 +4288,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lgthread-2.0 $GTHREAD_LIBS $LIBS" ++LIBS="$LIBS $GTHREAD_LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -4350,7 +4350,7 @@ + #define HAVE_LIBGTHREAD_2_0 1 + _ACEOF + +- LIBS="-lgthread-2.0 $LIBS" ++ LIBS="$LIBS $GTHREAD_LIBS" + + fi + Added: csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/ip_options.c libnids-1.23/src/ip_options.c +--- libnids-1.23.orig/src/ip_options.c 2002-08-10 21:07:45.000000000 +0200 ++++ libnids-1.23/src/ip_options.c 2009-03-11 00:03:28.000000000 +0100 +@@ -69,7 +69,7 @@ + unsigned char __pad1; + unsigned char __pad2; + unsigned char __pad3; +- unsigned char __data[0]; ++ unsigned char __data[]; + }; + + struct iphdr { Deleted: csw/mgar/pkg/libnids/trunk/files/mainpatch =================================================================== --- csw/mgar/pkg/libnids/trunk/files/mainpatch 2009-04-04 18:01:29 UTC (rev 4180) +++ csw/mgar/pkg/libnids/trunk/files/mainpatch 2009-04-04 18:02:20 UTC (rev 4181) @@ -1,152 +0,0 @@ -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/Makefile.in libnids-1.23/src/Makefile.in ---- libnids-1.23.orig/src/Makefile.in 2008-02-21 11:40:19.000000000 +0100 -+++ libnids-1.23/src/Makefile.in 2009-03-11 00:03:28.000000000 +0100 -@@ -16,7 +16,7 @@ - LIBSHARED = libnids.so.1.23 - - CC = @CC@ --CFLAGS = @CFLAGS@ -W -Wall -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ -+CFLAGS = @CFLAGS@ -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ - LDFLAGS = @LDFLAGS@ - - PCAP_CFLAGS = @PCAP_CFLAGS@ -@@ -40,43 +40,43 @@ - # How to write the following rules compactly and portably ? - # gmake accepts "%_pic.o: %.c", bsd make does not. - checksum_pic.o: checksum.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ - ip_fragment_pic.o: ip_fragment.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ - ip_options_pic.o: ip_options.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ - killtcp_pic.o: killtcp.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ - libnids_pic.o: libnids.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ - scan_pic.o: scan.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ - tcp_pic.o: tcp.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ - util_pic.o: util.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ - allpromisc_pic.o: allpromisc.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ - hash_pic.o: hash.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ - - - $(LIBSTATIC): $(OBJS) - ar -cr $@ $(OBJS) - $(RANLIB) $@ - $(LIBSHARED): $(OBJS_SHARED) -- $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) -+ $(LD) -G -h $(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) - - _install install: $(LIBSTATIC) -- ../mkinstalldirs $(install_prefix)$(libdir) -- ../mkinstalldirs $(install_prefix)$(includedir) -- ../mkinstalldirs $(install_prefix)$(mandir)/man3 -- $(INSTALL) -c -m 644 libnids.a $(install_prefix)$(libdir) -- $(INSTALL) -c -m 644 nids.h $(install_prefix)$(includedir) -- $(INSTALL) -c -m 644 libnids.3 $(install_prefix)$(mandir)/man3 -+ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(libdir) -+ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(includedir) -+ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(mandir)/man3 -+ $(INSTALL) -c -m 644 libnids.a $(DESTDIR)$(install_prefix)$(libdir) -+ $(INSTALL) -c -m 644 nids.h $(DESTDIR)$(install_prefix)$(includedir) -+ $(INSTALL) -c -m 644 libnids.3 $(DESTDIR)$(install_prefix)$(mandir)/man3 - _installshared installshared: install $(LIBSHARED) -- $(INSTALL) -c -m 755 $(LIBSHARED) $(install_prefix)$(libdir) -- ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.so -+ $(INSTALL) -c -m 755 $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir) -+ ln -s -f $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir)/libnids.so - - clean: - rm -f *.o *~ $(LIBSTATIC) $(LIBSHARED) -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/checksum.c libnids-1.23/src/checksum.c ---- libnids-1.23.orig/src/checksum.c 2005-02-08 16:46:11.000000000 +0100 -+++ libnids-1.23/src/checksum.c 2009-03-11 12:38:07.808047165 +0100 -@@ -25,7 +25,7 @@ - return 0; - } - --#if ( __i386__ || __i386 ) -+#if ( __i386__ || __i386 ) && __GNUC__ - // all asm procedures are copied from Linux 2.0.36 and 2.2.10 kernels - - /* -@@ -120,7 +120,7 @@ - By Jorge Cwik , adapted for linux by Arnt - Gulbrandsen. - */ --inline u_short ip_fast_csum(u_char * iph, u_int ihl) -+u_short ip_fast_csum(u_char * iph, u_int ihl) - { - u_int sum; - if (dontchksum(((struct ip*)iph)->ip_src.s_addr)) -@@ -191,13 +191,13 @@ - this routine is used for miscellaneous IP-like checksums, mainly in - icmp.c - */ --inline u_short -+u_short - ip_compute_csum(u_char * buff, int len) - { - return (csum_fold(csum_partial(buff, len, 0))); - } - --inline u_short -+u_short - my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr) - { - if (dontchksum(saddr)) -@@ -205,7 +205,7 @@ - return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP, - csum_partial((char *)th, len, 0)); - } --inline u_short -+u_short - my_udp_check(void *u, int len, u_int saddr, u_int daddr) - { - if (dontchksum(saddr)) -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/ip_options.c libnids-1.23/src/ip_options.c ---- libnids-1.23.orig/src/ip_options.c 2002-08-10 21:07:45.000000000 +0200 -+++ libnids-1.23/src/ip_options.c 2009-03-11 00:03:28.000000000 +0100 -@@ -69,7 +69,7 @@ - unsigned char __pad1; - unsigned char __pad2; - unsigned char __pad3; -- unsigned char __data[0]; -+ unsigned char __data[]; - }; - - struct iphdr { -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/util.c libnids-1.23/src/util.c ---- libnids-1.23.orig/src/util.c 2006-05-01 18:58:48.000000000 +0200 -+++ libnids-1.23/src/util.c 2009-03-11 00:48:59.000000000 +0100 -@@ -29,13 +29,13 @@ - return ret; - } - --inline int -+int - before(u_int seq1, u_int seq2) - { - return ((int)(seq1 - seq2) < 0); - } - --inline int -+int - after(u_int seq1, u_int seq2) - { - return ((int)(seq2 - seq1) < 0); Added: csw/mgar/pkg/libnids/trunk/files/utils.c.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/utils.c.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/utils.c.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,19 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/util.c libnids-1.23/src/util.c +--- libnids-1.23.orig/src/util.c 2006-05-01 18:58:48.000000000 +0200 ++++ libnids-1.23/src/util.c 2009-03-11 00:48:59.000000000 +0100 +@@ -29,13 +29,13 @@ + return ret; + } + +-inline int ++int + before(u_int seq1, u_int seq2) + { + return ((int)(seq1 - seq2) < 0); + } + +-inline int ++int + after(u_int seq1, u_int seq2) + { + return ((int)(seq2 - seq1) < 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:08:40 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:08:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4182] csw/mgar/pkg/ImageMagick/trunk Message-ID: Revision: 4182 http://gar.svn.sourceforge.net/gar/?rev=4182&view=rev Author: hson Date: 2009-04-04 18:08:40 +0000 (Sat, 04 Apr 2009) Log Message: ----------- imagemagick: Use fixme to patch libtool, rename compare to compare2 due to conflict with CSWschilyutils Modified Paths: -------------- csw/mgar/pkg/ImageMagick/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh Modified: csw/mgar/pkg/ImageMagick/trunk/Makefile =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-04 18:02:20 UTC (rev 4181) +++ csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-04 18:08:40 UTC (rev 4182) @@ -24,6 +24,7 @@ REQUIRED_PKGS += CSWglib2 CSWgs CSWgtk2 CSWilmbase CSWjasper CSWjbigkit REQUIRED_PKGS += CSWjpeg CSWlcms CSWlibcairo CSWlibfpx CSWlibrsvg CSWlibxml2 REQUIRED_PKGS += CSWopenexr CSWperl CSWpng CSWsunmath CSWtiff CSWwmf CSWzlib +REQUIRED_PKGS += CSWlibtoolrt # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = ImageMagick-((\d+(?:\.\d+)*)-(\d+)?).tar.bz2 @@ -47,6 +48,11 @@ include gar/category.mk +post-configure-$(MODULATION): + @(echo "~~~ Fixing Libtool ~~~") + @$(FILEDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + post-install-isa-sparcv8: @cp $(FILEDIR)/libMagick.so.10.0.4.s $(INSTALLISADIR)$(libdir)/libMagick.so.10.0.4 @cp $(FILEDIR)/libWand.so.10.0.4.s $(INSTALLISADIR)$(libdir)/libWand.so.10.0.4 @@ -57,6 +63,8 @@ @ln -s ImageMagick-$(GARVERSION) $(INSTALLISADIR)$(docdir)/ImageMagick echo $(DESTDIR) @( cd $(INSTALLISADIR)$(libdir) ; gzip -dc $(DESTDIR)/../../$(FILEDIR)/lib_6.2.9_s.tar.gz |tar xf -) + @mv $(INSTALLISADIR)$(mandir)/man1/compare.1 $(INSTALLISADIR)$(mandir)/man1/compare2.1 + @mv $(INSTALLISADIR)$(bindir)/compare $(INSTALLISADIR)$(bindir)/compare2 @$(MAKECOOKIE) post-install-isa-i386: @@ -69,4 +77,6 @@ @ln -s ImageMagick-$(GARVERSION) $(INSTALLISADIR)$(docdir)/ImageMagick echo $(DESTDIR) @( cd $(INSTALLISADIR)$(libdir) ; gzip -dc $(DESTDIR)/../../$(FILEDIR)/lib_6.2.9_i.tar.gz |tar xf -) + @mv $(INSTALLISADIR)$(mandir)/man1/compare.1 $(INSTALLISADIR)$(mandir)/man1/compare2.1 + @mv $(INSTALLISADIR)$(bindir)/compare $(INSTALLISADIR)$(bindir)/compare2 @$(MAKECOOKIE) Added: csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh 2009-04-04 18:08:40 UTC (rev 4182) @@ -0,0 +1,49 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} +done + +LTMAIN=$(gfind ${BASEPATH} -name ltmain.sh -print) +if [ -f ${LTMAIN} ]; then + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} +fi + Property changes on: csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:33:29 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:33:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4183] csw/mgar/pkg/librsvg/trunk Message-ID: Revision: 4183 http://gar.svn.sourceforge.net/gar/?rev=4183&view=rev Author: hson Date: 2009-04-04 18:33:28 +0000 (Sat, 04 Apr 2009) Log Message: ----------- librsvg: Use fixme to fix libtool problem Modified Paths: -------------- csw/mgar/pkg/librsvg/trunk/Makefile csw/mgar/pkg/librsvg/trunk/checksums Added Paths: ----------- csw/mgar/pkg/librsvg/trunk/files/fixme.sh Modified: csw/mgar/pkg/librsvg/trunk/Makefile =================================================================== --- csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:08:40 UTC (rev 4182) +++ csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:33:28 UTC (rev 4183) @@ -19,6 +19,7 @@ MASTER_SITES = http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION).$(GARSUBREV).tar.bz2 +DISTFILES += fixme.sh DISTNAME = $(GARNAME)-$(GARVERSION).$(GARSUBREV) @@ -50,6 +51,11 @@ include gar/category.mk +post-configure-modulated: + @(echo "~~~ Fixing Libtool ~~~") + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + $(DONADA) + post-install-isa-sparcv8: @cp $(FILEDIR)/librsvg-2.so.2.15.90.s $(INSTALLISADIR)/opt/csw/lib/librsvg-2.so.2.15.90 Modified: csw/mgar/pkg/librsvg/trunk/checksums =================================================================== --- csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:08:40 UTC (rev 4182) +++ csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:33:28 UTC (rev 4183) @@ -1,7 +1,5 @@ c4ec4fdb2b1842e221ca39127e85682d download/librsvg-2.22.3.tar.bz2 -300ffe1b2413261b5ce5e451c8c7d0eb download/librsvg-2.so.2.15.90.i -5e90964c1f99f46100f71cdb3d549fcc download/librsvg-2.so.2.15.90.s -d2491b9b8f422321a88f0414f5e78196 download/CSWlibrsvg.gspec +70771682427d524354d50482371edca5 download/fixme.sh 5b0c0387946c3b7ca7feb913de436936 download/pdiff.patch 8a26f6d0d0cf1cfce1a1e0365c6624ce download/perceptualdiff.patch 803a5d10e3e9c9a561b397aade043024 download/test_makefiles.patch Added: csw/mgar/pkg/librsvg/trunk/files/fixme.sh =================================================================== --- csw/mgar/pkg/librsvg/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/librsvg/trunk/files/fixme.sh 2009-04-04 18:33:28 UTC (rev 4183) @@ -0,0 +1,49 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + sed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} +done + +LTMAIN=$(gfind ${BASEPATH} -name ltmain.sh -print) +if [ -f ${LTMAIN} ]; then + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} +fi + Property changes on: csw/mgar/pkg/librsvg/trunk/files/fixme.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:34:36 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:34:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4184] csw/mgar/pkg/wmf/trunk Message-ID: Revision: 4184 http://gar.svn.sourceforge.net/gar/?rev=4184&view=rev Author: hson Date: 2009-04-04 18:34:36 +0000 (Sat, 04 Apr 2009) Log Message: ----------- wmf: Use fixme to fix libtool problem Modified Paths: -------------- csw/mgar/pkg/wmf/trunk/Makefile csw/mgar/pkg/wmf/trunk/checksums Added Paths: ----------- csw/mgar/pkg/wmf/trunk/files/fixme.sh Modified: csw/mgar/pkg/wmf/trunk/Makefile =================================================================== --- csw/mgar/pkg/wmf/trunk/Makefile 2009-04-04 18:33:28 UTC (rev 4183) +++ csw/mgar/pkg/wmf/trunk/Makefile 2009-04-04 18:34:36 UTC (rev 4184) @@ -28,11 +28,13 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = - CONFIGURE_ARGS = $(DIRPATHS) TEST_TARGET = check + include gar/category.mk + +post-configure-modulated: + @(echo "~~~ Fixing Libtool ~~~") + @$(FILEDIR)/fixme.sh $(WORKSRC) + $(DONADA) Modified: csw/mgar/pkg/wmf/trunk/checksums =================================================================== --- csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:33:28 UTC (rev 4183) +++ csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:34:36 UTC (rev 4184) @@ -1 +1,2 @@ d1177739bf1ceb07f57421f0cee191e0 download/libwmf-0.2.8.4.tar.gz +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh Added: csw/mgar/pkg/wmf/trunk/files/fixme.sh =================================================================== --- csw/mgar/pkg/wmf/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/wmf/trunk/files/fixme.sh 2009-04-04 18:34:36 UTC (rev 4184) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + Property changes on: csw/mgar/pkg/wmf/trunk/files/fixme.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:36:03 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:36:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4185] csw/mgar/pkg/wmf/trunk/checksums Message-ID: Revision: 4185 http://gar.svn.sourceforge.net/gar/?rev=4185&view=rev Author: hson Date: 2009-04-04 18:36:02 +0000 (Sat, 04 Apr 2009) Log Message: ----------- wmf: fixme dont have to be in DISTFILES Modified Paths: -------------- csw/mgar/pkg/wmf/trunk/checksums Modified: csw/mgar/pkg/wmf/trunk/checksums =================================================================== --- csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:34:36 UTC (rev 4184) +++ csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:36:02 UTC (rev 4185) @@ -1,2 +1 @@ d1177739bf1ceb07f57421f0cee191e0 download/libwmf-0.2.8.4.tar.gz -34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:36:20 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:36:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4186] csw/mgar/pkg/librsvg/trunk Message-ID: Revision: 4186 http://gar.svn.sourceforge.net/gar/?rev=4186&view=rev Author: hson Date: 2009-04-04 18:36:20 +0000 (Sat, 04 Apr 2009) Log Message: ----------- librsvg: fixme dont have to be in DISTFILES Modified Paths: -------------- csw/mgar/pkg/librsvg/trunk/Makefile csw/mgar/pkg/librsvg/trunk/checksums Modified: csw/mgar/pkg/librsvg/trunk/Makefile =================================================================== --- csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:36:02 UTC (rev 4185) +++ csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:36:20 UTC (rev 4186) @@ -19,7 +19,6 @@ MASTER_SITES = http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION).$(GARSUBREV).tar.bz2 -DISTFILES += fixme.sh DISTNAME = $(GARNAME)-$(GARVERSION).$(GARSUBREV) @@ -53,7 +52,7 @@ post-configure-modulated: @(echo "~~~ Fixing Libtool ~~~") - @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(FILEDIR)/fixme.sh $(WORKSRC) $(DONADA) post-install-isa-sparcv8: Modified: csw/mgar/pkg/librsvg/trunk/checksums =================================================================== --- csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:36:02 UTC (rev 4185) +++ csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:36:20 UTC (rev 4186) @@ -1,5 +1,4 @@ c4ec4fdb2b1842e221ca39127e85682d download/librsvg-2.22.3.tar.bz2 -70771682427d524354d50482371edca5 download/fixme.sh 5b0c0387946c3b7ca7feb913de436936 download/pdiff.patch 8a26f6d0d0cf1cfce1a1e0365c6624ce download/perceptualdiff.patch 803a5d10e3e9c9a561b397aade043024 download/test_makefiles.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 23:01:36 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 21:01:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4187] csw/mgar/pkg/wput/trunk Message-ID: Revision: 4187 http://gar.svn.sourceforge.net/gar/?rev=4187&view=rev Author: hson Date: 2009-04-04 21:01:36 +0000 (Sat, 04 Apr 2009) Log Message: ----------- wput: gnutls_devel required, gzipped manpages wont work Modified Paths: -------------- csw/mgar/pkg/wput/trunk/Makefile csw/mgar/pkg/wput/trunk/checksums csw/mgar/pkg/wput/trunk/files/Makefile.in.diff Modified: csw/mgar/pkg/wput/trunk/Makefile =================================================================== --- csw/mgar/pkg/wput/trunk/Makefile 2009-04-04 18:36:20 UTC (rev 4186) +++ csw/mgar/pkg/wput/trunk/Makefile 2009-04-04 21:01:36 UTC (rev 4187) @@ -15,8 +15,10 @@ LICENSE = COPYING -REQUIRED_PKGS = CSWggettextrt +PREREQUISITE_PKGS = CSWgnutlsdevel +REQUIRED_PKGS = CSWggettextrt CSWgnutls + # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=141519 UPSTREAM_USE_SF = 1 Modified: csw/mgar/pkg/wput/trunk/checksums =================================================================== --- csw/mgar/pkg/wput/trunk/checksums 2009-04-04 18:36:20 UTC (rev 4186) +++ csw/mgar/pkg/wput/trunk/checksums 2009-04-04 21:01:36 UTC (rev 4187) @@ -1,4 +1,4 @@ a14c4c13d91d04d6119bdc977e8a8bdf download/wput-0.6.2.tgz 90369c3a9dbb27432bdb5ae2611b6a96 download/configure.diff -066a65a869f312afc0e0a4d89e8b8710 download/Makefile.in.diff +b9f350b039a04e6ad5af3c4151d06b31 download/Makefile.in.diff e6e15f2a2fdac44f31ad4e3403993ff3 download/Makefile.in.src.diff Modified: csw/mgar/pkg/wput/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/wput/trunk/files/Makefile.in.diff 2009-04-04 18:36:20 UTC (rev 4186) +++ csw/mgar/pkg/wput/trunk/files/Makefile.in.diff 2009-04-04 21:01:36 UTC (rev 4187) @@ -1,7 +1,6 @@ -diff -ru ../build-global/wput-0.6.2/Makefile.in wput-0.6.2/Makefile.in --- ../build-global/wput-0.6.2/Makefile.in 2008-09-27 12:31:23.000000000 +0200 -+++ wput-0.6.2/Makefile.in 2009-03-29 18:25:34.366444523 +0200 -@@ -16,12 +16,12 @@ ++++ wput-0.6.2/Makefile.in 2009-04-04 22:04:33.828472735 +0200 +@@ -16,12 +16,14 @@ install: all cd po && $(MAKE) $(MAKEDEFS) $@ @@ -15,12 +14,14 @@ + mkdir -p $(DESTDIR)$(mandir) + ginstall -m0755 wput $(DESTDIR)$(bindir) + ginstall -m0644 doc/wput.1.gz $(DESTDIR)$(mandir) ++ gzip -d $(DESTDIR)$(mandir)/wput.1.gz + ln -s $(bindir)/wput $(DESTDIR)$(bindir)/wdel + ginstall -m0644 doc/wdel.1.gz $(DESTDIR)$(mandir) ++ gzip -d $(DESTDIR)$(mandir)/wdel.1.gz @echo "----------------" @echo "Wput and Wdel installed. See 'wput/wdel -h' or 'man wput/wdel' for" @echo "usage information." -@@ -30,6 +30,7 @@ +@@ -30,6 +32,7 @@ @echo "Wput is not perfect, so please report any bugs you notice (see BUGS-section" @echo "in the manpage)." @echo "----------------" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 00:55:42 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 22:55:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4188] csw/mgar/pkg/zlib/trunk Message-ID: Revision: 4188 http://gar.svn.sourceforge.net/gar/?rev=4188&view=rev Author: hson Date: 2009-04-04 22:55:42 +0000 (Sat, 04 Apr 2009) Log Message: ----------- zlib: Patch configure to build shared lib on amd64 Modified Paths: -------------- csw/mgar/pkg/zlib/trunk/Makefile csw/mgar/pkg/zlib/trunk/checksums csw/mgar/pkg/zlib/trunk/files/configure.diff Modified: csw/mgar/pkg/zlib/trunk/Makefile =================================================================== --- csw/mgar/pkg/zlib/trunk/Makefile 2009-04-04 21:01:36 UTC (rev 4187) +++ csw/mgar/pkg/zlib/trunk/Makefile 2009-04-04 22:55:42 UTC (rev 4188) @@ -30,7 +30,7 @@ PATCHFILES += configure.diff BUILD64 = 1 -NO_ISAEXEC = 1 +#NO_ISAEXEC = 1 CONFIGURE_ARGS = --prefix=$(prefix) --exec_prefix=$(exec_prefix) CONFIGURE_ARGS += --libdir=$(libdir) --includedir=$(includedir) --shared Modified: csw/mgar/pkg/zlib/trunk/checksums =================================================================== --- csw/mgar/pkg/zlib/trunk/checksums 2009-04-04 21:01:36 UTC (rev 4187) +++ csw/mgar/pkg/zlib/trunk/checksums 2009-04-04 22:55:42 UTC (rev 4188) @@ -1,3 +1,3 @@ dee233bf288ee795ac96a98cc2e369b6 download/zlib-1.2.3.tar.bz2 f1b6f2e9b6ce5902d2e7d83728233532 download/Makefile.in.diff -59755e3443f9a9c0374febf39663bf5f download/configure.diff +95c0edba1d5160ed41b871f2c83e813a download/configure.diff Modified: csw/mgar/pkg/zlib/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/zlib/trunk/files/configure.diff 2009-04-04 21:01:36 UTC (rev 4187) +++ csw/mgar/pkg/zlib/trunk/files/configure.diff 2009-04-04 22:55:42 UTC (rev 4188) @@ -1,5 +1,14 @@ --- ../build-global/zlib-1.2.3/configure 2005-07-11 22:11:57.000000000 +0200 -+++ zlib-1.2.3/configure 2009-03-23 08:21:07.639754073 +0100 ++++ zlib-1.2.3/configure 2009-04-01 00:31:48.271327549 +0200 +@@ -19,7 +19,7 @@ + # an error. + + LIBS=libz.a +-LDFLAGS="-L. ${LIBS}" ++#LDFLAGS="-L. ${LIBS}" + VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` + VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` + VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` @@ -29,7 +29,7 @@ exec_prefix=${exec_prefix-'${prefix}'} libdir=${libdir-'${exec_prefix}/lib'} @@ -9,3 +18,23 @@ shared_ext='.so' shared=0 gcc=0 +@@ -132,9 +132,9 @@ + SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} + CFLAGS=${CFLAGS-"-O3"} + LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; +- SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} ++ SunOS\ 5*) SFLAGS="-KPIC $CFLAGS" + CFLAGS=${CFLAGS-"-fast -xcg89"} +- LDSHARED=${LDSHARED-"cc -G"};; ++ LDSHARED=${LDSHARED-"cc -G $LDFLAGS"};; + SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} + CFLAGS=${CFLAGS-"-O2"} + LDSHARED=${LDSHARED-"ld"};; +@@ -187,6 +187,7 @@ + if test $shared -eq 0; then + LDSHARED="$CC" + echo Building static library $LIBS version $VER with $CC. ++ LDFLAGS="-L. ${LIBS}" + else + LDFLAGS="-L. ${SHAREDLIBV}" + fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 02:07:49 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 00:07:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4189] csw/mgar/pkg/wput/trunk Message-ID: Revision: 4189 http://gar.svn.sourceforge.net/gar/?rev=4189&view=rev Author: hson Date: 2009-04-05 00:07:48 +0000 (Sun, 05 Apr 2009) Log Message: ----------- wput: Patches for gnutls Modified Paths: -------------- csw/mgar/pkg/wput/trunk/Makefile csw/mgar/pkg/wput/trunk/checksums csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff csw/mgar/pkg/wput/trunk/files/configure.diff Modified: csw/mgar/pkg/wput/trunk/Makefile =================================================================== --- csw/mgar/pkg/wput/trunk/Makefile 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/Makefile 2009-04-05 00:07:48 UTC (rev 4189) @@ -17,7 +17,7 @@ PREREQUISITE_PKGS = CSWgnutlsdevel -REQUIRED_PKGS = CSWggettextrt CSWgnutls +REQUIRED_PKGS = CSWggettextrt CSWgnutls CSWgcrypt # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=141519 Modified: csw/mgar/pkg/wput/trunk/checksums =================================================================== --- csw/mgar/pkg/wput/trunk/checksums 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/checksums 2009-04-05 00:07:48 UTC (rev 4189) @@ -1,4 +1,4 @@ a14c4c13d91d04d6119bdc977e8a8bdf download/wput-0.6.2.tgz -90369c3a9dbb27432bdb5ae2611b6a96 download/configure.diff +424b62a6981cd7372281eb5b143e516d download/configure.diff b9f350b039a04e6ad5af3c4151d06b31 download/Makefile.in.diff -e6e15f2a2fdac44f31ad4e3403993ff3 download/Makefile.in.src.diff +ad2fee9c34f44b2c812ba300823eafe0 download/Makefile.in.src.diff Modified: csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff =================================================================== --- csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff 2009-04-05 00:07:48 UTC (rev 4189) @@ -1,12 +1,11 @@ -diff -ru ../build-global/wput-0.6.2/src/Makefile.in wput-0.6.2/src/Makefile.in --- ../build-global/wput-0.6.2/src/Makefile.in 2008-09-27 12:31:23.000000000 +0200 -+++ wput-0.6.2/src/Makefile.in 2009-03-29 18:24:32.132443546 +0200 ++++ wput-0.6.2/src/Makefile.in 2009-04-05 01:53:24.184186828 +0200 @@ -6,7 +6,7 @@ localedir=$(prefix)/share/locale CC=@CC@ CFLAGS= @CFLAGS@ -DLOCALEDIR=\"$(localedir)\" @GNUTLS_CFLAGS@ -LIBS=@LIBINTL@ @LIBS@ @GNUTLS_LIBS@ -+LIBS=@LIBINTL@ @LIBS@ @GNUTLS_LIBS@ -lsocket -lnsl ++LIBS=@LDFLAGS@ @LIBINTL@ @LIBS@ @GNUTLS_LIBS@ -lsocket -lnsl EXE=../wput GETOPT=@GETOPT@ MEMDBG=@MEMDBG@ Modified: csw/mgar/pkg/wput/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/wput/trunk/files/configure.diff 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/files/configure.diff 2009-04-05 00:07:48 UTC (rev 4189) @@ -1,6 +1,5 @@ -diff -ru ../build-global/wput-0.6.2/configure wput-0.6.2/configure --- ../build-global/wput-0.6.2/configure 2008-09-27 12:31:23.000000000 +0200 -+++ wput-0.6.2/configure 2009-03-29 18:17:59.596861076 +0200 ++++ wput-0.6.2/configure 2009-04-05 02:02:56.976236308 +0200 @@ -1736,7 +1736,7 @@ @@ -10,3 +9,21 @@ PACKAGE="wput" VERSION="0.6.2" +@@ -6632,7 +6632,7 @@ + CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes" + + +-for ac_header in gnutls/gnutls.h, gnutls/openssl.h ++for ac_header in gnutls/gnutls.h gnutls/openssl.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +@@ -6879,7 +6879,7 @@ + _ACEOF + + msg_gnutls="GNUTLS" +- GNUTLS_LIBS="$with_gnutls_libs -lgnutls-openssl" ++ GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt -lgnutls-openssl" + + with_ssl="yes" + else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From jake_goerzen at users.sourceforge.net Sun Apr 5 06:43:44 2009 From: jake_goerzen at users.sourceforge.net (jake_goerzen at users.sourceforge.net) Date: Sun, 05 Apr 2009 04:43:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4190] csw/mgar/pkg/fltk/trunk Message-ID: Revision: 4190 http://gar.svn.sourceforge.net/gar/?rev=4190&view=rev Author: jake_goerzen Date: 2009-04-05 04:43:44 +0000 (Sun, 05 Apr 2009) Log Message: ----------- switch to mGAR v2 Modified Paths: -------------- csw/mgar/pkg/fltk/trunk/Makefile csw/mgar/pkg/fltk/trunk/checksums Added Paths: ----------- csw/mgar/pkg/fltk/trunk/files/Makefile.diff Property Changed: ---------------- csw/mgar/pkg/fltk/trunk/ Property changes on: csw/mgar/pkg/fltk/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/fltk/trunk/Makefile =================================================================== --- csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 00:07:48 UTC (rev 4189) +++ csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 04:43:44 UTC (rev 4190) @@ -10,19 +10,20 @@ MASTER_SITES = http://ftp.easysw.com/pub/fltk/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION)-source.tar.gz -DISTFILES += $(call admfiles,CSWfltk, prototype) +DISTFILES += $(call admfiles,CSWfltk) -UFILES_REGEX = (\d+(?:\.\d+)*) +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -PATCHFILES = makeinclude.in.diff +PATCHFILES = makeinclude.in.diff Makefile.diff -CONFIGURE_ARGS = $(DIRPATHS) LDFLAGS='-L/opt/csw/lib -L../lib' +CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --mandir=/opt/csw/share/man CONFIGURE_ARGS += --disable-localpng CONFIGURE_ARGS += --disable-localjpeg CONFIGURE_ARGS += --disable-localzlib CONFIGURE_ARGS += --enable-threads CONFIGURE_ARGS += --enable-largefile +CONFIGURE_ARGS += --disable-static CONFIGURE_ARGS += --enable-shared include gar/category.mk Modified: csw/mgar/pkg/fltk/trunk/checksums =================================================================== --- csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 00:07:48 UTC (rev 4189) +++ csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 04:43:44 UTC (rev 4190) @@ -1,4 +1,4 @@ d3c76db1b6cebce7a009429bbd125470 download/fltk-1.1.9-source.tar.gz 5b35d77bcd4cb9dbb8a68eab89b358c8 download/CSWfltk.gspec -72ba3eb7711deeaad9d44004da12cc63 download/CSWfltk.prototype 1c51238fcb309cc77681874450d1bb28 download/makeinclude.in.diff +3c8162474dca50e2a8def66fc76f890d download/Makefile.diff Added: csw/mgar/pkg/fltk/trunk/files/Makefile.diff =================================================================== --- csw/mgar/pkg/fltk/trunk/files/Makefile.diff (rev 0) +++ csw/mgar/pkg/fltk/trunk/files/Makefile.diff 2009-04-05 04:43:44 UTC (rev 4190) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru fltk-1.1.9.orig/fluid/Makefile fltk-1.1.9/fluid/Makefile +--- fltk-1.1.9.orig/fluid/Makefile 2008-02-26 16:26:08.000000000 +0100 ++++ fltk-1.1.9/fluid/Makefile 2009-04-05 06:25:12.680119819 +0200 +@@ -64,7 +64,7 @@ + fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \ + ../src/$(IMGDSONAME) + echo Linking $@... +- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDLIBS) ++ $(CXX) $(ARCHFLAGS) -L../src $(LDFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDLIBS) + $(POSTBUILD) $@ ../FL/mac.r + + clean: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From jake_goerzen at users.sourceforge.net Sun Apr 5 07:09:56 2009 From: jake_goerzen at users.sourceforge.net (jake_goerzen at users.sourceforge.net) Date: Sun, 05 Apr 2009 05:09:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4191] csw/mgar/pkg/fltk/trunk Message-ID: Revision: 4191 http://gar.svn.sourceforge.net/gar/?rev=4191&view=rev Author: jake_goerzen Date: 2009-04-05 05:09:56 +0000 (Sun, 05 Apr 2009) Log Message: ----------- add depend file Modified Paths: -------------- csw/mgar/pkg/fltk/trunk/Makefile csw/mgar/pkg/fltk/trunk/checksums Added Paths: ----------- csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend Removed Paths: ------------- csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype Modified: csw/mgar/pkg/fltk/trunk/Makefile =================================================================== --- csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 04:43:44 UTC (rev 4190) +++ csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 05:09:56 UTC (rev 4191) @@ -10,7 +10,7 @@ MASTER_SITES = http://ftp.easysw.com/pub/fltk/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION)-source.tar.gz -DISTFILES += $(call admfiles,CSWfltk) +DISTFILES += $(call admfiles,CSWfltk, depend) UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/fltk/trunk/checksums =================================================================== --- csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 04:43:44 UTC (rev 4190) +++ csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 05:09:56 UTC (rev 4191) @@ -1,4 +1,5 @@ d3c76db1b6cebce7a009429bbd125470 download/fltk-1.1.9-source.tar.gz 5b35d77bcd4cb9dbb8a68eab89b358c8 download/CSWfltk.gspec +043fee4145d49b611961c22859edc4ec download/CSWfltk.depend 1c51238fcb309cc77681874450d1bb28 download/makeinclude.in.diff 3c8162474dca50e2a8def66fc76f890d download/Makefile.diff Added: csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend =================================================================== --- csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend (rev 0) +++ csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend 2009-04-05 05:09:56 UTC (rev 4191) @@ -0,0 +1,4 @@ +P CSWcommon +P CSWjpeg +P CSWpng +P CSWzlib Deleted: csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype =================================================================== --- csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype 2009-04-05 04:43:44 UTC (rev 4190) +++ csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype 2009-04-05 05:09:56 UTC (rev 4191) @@ -1,581 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/fltk-config 0755 root bin -f none /opt/csw/bin/fluid 0755 root bin -d none /opt/csw/include 0755 root bin -d none /opt/csw/include/FL 0755 root bin -f none /opt/csw/include/FL/Enumerations.H 0644 root bin -s none /opt/csw/include/FL/Enumerations.h=Enumerations.H -f none /opt/csw/include/FL/Fl.H 0644 root bin -s none /opt/csw/include/FL/Fl.h=Fl.H -f none /opt/csw/include/FL/Fl_Adjuster.H 0644 root bin -s none /opt/csw/include/FL/Fl_Adjuster.h=Fl_Adjuster.H -f none /opt/csw/include/FL/Fl_BMP_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_BMP_Image.h=Fl_BMP_Image.H -f none /opt/csw/include/FL/Fl_Bitmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_Bitmap.h=Fl_Bitmap.H -f none /opt/csw/include/FL/Fl_Box.H 0644 root bin -s none /opt/csw/include/FL/Fl_Box.h=Fl_Box.H -f none /opt/csw/include/FL/Fl_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Browser.h=Fl_Browser.H -f none /opt/csw/include/FL/Fl_Browser_.H 0644 root bin -s none /opt/csw/include/FL/Fl_Browser_.h=Fl_Browser_.H -f none /opt/csw/include/FL/Fl_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Button.h=Fl_Button.H -f none /opt/csw/include/FL/Fl_Chart.H 0644 root bin -s none /opt/csw/include/FL/Fl_Chart.h=Fl_Chart.H -f none /opt/csw/include/FL/Fl_Check_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Check_Browser.h=Fl_Check_Browser.H -f none /opt/csw/include/FL/Fl_Check_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Check_Button.h=Fl_Check_Button.H -f none /opt/csw/include/FL/Fl_Choice.H 0644 root bin -s none /opt/csw/include/FL/Fl_Choice.h=Fl_Choice.H -f none /opt/csw/include/FL/Fl_Clock.H 0644 root bin -s none /opt/csw/include/FL/Fl_Clock.h=Fl_Clock.H -f none /opt/csw/include/FL/Fl_Color_Chooser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Color_Chooser.h=Fl_Color_Chooser.H -f none /opt/csw/include/FL/Fl_Counter.H 0644 root bin -s none /opt/csw/include/FL/Fl_Counter.h=Fl_Counter.H -f none /opt/csw/include/FL/Fl_Dial.H 0644 root bin -s none /opt/csw/include/FL/Fl_Dial.h=Fl_Dial.H -f none /opt/csw/include/FL/Fl_Double_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Double_Window.h=Fl_Double_Window.H -f none /opt/csw/include/FL/Fl_Export.H 0644 root bin -s none /opt/csw/include/FL/Fl_Export.h=Fl_Export.H -f none /opt/csw/include/FL/Fl_File_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Browser.h=Fl_File_Browser.H -f none /opt/csw/include/FL/Fl_File_Chooser.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Chooser.h=Fl_File_Chooser.H -f none /opt/csw/include/FL/Fl_File_Icon.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Icon.h=Fl_File_Icon.H -f none /opt/csw/include/FL/Fl_File_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Input.h=Fl_File_Input.H -f none /opt/csw/include/FL/Fl_Fill_Dial.H 0644 root bin -s none /opt/csw/include/FL/Fl_Fill_Dial.h=Fl_Fill_Dial.H -f none /opt/csw/include/FL/Fl_Fill_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Fill_Slider.h=Fl_Fill_Slider.H -f none /opt/csw/include/FL/Fl_Float_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Float_Input.h=Fl_Float_Input.H -f none /opt/csw/include/FL/Fl_FormsBitmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_FormsBitmap.h=Fl_FormsBitmap.H -f none /opt/csw/include/FL/Fl_FormsPixmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_FormsPixmap.h=Fl_FormsPixmap.H -f none /opt/csw/include/FL/Fl_Free.H 0644 root bin -s none /opt/csw/include/FL/Fl_Free.h=Fl_Free.H -f none /opt/csw/include/FL/Fl_GIF_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_GIF_Image.h=Fl_GIF_Image.H -f none /opt/csw/include/FL/Fl_Gl_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Gl_Window.h=Fl_Gl_Window.H -f none /opt/csw/include/FL/Fl_Group.H 0644 root bin -s none /opt/csw/include/FL/Fl_Group.h=Fl_Group.H -f none /opt/csw/include/FL/Fl_Help_Dialog.H 0644 root bin -s none /opt/csw/include/FL/Fl_Help_Dialog.h=Fl_Help_Dialog.H -f none /opt/csw/include/FL/Fl_Help_View.H 0644 root bin -s none /opt/csw/include/FL/Fl_Help_View.h=Fl_Help_View.H -f none /opt/csw/include/FL/Fl_Hold_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hold_Browser.h=Fl_Hold_Browser.H -f none /opt/csw/include/FL/Fl_Hor_Fill_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Fill_Slider.h=Fl_Hor_Fill_Slider.H -f none /opt/csw/include/FL/Fl_Hor_Nice_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Nice_Slider.h=Fl_Hor_Nice_Slider.H -f none /opt/csw/include/FL/Fl_Hor_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Slider.h=Fl_Hor_Slider.H -f none /opt/csw/include/FL/Fl_Hor_Value_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Value_Slider.h=Fl_Hor_Value_Slider.H -f none /opt/csw/include/FL/Fl_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_Image.h=Fl_Image.H -f none /opt/csw/include/FL/Fl_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Input.h=Fl_Input.H -f none /opt/csw/include/FL/Fl_Input_.H 0644 root bin -s none /opt/csw/include/FL/Fl_Input_.h=Fl_Input_.H -f none /opt/csw/include/FL/Fl_Input_Choice.H 0644 root bin -s none /opt/csw/include/FL/Fl_Input_Choice.h=Fl_Input_Choice.H -f none /opt/csw/include/FL/Fl_Int_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Int_Input.h=Fl_Int_Input.H -f none /opt/csw/include/FL/Fl_JPEG_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_JPEG_Image.h=Fl_JPEG_Image.H -f none /opt/csw/include/FL/Fl_Light_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Light_Button.h=Fl_Light_Button.H -f none /opt/csw/include/FL/Fl_Line_Dial.H 0644 root bin -s none /opt/csw/include/FL/Fl_Line_Dial.h=Fl_Line_Dial.H -f none /opt/csw/include/FL/Fl_Menu.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu.h=Fl_Menu.H -f none /opt/csw/include/FL/Fl_Menu_.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_.h=Fl_Menu_.H -f none /opt/csw/include/FL/Fl_Menu_Bar.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Bar.h=Fl_Menu_Bar.H -f none /opt/csw/include/FL/Fl_Menu_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Button.h=Fl_Menu_Button.H -f none /opt/csw/include/FL/Fl_Menu_Item.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Item.h=Fl_Menu_Item.H -f none /opt/csw/include/FL/Fl_Menu_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Window.h=Fl_Menu_Window.H -f none /opt/csw/include/FL/Fl_Multi_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multi_Browser.h=Fl_Multi_Browser.H -f none /opt/csw/include/FL/Fl_Multi_Label.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multi_Label.h=Fl_Multi_Label.H -f none /opt/csw/include/FL/Fl_Multiline_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multiline_Input.h=Fl_Multiline_Input.H -f none /opt/csw/include/FL/Fl_Multiline_Output.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multiline_Output.h=Fl_Multiline_Output.H -f none /opt/csw/include/FL/Fl_Nice_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Nice_Slider.h=Fl_Nice_Slider.H -f none /opt/csw/include/FL/Fl_Object.H 0644 root bin -s none /opt/csw/include/FL/Fl_Object.h=Fl_Object.H -f none /opt/csw/include/FL/Fl_Output.H 0644 root bin -s none /opt/csw/include/FL/Fl_Output.h=Fl_Output.H -f none /opt/csw/include/FL/Fl_Overlay_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Overlay_Window.h=Fl_Overlay_Window.H -f none /opt/csw/include/FL/Fl_PNG_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_PNG_Image.h=Fl_PNG_Image.H -f none /opt/csw/include/FL/Fl_PNM_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_PNM_Image.h=Fl_PNM_Image.H -f none /opt/csw/include/FL/Fl_Pack.H 0644 root bin -s none /opt/csw/include/FL/Fl_Pack.h=Fl_Pack.H -f none /opt/csw/include/FL/Fl_Pixmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_Pixmap.h=Fl_Pixmap.H -f none /opt/csw/include/FL/Fl_Positioner.H 0644 root bin -s none /opt/csw/include/FL/Fl_Positioner.h=Fl_Positioner.H -f none /opt/csw/include/FL/Fl_Preferences.H 0644 root bin -s none /opt/csw/include/FL/Fl_Preferences.h=Fl_Preferences.H -f none /opt/csw/include/FL/Fl_Progress.H 0644 root bin -s none /opt/csw/include/FL/Fl_Progress.h=Fl_Progress.H -f none /opt/csw/include/FL/Fl_RGB_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_RGB_Image.h=Fl_RGB_Image.H -f none /opt/csw/include/FL/Fl_Radio_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Radio_Button.h=Fl_Radio_Button.H -f none /opt/csw/include/FL/Fl_Radio_Light_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Radio_Light_Button.h=Fl_Radio_Light_Button.H -f none /opt/csw/include/FL/Fl_Radio_Round_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Radio_Round_Button.h=Fl_Radio_Round_Button.H -f none /opt/csw/include/FL/Fl_Repeat_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Repeat_Button.h=Fl_Repeat_Button.H -f none /opt/csw/include/FL/Fl_Return_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Return_Button.h=Fl_Return_Button.H -f none /opt/csw/include/FL/Fl_Roller.H 0644 root bin -s none /opt/csw/include/FL/Fl_Roller.h=Fl_Roller.H -f none /opt/csw/include/FL/Fl_Round_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Round_Button.h=Fl_Round_Button.H -f none /opt/csw/include/FL/Fl_Round_Clock.H 0644 root bin -s none /opt/csw/include/FL/Fl_Round_Clock.h=Fl_Round_Clock.H -f none /opt/csw/include/FL/Fl_Scroll.H 0644 root bin -s none /opt/csw/include/FL/Fl_Scroll.h=Fl_Scroll.H -f none /opt/csw/include/FL/Fl_Scrollbar.H 0644 root bin -s none /opt/csw/include/FL/Fl_Scrollbar.h=Fl_Scrollbar.H -f none /opt/csw/include/FL/Fl_Secret_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Secret_Input.h=Fl_Secret_Input.H -f none /opt/csw/include/FL/Fl_Select_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Select_Browser.h=Fl_Select_Browser.H -f none /opt/csw/include/FL/Fl_Shared_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_Shared_Image.h=Fl_Shared_Image.H -f none /opt/csw/include/FL/Fl_Simple_Counter.H 0644 root bin -s none /opt/csw/include/FL/Fl_Simple_Counter.h=Fl_Simple_Counter.H -f none /opt/csw/include/FL/Fl_Single_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Single_Window.h=Fl_Single_Window.H -f none /opt/csw/include/FL/Fl_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Slider.h=Fl_Slider.H -f none /opt/csw/include/FL/Fl_Spinner.H 0644 root bin -s none /opt/csw/include/FL/Fl_Spinner.h=Fl_Spinner.H -f none /opt/csw/include/FL/Fl_Sys_Menu_Bar.H 0644 root bin -s none /opt/csw/include/FL/Fl_Sys_Menu_Bar.h=Fl_Sys_Menu_Bar.H -f none /opt/csw/include/FL/Fl_Tabs.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tabs.h=Fl_Tabs.H -f none /opt/csw/include/FL/Fl_Text_Buffer.H 0644 root bin -s none /opt/csw/include/FL/Fl_Text_Buffer.h=Fl_Text_Buffer.H -f none /opt/csw/include/FL/Fl_Text_Display.H 0644 root bin -s none /opt/csw/include/FL/Fl_Text_Display.h=Fl_Text_Display.H -f none /opt/csw/include/FL/Fl_Text_Editor.H 0644 root bin -s none /opt/csw/include/FL/Fl_Text_Editor.h=Fl_Text_Editor.H -f none /opt/csw/include/FL/Fl_Tile.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tile.h=Fl_Tile.H -f none /opt/csw/include/FL/Fl_Tiled_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tiled_Image.h=Fl_Tiled_Image.H -f none /opt/csw/include/FL/Fl_Timer.H 0644 root bin -s none /opt/csw/include/FL/Fl_Timer.h=Fl_Timer.H -f none /opt/csw/include/FL/Fl_Toggle_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Toggle_Button.h=Fl_Toggle_Button.H -f none /opt/csw/include/FL/Fl_Toggle_Light_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Toggle_Light_Button.h=Fl_Toggle_Light_Button.H -f none /opt/csw/include/FL/Fl_Toggle_Round_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Toggle_Round_Button.h=Fl_Toggle_Round_Button.H -f none /opt/csw/include/FL/Fl_Tooltip.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tooltip.h=Fl_Tooltip.H -f none /opt/csw/include/FL/Fl_Valuator.H 0644 root bin -s none /opt/csw/include/FL/Fl_Valuator.h=Fl_Valuator.H -f none /opt/csw/include/FL/Fl_Value_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Value_Input.h=Fl_Value_Input.H -f none /opt/csw/include/FL/Fl_Value_Output.H 0644 root bin -s none /opt/csw/include/FL/Fl_Value_Output.h=Fl_Value_Output.H -f none /opt/csw/include/FL/Fl_Value_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Value_Slider.h=Fl_Value_Slider.H -f none /opt/csw/include/FL/Fl_Widget.H 0644 root bin -s none /opt/csw/include/FL/Fl_Widget.h=Fl_Widget.H -f none /opt/csw/include/FL/Fl_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Window.h=Fl_Window.H -f none /opt/csw/include/FL/Fl_Wizard.H 0644 root bin -s none /opt/csw/include/FL/Fl_Wizard.h=Fl_Wizard.H -f none /opt/csw/include/FL/Fl_XBM_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_XBM_Image.h=Fl_XBM_Image.H -f none /opt/csw/include/FL/Fl_XPM_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_XPM_Image.h=Fl_XPM_Image.H -f none /opt/csw/include/FL/dirent.h 0644 root bin -f none /opt/csw/include/FL/filename.H 0644 root bin -s none /opt/csw/include/FL/filename.h=filename.H -f none /opt/csw/include/FL/fl_ask.H 0644 root bin -s none /opt/csw/include/FL/fl_ask.h=fl_ask.H -f none /opt/csw/include/FL/fl_draw.H 0644 root bin -s none /opt/csw/include/FL/fl_draw.h=fl_draw.H -s none /opt/csw/include/FL/fl_file_chooser.H=Fl_File_Chooser.H -s none /opt/csw/include/FL/fl_file_chooser.h=Fl_File_Chooser.H -f none /opt/csw/include/FL/fl_message.H 0644 root bin -s none /opt/csw/include/FL/fl_message.h=fl_message.H -f none /opt/csw/include/FL/fl_show_colormap.H 0644 root bin -s none /opt/csw/include/FL/fl_show_colormap.h=fl_show_colormap.H -f none /opt/csw/include/FL/fl_show_input.H 0644 root bin -s none /opt/csw/include/FL/fl_show_input.h=fl_show_input.H -f none /opt/csw/include/FL/forms.H 0644 root bin -s none /opt/csw/include/FL/forms.h=forms.H -f none /opt/csw/include/FL/gl.h 0644 root bin -f none /opt/csw/include/FL/gl2opengl.h 0644 root bin -f none /opt/csw/include/FL/gl_draw.H 0644 root bin -s none /opt/csw/include/FL/gl_draw.h=gl_draw.H -f none /opt/csw/include/FL/glu.h 0644 root bin -f none /opt/csw/include/FL/glut.H 0644 root bin -s none /opt/csw/include/FL/glut.h=glut.H -f none /opt/csw/include/FL/mac.H 0644 root bin -s none /opt/csw/include/FL/mac.h=mac.H -f none /opt/csw/include/FL/mac.r 0644 root bin -f none /opt/csw/include/FL/math.h 0644 root bin -f none /opt/csw/include/FL/names.h 0644 root bin -f none /opt/csw/include/FL/win32.H 0644 root bin -s none /opt/csw/include/FL/win32.h=win32.H -f none /opt/csw/include/FL/x.H 0644 root bin -s none /opt/csw/include/FL/x.h=x.H -s none /opt/csw/include/Fl=FL -d none /opt/csw/lib 0755 root bin -f none /opt/csw/lib/libfltk.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk.so=libfltk.so.1.1 -f none /opt/csw/lib/libfltk_forms.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk_forms.so=libfltk_forms.so.1.1 -f none /opt/csw/lib/libfltk_gl.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk_gl.so=libfltk_gl.so.1.1 -f none /opt/csw/lib/libfltk_images.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk_images.so=libfltk_images.so.1.1 -d none /opt/csw/share/doc/fltk 0755 root bin -f none /opt/csw/share/doc/fltk/FL.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Adjuster.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_BMP_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Bitmap.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Box.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Browser_.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Chart.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Check_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Check_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Check_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Choice.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Clock.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Clock_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Color_Chooser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Counter.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Dial.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Double_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_End.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Chooser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Chooser.jpg 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Icon.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Input.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Float_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Free.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_GIF_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Gl_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Group.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Help_Dialog.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Help_Dialog.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Help_View.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Hold_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Input_.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Input_Choice.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Int_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_JPEG_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Light_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Light_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Bar.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Item.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Multi_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Multiline_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Multiline_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Overlay_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_PNG_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_PNM_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Pack.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Pixmap.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Positioner.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Preferences.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Progress.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_RGB_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Repeat_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Return_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Return_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Roller.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Roller.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Round_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Round_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Scroll.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Scroll.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Scrollbar.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Secret_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Select_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Shared_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Single_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Slider.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Spinner.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tabs.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Text_Buffer.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Text_Display.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Text_Editor.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tile.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tile.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tiled_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Timer.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Toggle_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tooltip.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Valuator.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Input.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Output.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Slider.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Widget.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Wizard.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_XBM_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_XPM_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/adjuster1.gif 0644 root bin -f none /opt/csw/share/doc/fltk/advanced.html 0644 root bin -f none /opt/csw/share/doc/fltk/basics.html 0644 root bin -f none /opt/csw/share/doc/fltk/boxtypes.gif 0644 root bin -f none /opt/csw/share/doc/fltk/buttons.gif 0644 root bin -f none /opt/csw/share/doc/fltk/charts.gif 0644 root bin -f none /opt/csw/share/doc/fltk/choice.gif 0644 root bin -f none /opt/csw/share/doc/fltk/clock.gif 0644 root bin -f none /opt/csw/share/doc/fltk/common.html 0644 root bin -f none /opt/csw/share/doc/fltk/counter.gif 0644 root bin -f none /opt/csw/share/doc/fltk/cubeview.gif 0644 root bin -f none /opt/csw/share/doc/fltk/dial.gif 0644 root bin -f none /opt/csw/share/doc/fltk/drawing.html 0644 root bin -f none /opt/csw/share/doc/fltk/editor-replace.gif 0644 root bin -f none /opt/csw/share/doc/fltk/editor.gif 0644 root bin -f none /opt/csw/share/doc/fltk/editor.html 0644 root bin -f none /opt/csw/share/doc/fltk/enumerations.html 0644 root bin -f none /opt/csw/share/doc/fltk/events.html 0644 root bin -d none /opt/csw/share/doc/fltk/examples 0755 root bin -f none /opt/csw/share/doc/fltk/examples.html 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeMain.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeView.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeView.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeViewUI.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeViewUI.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeViewUI.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/adjuster.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/arc.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/ask.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/bitmap.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/blocks.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/boxtype.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/browser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/button.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/buttons.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/checkers.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/clock.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/colbrowser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/color_chooser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/connect.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/cube.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/cursor.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/curve.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/demo.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/demo.menu 0644 root bin -f none /opt/csw/share/doc/fltk/examples/doublebuffer.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/editor.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fast_slow.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fast_slow.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fast_slow.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/file_chooser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fl_jpeg_image.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fonts.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/forms.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fractals.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fracviewer.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fracviewer.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fullscreen.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/gl_overlay.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/glpuzzle.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/hello.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/help.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/iconize.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/image.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/inactive.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/inactive.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/inactive.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/input.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/input_choice.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard_ui.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard_ui.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard_ui.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/label.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/line_style.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/list_visuals.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot_ui.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot_ui.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot_ui.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/menubar.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/message.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/minimum.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/navigation.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/output.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/overlay.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pack.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmap.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmap_browser.cxx 0644 root bin -d none /opt/csw/share/doc/fltk/examples/pixmaps 0755 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blast.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blue.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blue_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/cyan.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/cyan_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/gray.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/gray_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/green.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/green_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/magenta.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/magenta_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/porsche.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/porsche1.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/red.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/red_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/srs.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/sudoku.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/tile.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/yellow.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/yellow_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/preferences.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/preferences.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/preferences.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/radio.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/radio.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/radio.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resize.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resize.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resize.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resizebox.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/scroll.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/shape.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/subwindow.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/sudoku.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/sudokurc.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/symbols.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tabs.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tabs.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tabs.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/threads.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/threads.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tile.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tiled_image.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/trackball.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/unittests.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/valuators.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/valuators.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/valuators.h 0644 root bin -f none /opt/csw/share/doc/fltk/fl_alert.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_ask.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_choice.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_color_chooser.jpg 0644 root bin -f none /opt/csw/share/doc/fltk/fl_input.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_message.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_password.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_show_colormap.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid-catgets.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid-gettext.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid-org.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid.html 0644 root bin -f none /opt/csw/share/doc/fltk/fluid1.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid2.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid3-cxx.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid3-gui.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid3-style.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid4.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_prefs.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_widget_cxx.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_widget_gui.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_widget_style.gif 0644 root bin -f none /opt/csw/share/doc/fltk/forms.html 0644 root bin -f none /opt/csw/share/doc/fltk/functions.html 0644 root bin -f none /opt/csw/share/doc/fltk/glut.html 0644 root bin -f none /opt/csw/share/doc/fltk/hello.C.gif 0644 root bin -f none /opt/csw/share/doc/fltk/index.html 0644 root bin -f none /opt/csw/share/doc/fltk/input_choice.jpg 0644 root bin -f none /opt/csw/share/doc/fltk/intro.html 0644 root bin -f none /opt/csw/share/doc/fltk/license.html 0644 root bin -f none /opt/csw/share/doc/fltk/menu.gif 0644 root bin -f none /opt/csw/share/doc/fltk/menu_button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/menubar.gif 0644 root bin -f none /opt/csw/share/doc/fltk/migration.html 0644 root bin -f none /opt/csw/share/doc/fltk/opengl.html 0644 root bin -f none /opt/csw/share/doc/fltk/osissues.html 0644 root bin -f none /opt/csw/share/doc/fltk/positioner.gif 0644 root bin -f none /opt/csw/share/doc/fltk/preface.html 0644 root bin -f none /opt/csw/share/doc/fltk/resizebox1.gif 0644 root bin -f none /opt/csw/share/doc/fltk/resizebox2.gif 0644 root bin -f none /opt/csw/share/doc/fltk/round_clock.gif 0644 root bin -f none /opt/csw/share/doc/fltk/scrollbar.gif 0644 root bin -f none /opt/csw/share/doc/fltk/slider.gif 0644 root bin -f none /opt/csw/share/doc/fltk/subclassing.html 0644 root bin -f none /opt/csw/share/doc/fltk/symbols.gif 0644 root bin -f none /opt/csw/share/doc/fltk/tabs.gif 0644 root bin -f none /opt/csw/share/doc/fltk/text.gif 0644 root bin -f none /opt/csw/share/doc/fltk/valuators.gif 0644 root bin -f none /opt/csw/share/doc/fltk/value_slider.gif 0644 root bin -f none /opt/csw/share/doc/fltk/widgets.html 0644 root bin -d none /opt/csw/share/man/cat1 0755 root bin -f none /opt/csw/share/man/cat1/fltk-config.1 0644 root bin -f none /opt/csw/share/man/cat1/fluid.1 0644 root bin -d none /opt/csw/share/man/cat3 0755 root bin -f none /opt/csw/share/man/cat3/fltk.3 0644 root bin -d none /opt/csw/share/man/man1 0755 root bin -f none /opt/csw/share/man/man1/fltk-config.1 0644 root bin -f none /opt/csw/share/man/man1/fluid.1 0644 root bin -d none /opt/csw/share/man/man3 0755 root bin -f none /opt/csw/share/man/man3/fltk.3 0644 root bin -i copyright=CSWfltk.copyright -i depend=CSWfltk.depend -i pkginfo=CSWfltk.pkginfo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From j_arndt at users.sourceforge.net Sun Apr 5 09:14:47 2009 From: j_arndt at users.sourceforge.net (j_arndt at users.sourceforge.net) Date: Sun, 05 Apr 2009 07:14:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4192] csw/mgar/pkg/nsca/trunk/Makefile Message-ID: Revision: 4192 http://gar.svn.sourceforge.net/gar/?rev=4192&view=rev Author: j_arndt Date: 2009-04-05 07:14:47 +0000 (Sun, 05 Apr 2009) Log Message: ----------- nsca: fix for #3568 and #3591 Modified Paths: -------------- csw/mgar/pkg/nsca/trunk/Makefile Modified: csw/mgar/pkg/nsca/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsca/trunk/Makefile 2009-04-05 05:09:56 UTC (rev 4191) +++ csw/mgar/pkg/nsca/trunk/Makefile 2009-04-05 07:14:47 UTC (rev 4192) @@ -23,6 +23,8 @@ SPKG_CLASSES_CSWnsca = none cswpreserveconf cswinitsmf SPKG_CLASSES_CSWsendnsca = none cswpreserveconf +NOISALIST = 1 + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-nsca-port=5667 CONFIGURE_ARGS += --localstatedir=/opt/csw/nagios/var This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From j_arndt at users.sourceforge.net Sun Apr 5 09:34:25 2009 From: j_arndt at users.sourceforge.net (j_arndt at users.sourceforge.net) Date: Sun, 05 Apr 2009 07:34:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4193] csw/mgar/pkg/nrpe/trunk/Makefile Message-ID: Revision: 4193 http://gar.svn.sourceforge.net/gar/?rev=4193&view=rev Author: j_arndt Date: 2009-04-05 07:34:24 +0000 (Sun, 05 Apr 2009) Log Message: ----------- fix for #3567 and #3566 Modified Paths: -------------- csw/mgar/pkg/nrpe/trunk/Makefile Modified: csw/mgar/pkg/nrpe/trunk/Makefile =================================================================== --- csw/mgar/pkg/nrpe/trunk/Makefile 2009-04-05 07:14:47 UTC (rev 4192) +++ csw/mgar/pkg/nrpe/trunk/Makefile 2009-04-05 07:34:24 UTC (rev 4193) @@ -21,6 +21,8 @@ SPKG_CLASSES_CSWnrpe = none cswpreserveconf cswinitsmf +NOISALIST = 1 + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl-lib=/opt/csw/lib CONFIGURE_ARGS += --with-ssl-inc=/opt/csw/include This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 11:16:26 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 09:16:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4194] csw/mgar/pkg/zlib/trunk Message-ID: Revision: 4194 http://gar.svn.sourceforge.net/gar/?rev=4194&view=rev Author: hson Date: 2009-04-05 09:16:25 +0000 (Sun, 05 Apr 2009) Log Message: ----------- zlib: Set SONAME Modified Paths: -------------- csw/mgar/pkg/zlib/trunk/checksums csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff Modified: csw/mgar/pkg/zlib/trunk/checksums =================================================================== --- csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 07:34:24 UTC (rev 4193) +++ csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 09:16:25 UTC (rev 4194) @@ -1,3 +1,3 @@ dee233bf288ee795ac96a98cc2e369b6 download/zlib-1.2.3.tar.bz2 -f1b6f2e9b6ce5902d2e7d83728233532 download/Makefile.in.diff +fc375b4e1b10b7946d3b872720154e63 download/Makefile.in.diff 95c0edba1d5160ed41b871f2c83e813a download/configure.diff Modified: csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 07:34:24 UTC (rev 4193) +++ csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 09:16:25 UTC (rev 4194) @@ -1,5 +1,25 @@ --- ../build-global/zlib-1.2.3/Makefile.in 2005-07-18 04:25:21.000000000 +0200 -+++ zlib-1.2.3/Makefile.in 2009-03-23 08:05:49.549504439 +0100 ++++ zlib-1.2.3/Makefile.in 2009-04-05 11:06:51.418782054 +0200 +@@ -24,15 +24,15 @@ + #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + # -Wstrict-prototypes -Wmissing-prototypes + +-LDFLAGS=libz.a +-LDSHARED=$(CC) +-CPP=$(CC) -E +- + LIBS=libz.a + SHAREDLIB=libz.so + SHAREDLIBV=libz.so.1.2.3 + SHAREDLIBM=libz.so.1 + ++LDFLAGS=libz.a ++LDSHARED=$(CC) -h $(SHAREDLIBM) ++CPP=$(CC) -E ++ + AR=ar rc + RANLIB=ranlib + TAR=tar @@ -43,7 +43,7 @@ exec_prefix = ${prefix} libdir = ${exec_prefix}/lib This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 11:29:04 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 09:29:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4195] csw/mgar/pkg/zlib/trunk Message-ID: Revision: 4195 http://gar.svn.sourceforge.net/gar/?rev=4195&view=rev Author: hson Date: 2009-04-05 09:29:04 +0000 (Sun, 05 Apr 2009) Log Message: ----------- zlib: SONAME fix Modified Paths: -------------- csw/mgar/pkg/zlib/trunk/checksums csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff Modified: csw/mgar/pkg/zlib/trunk/checksums =================================================================== --- csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 09:16:25 UTC (rev 4194) +++ csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 09:29:04 UTC (rev 4195) @@ -1,3 +1,3 @@ dee233bf288ee795ac96a98cc2e369b6 download/zlib-1.2.3.tar.bz2 -fc375b4e1b10b7946d3b872720154e63 download/Makefile.in.diff +7e6ff59ded76dd7d90a5dc10ff25e20a download/Makefile.in.diff 95c0edba1d5160ed41b871f2c83e813a download/configure.diff Modified: csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 09:16:25 UTC (rev 4194) +++ csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 09:29:04 UTC (rev 4195) @@ -1,25 +1,5 @@ --- ../build-global/zlib-1.2.3/Makefile.in 2005-07-18 04:25:21.000000000 +0200 -+++ zlib-1.2.3/Makefile.in 2009-04-05 11:06:51.418782054 +0200 -@@ -24,15 +24,15 @@ - #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - # -Wstrict-prototypes -Wmissing-prototypes - --LDFLAGS=libz.a --LDSHARED=$(CC) --CPP=$(CC) -E -- - LIBS=libz.a - SHAREDLIB=libz.so - SHAREDLIBV=libz.so.1.2.3 - SHAREDLIBM=libz.so.1 - -+LDFLAGS=libz.a -+LDSHARED=$(CC) -h $(SHAREDLIBM) -+CPP=$(CC) -E -+ - AR=ar rc - RANLIB=ranlib - TAR=tar ++++ zlib-1.2.3/Makefile.in 2009-04-05 11:24:56.336506142 +0200 @@ -43,7 +43,7 @@ exec_prefix = ${prefix} libdir = ${exec_prefix}/lib @@ -29,6 +9,15 @@ man3dir = ${mandir}/man3 OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ +@@ -78,7 +78,7 @@ + rm -f _match.s + + $(SHAREDLIBV): $(OBJS) +- $(LDSHARED) -o $@ $(OBJS) ++ $(LDSHARED) -h $(SHAREDLIBM) -o $@ $(OBJS) + rm -f $(SHAREDLIB) $(SHAREDLIBM) + ln -s $@ $(SHAREDLIB) + ln -s $@ $(SHAREDLIBM) @@ -90,23 +90,23 @@ $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 5 15:48:44 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 05 Apr 2009 13:48:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4196] csw/mgar/pkg/bash_completion/trunk Message-ID: Revision: 4196 http://gar.svn.sourceforge.net/gar/?rev=4196&view=rev Author: chninkel Date: 2009-04-05 13:48:44 +0000 (Sun, 05 Apr 2009) Log Message: ----------- bash_completion: updated to 1.0 bash_completion: switched to gar v2 Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/Makefile csw/mgar/pkg/bash_completion/trunk/checksums Added Paths: ----------- csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch Removed Paths: ------------- csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch Property Changed: ---------------- csw/mgar/pkg/bash_completion/trunk/ Property changes on: csw/mgar/pkg/bash_completion/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/bash_completion/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash_completion/trunk/Makefile 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/Makefile 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,5 +1,19 @@ +##################################################################### +# OpenCSW build recipe for bash-completion +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = bash_completion -GARVERSION = 20060301 +GARVERSION = 1.0 CATEGORIES = xtra DESCRIPTION = Programmable completion for bash @@ -7,38 +21,59 @@ Since v2.04, bash has allowed you to intelligently program and extend its standard completion behavior to achieve complex command lines with just a few keystrokes. Imagine typing ssh [Tab] and being able to complete on hosts from your ~/.ssh/known_hosts files. Or typing man 3 str [Tab] and getting a list of all string handling functions in the UNIX manual. mount system: [Tab] would complete on all exported file-systems from the host called system, while make [Tab] would complete on all targets in Makefile. This project was conceived to produce programmable completion routines for the most common Linux/UNIX commands, reducing the amount of typing sysadmins and programmers need to do on a daily basis. endef -MASTER_SITES = http://www.caliban.org/files/bash/ +ARCHALL=1 +PACKAGES = CSWbashcmplt +CATALOGNAME_CSWbashcmplt = bash_completion + + +###### Upstream and OpenCSW files information ####### + +MASTER_SITES = http://bash-completion.alioth.debian.org/files/ + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(shell echo $(GARNAME) | tr '_' '-')-(\d+).tar.gz -DISTFILES = $(shell echo $(GARNAME) | tr '_' '-')-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWbash_completion,) +DISTNAME = $(shell echo $(GARNAME) | tr '_' '-')-$(GARVERSION) + +DISTFILES = $(DISTNAME).tar.gz +# we automatically include all DISTFILES += $(shell cd files; for FILE in *.completion; do echo $$FILE; done) -# add blastwave paths -PATCHFILES = blastwave.patch +DISTFILES += changelog.CSW -WORKSRC = $(WORKDIR)/$(GARNAME) +# change the paths to use opencsw ones +PATCHFILES = opencsw_paths.patch -# no configure/Makefile -CONFIGURE_SCRIPTS = -BUILD_SCRIPTS = -INSTALL_SCRIPTS = manual + +##### Build and installation information ##### + +# the configure script doesn't seem to take in account the prefix +# env variable defined automatically by GAR +CONFIGURE_ARGS += --prefix $(prefix) + +# no test script in bash_completion TEST_SCRIPTS = -install-manual: - @ginstall -d $(DESTDIR)$(sysconfdir) - @ginstall -d $(DESTDIR)$(sysconfdir)/bash_completion.d - @ginstall -D $(WORKSRC)/bash_completion $(DESTDIR)$(sysconfdir)/bash_completion +post-merge: merge-opencsw-completion merge-additional-docs merge-changelog + +# we add some completion scripts for Solaris +merge-opencsw-completion: @( for FILE in $(WORKDIR)/*.completion; do \ - NFILE="`basename $$FILE | sed -e 's/\.completion$$//'`"; \ - ginstall -D $$FILE $(DESTDIR)$(sysconfdir)/bash_completion.d/$$NFILE; \ + NFILE="`basename $$FILE | sed -e 's/\.completion$$//'`"; \ + ginstall -D $$FILE $(PKGROOT)$(sysconfdir)/bash_completion.d/$$NFILE; \ done ) - @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) - @( for FILE in BUGS README TODO Changelog; do \ - ginstall -D $(WORKSRC)/$$FILE $(DESTDIR)$(docdir)/$(GARNAME)/$$FILE; \ + @$(MAKECOOKIE) + + +merge-additional-docs: + @( for FILE in AUTHORS README TODO CHANGES; do \ + ginstall -D "$(WORKSRC_FIRSTMOD)/$$FILE" "$(PKGROOT)$(docdir)/$(GARNAME)/$$FILE"; \ done ) + @$(MAKECOOKIE) +merge-changelog: + ginstall -D "$(WORKDIR)/changelog.CSW" "$(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW" + @$(MAKECOOKIE) include gar/category.mk Modified: csw/mgar/pkg/bash_completion/trunk/checksums =================================================================== --- csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,7 +1,7 @@ -9bca1cf97e8f8c73e3ef560cc9dead21 download/bash-completion-20060301.tar.gz -2de14c97d596cf5ac0da21ea34ea93aa download/CSWbash_completion.gspec +cd1c5648272917fbe0eef4ba30bb93f4 download/bash-completion-1.0.tar.gz 2acb33dad8ee4ea46b02f2cd86ced5e1 download/pkg-get.completion 0fcc270cda377374a9637d24c8b689b3 download/pkgadd.completion 7d304567cc880dd42e8ea277c991017f download/pkgrm.completion cc213a6d8dd2d484f2bce4f7905437f8 download/smf.completion -152cc17cbfe6875b15d9216f63bed3f9 download/blastwave.patch +1745e51815578a18384ff36a449e0002 download/changelog.CSW +d0c0d867babf351bca9ee97e03be550d download/opencsw_paths.patch Deleted: csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,4 +0,0 @@ -%var bitname bash_completion -%var pkgname CSWbashcmplt -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING Deleted: csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,23 +0,0 @@ -diff --speed-large-files --minimal -Nru bash_completion.orig/bash_completion bash_completion/bash_completion ---- bash_completion.orig/bash_completion 2006-05-01 21:23:54.827097000 -0400 -+++ bash_completion/bash_completion 2006-05-01 21:23:49.947089000 -0400 -@@ -32,8 +32,8 @@ - { - # These declarations must go within braces in order to be able to silence - # readonly variable errors. -- BASH_COMPLETION="${BASH_COMPLETION:-/etc/bash_completion}" -- BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/etc/bash_completion.d}" -+ BASH_COMPLETION="${BASH_COMPLETION:-/opt/csw/etc/bash_completion}" -+ BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/opt/csw/etc/bash_completion.d}" - } 2>/dev/null || : - readonly BASH_COMPLETION BASH_COMPLETION_DIR - -@@ -163,7 +163,7 @@ - have() - { - unset -v have -- PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && -+ PATH=$PATH:/opt/csw/sbin:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && - have="yes" - } - Added: csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW (rev 0) +++ csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW 2009-04-05 13:48:44 UTC (rev 4196) @@ -0,0 +1,6 @@ +bash_completion (1.0,REV=2009.04.05) + + * New upstream version. + * Switched to gar v2. + + -- Yann Rouillard Sun, 05 Apr 2009 15:32:52 +0200 Copied: csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch (from rev 4177, csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch) =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch (rev 0) +++ csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch 2009-04-05 13:48:44 UTC (rev 4196) @@ -0,0 +1,45 @@ +--- bash-completion-1.0/bash_completion 2009-04-02 22:01:39.000000000 +0200 ++++ bash-completion-1.0/bash_completion.new 2009-04-04 19:21:58.156466726 +0200 +@@ -42,8 +42,8 @@ + + # Alter the following to reflect the location of this file. + # +-[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/etc/bash_completion +-[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/etc/bash_completion.d ++[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/opt/csw/etc/bash_completion ++[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/opt/csw/etc/bash_completion.d + readonly BASH_COMPLETION BASH_COMPLETION_DIR + + # Set a couple of useful vars +@@ -2657,6 +2657,8 @@ + [ -r "$configfile" ] && + config=( "${config[@]}" "$configfile" ) + else ++ [ -r /opt/csw/etc/ssh/ssh_config ] && ++ config=( "${config[@]}" "/opt/csw/etc/ssh/ssh_config" ) + [ -r /etc/ssh/ssh_config ] && + config=( "${config[@]}" "/etc/ssh/ssh_config" ) + [ -r "${HOME}/.ssh/config" ] && +@@ -2676,6 +2678,8 @@ + [ -r "$global_kh" ] && + kh=( "${kh[@]}" "$global_kh" ) + if [ -z "$configfile" ]; then ++ [ -r /opt/csw/etc/ssh/ssh_known_hosts ] && ++ kh=( "${kh[@]}" /opt/csw/etc/ssh/ssh_known_hosts ) + [ -r /etc/ssh/ssh_known_hosts ] && + kh=( "${kh[@]}" /etc/ssh/ssh_known_hosts ) + [ -r /etc/ssh/ssh_known_hosts2 ] && +--- bash-completion-1.0/bash_completion.sh 2009-04-02 22:01:42.000000000 +0200 ++++ bash-completion-1.0/bash_completion.sh.new 2009-04-04 19:22:33.430034421 +0200 +@@ -4,9 +4,9 @@ + # Check for recent enough version of bash. + bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} + if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then +- if [ -r /etc/bash_completion ]; then ++ if [ -r /opt/csw/etc/bash_completion ]; then + # Source completion code. +- . /etc/bash_completion ++ . /opt/csw/etc/bash_completion + fi + fi + unset bash bminor bmajor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 5 17:54:10 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 05 Apr 2009 15:54:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4197] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4197 http://gar.svn.sourceforge.net/gar/?rev=4197&view=rev Author: valholla Date: 2009-04-05 15:54:10 +0000 (Sun, 05 Apr 2009) Log Message: ----------- switch from Sun Studio to gcc Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/gar_override.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 15:54:10 UTC (rev 4197) @@ -19,8 +19,8 @@ ## The following patches address bug 29442 ## http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29442 ## Patch to Reenable alloca() on non-GCC compilers -PATCHFILES = re-enable-alloc.diff -PATCHFILES += split-insn-attrtab.diff +#PATCHFILES = re-enable-alloc.diff +#PATCHFILES += split-insn-attrtab.diff ## build options CONFIGURE_ARGS = --prefix=$(BUILD_PREFIX)/gcc4 @@ -41,7 +41,7 @@ CONFIGURE_ARGS += --enable-objc-gc CONFIGURE_ARGS += --enable-threads=posix CONFIGURE_ARGS += --enable-stage1-languages=c -CONFIGURE_ARGS += --enable-languages=c,c++,fortran,java,objc +CONFIGURE_ARGS += --enable-languages=ada,c,c++,fortran,java,objc ## For cleanliness I split the Configuration into separate files include files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 15:54:10 UTC (rev 4197) @@ -14,7 +14,6 @@ AMD_MERGE_TARGETS = merge-dirs-amd AMD_MERGE_TARGETS += merge-i386-files AMD_MERGE_TARGETS += merge-amd64-files -AMD_MERGE_TARGETS += merge-strip-amd merge-amd: $(AMD_MERGE_TARGETS) $(_DBG)$(MAKECOOKIE) @@ -45,13 +44,6 @@ $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/libexec $(PKGROOT)) $(_DBG)$(MAKECOOKIE) -merge-strip-amd: - @(echo "[===== Stripping Merged Binaries =====]") - $(_DBG)(stripbin $(PPREFIX)/bin/i386) - $(_DBG)(stripbin $(PPREFIX)/bin/amd64) - $(_DBG)(stripbin $(PPREFIX)/bin) - $(_DBG)$(MAKECOOKIE) - ifeq ($(shell uname -p), i386) ISAEXEC_DIRS = /opt/csw/gcc4/bin ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc Modified: csw/mgar/pkg/gcc4/trunk/files/gar_override.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-05 15:54:10 UTC (rev 4197) @@ -1,34 +1,31 @@ -COOKIEDIR = $(COOKIEROOTDIR)/$(MODULATION)-$(GAROSREL)-$(GARCH) -WORKDIR = $(WORKROOTDIR)/build-$(MODULATION)-$(GAROSREL)-$(GARCH) -PATCHDIR = $(WORKDIR)/$(GARNAME)-$(GARVERSION) +COOKIEDIR = $(COOKIEROOTDIR)/$(MODULATION)-$(GAROSREL)-$(GARCH) +WORKDIR = $(WORKROOTDIR)/build-$(MODULATION)-$(GAROSREL)-$(GARCH) +PATCHDIR = $(WORKDIR)/$(GARNAME)-$(GARVERSION) INSTALLISADIR = $(WORKROOTDIR)/install-$(MODULATION)-$(GAROSREL)-$(GARCH) -PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GARCH)) -OBJECT_DIR = $(WORKDIR)/objdir -WORKSRC = $(OBJECT_DIR) -DIRPATHS = -OPTFLAGS = - -CONFIG_SHELL = /bin/ksh -GARCOMPILER = SOS11 -SOS11_CC = /opt/studio/SOS11/SUNWspro/bin/cc -xO3 -xarch=v8 -CFLAGS = -I/opt/csw/include -CPPFLAGS = -I/opt/csw/include -CXXFLAGS = -I/opt/csw/include -LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib -BOOT_CFLAGS = -I/opt/csw/include -mcpu=v8 -g -O2 -pipe +PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GARCH)) +OBJECT_DIR = $(WORKDIR)/objdir +WORKSRC = $(OBJECT_DIR) +DIRPATHS = +OPTFLAGS = +CONFIG_SHELL = /bin/bash +GARCOMPILER = GCC3 +GCC3_CC = /opt/csw/gcc3/bin/gcc -g -O2 -mcpu=v8 -pipe +CFLAGS = -I/opt/csw/include +CPPFLAGS = -I/opt/csw/include +CXXFLAGS = -I/opt/csw/include +LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib +BOOT_CFLAGS = -I/opt/csw/include -mcpu=v8 -g -O2 -pipe BOOT_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib ifeq ($(shell uname -p),i386) ifeq ($(shell uname -r),5.10) - GARCOMPILER = SOS12 - SOS12_CC = /opt/studio/SOS12/SUNWspro/bin/cc - BOOT_CFLAGS = -I/opt/csw/include -g -O2 -pipe + GCC3_CC = /opt/csw/gcc3/bin/gcc -g -O2 -pipe + BOOT_CFLAGS = -I/opt/csw/include -g -O2 -pipe BOOT_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib else - GARCOMPILER = SOS11 - SOS11_CC = /opt/studio/SOS11/SUNWspro/bin/cc -xarch=386 - BOOT_CFLAGS = -I/opt/csw/include -m32 -march=i386 -g -O2 -pipe + GCC3_CC = /opt/csw/gcc3/bin/gcc -march=i386 -g -O2 -pipe + BOOT_CFLAGS = -I/opt/csw/include -m32 -march=i386 -g -O2 -pipe BOOT_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib endif endif @@ -36,14 +33,13 @@ export CONFIG_SHELL CFLAGS CPPFLAGS CXXFLAGS export LDFLAGS BOOT_CFLAGS BOOT_LDFLAGS -FIXCONFIG_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/lib -STRIP_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/bin - -CONFIGURE_SCRIPTS = objdir -TEST_SCRIPTS = skip +FIXCONFIG_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/lib +STRIP_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/bin +CONFIGURE_SCRIPTS = objdir +TEST_SCRIPTS = skip post-configure-modulated: fix-bootflags -MERGE_SCRIPTS_isa-i386 = amd +MERGE_SCRIPTS_isa-i386 = amd ## Run checkpkg Manually -ENABLE_CHECK = 0 +ENABLE_CHECK = 0 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 15:54:10 UTC (rev 4197) @@ -4,6 +4,8 @@ PACKAGES += CSWgcc4objc CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt ## Define Package Catalog Names +CATALOGNAME_CSWgcc4ada = gcc4ada +CATALOGNAME_CSWgcc4adart = gcc4adart CATALOGNAME_CSWgcc4core = gcc4core CATALOGNAME_CSWgcc4corert = gcc4corert CATALOGNAME_CSWgcc4g++ = gcc4g++ @@ -16,6 +18,8 @@ CATALOGNAME_CSWgcc4objcrt = gcc4objcrt ## Source URLs +SPKG_SOURCEURL_CSWgcc4ada = http://gcc.gnu.org +SPKG_SOURCEURL_CSWgcc4adart = http://gcc.gnu.org SPKG_SOURCEURL_CSWgcc4core = http://gcc.gnu.org SPKG_SOURCEURL_CSWgcc4corert = http://gcc.gnu.org SPKG_SOURCEURL_CSWgcc4g++ = http://gcc.gnu.org @@ -28,6 +32,8 @@ SPKG_SOURCEURL_CSWgcc4objcrt = http://gcc.gnu.org ## Copyright File +LICENSE_CSWgcc4ada = COPYING3 +LICENSE_CSWgcc4adart = COPYING3 LICENSE_CSWgcc4core = COPYING3 LICENSE_CSWgcc4corert = COPYING3 LICENSE_CSWgcc4g++ = COPYING3 @@ -40,6 +46,8 @@ LICENSE_CSWgcc4objcrt = COPYING3 ## Define Package Descriptions +SPKG_DESC_CSWgcc4ada = GNU C ADA Compiler +SPKG_DESC_CSWgcc4adart = GNU C ADA Compiler Run Time SPKG_DESC_CSWgcc4core = GNU C Compiler SPKG_DESC_CSWgcc4corert = GNU C Compiler Run Time SPKG_DESC_CSWgcc4g++ = GNU C++ Compiler @@ -53,6 +61,8 @@ ## Define Dependencies COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr +REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4ada = CSWgcc4adart $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv @@ -67,6 +77,13 @@ ## Define the Contents of the Packages +## gcc4ada Definitions +PKGFILES_CSWgcc4ada = .*/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/adalib/.* +PKGFILES_CSWgcc4ada += .*/adainclude/.* +PKGFILES_CSWgcc4ada += .*/info/.*gnat.* +PKGFILES_CSWgcc4ada += .*/bin/gnat.* + ## gcc4gfortran Definitions PKGFILES_CSWgcc4gfortran = .*/bin/.*gfortran PKGFILES_CSWgcc4gfortran += .*/libexec/.*f951 @@ -133,6 +150,10 @@ ####### RunTime Packages +## gcc4adart +PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* +PKGFILES_CSWgcc4adart = .*/lib/.*libgnarl.* + ## gcc4corert PKGFILES_CSWgcc4corert = .*/lib/.*libgcc_s.* PKGFILES_CSWgcc4corert += .*/lib/.*libgomp.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 5 17:56:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 05 Apr 2009 15:56:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4198] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4198 http://gar.svn.sourceforge.net/gar/?rev=4198&view=rev Author: valholla Date: 2009-04-05 15:56:57 +0000 (Sun, 05 Apr 2009) Log Message: ----------- add ada package Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 15:54:10 UTC (rev 4197) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 15:56:57 UTC (rev 4198) @@ -1,7 +1,7 @@ ### Package Section ### -PACKAGES = CSWgcc4core CSWgcc4corert CSWgcc4gfortran -PACKAGES += CSWgcc4gfortranrt CSWgcc4java CSWgcc4javart -PACKAGES += CSWgcc4objc CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt +PACKAGES = CSWgcc4ada CSWgcc4adart CSWgcc4core CSWgcc4corert CSWgcc4gfortran +PACKAGES += CSWgcc4gfortranrt CSWgcc4java CSWgcc4javart CSWgcc4objc +PACKAGES += CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt ## Define Package Catalog Names CATALOGNAME_CSWgcc4ada = gcc4ada This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 5 18:30:09 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 05 Apr 2009 16:30:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4199] csw/mgar/pkg/bash_completion/trunk/files Message-ID: Revision: 4199 http://gar.svn.sourceforge.net/gar/?rev=4199&view=rev Author: chninkel Date: 2009-04-05 16:30:09 +0000 (Sun, 05 Apr 2009) Log Message: ----------- bash_completion: updated pkg-get completion with new options Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion csw/mgar/pkg/bash_completion/trunk/files/smf.completion Modified: csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -68,7 +68,7 @@ fi if [[ ${cur} == -* ]] ; then - local opts="-c -d -D -f -i -l -s -u -U" + local opts="-c -d -D -f -i -l -s -S -u -U -v" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 else Modified: csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is Modified: csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is Modified: csw/mgar/pkg/bash_completion/trunk/files/smf.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/smf.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/smf.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 5 18:31:11 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 05 Apr 2009 16:31:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4200] csw/mgar/pkg/bash_completion/trunk/files/pkg-get. completion Message-ID: Revision: 4200 http://gar.svn.sourceforge.net/gar/?rev=4200&view=rev Author: chninkel Date: 2009-04-05 16:31:11 +0000 (Sun, 05 Apr 2009) Log Message: ----------- bash_completion: some blastwave -> opencsw Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion Modified: csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 16:30:09 UTC (rev 4199) +++ csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 16:31:11 UTC (rev 4200) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is @@ -7,7 +7,7 @@ # author(s) shall not be liable in the event that use of the # software causes damage. # -# pkg-get.completion - bash completion for blastwave pkg-get +# pkg-get.completion - bash completion for opencsw pkg-get # have pkg-get && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 21:24:29 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 19:24:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4201] csw/mgar/pkg/libfaac/trunk Message-ID: Revision: 4201 http://gar.svn.sourceforge.net/gar/?rev=4201&view=rev Author: hson Date: 2009-04-05 19:24:29 +0000 (Sun, 05 Apr 2009) Log Message: ----------- libfaac: Several patches to get compiling to work Modified Paths: -------------- csw/mgar/pkg/libfaac/trunk/Makefile csw/mgar/pkg/libfaac/trunk/checksums csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff Added Paths: ----------- csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff csw/mgar/pkg/libfaac/trunk/files/configure.diff Modified: csw/mgar/pkg/libfaac/trunk/Makefile =================================================================== --- csw/mgar/pkg/libfaac/trunk/Makefile 2009-04-05 16:31:11 UTC (rev 4200) +++ csw/mgar/pkg/libfaac/trunk/Makefile 2009-04-05 19:24:29 UTC (rev 4201) @@ -19,9 +19,11 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(SF_PROJ)-(\d+(?:\.\d+)*).tar.bz2 -PATCHFILES += Makefile.am.diff Makefile.in.diff Makefile.in.frontend.diff +#PATCHFILES += Makefile.am.diff Makefile.in.diff Makefile.in.frontend.diff +PATCHFILES += Makefile.in.frontend.diff Makefile.in.common.mp4v2.diff PATCHFILES += aacquant.c.diff aacquant.h.diff config.h.in.diff -PATCHFILES += configure.in.diff faac.h.diff faaccfg.h.diff frame.h.diff +#PATCHFILES += configure.in.diff faac.h.diff faaccfg.h.diff frame.h.diff +PATCHFILES += configure.diff faac.h.diff faaccfg.h.diff frame.h.diff PATCHFILES += input.c.diff ltp.c.diff mp4property.h.diff mp4util.h.diff PATCHFILES += mpeg4ip.h.diff psych.h.diff Modified: csw/mgar/pkg/libfaac/trunk/checksums =================================================================== --- csw/mgar/pkg/libfaac/trunk/checksums 2009-04-05 16:31:11 UTC (rev 4200) +++ csw/mgar/pkg/libfaac/trunk/checksums 2009-04-05 19:24:29 UTC (rev 4201) @@ -1,11 +1,10 @@ c5dde68840cefe46532089c9392d1df0 download/faac-1.28.tar.bz2 -dcfdb7a011ce03ea536ddb92cc7ee8e4 download/Makefile.am.diff -62ba5e8b03a5c551ad17b149aa86e0c2 download/Makefile.in.diff eb7e2cee261c71ac4a8d718b5498777e download/Makefile.in.frontend.diff +3d7c0f7936dcc1c4833d693860720adf download/Makefile.in.common.mp4v2.diff 19f2eebe3df5300ab4a1a16e43593663 download/aacquant.c.diff 2af64ce38f023774fb0c8f691b98c564 download/aacquant.h.diff -86598bb0fb18acdf27557f65baf05f66 download/config.h.in.diff -ffb37b75a68dd524aa3d87dc38b4b971 download/configure.in.diff +ea8508703521e663e637382231d4c13b download/config.h.in.diff +027ebf052052128c67f0749e610f4acb download/configure.diff 56f2c5e28e1177e3b6956aaf83a10e13 download/faac.h.diff 268d60a6a1304fa1758a962a20731c1c download/faaccfg.h.diff 29fe6485d9ebe7fd0892c18ed450bac5 download/frame.h.diff Added: csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff =================================================================== --- csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff (rev 0) +++ csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff 2009-04-05 19:24:29 UTC (rev 4201) @@ -0,0 +1,13 @@ +--- ../build-global/faac-1.28/common/mp4v2/Makefile.in 2009-02-10 09:37:00.000000000 +0100 ++++ faac-1.28/common/mp4v2/Makefile.in 2009-04-05 20:42:49.571593147 +0200 +@@ -205,8 +205,8 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-INCLUDES = -I$(top_srcdir)/include +-AM_CXXFLAGS = -Wall ++INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4v2 ++AM_CXXFLAGS = $(CXXFLAGS) + noinst_LIBRARIES = libmp4v2.a + noinst_HEADERS = mp4.h mpeg4ip.h mpeg4ip_version.h mpeg4ip_config.h + libmp4v2_a_SOURCES = \ Modified: csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff =================================================================== --- csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff 2009-04-05 16:31:11 UTC (rev 4200) +++ csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff 2009-04-05 19:24:29 UTC (rev 4201) @@ -1,7 +1,6 @@ -diff --speed-large-files --minimal -ru ../build-global/faac-1.28/config.h.in faac-1.28/config.h.in --- ../build-global/faac-1.28/config.h.in 2009-02-10 09:36:59.000000000 +0100 -+++ faac-1.28/config.h.in 2009-03-20 05:55:21.041828651 +0100 -@@ -1,5 +1,26 @@ ++++ faac-1.28/config.h.in 2009-04-05 18:56:29.025432723 +0200 +@@ -1,5 +1,25 @@ /* config.h.in. Generated from configure.in by autoheader. */ +#ifndef __FAAC_CONFIG_H @@ -9,7 +8,6 @@ + +#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) +#include -+#include + +typedef uint8_t u_int8_t; +typedef uint16_t u_int16_t; @@ -28,7 +26,7 @@ /* Define if you want to encode for DRM */ #undef DRM -@@ -131,3 +152,5 @@ +@@ -131,3 +151,5 @@ /* Define to `long int' if does not define. */ #undef off_t Added: csw/mgar/pkg/libfaac/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/libfaac/trunk/files/configure.diff (rev 0) +++ csw/mgar/pkg/libfaac/trunk/files/configure.diff 2009-04-05 19:24:29 UTC (rev 4201) @@ -0,0 +1,20 @@ +--- ../build-global/faac-1.28/configure 2009-02-10 09:36:58.000000000 +0100 ++++ faac-1.28/configure 2009-04-05 20:17:04.647262929 +0200 +@@ -19731,7 +19731,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lmp4v2 -lstdc++ $LIBS" ++LIBS="-lmp4v2 -lCrun -lCstd $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -19864,7 +19864,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lmp4v2 -lstdc++ $LIBS" ++LIBS="-lmp4v2 -lCrun -lCstd $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 21:39:25 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 19:39:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4202] csw/mgar/pkg/libgoffice/trunk Message-ID: Revision: 4202 http://gar.svn.sourceforge.net/gar/?rev=4202&view=rev Author: hson Date: 2009-04-05 19:39:25 +0000 (Sun, 05 Apr 2009) Log Message: ----------- libgoffice: Revert back to 0.6.6 since gnumeric wont work with 0.7.x Modified Paths: -------------- csw/mgar/pkg/libgoffice/trunk/Makefile csw/mgar/pkg/libgoffice/trunk/checksums Modified: csw/mgar/pkg/libgoffice/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 19:24:29 UTC (rev 4201) +++ csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 19:39:25 UTC (rev 4202) @@ -1,5 +1,5 @@ GARNAME = libgoffice -GARVERSION = 0.7.3 +GARVERSION = 0.6.6 CATEGORIES = gnome DESCRIPTION = Document centric objects library @@ -8,13 +8,16 @@ top of GLib and Gtk+. endef -MASTER_SITES = $(GNOME_MIRROR) +MASTER_SITES = $(GNOME_ROOT)/goffice/$(GNOME_SUBV)/ DISTFILES = goffice-$(GARVERSION).tar.gz DISTNAME = goffice-$(GARVERSION) REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib +REQUIRED_PKGS += CSWbonobo2 CSWgnomekeyring CSWgnomevfs2 CSWlibart +REQUIRED_PKGS += CSWlibbonoboui CSWlibgnome CSWlibgnomecanvas CSWlibgnomeui +REQUIRED_PKGS += CSWlibpopt CSWorbit2 # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = goffice-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/libgoffice/trunk/checksums =================================================================== --- csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 19:24:29 UTC (rev 4201) +++ csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 19:39:25 UTC (rev 4202) @@ -1 +1 @@ -515bf59321337fe432c8c9bb4835fc52 download/goffice-0.7.3.tar.gz +e689b21b892768af9ef2c08f2b6ee94e download/goffice-0.6.6.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 23:20:49 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 21:20:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4203] csw/mgar/pkg/netsnmp/trunk/Makefile Message-ID: Revision: 4203 http://gar.svn.sourceforge.net/gar/?rev=4203&view=rev Author: hson Date: 2009-04-05 21:20:49 +0000 (Sun, 05 Apr 2009) Log Message: ----------- netsnmp: LD_OPTIONS workaround not needed anymore Modified Paths: -------------- csw/mgar/pkg/netsnmp/trunk/Makefile Modified: csw/mgar/pkg/netsnmp/trunk/Makefile =================================================================== --- csw/mgar/pkg/netsnmp/trunk/Makefile 2009-04-05 19:39:25 UTC (rev 4202) +++ csw/mgar/pkg/netsnmp/trunk/Makefile 2009-04-05 21:20:49 UTC (rev 4203) @@ -24,10 +24,6 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-default-snmp-version=1 CONFIGURE_ARGS += --with-sys-contact=unknown @@ -47,8 +43,8 @@ # Patch for python module PATCHFILES += Makefile.in.diff -LD_OPTIONS = -EXTRA_COMMON_EXPORTS = LD_OPTIONS +#LD_OPTIONS = +#EXTRA_COMMON_EXPORTS = LD_OPTIONS EXTRA_MERGE_EXCLUDE_FILES = .*/perllocal.pod This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 6 00:36:59 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 05 Apr 2009 22:36:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4204] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4204 http://gar.svn.sourceforge.net/gar/?rev=4204&view=rev Author: valholla Date: 2009-04-05 22:36:59 +0000 (Sun, 05 Apr 2009) Log Message: ----------- test-results Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk Added Paths: ----------- csw/mgar/pkg/gcc4/trunk/files/test-results/ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 21:20:49 UTC (rev 4203) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 22:36:59 UTC (rev 4204) @@ -16,12 +16,6 @@ # of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -## The following patches address bug 29442 -## http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29442 -## Patch to Reenable alloca() on non-GCC compilers -#PATCHFILES = re-enable-alloc.diff -#PATCHFILES += split-insn-attrtab.diff - ## build options CONFIGURE_ARGS = --prefix=$(BUILD_PREFIX)/gcc4 CONFIGURE_ARGS += --exec-prefix=$(BUILD_PREFIX)/gcc4 Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 21:20:49 UTC (rev 4203) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 22:36:59 UTC (rev 4204) @@ -24,14 +24,6 @@ $(_DBG)(ginstall -d $(PPREFIX)/bin/i386) $(_DBG)$(MAKECOOKIE) -merge-amd64-files: - @echo "[===== Merging isa-amd64 =====]" - $(_DBG)(cd $(AMD_BASE); for dir in `gfind . -name "*solaris2\.10*" -type d` ; do \ - /usr/bin/pax -rw $$dir $(PKGROOT); done ) - $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw $(MPREFIX)/lib/amd64 $(PKGROOT)) - $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw * $(PPREFIX)/bin/amd64) - $(_DBG)$(MAKECOOKIE) - merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/bin $(PKGROOT)) @@ -44,6 +36,15 @@ $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/libexec $(PKGROOT)) $(_DBG)$(MAKECOOKIE) +merge-amd64-files: + @echo "[===== Merging isa-amd64 =====]" + $(_DBG)(cd $(AMD_BASE); \ + for dir in `gfind . -name "*solaris2\.10*" -type d` ; do \ + /usr/bin/pax -rw $$dir $(PKGROOT); done ) + $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw $(MPREFIX)/lib/amd64 $(PKGROOT)) + $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw * $(PPREFIX)/bin/amd64) + $(_DBG)$(MAKECOOKIE) + ifeq ($(shell uname -p), i386) ISAEXEC_DIRS = /opt/csw/gcc4/bin ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc @@ -73,4 +74,18 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gjar ISAEXEC_FILES += /opt/csw/gcc4/bin/gorbd ISAEXEC_FILES += /opt/csw/gcc4/bin/gtnameserv +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnat +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbl +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatmake +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref endif Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 21:20:49 UTC (rev 4203) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 22:36:59 UTC (rev 4204) @@ -151,8 +151,8 @@ ####### RunTime Packages ## gcc4adart -PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* -PKGFILES_CSWgcc4adart = .*/lib/.*libgnarl.* +PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* +PKGFILES_CSWgcc4adart += .*/lib/.*libgnarl.* ## gcc4corert PKGFILES_CSWgcc4corert = .*/lib/.*libgcc_s.* Added: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd 2009-04-05 22:36:59 UTC (rev 4204) @@ -0,0 +1,397 @@ +$ make check +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gcc || mkdir testsuite/gcc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gcc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 01:17:49 2009 +Native configuration is i386-pc-solaris2.10 + + === gcc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... +FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 +FAIL: gcc.c-torture/execute/990127-2.c execution, -Os +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... + +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... +XPASS: gcc.dg/ucnid-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-3.c (test for excess errors) +XPASS: gcc.dg/ucnid-4.c (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... +FAIL: gcc.target/i386/sse-13.c (test for excess errors) +FAIL: gcc.target/i386/sse-14.c (test for excess errors) +FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable +FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... +skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined + + === gcc Summary === + +# of expected passes 48837 +# of unexpected failures 6 +# of unexpected successes 3 +# of expected failures 176 +# of untested testcases 42 +# of unsupported tests 314 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gcc] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' + === acats configuration === +target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/ +Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/specs Target: i386-pc-solaris2.10 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) +host=i386-pc-solaris2.8 +target=i386-pc-solaris2.10 +gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/gnatmake + + === acats support === +Generating support files... done. +Compiling support files... done. + + === acats tests === +Running chapter a ... +Running chapter c2 ... +Running chapter c3 ... +Running chapter c4 ... +Running chapter c5 ... +Running chapter c6 ... +Running chapter c7 ... +Running chapter c8 ... +Running chapter c9 ... +Running chapter ca ... +Running chapter cb ... +Running chapter cc ... +Running chapter cd ... +Running chapter ce ... +Running chapter cxa ... +Running chapter cxb ... +Running chapter cxf ... +Running chapter cxg ... +Running chapter cxh ... +Running chapter cz ... +Running chapter d ... +Running chapter e ... +Running chapter gcc ... +Running chapter l ... + === acats Summary === +# of expected passes 2315 +# of unexpected failures 0 +test -d testsuite || mkdir testsuite +test -d testsuite/gnat || mkdir testsuite/gnat +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gnat; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 05:27:21 2009 +Native configuration is i386-pc-solaris2.10 + + === gnat tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... + + === gnat Summary === + +# of expected passes 374 +# of expected failures 1 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/g++ || mkdir testsuite/g++ +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/g++; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 05:31:24 2009 +Native configuration is i386-pc-solaris2.10 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... +XPASS: g++.dg/other/ucnid-1.C (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... +XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) +XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) +XPASS: g++.old-deja/g++.other/init19.C execution test + + === g++ Summary === + +# of expected passes 17496 +# of unexpected successes 4 +# of expected failures 83 +# of unsupported tests 172 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) + +gmake[1]: [check-parallel-g++] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gfortran || mkdir testsuite/gfortran +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gfortran; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 06:21:32 2009 +Native configuration is i386-pc-solaris2.10 + + === gfortran tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... +FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/array_constructor_23.f -O3 -g execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... + + === gfortran Summary === + +# of expected passes 25233 +# of unexpected failures 4 +# of expected failures 3 +# of unsupported tests 32 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gfortran] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/objc || mkdir testsuite/objc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/objc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 08:04:18 2009 +Native configuration is i386-pc-solaris2.10 + + === objc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... + + === objc Summary === + +# of expected passes 1812 +# of expected failures 7 +# of unsupported tests 24 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + Added: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 2009-04-05 22:36:59 UTC (rev 4204) @@ -0,0 +1,512 @@ +$ make check +Making a new config file... +echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite" >> ./tmp0 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gcc || mkdir testsuite/gcc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gcc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 10:07:08 2009 +Native configuration is i386-pc-solaris2.8 + + === gcc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... +FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 +FAIL: gcc.c-torture/execute/990127-2.c execution, -Os +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... + +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... +FAIL: gcc.dg/builtins-8.c execution test +FAIL: gcc.dg/pr36584.c execution test +FAIL: gcc.dg/pthread-init-1.c (test for excess errors) +FAIL: gcc.dg/pthread-init-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-3.c (test for excess errors) +XPASS: gcc.dg/ucnid-4.c (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... +FAIL: largefile.c -O0 -g (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O0 -g assembly comparison +FAIL: largefile.c -O0 (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O0 assembly comparison +FAIL: largefile.c -O1 (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O1 assembly comparison +FAIL: largefile.c -O2 (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O2 assembly comparison +FAIL: largefile.c -O3 -fomit-frame-pointer (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O3 -fomit-frame-pointer assembly comparison +FAIL: largefile.c -O3 -g (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O3 -g assembly comparison +FAIL: largefile.c -Os (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -Os assembly comparison +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... +FAIL: gcc.dg/torture/complex-alias-1.c -O0 execution test +FAIL: gcc.dg/torture/complex-alias-1.c -O1 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... +XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized "link_error" 0 +FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "converted loop nest to perfect loop nest" 1 +FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-4.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-5.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-6.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-8.c scan-tree-dump-times ltrans "transformed loop" 1 +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... +FAIL: gcc.dg/vect/pr36493.c execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... +FAIL: gcc.target/i386/20060512-1.c execution test +FAIL: gcc.target/i386/20060512-3.c execution test +FAIL: gcc.target/i386/abi-1.c scan-assembler xmm0 +FAIL: gcc.target/i386/asm-2.c (internal compiler error) +FAIL: gcc.target/i386/asm-2.c (test for excess errors) +FAIL: gcc.target/i386/fastcall-sseregparm.c execution test +FAIL: gcc.target/i386/fpprec-1.c execution test +FAIL: gcc.target/i386/pr13685.c execution test +FAIL: gcc.target/i386/pr37191.c (test for excess errors) +FAIL: gcc.target/i386/reload-1.c (test for excess errors) +ERROR: gcc.target/i386/reload-1.c: error executing dg-final: no files matched glob pattern "reload-1.c.[0-9][0-9][0-9]r.csa" +FAIL: gcc.target/i386/sse-10.c execution test +FAIL: gcc.target/i386/sse-11.c execution test +FAIL: gcc.target/i386/sse-13.c (test for excess errors) +FAIL: gcc.target/i386/sse-14.c (test for excess errors) +FAIL: gcc.target/i386/sse-17.c execution test +FAIL: gcc.target/i386/sse-18.c execution test +FAIL: gcc.target/i386/sse-3.c execution test +FAIL: gcc.target/i386/sse-6.c execution test +FAIL: gcc.target/i386/sse-recip-vec.c execution test +FAIL: gcc.target/i386/sse-recip.c execution test +FAIL: gcc.target/i386/sse2-lrint-vec.c execution test +FAIL: gcc.target/i386/sse2-lrintf-vec.c execution test +FAIL: gcc.target/i386/sse2-vec-1.c execution test +FAIL: gcc.target/i386/sse2-vec-2.c execution test +FAIL: gcc.target/i386/sse2-vec-3.c execution test +FAIL: gcc.target/i386/sse2-vec-4.c execution test +FAIL: gcc.target/i386/sse2-vec-5.c execution test +FAIL: gcc.target/i386/sse2-vec-6.c execution test +FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable +FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... +skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined + + === gcc Summary === + +# of expected passes 48710 +# of unexpected failures 59 +# of unexpected successes 4 +# of expected failures 168 +# of unresolved testcases 1 +# of untested testcases 35 +# of unsupported tests 340 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gcc] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' + === acats configuration === +target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/ +Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/specs Target: i386-pc-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) +host=i386-pc-solaris2.8 +target=i386-pc-solaris2.8 +gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/gnatmake + + === acats support === +Generating support files... done. +Compiling support files... done. + + === acats tests === +Running chapter a ... +Running chapter c2 ... +Running chapter c3 ... +Running chapter c4 ... +Running chapter c5 ... +Running chapter c6 ... +Running chapter c7 ... +Running chapter c8 ... +Running chapter c9 ... +Running chapter ca ... +Running chapter cb ... +Running chapter cc ... +Running chapter cd ... +Running chapter ce ... +Running chapter cxa ... +Running chapter cxb ... +Running chapter cxf ... +Running chapter cxg ... +Running chapter cxh ... +Running chapter cz ... +Running chapter d ... +Running chapter e ... +Running chapter gcc ... +Running chapter l ... + === acats Summary === +# of expected passes 2315 +# of unexpected failures 0 +test -d testsuite || mkdir testsuite +test -d testsuite/gnat || mkdir testsuite/gnat +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gnat; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 14:20:14 2009 +Native configuration is i386-pc-solaris2.8 + + === gnat tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... + + === gnat Summary === + +# of expected passes 374 +# of expected failures 1 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/g++ || mkdir testsuite/g++ +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/g++; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 14:24:10 2009 +Native configuration is i386-pc-solaris2.8 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... +FAIL: g++.dg/other/i386-1.C execution test +XPASS: g++.dg/other/ucnid-1.C (test for excess errors) +FAIL: g++.dg/warn/miss-format-1.C printf attribute warning (test for warnings, line 15) +FAIL: g++.dg/warn/miss-format-1.C printf attribute warning 2 (test for warnings, line 40) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... +FAIL: g++.dg/torture/pr34099.C -O0 execution test +FAIL: g++.dg/torture/pr34099.C -O1 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... +FAIL: g++.old-deja/g++.brendan/complex1.C execution test +XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) +XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) +FAIL: g++.old-deja/g++.other/headers1.C (test for excess errors) +WARNING: g++.old-deja/g++.other/headers1.C compilation failed to produce executable +XPASS: g++.old-deja/g++.other/init19.C execution test + + === g++ Summary === + +# of expected passes 17488 +# of unexpected failures 7 +# of unexpected successes 4 +# of expected failures 84 +# of unsupported tests 172 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) + +gmake[1]: [check-parallel-g++] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gfortran || mkdir testsuite/gfortran +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gfortran; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 15:18:21 2009 +Native configuration is i386-pc-solaris2.8 + + === gfortran tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... +FAIL: gfortran.dg/c_by_val_1.f -O0 execution test +FAIL: gfortran.dg/c_by_val_1.f -O1 execution test +FAIL: gfortran.dg/c_by_val_1.f -O2 execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -g execution test +FAIL: gfortran.dg/c_by_val_1.f -Os execution test +FAIL: gfortran.dg/f2c_2.f90 -O0 execution test +FAIL: gfortran.dg/f2c_2.f90 -O1 execution test +FAIL: gfortran.dg/f2c_2.f90 -O2 execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -g execution test +FAIL: gfortran.dg/f2c_2.f90 -Os execution test +FAIL: gfortran.dg/ltrans-7.f90 -O scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gfortran.dg/specifics_1.f90 -O0 execution test +FAIL: gfortran.dg/specifics_1.f90 -O1 execution test +FAIL: gfortran.dg/specifics_1.f90 -O2 execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -g execution test +FAIL: gfortran.dg/specifics_1.f90 -Os execution test +FAIL: gfortran.dg/value_4.f90 -O0 execution test +FAIL: gfortran.dg/value_4.f90 -O1 execution test +FAIL: gfortran.dg/value_4.f90 -O2 execution test +FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/value_4.f90 -O3 -g execution test +FAIL: gfortran.dg/value_4.f90 -Os execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... +FAIL: gfortran.dg/vect/vect-5.f90 -O execution test +FAIL: gfortran.dg/vect/fast-math-pr33299.f90 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... +FAIL: gfortran.fortran-torture/execute/common.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/common_size.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/forall_4.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/forall_5.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/seq_io.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O0 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O1 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions -funroll-loops +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fbounds-check +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O3 -g +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -Os +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/stack_varsize.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/where_2.f90 execution, -O2 -ftree-vectorize -msse2 + + === gfortran Summary === + +# of expected passes 24969 +# of unexpected failures 52 +# of expected failures 3 +# of unsupported tests 136 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gfortran] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/objc || mkdir testsuite/objc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/objc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 17:01:58 2009 +Native configuration is i386-pc-solaris2.8 + + === objc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... + + === objc Summary === + +# of expected passes 1812 +# of expected failures 7 +# of unsupported tests 24 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + Added: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc 2009-04-05 22:36:59 UTC (rev 4204) @@ -0,0 +1,410 @@ +$ make check +Making a new config file... +echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite" >> ./tmp0 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gcc || mkdir testsuite/gcc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gcc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 13:48:45 2009 +Native configuration is sparc-sun-solaris2.8 + + === gcc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... + +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... +WARNING: program timed out. +FAIL: gcc.dg/pr28796-2.c execution test +FAIL: gcc.dg/pthread-init-1.c (test for excess errors) +FAIL: gcc.dg/pthread-init-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-3.c (test for excess errors) +XPASS: gcc.dg/ucnid-4.c (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... +FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 +FAIL: gcc.dg/vect/vect-35.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-iv-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-multitypes-5.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-multitypes-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 +FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "zero step in outer loop." 1 +FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 +FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "zero step in outer loop." 1 +FAIL: gcc.dg/vect/vect-vfa-slp.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/slp-15.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 +FAIL: gcc.dg/vect/slp-25.c scan-tree-dump-times vect "Alignment of access forced using peeling" 2 +FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorized 3 loops" 1 +FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorizing stmts using SLP" 3 +FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 0 loops" 2 +FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/no-vfa-vect-depend-1.c scan-tree-dump-times vect "vectorized 1 loops" 1 +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... +skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined + + === gcc Summary === + +# of expected passes 46968 +# of unexpected failures 21 +# of unexpected successes 3 +# of expected failures 192 +# of untested testcases 35 +# of unsupported tests 531 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gcc] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' + === acats configuration === +target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/ +Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/specs Target: sparc-sun-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) +host=sparc-sun-solaris2.8 +target=sparc-sun-solaris2.8 +gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/gnatmake + + === acats support === +Generating support files... done. +Compiling support files... done. + + === acats tests === +Running chapter a ... +Running chapter c2 ... +Running chapter c3 ... +Running chapter c4 ... +Running chapter c5 ... +Running chapter c6 ... +Running chapter c7 ... +Running chapter c8 ... +Running chapter c9 ... +Running chapter ca ... +Running chapter cb ... +Running chapter cc ... +Running chapter cd ... +Running chapter ce ... +Running chapter cxa ... +Running chapter cxb ... +Running chapter cxf ... +Running chapter cxg ... +Running chapter cxh ... +Running chapter cz ... +Running chapter d ... +Running chapter e ... +Running chapter gcc ... +Running chapter l ... + === acats Summary === +# of expected passes 2315 +# of unexpected failures 0 +test -d testsuite || mkdir testsuite +test -d testsuite/gnat || mkdir testsuite/gnat +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gnat; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 18:48:17 2009 +Native configuration is sparc-sun-solaris2.8 + + === gnat tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... + + === gnat Summary === + +# of expected passes 375 +# of expected failures 1 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/g++ || mkdir testsuite/g++ +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/g++; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 18:52:36 2009 +Native configuration is sparc-sun-solaris2.8 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... +FAIL: g++.dg/opt/anchor1.C execution test +XPASS: g++.dg/other/ucnid-1.C (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... +XPASS: g++.old-deja/g++.other/init19.C execution test + + === g++ Summary === + +# of expected passes 17327 +# of unexpected failures 1 +# of unexpected successes 2 +# of expected failures 84 +# of unsupported tests 227 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) + +gmake[1]: [check-parallel-g++] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gfortran || mkdir testsuite/gfortran +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gfortran; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 19:59:55 2009 +Native configuration is sparc-sun-solaris2.8 + + === gfortran tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... +FAIL: gfortran.dg/nint_2.f90 -O0 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... + + === gfortran Summary === + +# of expected passes 24901 +# of unexpected failures 1 +# of expected failures 5 +# of unsupported tests 171 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gfortran] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/objc || mkdir testsuite/objc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/objc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 22:13:33 2009 +Native configuration is sparc-sun-solaris2.8 + + === objc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... + + === objc Summary === + +# of expected passes 1812 +# of expected failures 7 +# of unsupported tests 24 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 01:03:35 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 23:03:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4205] csw/mgar/pkg/libgoffice/trunk Message-ID: Revision: 4205 http://gar.svn.sourceforge.net/gar/?rev=4205&view=rev Author: hson Date: 2009-04-05 23:03:35 +0000 (Sun, 05 Apr 2009) Log Message: ----------- libgoffice: Update to 0.7.4 Modified Paths: -------------- csw/mgar/pkg/libgoffice/trunk/Makefile csw/mgar/pkg/libgoffice/trunk/checksums Modified: csw/mgar/pkg/libgoffice/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 22:36:59 UTC (rev 4204) +++ csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 23:03:35 UTC (rev 4205) @@ -1,5 +1,5 @@ GARNAME = libgoffice -GARVERSION = 0.6.6 +GARVERSION = 0.7.4 CATEGORIES = gnome DESCRIPTION = Document centric objects library Modified: csw/mgar/pkg/libgoffice/trunk/checksums =================================================================== --- csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 22:36:59 UTC (rev 4204) +++ csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 23:03:35 UTC (rev 4205) @@ -1 +1 @@ -e689b21b892768af9ef2c08f2b6ee94e download/goffice-0.6.6.tar.gz +efb34403af04315c0ae1b55f89a24b3d download/goffice-0.7.4.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 02:08:13 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Mon, 06 Apr 2009 00:08:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4206] csw/mgar/pkg Message-ID: Revision: 4206 http://gar.svn.sourceforge.net/gar/?rev=4206&view=rev Author: hson Date: 2009-04-06 00:08:13 +0000 (Mon, 06 Apr 2009) Log Message: ----------- libgnomedb: Initial commit Added Paths: ----------- csw/mgar/pkg/libgnomedb/ csw/mgar/pkg/libgnomedb/branches/ csw/mgar/pkg/libgnomedb/tags/ csw/mgar/pkg/libgnomedb/trunk/ csw/mgar/pkg/libgnomedb/trunk/Makefile csw/mgar/pkg/libgnomedb/trunk/checksums csw/mgar/pkg/libgnomedb/trunk/files/ Property changes on: csw/mgar/pkg/libgnomedb/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libgnomedb/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgnomedb/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libgnomedb/trunk/Makefile 2009-04-06 00:08:13 UTC (rev 4206) @@ -0,0 +1,31 @@ +GARNAME = libgnomedb +GARVERSION = 3.99.7 +CATEGORIES = gnome + +DESCRIPTION = The libgnomedb library +define BLURB + libgnomedb provides data-bound UI widgets, using GTK+ and libgda. + + The libgnomedb library is released under the terms of the LGPL license, which + allows for commercial applications to be developed based on libgnomedb. The + accompanying tools are under the GPL. +endef + +MASTER_SITES = $(GNOME_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 +DISTNAME = $(GARNAME)-$(GARVERSION) + +#REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk +#REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender +#REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +CONFIGURE_ARGS = $(DIRPATHS) + +#TEST_TARGET = + +include gar/category.mk + +PATH :=/opt/csw/bin:/opt/csw/gnu:$(PATH) Added: csw/mgar/pkg/libgnomedb/trunk/checksums =================================================================== --- csw/mgar/pkg/libgnomedb/trunk/checksums (rev 0) +++ csw/mgar/pkg/libgnomedb/trunk/checksums 2009-04-06 00:08:13 UTC (rev 4206) @@ -0,0 +1 @@ +5d6c77c6c156230ad624cdae190c9d52 download/libgnomedb-3.99.7.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 02:08:43 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Mon, 06 Apr 2009 00:08:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4207] csw/mgar/pkg Message-ID: Revision: 4207 http://gar.svn.sourceforge.net/gar/?rev=4207&view=rev Author: hson Date: 2009-04-06 00:08:42 +0000 (Mon, 06 Apr 2009) Log Message: ----------- libgda: Initial commit Added Paths: ----------- csw/mgar/pkg/libgda/ csw/mgar/pkg/libgda/branches/ csw/mgar/pkg/libgda/tags/ csw/mgar/pkg/libgda/trunk/ csw/mgar/pkg/libgda/trunk/Makefile csw/mgar/pkg/libgda/trunk/checksums csw/mgar/pkg/libgda/trunk/files/ Property changes on: csw/mgar/pkg/libgda/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libgda/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgda/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libgda/trunk/Makefile 2009-04-06 00:08:42 UTC (rev 4207) @@ -0,0 +1,32 @@ +GARNAME = libgda +GARVERSION = 3.99.14 +CATEGORIES = gnome + +DESCRIPTION = GNU Data Access +define BLURB + GNU Data Access (GDA) is an attempt to provide uniform access to different + kinds of data sources (databases, information servers, mail spools, etc). + It is a complete architecture that provides all you need to access your data. + It is defined by a set of plugin APIs as generic as possible + (but very powerful at the same time) so that any kind of data source + can be accessed through them. +endef + +MASTER_SITES = $(GNOME_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 +DISTNAME = $(GARNAME)-$(GARVERSION) + +#REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk +#REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender +#REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +CONFIGURE_ARGS = $(DIRPATHS) + +#TEST_TARGET = + +include gar/category.mk + +PATH :=/opt/csw/bin:/opt/csw/gnu:$(PATH) Added: csw/mgar/pkg/libgda/trunk/checksums =================================================================== --- csw/mgar/pkg/libgda/trunk/checksums (rev 0) +++ csw/mgar/pkg/libgda/trunk/checksums 2009-04-06 00:08:42 UTC (rev 4207) @@ -0,0 +1 @@ +c7cf44e50dee4336cb79311f85ad948e download/libgda-3.99.14.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 6 04:17:49 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 06 Apr 2009 02:17:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4208] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4208 http://gar.svn.sourceforge.net/gar/?rev=4208&view=rev Author: bdwalton Date: 2009-04-06 02:17:49 +0000 (Mon, 06 Apr 2009) Log Message: ----------- Correct the LD_OPTIONS that are set when GARCOMPILER is either GCC3 or GCC4. Previously, -R/lib being added. Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-06 00:08:42 UTC (rev 4207) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-06 02:17:49 UTC (rev 4208) @@ -471,8 +471,8 @@ ASFLAGS ?= $(strip $($(GARCOMPILER)_AS_FLAGS) $(EXTRA_ASFLAGS)) OPTFLAGS ?= $(strip $($(GARCOMPILER)_CC_FLAGS) $(EXTRA_OPTFLAGS)) -GCC3_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) -GCC4_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +GCC3_LD_OPTIONS = -R$(GCC3_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +GCC4_LD_OPTIONS = -R$(GCC4_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) SOS11_LD_OPTIONS = $(strip $(EXTRA_SOS11_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) SOS12_LD_OPTIONS = $(strip $(EXTRA_SOS12_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 6 04:22:24 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 06 Apr 2009 02:22:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4209] csw/mgar/pkg/ruby/trunk/Makefile Message-ID: Revision: 4209 http://gar.svn.sourceforge.net/gar/?rev=4209&view=rev Author: bdwalton Date: 2009-04-06 02:22:24 +0000 (Mon, 06 Apr 2009) Log Message: ----------- As per Mantis #3623, allow libruby.so to be pulled into CSWruby instead of CSWrubydev. Modified Paths: -------------- csw/mgar/pkg/ruby/trunk/Makefile Modified: csw/mgar/pkg/ruby/trunk/Makefile =================================================================== --- csw/mgar/pkg/ruby/trunk/Makefile 2009-04-06 02:17:49 UTC (rev 4208) +++ csw/mgar/pkg/ruby/trunk/Makefile 2009-04-06 02:22:24 UTC (rev 4209) @@ -44,7 +44,6 @@ PKGFILES_CSWrubytk = $(libdir)/.*/tcl.* $(libdir)/.*/tk.* $(libdir)/.*-tk.rb PKGFILES_CSWrubydev = $(libdir)/.*\.h $(libdir)/.*/mkmf.rb $(libdir)/.*static.a -PKGFILES_CSWrubydev += $(libdir)/libruby.so MASTER_SITES = ftp://ftp.ruby-lang.org/pub/ruby/ MASTER_SITES += ftp://www.ibiblio.org/pub/languages/ruby/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 6 16:52:57 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 06 Apr 2009 14:52:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4210] csw/mgar/pkg/ncurses/trunk/Makefile Message-ID: Revision: 4210 http://gar.svn.sourceforge.net/gar/?rev=4210&view=rev Author: dmichelsen Date: 2009-04-06 14:52:54 +0000 (Mon, 06 Apr 2009) Log Message: ----------- ncurses: Add both includes for ncurses and ncursesw Modified Paths: -------------- csw/mgar/pkg/ncurses/trunk/Makefile Modified: csw/mgar/pkg/ncurses/trunk/Makefile =================================================================== --- csw/mgar/pkg/ncurses/trunk/Makefile 2009-04-06 02:22:24 UTC (rev 4209) +++ csw/mgar/pkg/ncurses/trunk/Makefile 2009-04-06 14:52:54 UTC (rev 4210) @@ -50,7 +50,7 @@ CONFIGURE_ARGS += --without-xterm-new MERGE_SCRIPTS_isa-sparcv8-widec-disable = copy-only copy-config-only - MERGE_DIRS_isa-sparcv8-widec-disable = $(libdir) + MERGE_DIRS_isa-sparcv8-widec-disable = $(libdir) $(includedir) MERGE_SCRIPTS_isa-sparcv9-widec-disable = copy-relocated-only copy-config-only MERGE_DIRS_isa-sparcv9-widec-disable = $(libdir) @@ -59,7 +59,7 @@ MERGE_DIRS_isa-sparcv9-widec-enable = $(libdir) MERGE_SCRIPTS_isa-i386-widec-disable = copy-only copy-config-only - MERGE_DIRS_isa-i386-widec-disable = $(libdir) + MERGE_DIRS_isa-i386-widec-disable = $(libdir) $(includedir) MERGE_SCRIPTS_isa-amd64-widec-disable = copy-relocated-only copy-config-only MERGE_DIRS_isa-amd64-widec-disable = $(libdir) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 16:57:25 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Mon, 06 Apr 2009 14:57:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4211] csw/mgar/pkg/gnumeric/trunk Message-ID: Revision: 4211 http://gar.svn.sourceforge.net/gar/?rev=4211&view=rev Author: hson Date: 2009-04-06 14:57:25 +0000 (Mon, 06 Apr 2009) Log Message: ----------- gnumeric: Update to 1.9.5 Modified Paths: -------------- csw/mgar/pkg/gnumeric/trunk/Makefile csw/mgar/pkg/gnumeric/trunk/checksums csw/mgar/pkg/gnumeric/trunk/files/mainpatch Modified: csw/mgar/pkg/gnumeric/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-06 14:52:54 UTC (rev 4210) +++ csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-06 14:57:25 UTC (rev 4211) @@ -1,10 +1,10 @@ GARNAME = gnumeric -GARVERSION = 1.8.3 +GARVERSION = 1.9.5 CATEGORIES = gnome -DESCRIPTION = Brief description +DESCRIPTION = GNOME spreadsheet program define BLURB - Long description + The project aims to become a drop in replacement for proprietary spreadsheets. endef MASTER_SITES = $(GNOME_MIRROR) @@ -19,8 +19,10 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -PATCHFILES = mainpatch +#PATCHFILES = mainpatch CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk + +PATH := /opt/csw/gnu:$(PATH) Modified: csw/mgar/pkg/gnumeric/trunk/checksums =================================================================== --- csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-06 14:52:54 UTC (rev 4210) +++ csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-06 14:57:25 UTC (rev 4211) @@ -1,2 +1 @@ -64721d3c0d48ffeb5bf721315682cdcd download/gnumeric-1.8.3.tar.gz -cf9ffd8f1b23eec556cd949af385b972 download/mainpatch +4bc2ca7b90e953934b086c931238fd04 download/gnumeric-1.9.5.tar.gz Modified: csw/mgar/pkg/gnumeric/trunk/files/mainpatch =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-06 14:52:54 UTC (rev 4210) +++ csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-06 14:57:25 UTC (rev 4211) @@ -1,68 +1,3 @@ -Only in gnumeric-1.8.3: Makefile -Only in gnumeric-1.8.3: config.log -Only in gnumeric-1.8.3: config.status -Only in gnumeric-1.8.3: config.status.lineno -Only in gnumeric-1.8.3/doc/C: Makefile -Only in gnumeric-1.8.3/doc/C/figures: Makefile -Only in gnumeric-1.8.3/doc/C/figures/icons: Makefile -Only in gnumeric-1.8.3/doc/C: gnumeric-C.omf.out -Only in gnumeric-1.8.3/doc/C: omf_timestamp -Only in gnumeric-1.8.3/doc: Makefile -Only in gnumeric-1.8.3/doc/developer: Makefile -Only in gnumeric-1.8.3: gnumeric-config.h -Only in gnumeric-1.8.3: gnumeric-features.h -Only in gnumeric-1.8.3: gnumeric.desktop -Only in gnumeric-1.8.3/icons: Makefile -Only in gnumeric-1.8.3: intltool-extract -Only in gnumeric-1.8.3: intltool-merge -Only in gnumeric-1.8.3: intltool-update -Only in gnumeric-1.8.3: libspreadsheet-1.8.pc -Only in gnumeric-1.8.3: libspreadsheet.pc -Only in gnumeric-1.8.3: libtool -Only in gnumeric-1.8.3/plugins: Makefile -Only in gnumeric-1.8.3/plugins/applix: .deps -Only in gnumeric-1.8.3/plugins/applix: .libs -Only in gnumeric-1.8.3/plugins/applix: Makefile -Only in gnumeric-1.8.3/plugins/applix: applix-read.lo -Only in gnumeric-1.8.3/plugins/applix: applix-write.lo -Only in gnumeric-1.8.3/plugins/applix: applix.la -Only in gnumeric-1.8.3/plugins/applix: boot.lo -Only in gnumeric-1.8.3/plugins/applix: plugin.xml -Only in gnumeric-1.8.3/plugins/corba: .deps -Only in gnumeric-1.8.3/plugins/corba: .libs -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-common.c -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-common.lo -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-skels.c -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-skels.lo -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-stubs.c -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-stubs.lo -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric.h -Only in gnumeric-1.8.3/plugins/corba: Makefile -Only in gnumeric-1.8.3/plugins/corba: corba-application.lo -Only in gnumeric-1.8.3/plugins/corba: corba-sheet.lo -Only in gnumeric-1.8.3/plugins/corba: corba-workbook.lo -Only in gnumeric-1.8.3/plugins/corba: corba.la -Only in gnumeric-1.8.3/plugins/corba: plugin.xml -Only in gnumeric-1.8.3/plugins/corba: stamp_Gnumeric_idl -Only in gnumeric-1.8.3/plugins/derivatives: .deps -Only in gnumeric-1.8.3/plugins/derivatives: .libs -Only in gnumeric-1.8.3/plugins/derivatives: Makefile -Only in gnumeric-1.8.3/plugins/derivatives: derivatives.la -Only in gnumeric-1.8.3/plugins/derivatives: options.lo -Only in gnumeric-1.8.3/plugins/derivatives: plugin.xml -Only in gnumeric-1.8.3/plugins/dif: .deps -Only in gnumeric-1.8.3/plugins/dif: .libs -Only in gnumeric-1.8.3/plugins/dif: Makefile -Only in gnumeric-1.8.3/plugins/dif: dif.la -Only in gnumeric-1.8.3/plugins/dif: dif.lo -Only in gnumeric-1.8.3/plugins/dif: plugin.xml -Only in gnumeric-1.8.3/plugins/excel: .deps -Only in gnumeric-1.8.3/plugins/excel: .libs -Only in gnumeric-1.8.3/plugins/excel: Makefile -Only in gnumeric-1.8.3/plugins/excel: boot.lo -Only in gnumeric-1.8.3/plugins/excel: crypt-md4.lo -Only in gnumeric-1.8.3/plugins/excel: excel-xml-read.lo -Only in gnumeric-1.8.3/plugins/excel: excel.la diff -ru gnumeric-1.8.3.orig/plugins/excel/md5.h gnumeric-1.8.3/plugins/excel/md5.h --- gnumeric-1.8.3.orig/plugins/excel/md5.h 2008-01-15 00:55:11.000000000 +0100 +++ gnumeric-1.8.3/plugins/excel/md5.h 2009-03-17 00:23:02.110582251 +0100 @@ -78,150 +13,6 @@ #define MD5_DIGEST_SIZE 16 #define MD5_BLOCK_SIZE 64 -Only in gnumeric-1.8.3/plugins/excel: md5.lo -Only in gnumeric-1.8.3/plugins/excel: ms-biff.lo -Only in gnumeric-1.8.3/plugins/excel: ms-chart.lo -Only in gnumeric-1.8.3/plugins/excel: ms-container.lo -Only in gnumeric-1.8.3/plugins/excel: ms-escher.lo -Only in gnumeric-1.8.3/plugins/excel: ms-excel-read.lo -Only in gnumeric-1.8.3/plugins/excel: ms-excel-util.lo -Only in gnumeric-1.8.3/plugins/excel: ms-excel-write.lo -Only in gnumeric-1.8.3/plugins/excel: ms-formula-read.lo -Only in gnumeric-1.8.3/plugins/excel: ms-formula-write.lo -Only in gnumeric-1.8.3/plugins/excel: ms-obj.lo -Only in gnumeric-1.8.3/plugins/excel: ms-pivot.lo -Only in gnumeric-1.8.3/plugins/excel: plugin.xml -Only in gnumeric-1.8.3/plugins/excel: rc4.lo -Only in gnumeric-1.8.3/plugins/excel: xlsx-read.lo -Only in gnumeric-1.8.3/plugins/excel: xlsx-utils.lo -Only in gnumeric-1.8.3/plugins/excel: xlsx-write.lo -Only in gnumeric-1.8.3/plugins/fn-complex: .deps -Only in gnumeric-1.8.3/plugins/fn-complex: .libs -Only in gnumeric-1.8.3/plugins/fn-complex: Makefile -Only in gnumeric-1.8.3/plugins/fn-complex: functions.lo -Only in gnumeric-1.8.3/plugins/fn-complex: gsl-complex.lo -Only in gnumeric-1.8.3/plugins/fn-complex: plugin.la -Only in gnumeric-1.8.3/plugins/fn-complex: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-database: .deps -Only in gnumeric-1.8.3/plugins/fn-database: .libs -Only in gnumeric-1.8.3/plugins/fn-database: Makefile -Only in gnumeric-1.8.3/plugins/fn-database: functions.lo -Only in gnumeric-1.8.3/plugins/fn-database: plugin.la -Only in gnumeric-1.8.3/plugins/fn-database: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-date: .deps -Only in gnumeric-1.8.3/plugins/fn-date: .libs -Only in gnumeric-1.8.3/plugins/fn-date: Makefile -Only in gnumeric-1.8.3/plugins/fn-date: functions.lo -Only in gnumeric-1.8.3/plugins/fn-date: plugin.la -Only in gnumeric-1.8.3/plugins/fn-date: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-eng: .deps -Only in gnumeric-1.8.3/plugins/fn-eng: .libs -Only in gnumeric-1.8.3/plugins/fn-eng: Makefile -Only in gnumeric-1.8.3/plugins/fn-eng: functions.lo -Only in gnumeric-1.8.3/plugins/fn-eng: plugin.la -Only in gnumeric-1.8.3/plugins/fn-eng: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-erlang: .deps -Only in gnumeric-1.8.3/plugins/fn-erlang: .libs -Only in gnumeric-1.8.3/plugins/fn-erlang: Makefile -Only in gnumeric-1.8.3/plugins/fn-erlang: erlang.la -Only in gnumeric-1.8.3/plugins/fn-erlang: functions.lo -Only in gnumeric-1.8.3/plugins/fn-erlang: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-financial: .deps -Only in gnumeric-1.8.3/plugins/fn-financial: .libs -Only in gnumeric-1.8.3/plugins/fn-financial: Makefile -Only in gnumeric-1.8.3/plugins/fn-financial: functions.lo -Only in gnumeric-1.8.3/plugins/fn-financial: plugin.la -Only in gnumeric-1.8.3/plugins/fn-financial: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-financial: sc-fin.lo -Only in gnumeric-1.8.3/plugins/fn-info: .deps -Only in gnumeric-1.8.3/plugins/fn-info: .libs -Only in gnumeric-1.8.3/plugins/fn-info: Makefile -Only in gnumeric-1.8.3/plugins/fn-info: functions.lo -Only in gnumeric-1.8.3/plugins/fn-info: plugin.la -Only in gnumeric-1.8.3/plugins/fn-info: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-logical: .deps -Only in gnumeric-1.8.3/plugins/fn-logical: .libs -Only in gnumeric-1.8.3/plugins/fn-logical: Makefile -Only in gnumeric-1.8.3/plugins/fn-logical: functions.lo -Only in gnumeric-1.8.3/plugins/fn-logical: plugin.la -Only in gnumeric-1.8.3/plugins/fn-logical: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-lookup: .deps -Only in gnumeric-1.8.3/plugins/fn-lookup: .libs -Only in gnumeric-1.8.3/plugins/fn-lookup: Makefile -Only in gnumeric-1.8.3/plugins/fn-lookup: functions.lo -Only in gnumeric-1.8.3/plugins/fn-lookup: plugin.la -Only in gnumeric-1.8.3/plugins/fn-lookup: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-math: .deps -Only in gnumeric-1.8.3/plugins/fn-math: .libs -Only in gnumeric-1.8.3/plugins/fn-math: Makefile -Only in gnumeric-1.8.3/plugins/fn-math: functions.lo -Only in gnumeric-1.8.3/plugins/fn-math: plugin.la -Only in gnumeric-1.8.3/plugins/fn-math: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-r: .deps -Only in gnumeric-1.8.3/plugins/fn-r: .libs -Only in gnumeric-1.8.3/plugins/fn-r: Makefile -Only in gnumeric-1.8.3/plugins/fn-r: extra.lo -Only in gnumeric-1.8.3/plugins/fn-r: functions.lo -Only in gnumeric-1.8.3/plugins/fn-r: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-r: rstat.la -Only in gnumeric-1.8.3/plugins/fn-random: .deps -Only in gnumeric-1.8.3/plugins/fn-random: .libs -Only in gnumeric-1.8.3/plugins/fn-random: Makefile -Only in gnumeric-1.8.3/plugins/fn-random: functions.lo -Only in gnumeric-1.8.3/plugins/fn-random: plugin.la -Only in gnumeric-1.8.3/plugins/fn-random: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-stat: .deps -Only in gnumeric-1.8.3/plugins/fn-stat: .libs -Only in gnumeric-1.8.3/plugins/fn-stat: Makefile -Only in gnumeric-1.8.3/plugins/fn-stat: functions.lo -Only in gnumeric-1.8.3/plugins/fn-stat: plugin.la -Only in gnumeric-1.8.3/plugins/fn-stat: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-string: .deps -Only in gnumeric-1.8.3/plugins/fn-string: .libs -Only in gnumeric-1.8.3/plugins/fn-string: Makefile -Only in gnumeric-1.8.3/plugins/fn-string: functions.lo -Only in gnumeric-1.8.3/plugins/fn-string: plugin.la -Only in gnumeric-1.8.3/plugins/fn-string: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-tsa: .deps -Only in gnumeric-1.8.3/plugins/fn-tsa: .libs -Only in gnumeric-1.8.3/plugins/fn-tsa: Makefile -Only in gnumeric-1.8.3/plugins/fn-tsa: functions.lo -Only in gnumeric-1.8.3/plugins/fn-tsa: plugin.la -Only in gnumeric-1.8.3/plugins/fn-tsa: plugin.xml -Only in gnumeric-1.8.3/plugins/gda: .deps -Only in gnumeric-1.8.3/plugins/gda: Makefile -Only in gnumeric-1.8.3/plugins/gnome-db: .deps -Only in gnumeric-1.8.3/plugins/gnome-db: Makefile -Only in gnumeric-1.8.3/plugins/gnome-glossary: Makefile -Only in gnumeric-1.8.3/plugins/html: .deps -Only in gnumeric-1.8.3/plugins/html: .libs -Only in gnumeric-1.8.3/plugins/html: Makefile -Only in gnumeric-1.8.3/plugins/html: boot.lo -Only in gnumeric-1.8.3/plugins/html: font.lo -Only in gnumeric-1.8.3/plugins/html: html.la -Only in gnumeric-1.8.3/plugins/html: html.lo -Only in gnumeric-1.8.3/plugins/html: html_read.lo -Only in gnumeric-1.8.3/plugins/html: latex.lo -Only in gnumeric-1.8.3/plugins/html: plugin.xml -Only in gnumeric-1.8.3/plugins/html: roff.lo -Only in gnumeric-1.8.3/plugins/lotus-123: .deps -Only in gnumeric-1.8.3/plugins/lotus-123: .libs -Only in gnumeric-1.8.3/plugins/lotus-123: Makefile -Only in gnumeric-1.8.3/plugins/lotus-123: boot.lo -Only in gnumeric-1.8.3/plugins/lotus-123: lotus-formula.lo -Only in gnumeric-1.8.3/plugins/lotus-123: lotus.la -Only in gnumeric-1.8.3/plugins/lotus-123: lotus.lo -Only in gnumeric-1.8.3/plugins/lotus-123: plugin.xml -Only in gnumeric-1.8.3/plugins/mps: .deps -Only in gnumeric-1.8.3/plugins/mps: .libs -Only in gnumeric-1.8.3/plugins/mps: Makefile -Only in gnumeric-1.8.3/plugins/mps: mps.la -Only in gnumeric-1.8.3/plugins/mps: mps.lo -Only in gnumeric-1.8.3/plugins/mps: parser.lo -Only in gnumeric-1.8.3/plugins/mps: plugin.xml -Only in gnumeric-1.8.3/plugins/numtheory: .deps -Only in gnumeric-1.8.3/plugins/numtheory: .libs -Only in gnumeric-1.8.3/plugins/numtheory: Makefile diff -ru gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c gnumeric-1.8.3/plugins/numtheory/numtheory.c --- gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c 2008-01-15 00:55:10.000000000 +0100 +++ gnumeric-1.8.3/plugins/numtheory/numtheory.c 2009-03-17 00:55:21.253509921 +0100 @@ -240,90 +31,6 @@ /* ------------------------------------------------------------------------- */ -Only in gnumeric-1.8.3/plugins/numtheory: numtheory.e -Only in gnumeric-1.8.3/plugins/numtheory: numtheory.la -Only in gnumeric-1.8.3/plugins/numtheory: numtheory.lo -Only in gnumeric-1.8.3/plugins/numtheory: plugin.xml -Only in gnumeric-1.8.3/plugins/oleo: .deps -Only in gnumeric-1.8.3/plugins/oleo: .libs -Only in gnumeric-1.8.3/plugins/oleo: Makefile -Only in gnumeric-1.8.3/plugins/oleo: boot.lo -Only in gnumeric-1.8.3/plugins/oleo: oleo.la -Only in gnumeric-1.8.3/plugins/oleo: oleo.lo -Only in gnumeric-1.8.3/plugins/oleo: plugin.xml -Only in gnumeric-1.8.3/plugins/openoffice: .deps -Only in gnumeric-1.8.3/plugins/openoffice: .libs -Only in gnumeric-1.8.3/plugins/openoffice: Makefile -Only in gnumeric-1.8.3/plugins/openoffice: openoffice-read.lo -Only in gnumeric-1.8.3/plugins/openoffice: openoffice-write.lo -Only in gnumeric-1.8.3/plugins/openoffice: openoffice.la -Only in gnumeric-1.8.3/plugins/openoffice: plugin.xml -Only in gnumeric-1.8.3/plugins/paradox: .deps -Only in gnumeric-1.8.3/plugins/paradox: Makefile -Only in gnumeric-1.8.3/plugins/perl-func: Makefile -Only in gnumeric-1.8.3/plugins/perl-func: plugin.xml -Only in gnumeric-1.8.3/plugins/perl-loader: .libs -Only in gnumeric-1.8.3/plugins/perl-loader: Makefile -Only in gnumeric-1.8.3/plugins/perl-loader: boot.lo -Only in gnumeric-1.8.3/plugins/perl-loader: perl-gnumeric.lo -Only in gnumeric-1.8.3/plugins/perl-loader: perl-loader.lo -Only in gnumeric-1.8.3/plugins/perl-loader: perl_loader.la -Only in gnumeric-1.8.3/plugins/perl-loader: plugin.xml -Only in gnumeric-1.8.3/plugins/perl-loader: xsinit.c -Only in gnumeric-1.8.3/plugins/perl-loader: xsinit.lo -Only in gnumeric-1.8.3/plugins/plan-perfect: .deps -Only in gnumeric-1.8.3/plugins/plan-perfect: .libs -Only in gnumeric-1.8.3/plugins/plan-perfect: Makefile -Only in gnumeric-1.8.3/plugins/plan-perfect: charset.lo -Only in gnumeric-1.8.3/plugins/plan-perfect: plan_perfect.la -Only in gnumeric-1.8.3/plugins/plan-perfect: pln.lo -Only in gnumeric-1.8.3/plugins/plan-perfect: plugin.xml -Only in gnumeric-1.8.3/plugins/psiconv: .deps -Only in gnumeric-1.8.3/plugins/psiconv: Makefile -Only in gnumeric-1.8.3/plugins/py-func: Makefile -Only in gnumeric-1.8.3/plugins/python-loader: .deps -Only in gnumeric-1.8.3/plugins/python-loader: Makefile -Only in gnumeric-1.8.3/plugins/qpro: .deps -Only in gnumeric-1.8.3/plugins/qpro: .libs -Only in gnumeric-1.8.3/plugins/qpro: Makefile -Only in gnumeric-1.8.3/plugins/qpro: plugin.xml -Only in gnumeric-1.8.3/plugins/qpro: qpro-read.lo -Only in gnumeric-1.8.3/plugins/qpro: qpro.la -Only in gnumeric-1.8.3/plugins/sample_datasource: .deps -Only in gnumeric-1.8.3/plugins/sample_datasource: .libs -Only in gnumeric-1.8.3/plugins/sample_datasource: Makefile -Only in gnumeric-1.8.3/plugins/sample_datasource: plugin.xml -Only in gnumeric-1.8.3/plugins/sample_datasource: sample_datasource.la -Only in gnumeric-1.8.3/plugins/sample_datasource: sample_datasource.lo -Only in gnumeric-1.8.3/plugins/sc: .deps -Only in gnumeric-1.8.3/plugins/sc: .libs -Only in gnumeric-1.8.3/plugins/sc: Makefile -Only in gnumeric-1.8.3/plugins/sc: plugin.xml -Only in gnumeric-1.8.3/plugins/sc: sc.la -Only in gnumeric-1.8.3/plugins/sc: sc.lo -Only in gnumeric-1.8.3/plugins/sylk: .deps -Only in gnumeric-1.8.3/plugins/sylk: .libs -Only in gnumeric-1.8.3/plugins/sylk: Makefile -Only in gnumeric-1.8.3/plugins/sylk: plugin.xml -Only in gnumeric-1.8.3/plugins/sylk: sylk-write.lo -Only in gnumeric-1.8.3/plugins/sylk: sylk.la -Only in gnumeric-1.8.3/plugins/sylk: sylk.lo -Only in gnumeric-1.8.3/plugins/uihello: .deps -Only in gnumeric-1.8.3/plugins/uihello: .libs -Only in gnumeric-1.8.3/plugins/uihello: Makefile -Only in gnumeric-1.8.3/plugins/uihello: plugin.la -Only in gnumeric-1.8.3/plugins/uihello: plugin.xml -Only in gnumeric-1.8.3/plugins/uihello: uihello.lo -Only in gnumeric-1.8.3/plugins/xbase: .deps -Only in gnumeric-1.8.3/plugins/xbase: .libs -Only in gnumeric-1.8.3/plugins/xbase: Makefile -Only in gnumeric-1.8.3/plugins/xbase: boot.lo -Only in gnumeric-1.8.3/plugins/xbase: plugin.xml -Only in gnumeric-1.8.3/plugins/xbase: xbase.la -Only in gnumeric-1.8.3/plugins/xbase: xbase.lo -Only in gnumeric-1.8.3/po: .intltool-merge-cache -Only in gnumeric-1.8.3/po: Makefile -Only in gnumeric-1.8.3/po: Makefile.in diff -ru gnumeric-1.8.3.orig/po/Makefile.in.in gnumeric-1.8.3/po/Makefile.in.in --- gnumeric-1.8.3.orig/po/Makefile.in.in 2008-05-24 22:40:36.000000000 +0200 +++ gnumeric-1.8.3/po/Makefile.in.in 2009-03-17 00:59:24.557217225 +0100 @@ -336,183 +43,6 @@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ -Only in gnumeric-1.8.3/po: POTFILES -Only in gnumeric-1.8.3/po: am.gmo -Only in gnumeric-1.8.3/po: ar.gmo -Only in gnumeric-1.8.3/po: az.gmo -Only in gnumeric-1.8.3/po: bg.gmo -Only in gnumeric-1.8.3/po: ca.gmo -Only in gnumeric-1.8.3/po: cs.gmo -Only in gnumeric-1.8.3/po: da.gmo -Only in gnumeric-1.8.3/po: de.gmo -Only in gnumeric-1.8.3/po: dz.gmo -Only in gnumeric-1.8.3/po: el.gmo -Only in gnumeric-1.8.3/po: en_CA.gmo -Only in gnumeric-1.8.3/po: en_GB.gmo -Only in gnumeric-1.8.3/po: es.gmo -Only in gnumeric-1.8.3/po: et.gmo -Only in gnumeric-1.8.3/po: fi.gmo -Only in gnumeric-1.8.3/po: fr.gmo -Only in gnumeric-1.8.3/po: ga.gmo -Only in gnumeric-1.8.3/po: gl.gmo -Only in gnumeric-1.8.3/po: he.gmo -Only in gnumeric-1.8.3/po: hr.gmo -Only in gnumeric-1.8.3/po: hu.gmo -Only in gnumeric-1.8.3/po: it.gmo -Only in gnumeric-1.8.3/po: ja.gmo -Only in gnumeric-1.8.3/po: ko.gmo -Only in gnumeric-1.8.3/po: lt.gmo -Only in gnumeric-1.8.3/po: lv.gmo -Only in gnumeric-1.8.3/po: mk.gmo -Only in gnumeric-1.8.3/po: ml.gmo -Only in gnumeric-1.8.3/po: mr.gmo -Only in gnumeric-1.8.3/po: ms.gmo -Only in gnumeric-1.8.3/po: nb.gmo -Only in gnumeric-1.8.3/po: ne.gmo -Only in gnumeric-1.8.3/po: nl.gmo -Only in gnumeric-1.8.3/po: nn.gmo -Only in gnumeric-1.8.3/po: oc.gmo -Only in gnumeric-1.8.3/po: pl.gmo -Only in gnumeric-1.8.3/po: pt.gmo -Only in gnumeric-1.8.3/po: pt_BR.gmo -Only in gnumeric-1.8.3/po: ro.gmo -Only in gnumeric-1.8.3/po: ru.gmo -Only in gnumeric-1.8.3/po: rw.gmo -Only in gnumeric-1.8.3/po: sk.gmo -Only in gnumeric-1.8.3/po: sr.gmo -Only in gnumeric-1.8.3/po: sr at Latn.gmo -Only in gnumeric-1.8.3/po: stamp-it -Only in gnumeric-1.8.3/po: sv.gmo -Only in gnumeric-1.8.3/po: te.gmo -Only in gnumeric-1.8.3/po: tr.gmo -Only in gnumeric-1.8.3/po: uk.gmo -Only in gnumeric-1.8.3/po: vi.gmo -Only in gnumeric-1.8.3/po: zh_CN.gmo -Only in gnumeric-1.8.3/po: zh_TW.gmo -Only in gnumeric-1.8.3/po-functions: Makefile -Only in gnumeric-1.8.3/po-functions: Makefile.in -Only in gnumeric-1.8.3/po-functions: POTFILES -Only in gnumeric-1.8.3/po-functions: am.gmo -Only in gnumeric-1.8.3/po-functions: ar.gmo -Only in gnumeric-1.8.3/po-functions: az.gmo -Only in gnumeric-1.8.3/po-functions: bg.gmo -Only in gnumeric-1.8.3/po-functions: ca.gmo -Only in gnumeric-1.8.3/po-functions: cs.gmo -Only in gnumeric-1.8.3/po-functions: da.gmo -Only in gnumeric-1.8.3/po-functions: de.gmo -Only in gnumeric-1.8.3/po-functions: dz.gmo -Only in gnumeric-1.8.3/po-functions: el.gmo -Only in gnumeric-1.8.3/po-functions: en_CA.gmo -Only in gnumeric-1.8.3/po-functions: en_GB.gmo -Only in gnumeric-1.8.3/po-functions: es.gmo -Only in gnumeric-1.8.3/po-functions: et.gmo -Only in gnumeric-1.8.3/po-functions: fi.gmo -Only in gnumeric-1.8.3/po-functions: fr.gmo -Only in gnumeric-1.8.3/po-functions: ga.gmo -Only in gnumeric-1.8.3/po-functions: gl.gmo -Only in gnumeric-1.8.3/po-functions: he.gmo -Only in gnumeric-1.8.3/po-functions: hr.gmo -Only in gnumeric-1.8.3/po-functions: hu.gmo -Only in gnumeric-1.8.3/po-functions: it.gmo -Only in gnumeric-1.8.3/po-functions: ja.gmo -Only in gnumeric-1.8.3/po-functions: ko.gmo -Only in gnumeric-1.8.3/po-functions: lt.gmo -Only in gnumeric-1.8.3/po-functions: lv.gmo -Only in gnumeric-1.8.3/po-functions: mk.gmo -Only in gnumeric-1.8.3/po-functions: ml.gmo -Only in gnumeric-1.8.3/po-functions: mr.gmo -Only in gnumeric-1.8.3/po-functions: ms.gmo -Only in gnumeric-1.8.3/po-functions: nb.gmo -Only in gnumeric-1.8.3/po-functions: ne.gmo -Only in gnumeric-1.8.3/po-functions: nl.gmo -Only in gnumeric-1.8.3/po-functions: nn.gmo -Only in gnumeric-1.8.3/po-functions: oc.gmo -Only in gnumeric-1.8.3/po-functions: pl.gmo -Only in gnumeric-1.8.3/po-functions: pt.gmo -Only in gnumeric-1.8.3/po-functions: pt_BR.gmo -Only in gnumeric-1.8.3/po-functions: ro.gmo -Only in gnumeric-1.8.3/po-functions: ru.gmo -Only in gnumeric-1.8.3/po-functions: rw.gmo -Only in gnumeric-1.8.3/po-functions: sk.gmo -Only in gnumeric-1.8.3/po-functions: sr.gmo -Only in gnumeric-1.8.3/po-functions: sr at Latn.gmo -Only in gnumeric-1.8.3/po-functions: sv.gmo -Only in gnumeric-1.8.3/po-functions: te.gmo -Only in gnumeric-1.8.3/po-functions: tr.gmo -Only in gnumeric-1.8.3/po-functions: uk.gmo -Only in gnumeric-1.8.3/po-functions: vi.gmo -Only in gnumeric-1.8.3/po-functions: zh_CN.gmo -Only in gnumeric-1.8.3/po-functions: zh_TW.gmo -Only in gnumeric-1.8.3/schemas: Makefile -Only in gnumeric-1.8.3/schemas: gnumeric-dialogs.schemas -Only in gnumeric-1.8.3/schemas: gnumeric-general.schemas -Only in gnumeric-1.8.3/schemas: gnumeric-plugins.schemas -Only in gnumeric-1.8.3/src: .deps -Only in gnumeric-1.8.3/src: .libs -Only in gnumeric-1.8.3/src: GNOME_Gnumeric-gtk.xml -Only in gnumeric-1.8.3/src: Makefile -Only in gnumeric-1.8.3/src/cut-n-paste-code: Makefile -Only in gnumeric-1.8.3/src/dialogs: .deps -Only in gnumeric-1.8.3/src/dialogs: .libs -Only in gnumeric-1.8.3/src/dialogs: Makefile -Only in gnumeric-1.8.3/src/dialogs: dao-gui-utils.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-about.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-advanced-filter.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-analysis-tools.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autocorrect.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autofilter.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autoformat.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autosave.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-cell-comment.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-cell-format.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-cell-sort.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-col-row.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-col-width.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-consolidate.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-data-table.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-define-names.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-delete-cells.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-doc-metadata.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-fill-series.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-formula-guru.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-function-select.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-goal-seek.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-goto-cell.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-hyperlink.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-insert-cells.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-merge.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-password.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-paste-names.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-paste-special.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-plugin-manager.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-preferences.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-printer-setup.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-quit.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-random-generator.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-recent.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-row-height.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-scenarios.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-search-replace.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-search.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-sheet-order.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-shuffle.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-simulation.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-so-list.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-so-styled.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-solver.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-csv-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-export.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-fixed-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-format-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-main-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-preview.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-tabulate.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-view.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-workbook-attr.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-zoom.lo -Only in gnumeric-1.8.3/src/dialogs: libdialogs.la -Only in gnumeric-1.8.3/src: gnm-marshalers.h diff -ru gnumeric-1.8.3.orig/src/gnm-so-polygon.c gnumeric-1.8.3/src/gnm-so-polygon.c --- gnumeric-1.8.3.orig/src/gnm-so-polygon.c 2008-01-15 00:54:39.000000000 +0100 +++ gnumeric-1.8.3/src/gnm-so-polygon.c 2009-03-16 23:35:49.881228497 +0100 @@ -525,206 +55,3 @@ } static void -Only in gnumeric-1.8.3/src: gnumeric -Only in gnumeric-1.8.3/src: gnumeric-paths.h -Only in gnumeric-1.8.3/src: io-context-gtk.o -Only in gnumeric-1.8.3/src: libspreadsheet.la -Only in gnumeric-1.8.3/src: libspreadsheet_la-application.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-auto-format.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cell-draw.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cell.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cellspan.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-clipboard.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cmd-edit.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-collect.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-colrow.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-command-context-stderr.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-command-context.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-commands.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-complete-sheet.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-complete.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-complex.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-consolidate.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-dependent.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-expr-name.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-expr.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-file-autoft.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-format-template.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-func-builtin.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-func.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-datetime.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-format.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-graph-window.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-marshalers.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-pane.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-plugin.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-so-filled.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-so-line.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-so-polygon.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnumeric-gconf.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnumeric-simple-canvas.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-graph.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gui-clipboard.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gui-file.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gui-util.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gutils.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-history.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-hlink.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-input-msg.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-acetate.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-bar.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-cursor.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-debug.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-edit.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-grid.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-libgnumeric.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-mathfunc.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-mstyle.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-number-match.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-parse-util.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-parser.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-pattern.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-position.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-preview-grid.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-print-cell.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-print-info.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-print.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-rangefunc-strings.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-rangefunc.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-ranges.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-rendered-value.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-search.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-selection.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-session.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-autofill.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-control-gui.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-control.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-filter.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-merge.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-cell-comment.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-graph.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-image.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-widget.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-style.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-view.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sort.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-stf-export.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-stf-parse.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-stf.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-str.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style-border.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style-color.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style-conditions.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-symbol.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-validation.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-value-sheet.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-value.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-wbc-gtk-actions.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-wbc-gtk-edit.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-wbc-gtk.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook-cmd-format.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook-control.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook-view.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-xml-io.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-xml-sax-read.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-xml-sax-write.lo -Only in gnumeric-1.8.3/src: main-application.o -Only in gnumeric-1.8.3/src/pixmaps: Makefile -Only in gnumeric-1.8.3/src/pixmaps: gnumeric-stock-pixbufs.h -Only in gnumeric-1.8.3/src: ssconvert -Only in gnumeric-1.8.3/src: ssconvert.o -Only in gnumeric-1.8.3/src: ssindex -Only in gnumeric-1.8.3/src: ssindex.o -Only in gnumeric-1.8.3/src/tools: .deps -Only in gnumeric-1.8.3/src/tools: .libs -Only in gnumeric-1.8.3/src/tools: Makefile -Only in gnumeric-1.8.3/src/tools: analysis-histogram.lo -Only in gnumeric-1.8.3/src/tools: analysis-tools.lo -Only in gnumeric-1.8.3/src/tools: auto-correct.lo -Only in gnumeric-1.8.3/src/tools: dao.lo -Only in gnumeric-1.8.3/src/tools: data-shuffling.lo -Only in gnumeric-1.8.3/src/tools: fill-series.lo -Only in gnumeric-1.8.3/src/tools: filter.lo -Only in gnumeric-1.8.3/src/tools: goal-seek.lo -Only in gnumeric-1.8.3/src/tools: libtools.la -Only in gnumeric-1.8.3/src/tools: random-generator.lo -Only in gnumeric-1.8.3/src/tools: scenarios.lo -Only in gnumeric-1.8.3/src/tools: simulation.lo -Only in gnumeric-1.8.3/src/tools/solver: .deps -Only in gnumeric-1.8.3/src/tools/solver: .libs -Only in gnumeric-1.8.3/src/tools/solver: Makefile -Only in gnumeric-1.8.3/src/tools/solver: api.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk: Makefile -Only in gnumeric-1.8.3/src/tools/solver/glpk/include: Makefile -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: .deps -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: .libs -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: Makefile -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpavl.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpdmp.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpinv.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpipp1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpipp2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib1a.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib1b.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib3.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib4.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpp1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpp2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx3.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx4.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx5.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx6a.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx6c.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx6d.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx7.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx7a.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpluf.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpmip1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpmip2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpspx1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpspx2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpstr.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: libglpk.la -Only in gnumeric-1.8.3/src/tools/solver: libsolver.la -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: .deps -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: .libs -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: Makefile -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: liblp_solve.la -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: lp_solve.lo -Only in gnumeric-1.8.3/src/tools/solver: reports-write.lo -Only in gnumeric-1.8.3/src/tools/solver: reports.lo -Only in gnumeric-1.8.3/src/tools/solver: solver.lo -Only in gnumeric-1.8.3/src/tools: tabulate.lo -Only in gnumeric-1.8.3/src/widgets: .deps -Only in gnumeric-1.8.3/src/widgets: .libs -Only in gnumeric-1.8.3/src/widgets: Makefile -Only in gnumeric-1.8.3/src/widgets: gnm-cell-combo-foo-view.lo -Only in gnumeric-1.8.3/src/widgets: gnm-dao.lo -Only in gnumeric-1.8.3/src/widgets: gnm-filter-combo-foo-view.lo -Only in gnumeric-1.8.3/src/widgets: gnm-format-sel.lo -Only in gnumeric-1.8.3/src/widgets: gnm-validation-combo-foo-view.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-cell-renderer-expr-entry.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-cell-renderer-text.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-cell-renderer-toggle.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-dashed-canvas-line.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-expr-entry.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-lazy-list.lo -Only in gnumeric-1.8.3/src/widgets: libwidgets.la -Only in gnumeric-1.8.3/src/widgets: widget-editable-label.lo -Only in gnumeric-1.8.3/src/widgets: widget-font-selector.lo -Only in gnumeric-1.8.3: stamp-h1 -Only in gnumeric-1.8.3: stamp-h2 -Only in gnumeric-1.8.3/templates: Makefile -Only in gnumeric-1.8.3/templates/autoformat: Makefile -Only in gnumeric-1.8.3/templates/english: Makefile -Only in gnumeric-1.8.3/test: Makefile -Only in gnumeric-1.8.3/tools: .deps -Only in gnumeric-1.8.3/tools: Makefile -Only in gnumeric-1.8.3/tools/win32: gnumeric.nsi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From rmacduff at users.sourceforge.net Mon Apr 6 21:28:32 2009 From: rmacduff at users.sourceforge.net (rmacduff at users.sourceforge.net) Date: Mon, 06 Apr 2009 19:28:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4212] csw/mgar/pkg/sed/trunk/Makefile Message-ID: Revision: 4212 http://gar.svn.sourceforge.net/gar/?rev=4212&view=rev Author: rmacduff Date: 2009-04-06 19:28:32 +0000 (Mon, 06 Apr 2009) Log Message: ----------- gsed: corrected runtime linker path Modified Paths: -------------- csw/mgar/pkg/sed/trunk/Makefile Modified: csw/mgar/pkg/sed/trunk/Makefile =================================================================== --- csw/mgar/pkg/sed/trunk/Makefile 2009-04-06 14:57:25 UTC (rev 4211) +++ csw/mgar/pkg/sed/trunk/Makefile 2009-04-06 19:28:32 UTC (rev 4212) @@ -5,7 +5,7 @@ PACKAGES = CSWgsed CATALOGNAME_CSWgsed = gsed -DESCRIPTION = GNU Stream Editor +DESCRIPTION = The GNU non-interactive text Stream-oriented EDitor (sed) define BLURB Sed, the GNU Stream Editor, copies the named files (standard input default) to the standard output, edited according to a script of commands. @@ -25,6 +25,8 @@ REQUIRED_PKGS = CSWiconv +# No special platform optimization +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --program-prefix=g @@ -37,4 +39,6 @@ # Make sure we are using gnu tools (esp. sed) PATH := /opt/csw/gnu:$(PATH) -EXTRA_MERGE_EXCLUDE_FILES = $(libdir)/charset.alias +EXTRA_MERGE_EXCLUDE_FILES = $(sharedstatedir)/.*locale.alias +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/charset.alias + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From ggunselm at emporia.edu Tue Apr 7 06:05:26 2009 From: ggunselm at emporia.edu (Glen Gunselman) Date: Mon, 06 Apr 2009 23:05:26 -0500 Subject: [csw-devel] Orca and friends packages In-Reply-To: <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> References: <49BF8E3F.CC54.005D.3@emporia.edu> <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> Message-ID: <49DA8AB5.CC54.005D.0@emporia.edu> I the collection process running on the master and one client. When I run Orca I get the following: /opt/csw/bin/orca -v /opt/csw/etc/orca_services.cfg Orca at Mon Apr 6 22:02:00 2009 running on: Orca version 0.28.0 (dev 535) RRDs version 1.3006 Perl version 5.008008 Loading state from '/var/opt/csw/orca/rrd/orca_services/orca.state'. Creating orca_logo.gif. Creating rrdtool_logo.gif. Creating rothschild_image_logo.png. Finding files and setting up data structures at Mon Apr 6 22:02:00 2009. Current running time is 0:01 minutes. Loading new data from group orca_services for sys1. Loading new data from group orca_services for sysa. Saving state into '/var/opt/csw/orca/rrd/orca_services/orca.state'. Updating PNGs. Creating HTML files in '/opt/csw/share/www/orca/orca_services/'. Sleeping at Mon Apr 6 22:02:02 2009 until Mon Apr 6 22:07:30 2009. Current running time is 5:32 minutes. Loading new data from group orca_services for sys1. Updating PNGs. Sleeping at Mon Apr 6 22:07:31 2009 until Mon Apr 6 22:07:32 2009. Current running time is 5:34 minutes. Loading new data from group orca_services for sysa. Updating PNGs. Sleeping at Mon Apr 6 22:07:33 2009 until Mon Apr 6 22:13:01 2009. ^CCurrent running time is 11:02 minutes. /opt/csw/bin/orca: caught signal INT. At this point the web page contains the headers and trailers plus the table(s) with the two servers but no graphs. The plot statements from the cfg file are of the following format: plot { title %g SMTP Mail Queue source orca_services data mailq_total legend Msgs. in queue (5m) y_legend Number of Messages line_type line2 data_min 0 data_max U href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Mail_Queue } I'm looking for plots like the older versions (0.265 is what I've been using). Unless you have a magic bullet I'm ready to throw in the towel. If I had any obligation to test CSW packages, I feel that I've proven that it's beyond me. I invested a couple of weeks trying but don't really have anything to show for it. Glen Gunselman Systems Software Specialist TCS Emporia State University >>> Dagobert Michelsen dam at opencsw.org> 3/17/2009 4:22 PM >> ( mailto:dam at opencsw.org> ) Basically the packages are ready for use, but the start-scripts are still without SMF-support. Do you know how to operate Orca in general or should I write some small how-to? Best regards -- Dago -------------- next part -------------- An HTML attachment was scrubbed... URL: From valholla at users.sourceforge.net Tue Apr 7 07:22:48 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 07 Apr 2009 05:22:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4213] csw/mgar/pkg Message-ID: Revision: 4213 http://gar.svn.sourceforge.net/gar/?rev=4213&view=rev Author: valholla Date: 2009-04-07 05:22:47 +0000 (Tue, 07 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/libffi/ csw/mgar/pkg/libffi/branches/ csw/mgar/pkg/libffi/tags/ csw/mgar/pkg/libffi/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 7 07:23:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 07 Apr 2009 05:23:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4214] csw/mgar/pkg/libffi/trunk/ Message-ID: Revision: 4214 http://gar.svn.sourceforge.net/gar/?rev=4214&view=rev Author: valholla Date: 2009-04-07 05:23:56 +0000 (Tue, 07 Apr 2009) Log Message: ----------- externals to garv2 Property Changed: ---------------- csw/mgar/pkg/libffi/trunk/ Property changes on: csw/mgar/pkg/libffi/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dam at opencsw.org Tue Apr 7 09:28:00 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Tue, 7 Apr 2009 09:28:00 +0200 Subject: [csw-devel] Orca and friends packages In-Reply-To: <49DA8AB5.CC54.005D.0@emporia.edu> References: <49BF8E3F.CC54.005D.3@emporia.edu> <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> <49DA8AB5.CC54.005D.0@emporia.edu> Message-ID: Hi Glen, Am 07.04.2009 um 06:05 schrieb Glen Gunselman: > I the collection process running on the master and one client. That means you have applied something like this? --- /opt/csw/bin/start_orcallator.orig 2009-04-07 09:21:13.991714686 +0200 +++ /opt/csw/bin/start_orcallator 2009-04-07 09:21:27.598788701 +0200 @@ -139,7 +139,7 @@ # Now start the logging. echo "Starting logging" -nohup $SE $SE_PATCHES -DWATCH_OS $WATCH_WEB -I$libdir/SE/$SE_VERSION $libdir/orcallator.se & +nohup $SE $SE_PATCHES -DWATCH_OS $WATCH_WEB $libdir/orca/ orcallator.se & # Write the PID of orcallator to a file to make killing easier. pid=$! Then you should have statistics data like this coming in: build8s-dam# ls -l /var/opt/csw/orca/orcallator/build8s-dam/ total 11 -rw-r--r-- 1 root other 7137 Apr 7 09:20 orcallator-2009-04-07-000 -rw-r--r-- 1 root other 1 Apr 7 09:01 orcallator.pid Copy these from the clients to the host doing the graphing e. g. via rsync. > When I run Orca I get the following: > > /opt/csw/bin/orca -v /opt/csw/etc/orca_services.cfg Are you collecting data for services? If you run orcallator.se you must run /opt/csw/bin/orca -v /opt/csw/etc/orcallator.cfg to generate the graphs for the collected data. > Updating PNGs. > Sleeping at Mon Apr 6 22:07:31 2009 until Mon Apr 6 22:07:32 2009. > Current running time is 5:34 minutes. > Loading new data from group orca_services for sysa. > Updating PNGs. > Sleeping at Mon Apr 6 22:07:33 2009 until Mon Apr 6 22:13:01 2009. > ^CCurrent running time is 11:02 minutes. > /opt/csw/bin/orca: caught signal INT. > > At this point the web page contains the headers and trailers plus > the table(s) with the two servers but no graphs. Do not stop the process, start it in background and make sure the data from the collection hosts is transferred regularly to /var/opt/csw/ orca/orcallator. Then the webpages should be updated. > Unless you have a magic bullet I'm ready to throw in the towel. > > If I had any obligation to test CSW packages, I feel that I've > proven that it's beyond me. I invested a couple of weeks trying but > don't really have anything to show for it. Thank you very much for your commitment. I apologize for not having enough time to build a proper releasable package of Orca right now. My day is currently stuffed with private things and work-related stuff and the little remaining spare time is needed for work on the build system itself. Best regards -- Dago -------------- next part -------------- An HTML attachment was scrubbed... URL: From idogan23 at users.sourceforge.net Tue Apr 7 14:48:15 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Tue, 07 Apr 2009 12:48:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4215] csw/mgar/pkg/rrdtool/trunk Message-ID: Revision: 4215 http://gar.svn.sourceforge.net/gar/?rev=4215&view=rev Author: idogan23 Date: 2009-04-07 12:48:14 +0000 (Tue, 07 Apr 2009) Log Message: ----------- rrdtool: update to 1.3.7 Modified Paths: -------------- csw/mgar/pkg/rrdtool/trunk/Makefile csw/mgar/pkg/rrdtool/trunk/checksums Modified: csw/mgar/pkg/rrdtool/trunk/Makefile =================================================================== --- csw/mgar/pkg/rrdtool/trunk/Makefile 2009-04-07 05:23:56 UTC (rev 4214) +++ csw/mgar/pkg/rrdtool/trunk/Makefile 2009-04-07 12:48:14 UTC (rev 4215) @@ -1,5 +1,5 @@ GARNAME = rrdtool -GARVERSION = 1.3.6 +GARVERSION = 1.3.7 CATEGORIES = utils DESCRIPTION = time-series data logging and graphing. Modified: csw/mgar/pkg/rrdtool/trunk/checksums =================================================================== --- csw/mgar/pkg/rrdtool/trunk/checksums 2009-04-07 05:23:56 UTC (rev 4214) +++ csw/mgar/pkg/rrdtool/trunk/checksums 2009-04-07 12:48:14 UTC (rev 4215) @@ -1,3 +1,3 @@ -afaabd5a60115581e866efbac796d307 download/rrdtool-1.3.6.tar.gz +e2e0da2a83e58ba2fcefba932a3cbb72 download/rrdtool-1.3.7.tar.gz 48a9b258cf8b4b943dbaf30ea939c315 download/CSWrrdtool.gspec 1c2f1efd982f4f4a1c9d5abd1f8b6501 download/fixme.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 7 15:25:57 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 07 Apr 2009 13:25:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4216] csw/mgar/pkg/cpan/perl-ldap/trunk Message-ID: Revision: 4216 http://gar.svn.sourceforge.net/gar/?rev=4216&view=rev Author: bonivart Date: 2009-04-07 13:25:57 +0000 (Tue, 07 Apr 2009) Log Message: ----------- perl-ldap: update to 0.39 Modified Paths: -------------- csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile csw/mgar/pkg/cpan/perl-ldap/trunk/checksums Added Paths: ----------- csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING Removed Paths: ------------- csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec Property Changed: ---------------- csw/mgar/pkg/cpan/perl-ldap/trunk/ Property changes on: csw/mgar/pkg/cpan/perl-ldap/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,5 +1,5 @@ GARNAME = perl-ldap -GARVERSION = 0.34 +GARVERSION = 0.39 CATEGORIES = cpan AUTHOR = GBARR @@ -10,12 +10,21 @@ maintenance functions such as adding, deleting or modifying entries. endef -DISTFILES += CSWpmldap.gspec CSWpmldap.depend +DISTFILES = COPYING +PACKAGES = CSWpmldap +CATALOGNAME = pm_ldap +ARCHALL = 1 + +REQUIRED_PKGS = CSWpmxmlsax CSWpmauthensasl CSWpmiosocketssl CSWpmuri CSWpmconvertasn1 CSWpmmimebase64 + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + DEPENDS += cpan/Convert-ASN1 cpan/IO-Socket-SSL DEPENDS += cpan/Authen-SASL cpan/XML-SAX # Module version numbers defeat Sort::Versions -MANUAL_UPDATE = 1 +#MANUAL_UPDATE = 1 include gar/category.mk Modified: csw/mgar/pkg/cpan/perl-ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/checksums 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/checksums 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,3 +1,2 @@ -3f89b099591e33b3f040adba367c56ff download/CSWpmldap.gspec -a857be6cb94009be59ef97db547d91f7 download/CSWpmldap.depend -398689b0a7b1615075a6b5035f6e3e91 download/perl-ldap-0.34.tar.gz +4d6588c2fa0d38ae162f6314d201d89e download/COPYING +0c31097aa22672a2831a7542250d1b55 download/perl-ldap-0.39.tar.gz Added: csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING (rev 0) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING 2009-04-07 13:25:57 UTC (rev 4216) @@ -0,0 +1,3 @@ +Copyright (c) 1997-2004 Graham Barr. All rights reserved. +This package is free software; you can redistribute it and/or +modify it under the same terms as Perl itself. Deleted: csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,4 +0,0 @@ -P CSWpmauthensasl pm_authensasl - SASL Authentication framework -P CSWpmconvertasn1 pm_convertasn1 - ASN.1 Encode/Decode library -P CSWpmiosocketssl pm_iosocketssl - nearly transparent SSL encapsulation for IO::Socket::INET. -P CSWpmxmlsax pm_xmlsax - Simple API for XML Deleted: csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,7 +0,0 @@ -%var bitname pm_ldap -%var pkgname CSWpmldap -%include url file://%{PKGLIB}/csw_cpan.gspec -%copyright -Copyright (c) 1997-2004 Graham Barr. All rights reserved. -This package is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Tue Apr 7 16:42:23 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Tue, 07 Apr 2009 14:42:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4217] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4217 http://gar.svn.sourceforge.net/gar/?rev=4217&view=rev Author: chninkel Date: 2009-04-07 14:42:01 +0000 (Tue, 07 Apr 2009) Log Message: ----------- cadaver: fixed catalog name Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/Makefile csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/Makefile =================================================================== --- csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-07 13:25:57 UTC (rev 4216) +++ csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-07 14:42:01 UTC (rev 4217) @@ -23,6 +23,7 @@ endef PACKAGES = CSWcadav +CATALOGNAME_CSWcadav = cadaver REQUIRED_PKGS = CSWggettextrt CSWiconv CSWneon CSWosslrt CSWreadline CSWzlib CSWgcrypt CSWgnutls CSWgpgerr Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-07 13:25:57 UTC (rev 4216) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-07 14:42:01 UTC (rev 4217) @@ -1,3 +1,3 @@ 5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -9deb0d89879fd18151fdd8a5472f194d download/changelog.CSW +0db916e7303fe1fac02ba69acbd41ce9 download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-07 13:25:57 UTC (rev 4216) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-07 14:42:01 UTC (rev 4217) @@ -1,4 +1,4 @@ -cadaver (0.23.2,REV=2009.04.04) unstable +cadaver (0.23.2,REV=2009.04.07) unstable * New upstream version. * Dropped destdir.patch as DESTDIR support has been added upstream. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Tue Apr 7 17:20:39 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 07 Apr 2009 15:20:39 +0000 Subject: [csw-devel] SF.net SVN: gar:[4218] csw/mgar/pkg/mcabber/trunk/Makefile Message-ID: Revision: 4218 http://gar.svn.sourceforge.net/gar/?rev=4218&view=rev Author: skayser Date: 2009-04-07 15:20:38 +0000 (Tue, 07 Apr 2009) Log Message: ----------- mcabber: build against ncursesw, add samplerc / changelog to pkg Modified Paths: -------------- csw/mgar/pkg/mcabber/trunk/Makefile Modified: csw/mgar/pkg/mcabber/trunk/Makefile =================================================================== --- csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-07 14:42:01 UTC (rev 4217) +++ csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-07 15:20:38 UTC (rev 4218) @@ -16,6 +16,10 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +PREREQUISITE_PKGS = CSWncurses CSWossldevel CSWotrdevel +PREREQUISITE_PKGS += CSWaspell CSWggettext CSWglib2devel CSWpkgconfig +PREREQUISITE_PKGS += CSWgpgerr CSWgpgme CSWiconv + REQUIRED_PKGS = CSWncurses CSWosslrt CSWotr REQUIRED_PKGS += CSWaspell CSWggettextrt CSWglib2 REQUIRED_PKGS += CSWgpgerr CSWgpgme CSWiconv @@ -26,6 +30,7 @@ CONFIGURE_ARGS += --with-openssl=/opt/csw/lib CONFIGURE_ARGS += --enable-otr CONFIGURE_ARGS += --enable-aspell +CONFIGURE_ARGS += --enable-sigwinch # mcabber is geared towards gcc and heavily uses inline functions without # static/extern storage qualifiers. Sun Studio needs to emulate gcc @@ -35,8 +40,8 @@ # EXTRA_CFLAGS = -features=no%extinl -EXTRA_LDFLAGS = -lsocket -EXTRA_INC = /opt/csw/lib/ncurses +EXTRA_LDFLAGS = -lsocket -lnsl +EXTRA_INC = /opt/csw/lib/ncursesw # Get rid of inline functions which are referenced externally (no%extinl # makes inline functions static and would break linking otherwise) @@ -53,10 +58,13 @@ $(WORKSRC)/Makefile \ $(WORKSRC)/src/Makefile \ $(WORKSRC)/libjabber/Makefile + @$(MAKECOOKIE) post-install-modulated: @perl -pi -e '\ s|/usr/share/ssl/certs/ca-bundle.crt|/opt/csw/ssl/certs/ca-certificates.crt|;' \ $(WORKSRC)/mcabberrc.example - @ginstall -d $(DESTDIR)$(docdir)$(GARNAME) - @cp $(WORKSRC)/mcabberrc.example $(DESTDIR)$(docdir)$(GARNAME) + @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) + @cp $(WORKSRC)/mcabberrc.example $(DESTDIR)$(docdir)/$(GARNAME) + @cp $(WORKSRC)/ChangeLog $(DESTDIR)$(docdir)/$(GARNAME)/changelog + @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 7 21:49:04 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 07 Apr 2009 19:49:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4219] csw/mgar/pkg/sysstat/trunk Message-ID: Revision: 4219 http://gar.svn.sourceforge.net/gar/?rev=4219&view=rev Author: dmichelsen Date: 2009-04-07 19:49:04 +0000 (Tue, 07 Apr 2009) Log Message: ----------- sysstat: Update to 20090405 Modified Paths: -------------- csw/mgar/pkg/sysstat/trunk/Makefile csw/mgar/pkg/sysstat/trunk/checksums Property Changed: ---------------- csw/mgar/pkg/sysstat/trunk/ Property changes on: csw/mgar/pkg/sysstat/trunk ___________________________________________________________________ Added: svn:ignore + work download cookies Modified: csw/mgar/pkg/sysstat/trunk/Makefile =================================================================== --- csw/mgar/pkg/sysstat/trunk/Makefile 2009-04-07 15:20:38 UTC (rev 4218) +++ csw/mgar/pkg/sysstat/trunk/Makefile 2009-04-07 19:49:04 UTC (rev 4219) @@ -1,5 +1,5 @@ GARNAME = sysstat -GARVERSION = 20090218 +GARVERSION = 20090405 CATEGORIES = utils DESCRIPTION = Key system statistics at a glance Modified: csw/mgar/pkg/sysstat/trunk/checksums =================================================================== --- csw/mgar/pkg/sysstat/trunk/checksums 2009-04-07 15:20:38 UTC (rev 4218) +++ csw/mgar/pkg/sysstat/trunk/checksums 2009-04-07 19:49:04 UTC (rev 4219) @@ -1,2 +1,2 @@ -cb48048e5b6eee430017ce8591a71d65 download/sysstat-20090218.tgz +847e0101576ae2a73a09c2b4af3da8f1 download/sysstat-20090405.tgz 7a7f0f67bb68484b56375d4a922fb63f download/patch-onlyisaexec-sysstatd.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Tue Apr 7 22:42:11 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Tue, 07 Apr 2009 20:42:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4220] csw/mgar/pkg/bash_completion/trunk Message-ID: Revision: 4220 http://gar.svn.sourceforge.net/gar/?rev=4220&view=rev Author: chninkel Date: 2009-04-07 20:42:11 +0000 (Tue, 07 Apr 2009) Log Message: ----------- bash_completion: added completion for pkgutil Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/checksums csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW Added Paths: ----------- csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion Modified: csw/mgar/pkg/bash_completion/trunk/checksums =================================================================== --- csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-07 19:49:04 UTC (rev 4219) +++ csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-07 20:42:11 UTC (rev 4220) @@ -1,7 +1,8 @@ cd1c5648272917fbe0eef4ba30bb93f4 download/bash-completion-1.0.tar.gz -2acb33dad8ee4ea46b02f2cd86ced5e1 download/pkg-get.completion -0fcc270cda377374a9637d24c8b689b3 download/pkgadd.completion -7d304567cc880dd42e8ea277c991017f download/pkgrm.completion -cc213a6d8dd2d484f2bce4f7905437f8 download/smf.completion -1745e51815578a18384ff36a449e0002 download/changelog.CSW +5bc234f6060561c564a20d2a9cc552c1 download/pkg-get.completion +af7a63477c6e81ed5b08f195e153091e download/pkgadd.completion +1389a7771e34fc54fe993d442cce1524 download/pkgrm.completion +f922762210a6f208695c328c040ac90d download/pkgutil.completion +52bd6948f5cc1548c3791a969da0e5e2 download/smf.completion +a413f5d9346c32ef22093b55956bd268 download/changelog.CSW d0c0d867babf351bca9ee97e03be550d download/opencsw_paths.patch Modified: csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW 2009-04-07 19:49:04 UTC (rev 4219) +++ csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW 2009-04-07 20:42:11 UTC (rev 4220) @@ -1,6 +1,7 @@ -bash_completion (1.0,REV=2009.04.05) +bash_completion (1.0,REV=2009.04.07) * New upstream version. + * Added completion code for pkgutil. * Switched to gar v2. - -- Yann Rouillard Sun, 05 Apr 2009 15:32:52 +0200 + -- Yann Rouillard Sun, 07 Apr 2009 15:32:52 +0200 Added: csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion (rev 0) +++ csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion 2009-04-07 20:42:11 UTC (rev 4220) @@ -0,0 +1,62 @@ +# +# Copyright 2006 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This code is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +# +# pkgutil.completion - bash completion for pkgutil +# + +have pkgutil && +_pkgutil() +{ + local cur prev file catalog_file url command + local catalog_file="/var/opt/csw/pkgutil/catalog.`uname -p`.`uname -r`" + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + i=${#COMP_WORDS[*]} + while [[ $i -gt 1 ]]; do + i=$((i-1)) + if [[ "${COMP_WORDS[$i]}" = @(-t|--temp) ]]; then + url="${COMP_WORDS[$((i+1))]}" + fi + if [[ "${COMP_WORDS[$i]}" == @(-i|--install|-u|--upgrade|-r|--remove|-d|--download|-a|--available|-c|--compare|-U|--catalog|-S|--stream) ]]; then + command="${COMP_WORDS[$i]}" + fi + done + + if [[ -n "$command" ]]; then + if [[ -f $catalog_file ]]; then + if [[ "$command" == @(--download|-d|--install|-i|--upgrade|-u|s|--stream) ]]; then + local packages_list=$(awk ' $0 ~ /BEGIN PGP SIGNATURE/ { exit } $1 ~ /^Hash:/ || $1 ~ /^ *(-|#|$)/ { next } { print $1 }' $catalog_file) + COMPREPLY=( $(compgen -W "${packages_list}" -- ${cur}) ) + elif [[ "$command" == @(-r|--remove) ]]; then + local packages_list=$(pkginfo | awk ' $2 ~ /^CSW/ { printf ("%s|",$2) }') + packages_list=${packages_list%|} + packages_list=$(nawk " \$3 ~ /^$packages_list\$/ { print \$1 }" $catalog_file) + COMPREPLY=( $(compgen -W "${packages_list}" -- ${cur}) ) + fi + fi + return 0 + fi + + if [[ "$prev" = @(-W|--workdir) ]]; then + COMPREPLY=( $(compgen -d -- ${cur}) ) + return 0 + fi + + if [[ "$prev" = @(-o|--output) ]]; then + COMPREPLY=( $(compgen -f -- ${cur}) ) + return 0 + fi + + local commands="-i --install -u --upgrade -r --remove -d --download -a --available -c --compare -U --catalog -e --email -t --temp=site -s --stream -T --target -o --output -x --exclude -W --workdir -y --yes -n --nomod -D --debug -h --help -v --version -V --syscheck" + COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) + return 0 +} && +complete -F _pkgutil pkgutil Property changes on: csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 00:48:42 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Tue, 07 Apr 2009 22:48:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4221] csw/mgar/pkg/libgda Message-ID: Revision: 4221 http://gar.svn.sourceforge.net/gar/?rev=4221&view=rev Author: hson Date: 2009-04-07 22:48:42 +0000 (Tue, 07 Apr 2009) Log Message: ----------- libgda: Add intermediate level Makefile, fix for __FUNCTION__ Modified Paths: -------------- csw/mgar/pkg/libgda/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/libgda/Makefile Added: csw/mgar/pkg/libgda/Makefile =================================================================== --- csw/mgar/pkg/libgda/Makefile (rev 0) +++ csw/mgar/pkg/libgda/Makefile 2009-04-07 22:48:42 UTC (rev 4221) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Modified: csw/mgar/pkg/libgda/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgda/trunk/Makefile 2009-04-07 20:42:11 UTC (rev 4220) +++ csw/mgar/pkg/libgda/trunk/Makefile 2009-04-07 22:48:42 UTC (rev 4221) @@ -16,16 +16,20 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 DISTNAME = $(GARNAME)-$(GARVERSION) -#REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk -#REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender -#REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib +REQUIRED_PKGS += CSWggettextrt CSWglib2 CSWiconv CSWlibxml2 CSWlibxslt +REQUIRED_PKGS += CSWncurses CSWreadline CSWzlib # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 +CFLAGS += -D__FUNCTION__=__func__ +CXXFLAGS += -D__FUNCTION__=__func__ + CONFIGURE_ARGS = $(DIRPATHS) -#TEST_TARGET = +# One test fail for some reason... +#TEST_TARGET = check +TEST_TARGET = include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 01:44:44 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Tue, 07 Apr 2009 23:44:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4222] csw/mgar/pkg/libgnomedb/Makefile Message-ID: Revision: 4222 http://gar.svn.sourceforge.net/gar/?rev=4222&view=rev Author: hson Date: 2009-04-07 23:44:44 +0000 (Tue, 07 Apr 2009) Log Message: ----------- libgnomedb: Add intermediate Makefile Added Paths: ----------- csw/mgar/pkg/libgnomedb/Makefile Added: csw/mgar/pkg/libgnomedb/Makefile =================================================================== --- csw/mgar/pkg/libgnomedb/Makefile (rev 0) +++ csw/mgar/pkg/libgnomedb/Makefile 2009-04-07 23:44:44 UTC (rev 4222) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 8 02:21:29 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 08 Apr 2009 00:21:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4223] csw/mgar/pkg/mysql5/trunk/Makefile Message-ID: Revision: 4223 http://gar.svn.sourceforge.net/gar/?rev=4223&view=rev Author: bdwalton Date: 2009-04-08 00:21:29 +0000 (Wed, 08 Apr 2009) Log Message: ----------- Builds completely. RPATH set appropriately (accounting for modified prefix). Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-07 23:44:44 UTC (rev 4222) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-08 00:21:29 UTC (rev 4223) @@ -2,6 +2,8 @@ GARVERSION = 5.1.32 CATEGORIES = server +GARCOMPILER = GCC4 + DESCRIPTION = Multithreaded SQL database define BLURB MySQL is a very fast, multi-threaded, multi-user and robust SQL @@ -18,23 +20,25 @@ # Change prefix to /opt/csw/mysql5 prefix = /opt/csw/mysql5 +WORKSRC = $(WORKDIR)/mysql-$(GARVERSION) + +EXTRA_LD_OPTIONS = -R/opt/csw/lib/\$$ISALIST + # Set ./configure options CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-assembler -CONFIGURE_ARGS += --without-docs -CONFIGURE_ARGS += --enable-thread-safe-client -CONFIGURE_ARGS += --with-named-z-libs=yes -CONFIGURE_ARGS += --with-berkeley-db -CONFIGURE_ARGS += --with-innodb -CONFIGURE_ARGS += --enable-local-infile -CONFIGURE_ARGS += --with-extra-charsets=all +CONFIGURE_ARGS += --without-docs +CONFIGURE_ARGS += --enable-local-infile +CONFIGURE_ARGS += --with-extra-charsets=all CONFIGURE_ARGS += --with-low-memory +CONFIGURE_ARGS += --with-pthread +CONFIGURE_ARGS += --with-readline +CONFIGURE_ARGS += --with-zlib-dir=/opt/csw +CONFIGURE_ARGS += --with-ssl=/opt/csw +CONFIGURE_ARGS += --with-plugins=max-no-ndb # Enable 64 bits build # BUILD64 = 1 include gar/category.mk -post-extract: - @for i in $(WORKROOTDIR)/build-isa* ; do mv $$i/mysql-$(GARVERSION) $$i/$(GARNAME)-$(GARVERSION) ; done - @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 02:34:16 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 00:34:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4224] csw/mgar/pkg/mcabber/trunk Message-ID: Revision: 4224 http://gar.svn.sourceforge.net/gar/?rev=4224&view=rev Author: skayser Date: 2009-04-08 00:34:16 +0000 (Wed, 08 Apr 2009) Log Message: ----------- mcabber: fixed build issues on Solaris 10 Modified Paths: -------------- csw/mgar/pkg/mcabber/trunk/checksums csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff Modified: csw/mgar/pkg/mcabber/trunk/checksums =================================================================== --- csw/mgar/pkg/mcabber/trunk/checksums 2009-04-08 00:21:29 UTC (rev 4223) +++ csw/mgar/pkg/mcabber/trunk/checksums 2009-04-08 00:34:16 UTC (rev 4224) @@ -1,3 +1,3 @@ 189fb9d23f5a8412bc660884528475ea download/mcabber-0.9.9.tar.bz2 a7ceb9f017c2c9267e2264aa626b7a4e download/patch-inline.diff -cff6d32fef59fc10806534025dc53f7e download/patch-iswblank.diff +73e2ae212a072d753942ff24c806ba5d download/patch-iswblank.diff Modified: csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff =================================================================== --- csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff 2009-04-08 00:21:29 UTC (rev 4223) +++ csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff 2009-04-08 00:34:16 UTC (rev 4224) @@ -1,13 +1,22 @@ ---- mcabber-0.9.9.orig/src/screen.h 2008-10-09 22:17:52.000000000 +0200 -+++ mcabber-0.9.9/src/screen.h 2009-03-08 16:31:44.043214331 +0100 -@@ -20,6 +20,10 @@ - //static void spellcheck(char*, char*); - #endif +diff --speed-large-files --minimal -Nru mcabber-0.9.9.orig/src/utf8.h mcabber-0.9.9/src/utf8.h +--- mcabber-0.9.9.orig/src/utf8.h 2008-10-09 22:17:52.000000000 +0200 ++++ mcabber-0.9.9/src/utf8.h 2009-04-03 17:57:44.524993893 +0200 +@@ -17,6 +17,18 @@ -+#ifndef HAVE_ISWBLANK -+#define iswblank(wc) iswctype(wc, wctype("blank")) -+#endif + #ifdef HAVE_WCTYPE_H + # include + - #include "hbuf.h" - #include "logprint.h" - ++/* The following bit is a hack for Solaris 8&9 systems that don't have ++ * iswblank(). HAVE_ISWBLANK is not set by the mcabber build system so ++ * this always gets included, even on Solaris 10 systems where iswblank() ++ * is present. ++ * For now i made sure it comes after wctype.h so it doesn't create ++ * problems (wctype.h has calls to iswblank() before wctype() is declared). ++ */ ++# ifndef HAVE_ISWBLANK ++# define iswblank(wc) iswctype(wc, wctype("blank")) ++# endif ++ + #else + # define iswblank(c) (c == ' ') + # define iswalnum(c) isalnum(c) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 14:56:18 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 12:56:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4225] csw/mgar/pkg/xterm/trunk Message-ID: Revision: 4225 http://gar.svn.sourceforge.net/gar/?rev=4225&view=rev Author: skayser Date: 2009-04-08 12:56:18 +0000 (Wed, 08 Apr 2009) Log Message: ----------- xterm: added fix for ACS chars in UTF-8 mode, added README.CSW Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/Makefile csw/mgar/pkg/xterm/trunk/checksums Added Paths: ----------- csw/mgar/pkg/xterm/trunk/files/README.CSW csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff Modified: csw/mgar/pkg/xterm/trunk/Makefile =================================================================== --- csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 00:34:16 UTC (rev 4224) +++ csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 12:56:18 UTC (rev 4225) @@ -16,6 +16,10 @@ REQUIRED_PKGS = CSWfconfig CSWlibxft2 +# enable -mk_width per default to address unicode form character width woes, +# can be taken out once upstream enhances wcwidth() sanity checking +# http://article.gmane.org/gmane.comp.lib.ncurses.bugs/3795 +PATCHFILES = patch-mkwidth.diff # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tgz @@ -47,3 +51,8 @@ EXTRA_INC = $(includedir)/freetype2 include gar/category.mk + +post-install-modulated: + @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) + @cp $(FILEDIR)/README.CSW $(DESTDIR)$(docdir)/$(GARNAME) + @$(MAKECOOKIE) Modified: csw/mgar/pkg/xterm/trunk/checksums =================================================================== --- csw/mgar/pkg/xterm/trunk/checksums 2009-04-08 00:34:16 UTC (rev 4224) +++ csw/mgar/pkg/xterm/trunk/checksums 2009-04-08 12:56:18 UTC (rev 4225) @@ -1 +1,2 @@ be25d2d3661d0bb77fc66e1bcbb3caba download/xterm-243.tgz +347f24b7ed3e42a3d40b1db1ed0061f0 download/patch-mkwidth.diff Added: csw/mgar/pkg/xterm/trunk/files/README.CSW =================================================================== --- csw/mgar/pkg/xterm/trunk/files/README.CSW (rev 0) +++ csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-08 12:56:18 UTC (rev 4225) @@ -0,0 +1,22 @@ +Note: app-defaults in /opt/csw/lib/X11/app-defaults +--------------------------------------------------- + +Although this package delivers some x resource files in +/opt/csw/lib/X11/app-defaults/ this folder is not evaluated by the +Solaris libXt per default. + +Either treat them as example files and copy and paste what you need into +your system / personal x resource files or set XFILESEARCHPATH / +XUSERFILESEARCHPATH to honor this directory. + + http://www.faqs.org/faqs/x-faq/part2/section-22.html + + +Note: mkWidth/-mk_width activated per default +--------------------------------------------- + +This xterm has been adjusted to set the mkWidth resource to true per +default (xterm command line argument -mk_width), which works around some +bugs with box drawing characters and Solaris locales. In case you want +to restore the default behaviour, either start xterm with +mk_width or +set the mkWidth resource to false. Added: csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff =================================================================== --- csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff (rev 0) +++ csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff 2009-04-08 12:56:18 UTC (rev 4225) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru xterm-243.orig/charproc.c xterm-243/charproc.c +--- xterm-243.orig/charproc.c 2009-03-29 01:23:12.000000000 +0100 ++++ xterm-243/charproc.c 2009-04-08 14:09:42.224460743 +0200 +@@ -662,7 +662,7 @@ + + #if OPT_WIDE_CHARS + Bres(XtNcjkWidth, XtCCjkWidth, misc.cjk_width, False), +- Bres(XtNmkWidth, XtCMkWidth, misc.mk_width, False), ++ Bres(XtNmkWidth, XtCMkWidth, misc.mk_width, True), + Bres(XtNutf8Latin1, XtCUtf8Latin1, screen.utf8_latin1, False), + Bres(XtNutf8Title, XtCUtf8Title, screen.utf8_title, False), + Bres(XtNvt100Graphics, XtCVT100Graphics, screen.vt100_graphics, True), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 15:26:11 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 13:26:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4226] csw/mgar/pkg/xterm/trunk/Makefile Message-ID: Revision: 4226 http://gar.svn.sourceforge.net/gar/?rev=4226&view=rev Author: skayser Date: 2009-04-08 13:26:11 +0000 (Wed, 08 Apr 2009) Log Message: ----------- xterm: fix double /opt/csw/lib entry in R*PATH Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/Makefile Modified: csw/mgar/pkg/xterm/trunk/Makefile =================================================================== --- csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 12:56:18 UTC (rev 4225) +++ csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 13:26:11 UTC (rev 4226) @@ -52,6 +52,12 @@ include gar/category.mk +# Hack for now to address the double /opt/csw/lib in $R*PATH. One comes +# from LD_OPTIONS and this one from pkg-config i suppose. +pre-build-modulated: + @perl -pi -e 's|-R/opt/csw/lib ||' $(WORKSRC)/Makefile + @$(MAKECOOKIE) + post-install-modulated: @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) @cp $(FILEDIR)/README.CSW $(DESTDIR)$(docdir)/$(GARNAME) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 15:38:19 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 13:38:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4227] csw/mgar/pkg/xterm/trunk/files/README.CSW Message-ID: Revision: 4227 http://gar.svn.sourceforge.net/gar/?rev=4227&view=rev Author: skayser Date: 2009-04-08 13:38:19 +0000 (Wed, 08 Apr 2009) Log Message: ----------- xterm: added note about TERM handling WRT to vanilla Solaris xterm Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/files/README.CSW Modified: csw/mgar/pkg/xterm/trunk/files/README.CSW =================================================================== --- csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-08 13:26:11 UTC (rev 4226) +++ csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-08 13:38:19 UTC (rev 4227) @@ -1,3 +1,16 @@ +$TERM, ncurses and how to make xterm display colors +--------------------------------------------------- + +The xterm distributed with Solaris is a basic xterm (xterm-r6), whereas this +is a current xterm and supports a wider range of terminal capabilites. +To keep CSWncurses compatible with the Solaris xterm, TERM=xterm refers +to the basic xterm-r6 capabilities, which unfortunately also defeats +color support in some ncurses-based applications. + +To make full use of the capabilities of this xterm (including color-support) +set TERM=xterm-new. + + Note: app-defaults in /opt/csw/lib/X11/app-defaults --------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 8 16:09:54 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 08 Apr 2009 14:09:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4228] csw/mgar/pkg/pkgutil/trunk Message-ID: Revision: 4228 http://gar.svn.sourceforge.net/gar/?rev=4228&view=rev Author: bonivart Date: 2009-04-08 14:09:53 +0000 (Wed, 08 Apr 2009) Log Message: ----------- pkgutil: update to 1.5 Modified Paths: -------------- csw/mgar/pkg/pkgutil/trunk/Makefile csw/mgar/pkg/pkgutil/trunk/checksums Modified: csw/mgar/pkg/pkgutil/trunk/Makefile =================================================================== --- csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-08 13:38:19 UTC (rev 4227) +++ csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-08 14:09:53 UTC (rev 4228) @@ -1,5 +1,5 @@ GARNAME = pkgutil -GARVERSION = 1.5b4 +GARVERSION = 1.5 CATEGORIES = utils DESCRIPTION = Installs Solaris packages easily Modified: csw/mgar/pkg/pkgutil/trunk/checksums =================================================================== --- csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-08 13:38:19 UTC (rev 4227) +++ csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-08 14:09:53 UTC (rev 4228) @@ -1,4 +1,4 @@ -f4771b87ddaa176ebe0c5bbd31414e2c download/pkgutil-1.5b4.zip +97349a661c6f779e33621b73b738925e download/pkgutil-1.5.zip 805cd30ad9f21cb1167d166fa99b5891 download/CSWpkgutil.gspec 54bd1af1cd6ca5ac7e63586ffc16842d download/CSWpkgutil.prototype e1407c24d47306dbc4cea22dcb291f1d download/CSWpkgutil.postinstall This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 16:39:27 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Wed, 08 Apr 2009 14:39:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4229] csw/mgar/pkg/htmldoc/trunk/Makefile Message-ID: Revision: 4229 http://gar.svn.sourceforge.net/gar/?rev=4229&view=rev Author: hson Date: 2009-04-08 14:39:27 +0000 (Wed, 08 Apr 2009) Log Message: ----------- htmldoc: Split package in two Modified Paths: -------------- csw/mgar/pkg/htmldoc/trunk/Makefile Modified: csw/mgar/pkg/htmldoc/trunk/Makefile =================================================================== --- csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-08 14:09:53 UTC (rev 4228) +++ csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-08 14:39:27 UTC (rev 4229) @@ -4,19 +4,33 @@ DESCRIPTION = converts HTML files and web pages into indexed HTML PostScript and PDF define BLURB - HTMLDOC converts Hyper-Text Markup Language ("HTML") files and web pages into - indexed HTML, Adobe\xAE PostScript\xAE, or Adobe Portable Document Format ("PDF") - files. + HTMLDOC is a program for writing documentation in HTML and producing indexed + HTML, PostScript, or PDF output (with tables of contents). It supports most + HTML 3.2 and some HTML 4.0 syntax, as well as GIF, JPEG, and PNG images. endef +PACKAGES = CSWhtmldoc-common CSWhtmldoc +CATALOGNAME_CSWhtmldoc = $(GARNAME) +CATALOGNAME_CSWhtmldoc-common = $(GARNAME)_common +SPKG_DESC_CSWhtmldoc = $(DESCRIPTION) +SPKG_DESC_CSWhtmldoc-common = This package contains the htmldoc files common to all architectures. +ARCHALL_CSWhtmldoc-common = 1 + +REQUIRED_PKGS_CSWhtmldoc = CSWfltk CSWjpeg CSWosslrt CSWpng CSWzlib +REQUIRED_PKGS_CSWhtmldoc += CSWhtmldoc-common +#REQUIRED_PKGS_CSWhtmldoc-common = + +PKGFILES_CSWhtmldoc = $(bindir)/.* +PKGFILES_CSWhtmldoc-common = $(datadir)/.* + MASTER_SITES = http://ftp.easysw.com/pub/htmldoc/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION)-source.tar.bz2 +#DISTFILES += $(call admfiles,CSWhtmldoc, ) +#DISTFILES += $(call admfiles,CSWhtmldoc-common, ) -SPKG_SOURCEURL = http://www.htmldoc.org - LICENSE = COPYING.txt -REQUIRED_PKGS = CSWfltk CSWjpeg CSWosslrt CSWpng CSWzlib +SPKG_SOURCEURL = http://www.htmldoc.org # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*)-source.tar.bz2 @@ -31,4 +45,6 @@ TEST_SCRIPTS = +# Disable check until package is released +ENABLE_CHECK = 0 include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 8 22:12:00 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 08 Apr 2009 20:12:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4230] csw/mgar/pkg/pca/trunk Message-ID: Revision: 4230 http://gar.svn.sourceforge.net/gar/?rev=4230&view=rev Author: dmichelsen Date: 2009-04-08 20:12:00 +0000 (Wed, 08 Apr 2009) Log Message: ----------- pca: Update to 20090408-01 Modified Paths: -------------- csw/mgar/pkg/pca/trunk/Makefile csw/mgar/pkg/pca/trunk/checksums Modified: csw/mgar/pkg/pca/trunk/Makefile =================================================================== --- csw/mgar/pkg/pca/trunk/Makefile 2009-04-08 14:39:27 UTC (rev 4229) +++ csw/mgar/pkg/pca/trunk/Makefile 2009-04-08 20:12:00 UTC (rev 4230) @@ -1,5 +1,5 @@ GARNAME = pca -GARVERSION = 20090224-01 +GARVERSION = 20090408-01 CATEGORIES = utils DESCRIPTION = Patch Check Advanced Modified: csw/mgar/pkg/pca/trunk/checksums =================================================================== --- csw/mgar/pkg/pca/trunk/checksums 2009-04-08 14:39:27 UTC (rev 4229) +++ csw/mgar/pkg/pca/trunk/checksums 2009-04-08 20:12:00 UTC (rev 4230) @@ -1,3 +1,3 @@ -3de9a69abff821d3b103a660f161f119 download/pca-20090224-01 +9019de37bfb4d9e89930f922695cc788 download/pca-20090408-01 6f2f2376eba0a788795dd43d68ad32d1 download/COPYING 12de68ff8f67b4bb8b095e5646402208 download/pca.conf This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 8 22:55:24 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 08 Apr 2009 20:55:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4231] csw/mgar/pkg/libvorbis/trunk/Makefile Message-ID: Revision: 4231 http://gar.svn.sourceforge.net/gar/?rev=4231&view=rev Author: dmichelsen Date: 2009-04-08 20:55:24 +0000 (Wed, 08 Apr 2009) Log Message: ----------- libvorbis: Fix package name Modified Paths: -------------- csw/mgar/pkg/libvorbis/trunk/Makefile Modified: csw/mgar/pkg/libvorbis/trunk/Makefile =================================================================== --- csw/mgar/pkg/libvorbis/trunk/Makefile 2009-04-08 20:12:00 UTC (rev 4230) +++ csw/mgar/pkg/libvorbis/trunk/Makefile 2009-04-08 20:55:24 UTC (rev 4231) @@ -12,6 +12,8 @@ MASTER_SITES = http://downloads.xiph.org/releases/vorbis/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PACKAGES = CSWvorbis +CATALOGNAME = libvorbis REQUIRED_PKGS = CSWlibogg SPKG_SOURCEURL = http://www.vorbis.com/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 23:55:23 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Wed, 08 Apr 2009 21:55:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4232] csw/mgar/pkg/gnumeric/trunk Message-ID: Revision: 4232 http://gar.svn.sourceforge.net/gar/?rev=4232&view=rev Author: hson Date: 2009-04-08 21:55:22 +0000 (Wed, 08 Apr 2009) Log Message: ----------- gnumeric: Add patches required to compile Modified Paths: -------------- csw/mgar/pkg/gnumeric/trunk/Makefile csw/mgar/pkg/gnumeric/trunk/checksums Added Paths: ----------- csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff Removed Paths: ------------- csw/mgar/pkg/gnumeric/trunk/files/mainpatch Modified: csw/mgar/pkg/gnumeric/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-08 20:55:24 UTC (rev 4231) +++ csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-08 21:55:22 UTC (rev 4232) @@ -19,7 +19,8 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -#PATCHFILES = mainpatch +PATCHFILES = md5.h.diff +PATCHFILES += numtheory.c.diff CONFIGURE_ARGS = $(DIRPATHS) Modified: csw/mgar/pkg/gnumeric/trunk/checksums =================================================================== --- csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-08 20:55:24 UTC (rev 4231) +++ csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-08 21:55:22 UTC (rev 4232) @@ -1 +1,3 @@ 4bc2ca7b90e953934b086c931238fd04 download/gnumeric-1.9.5.tar.gz +883cdef1974db050cb0fd002a399d940 download/md5.h.diff +70046f2846c948a2740cfc9e4c331a50 download/numtheory.c.diff Deleted: csw/mgar/pkg/gnumeric/trunk/files/mainpatch =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-08 20:55:24 UTC (rev 4231) +++ csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-08 21:55:22 UTC (rev 4232) @@ -1,57 +0,0 @@ -diff -ru gnumeric-1.8.3.orig/plugins/excel/md5.h gnumeric-1.8.3/plugins/excel/md5.h ---- gnumeric-1.8.3.orig/plugins/excel/md5.h 2008-01-15 00:55:11.000000000 +0100 -+++ gnumeric-1.8.3/plugins/excel/md5.h 2009-03-17 00:23:02.110582251 +0100 -@@ -22,7 +22,11 @@ - #define _MD5_H 1 - - #include -+#ifdef __sun -+#include -+#else - #include -+#endif - - #define MD5_DIGEST_SIZE 16 - #define MD5_BLOCK_SIZE 64 -diff -ru gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c gnumeric-1.8.3/plugins/numtheory/numtheory.c ---- gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c 2008-01-15 00:55:10.000000000 +0100 -+++ gnumeric-1.8.3/plugins/numtheory/numtheory.c 2009-03-17 00:55:21.253509921 +0100 -@@ -33,7 +33,14 @@ - - #define OUT_OF_BOUNDS "#LIMIT!" - -+#ifdef __sun -+static inline double bit_max_fn(void) { -+ return MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); -+} -+#define bit_max (bit_max_fn()) -+#else - static const double bit_max = MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); -+#endif - - /* ------------------------------------------------------------------------- */ - -diff -ru gnumeric-1.8.3.orig/po/Makefile.in.in gnumeric-1.8.3/po/Makefile.in.in ---- gnumeric-1.8.3.orig/po/Makefile.in.in 2008-05-24 22:40:36.000000000 +0200 -+++ gnumeric-1.8.3/po/Makefile.in.in 2009-03-17 00:59:24.557217225 +0100 -@@ -69,7 +69,7 @@ - EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS - - POTFILES = \ -- -+# - CATALOGS = @CATALOGS@ - CATOBJEXT = @CATOBJEXT@ - -diff -ru gnumeric-1.8.3.orig/src/gnm-so-polygon.c gnumeric-1.8.3/src/gnm-so-polygon.c ---- gnumeric-1.8.3.orig/src/gnm-so-polygon.c 2008-01-15 00:54:39.000000000 +0100 -+++ gnumeric-1.8.3/src/gnm-so-polygon.c 2009-03-16 23:35:49.881228497 +0100 -@@ -223,7 +223,7 @@ - gnm_so_polygon_write_xml_sax (SheetObject const *so, GsfXMLOut *output) - { - /* TODO */ -- return gnm_so_polygon_parent_class->write_xml_sax (so, output); -+ gnm_so_polygon_parent_class->write_xml_sax (so, output); - } - - static void Added: csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff (rev 0) +++ csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff 2009-04-08 21:55:22 UTC (rev 4232) @@ -0,0 +1,15 @@ +diff -ru ../build-global/gnumeric-1.9.5/plugins/excel/md5.h gnumeric-1.9.5/plugins/excel/md5.h +--- ../build-global/gnumeric-1.9.5/plugins/excel/md5.h 2007-09-21 02:11:31.000000000 +0200 ++++ gnumeric-1.9.5/plugins/excel/md5.h 2009-04-07 08:29:55.235754017 +0200 +@@ -22,7 +22,11 @@ + #define _MD5_H 1 + + #include ++#ifdef __sun ++#include ++#else + #include ++#endif + + #define MD5_DIGEST_SIZE 16 + #define MD5_BLOCK_SIZE 64 Added: csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff (rev 0) +++ csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff 2009-04-08 21:55:22 UTC (rev 4232) @@ -0,0 +1,18 @@ +diff -ru ../build-global/gnumeric-1.9.5/plugins/numtheory/numtheory.c gnumeric-1.9.5/plugins/numtheory/numtheory.c +--- ../build-global/gnumeric-1.9.5/plugins/numtheory/numtheory.c 2009-03-02 03:05:42.000000000 +0100 ++++ gnumeric-1.9.5/plugins/numtheory/numtheory.c 2009-04-08 00:59:37.712247116 +0200 +@@ -38,7 +38,14 @@ + * represented in a gnm_float _and_ in a guint64. (For regular "double", + * the latter part is irrelevant.) + */ ++#ifdef __sun ++static inline double bit_max_fn(void) { ++ return MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); ++} ++#define bit_max (bit_max_fn()) ++#else + static const double bit_max = MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); ++#endif + + /* ------------------------------------------------------------------------- */ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 23:56:32 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Wed, 08 Apr 2009 21:56:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4233] csw/mgar/pkg Message-ID: Revision: 4233 http://gar.svn.sourceforge.net/gar/?rev=4233&view=rev Author: hson Date: 2009-04-08 21:56:32 +0000 (Wed, 08 Apr 2009) Log Message: ----------- scrollkeeper: Initial commit Added Paths: ----------- csw/mgar/pkg/scrollkeeper/ csw/mgar/pkg/scrollkeeper/Makefile csw/mgar/pkg/scrollkeeper/branches/ csw/mgar/pkg/scrollkeeper/tags/ csw/mgar/pkg/scrollkeeper/trunk/ csw/mgar/pkg/scrollkeeper/trunk/Makefile csw/mgar/pkg/scrollkeeper/trunk/files/ csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff Added: csw/mgar/pkg/scrollkeeper/Makefile =================================================================== --- csw/mgar/pkg/scrollkeeper/Makefile (rev 0) +++ csw/mgar/pkg/scrollkeeper/Makefile 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/scrollkeeper/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/scrollkeeper/trunk/Makefile =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/Makefile (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/Makefile 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,37 @@ +GARNAME = scrollkeeper +GARVERSION = 0.3.14 +CATEGORIES = utils + +DESCRIPTION = a cataloging system for documentation on open systems +define BLURB + ScrollKeeper is a cataloging system for documentation on open systems. It + manages documentation metadata (as specified by the Open Source Metadata + Framework(OMF)) and provides a simple API to allow help browsers to find, + sort, and search the document catalog. It will also be able to communicate + with catalog servers on the Net to search for documents which are not on the + local system. +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +SPKG_SOURCEURL = http://scrollkeeper.sourceforge.net/ + +LICENSE = COPYING + +REQUIRED_PKGS = CSWggettextrt CSWiconv CSWlibxml2 CSWlibxslt CSWzlib + +# We define upstream file regex so we can be notifed of new upstream software release +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=11543 +UPSTREAM_USE_SF = 1 +UFILES_REGEX = (\d+(?:\.\d+)*) + +PATCHFILES = Makefile.in.diff + +CONFIGURE_ARGS = $(DIRPATHS) + +TEST_SCRIPTS = + +include gar/category.mk + +localstatedir = /var/$(prefix) Added: csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,5 @@ +#!/bin/sh +PATH=/opt/csw/bin:$PATH;export PATH +if [ -x /opt/csw/bin/scrollkeeper-rebuilddb ]; then + /opt/csw/bin/scrollkeeper-rebuilddb -q -p /var/opt/csw/lib/scrollkeeper +fi Added: csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,6 @@ +#!/bin/sh +PATH=/opt/csw/bin:$PATH;export PATH +if [ -d /var/opt/csw/lib/scrollkeeper ]; then + rm -rf /var/opt/csw/lib/scrollkeeper + rm -f /var/opt/csw/log/scrollkeeper.log* +fi Property changes on: csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove ___________________________________________________________________ Added: svn:executable + * Added: csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,17 @@ +--- ../build-global/scrollkeeper-0.3.14/Makefile.in 2003-12-06 09:17:51.000000000 +0100 ++++ scrollkeeper-0.3.14/Makefile.in 2009-04-08 19:57:15.376155974 +0200 +@@ -673,10 +673,10 @@ + rm -rf $(DESTDIR)$(scrollkeeper_localstate_dir) + $(mkinstalldirs) $(DESTDIR)$(scrollkeeper_localstate_dir) + $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log +- PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ +- echo "`date +\"%b %d %X\"` Installing ScrollKeeper `scrollkeeper-config --version`..." >> $(DESTDIR)$(localstatedir)/log/scrollkeeper.log +- PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ +- $(DESTDIR)$(bindir)/scrollkeeper-rebuilddb -q -p $(DESTDIR)$(scrollkeeper_localstate_dir) ++# PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ ++# echo "`date +\"%b %d %X\"` Installing ScrollKeeper `scrollkeeper-config --version`..." >> $(DESTDIR)$(localstatedir)/log/scrollkeeper.log ++# PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ ++# $(DESTDIR)$(bindir)/scrollkeeper-rebuilddb -q -p $(DESTDIR)$(scrollkeeper_localstate_dir) + + # Remove generated files + uninstall-local: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 9 01:18:59 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 08 Apr 2009 23:18:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4234] csw/mgar/pkg/glib2/trunk/Makefile Message-ID: Revision: 4234 http://gar.svn.sourceforge.net/gar/?rev=4234&view=rev Author: harpchad Date: 2009-04-08 23:18:58 +0000 (Wed, 08 Apr 2009) Log Message: ----------- No longer dependant on CSWsunmath Modified Paths: -------------- csw/mgar/pkg/glib2/trunk/Makefile Modified: csw/mgar/pkg/glib2/trunk/Makefile =================================================================== --- csw/mgar/pkg/glib2/trunk/Makefile 2009-04-08 21:56:32 UTC (rev 4233) +++ csw/mgar/pkg/glib2/trunk/Makefile 2009-04-08 23:18:58 UTC (rev 4234) @@ -32,7 +32,7 @@ BUILD64 = 1 NO_ISAEXEC = 1 -REQUIRED_PKGS_CSWglib2 = CSWggettextrt CSWiconv CSWsunmath +REQUIRED_PKGS_CSWglib2 = CSWggettextrt CSWiconv REQUIRED_PKGS_CSWglib2devel = CSWglib2 CSWggettextrt CSWiconv TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 9 02:14:19 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Thu, 09 Apr 2009 00:14:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4235] csw/mgar/pkg/gvim/trunk Message-ID: Revision: 4235 http://gar.svn.sourceforge.net/gar/?rev=4235&view=rev Author: harpchad Date: 2009-04-09 00:14:19 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Bump to patchrev 148 Modified Paths: -------------- csw/mgar/pkg/gvim/trunk/Makefile csw/mgar/pkg/gvim/trunk/checksums Modified: csw/mgar/pkg/gvim/trunk/Makefile =================================================================== --- csw/mgar/pkg/gvim/trunk/Makefile 2009-04-08 23:18:58 UTC (rev 4234) +++ csw/mgar/pkg/gvim/trunk/Makefile 2009-04-09 00:14:19 UTC (rev 4235) @@ -1,6 +1,6 @@ GARNAME = vim DISTVERSION = 7.2 -PATCHREV = 128 +PATCHREV = 148 GARVERSION = $(DISTVERSION).$(PATCHREV) CATEGORIES = utils SPKG_SOURCEURL = http://www.vim.org/download.php @@ -48,7 +48,7 @@ REQUIRED_PKGS_CSWgvim = CSWvimrt CSWbonobo2 CSWfconfig CSWftype2 CSWgconf2 REQUIRED_PKGS_CSWgvim += CSWggettextrt CSWglib2 CSWgnomekeyring CSWgnomevfs2 CSWgtk2 REQUIRED_PKGS_CSWgvim += CSWiconv CSWlibart CSWlibatk CSWlibbonoboui CSWlibcairo -REQUIRED_PKGS_CSWgvim += CSWlibgnome CSWlibgnomecanvas CSWlibgnomeui CSWlibnet CSWlibpopt +REQUIRED_PKGS_CSWgvim += CSWlibgnome CSWlibgnomecanvas CSWlibgnomeui CSWlibpopt REQUIRED_PKGS_CSWgvim += CSWlibxml2 CSWlibxrender CSWncurses CSWorbit2 CSWpango REQUIRED_PKGS_CSWgvim += CSWperl CSWpng CSWzlib Modified: csw/mgar/pkg/gvim/trunk/checksums =================================================================== --- csw/mgar/pkg/gvim/trunk/checksums 2009-04-08 23:18:58 UTC (rev 4234) +++ csw/mgar/pkg/gvim/trunk/checksums 2009-04-09 00:14:19 UTC (rev 4235) @@ -131,4 +131,24 @@ b31534667bb741e21479b1e3757c9e21 download/7.2.126 71e87e78bea69d8876ff7f6d824c8986 download/7.2.127 21da01d371757282bfd402ddd91005ba download/7.2.128 +e890b630efa3847c8cdee2f197145b6c download/7.2.129 +d3fe3bf37d5c0940f3e751f41d92e817 download/7.2.130 +3c2aaa22914d06a65bf0f212e43c3ace download/7.2.131 +379aa718df5dbcde8215fc4d94062d9f download/7.2.132 +6d51f9deb4c2604692f532c118b73ef8 download/7.2.133 +4acae77b2a217e1cb47040c08e28180d download/7.2.134 +4d30bf2c9d2973f5dd1c12468123dc41 download/7.2.135 +f2ae8cc595933938ee608e040d1256a5 download/7.2.136 +c613c1e0fac319f05ffe1fa7e27d6600 download/7.2.137 +e7d02c3dea47fa579366bb1cd025ce5e download/7.2.138 +04f7131164b3f46d6365a8faea0e32c6 download/7.2.139 +e1c0e4fbd985f5a2e5a24a4cfab1112c download/7.2.140 +e5a9c7ef44a38057c0c5c1191d9cdf77 download/7.2.141 +f08f7f966749c2ef20ff87dfeb9bef62 download/7.2.142 +6b132dad3ad947662d1c370193a14218 download/7.2.143 +4e2a1d1cb12198a783759f88e6c64fc4 download/7.2.144 +38877e2ac720e45e5d62cd1089167db3 download/7.2.145 +cb97aca73a1f4fdd2fac894bba7e43ae download/7.2.146 +4219afedebf0172118f2d078d9012995 download/7.2.147 +49ca89a47315f512c7ee06f5b2617a90 download/7.2.148 582717146f6bbd5b73db83a2f62e62a5 download/vimtutor.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 9 02:14:51 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Thu, 09 Apr 2009 00:14:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4236] csw/mgar/pkg/vim/trunk Message-ID: Revision: 4236 http://gar.svn.sourceforge.net/gar/?rev=4236&view=rev Author: harpchad Date: 2009-04-09 00:14:50 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Bump to patchrev 148 Modified Paths: -------------- csw/mgar/pkg/vim/trunk/Makefile csw/mgar/pkg/vim/trunk/checksums Modified: csw/mgar/pkg/vim/trunk/Makefile =================================================================== --- csw/mgar/pkg/vim/trunk/Makefile 2009-04-09 00:14:19 UTC (rev 4235) +++ csw/mgar/pkg/vim/trunk/Makefile 2009-04-09 00:14:50 UTC (rev 4236) @@ -1,6 +1,6 @@ GARNAME = vim DISTVERSION = 7.2 -PATCHREV = 128 +PATCHREV = 148 GARVERSION = $(DISTVERSION).$(PATCHREV) CATEGORIES = utils SPKG_SOURCEURL = http://www.vim.org/download.php Modified: csw/mgar/pkg/vim/trunk/checksums =================================================================== --- csw/mgar/pkg/vim/trunk/checksums 2009-04-09 00:14:19 UTC (rev 4235) +++ csw/mgar/pkg/vim/trunk/checksums 2009-04-09 00:14:50 UTC (rev 4236) @@ -133,4 +133,24 @@ b31534667bb741e21479b1e3757c9e21 download/7.2.126 71e87e78bea69d8876ff7f6d824c8986 download/7.2.127 21da01d371757282bfd402ddd91005ba download/7.2.128 +e890b630efa3847c8cdee2f197145b6c download/7.2.129 +d3fe3bf37d5c0940f3e751f41d92e817 download/7.2.130 +3c2aaa22914d06a65bf0f212e43c3ace download/7.2.131 +379aa718df5dbcde8215fc4d94062d9f download/7.2.132 +6d51f9deb4c2604692f532c118b73ef8 download/7.2.133 +4acae77b2a217e1cb47040c08e28180d download/7.2.134 +4d30bf2c9d2973f5dd1c12468123dc41 download/7.2.135 +f2ae8cc595933938ee608e040d1256a5 download/7.2.136 +c613c1e0fac319f05ffe1fa7e27d6600 download/7.2.137 +e7d02c3dea47fa579366bb1cd025ce5e download/7.2.138 +04f7131164b3f46d6365a8faea0e32c6 download/7.2.139 +e1c0e4fbd985f5a2e5a24a4cfab1112c download/7.2.140 +e5a9c7ef44a38057c0c5c1191d9cdf77 download/7.2.141 +f08f7f966749c2ef20ff87dfeb9bef62 download/7.2.142 +6b132dad3ad947662d1c370193a14218 download/7.2.143 +4e2a1d1cb12198a783759f88e6c64fc4 download/7.2.144 +38877e2ac720e45e5d62cd1089167db3 download/7.2.145 +cb97aca73a1f4fdd2fac894bba7e43ae download/7.2.146 +4219afedebf0172118f2d078d9012995 download/7.2.147 +49ca89a47315f512c7ee06f5b2617a90 download/7.2.148 582717146f6bbd5b73db83a2f62e62a5 download/vimtutor.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 02:17:10 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 00:17:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4237] csw/mgar/pkg/scrollkeeper/trunk/checksums Message-ID: Revision: 4237 http://gar.svn.sourceforge.net/gar/?rev=4237&view=rev Author: hson Date: 2009-04-09 00:17:10 +0000 (Thu, 09 Apr 2009) Log Message: ----------- scrollkeeper: Missed checksums Added Paths: ----------- csw/mgar/pkg/scrollkeeper/trunk/checksums Added: csw/mgar/pkg/scrollkeeper/trunk/checksums =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/checksums (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/checksums 2009-04-09 00:17:10 UTC (rev 4237) @@ -0,0 +1,2 @@ +161eb3f29e30e7b24f84eb93ac696155 download/scrollkeeper-0.3.14.tar.gz +b04f0a91f4fa5870868059d454eda833 download/Makefile.in.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 9 04:08:32 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 09 Apr 2009 02:08:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4238] csw/mgar/pkg/mysql5/trunk/Makefile Message-ID: Revision: 4238 http://gar.svn.sourceforge.net/gar/?rev=4238&view=rev Author: bdwalton Date: 2009-04-09 02:08:32 +0000 (Thu, 09 Apr 2009) Log Message: ----------- use EXTRA_LIB instead of EXTRA_LD_OPTIONS to get handling of ISALIST properly for all -L dirs Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-09 00:17:10 UTC (rev 4237) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-09 02:08:32 UTC (rev 4238) @@ -22,7 +22,7 @@ WORKSRC = $(WORKDIR)/mysql-$(GARVERSION) -EXTRA_LD_OPTIONS = -R/opt/csw/lib/\$$ISALIST +EXTRA_LIB = /opt/csw/lib # Set ./configure options CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 04:42:30 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 02:42:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4239] csw/mgar/pkg/libpcap/trunk Message-ID: Revision: 4239 http://gar.svn.sourceforge.net/gar/?rev=4239&view=rev Author: hson Date: 2009-04-09 02:42:30 +0000 (Thu, 09 Apr 2009) Log Message: ----------- libpcap: Update to 0.9.8 Modified Paths: -------------- csw/mgar/pkg/libpcap/trunk/Makefile csw/mgar/pkg/libpcap/trunk/checksums Added Paths: ----------- csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff Removed Paths: ------------- csw/mgar/pkg/libpcap/trunk/files/solib.diff Property Changed: ---------------- csw/mgar/pkg/libpcap/trunk/ Property changes on: csw/mgar/pkg/libpcap/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/libpcap/trunk/Makefile =================================================================== --- csw/mgar/pkg/libpcap/trunk/Makefile 2009-04-09 02:08:32 UTC (rev 4238) +++ csw/mgar/pkg/libpcap/trunk/Makefile 2009-04-09 02:42:30 UTC (rev 4239) @@ -1,5 +1,5 @@ GARNAME = libpcap -GARVERSION = 0.8.3 +GARVERSION = 0.9.8 CATEGORIES = lib DESCRIPTION = Libraries for network diagnostics @@ -9,22 +9,29 @@ MASTER_SITES = http://www.tcpdump.org/release/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibpcap,) +LICENSE = LICENSE + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz # Shared libraries patch -PATCHFILES = solib.diff +PATCHFILES = Makefile.in.diff +PATCHFILES += scanner.l.diff # No test target for libpcap TEST_SCRIPTS = -CONFIGURE_ARGS = $(DIRPATHS) +BUILD64 = 1 -INSTALL_OVERRIDE_DIRS = prefix exec_prefix includedir libdir mandir +EXTRA_BUILD_ISAS_sparc = sparcv8plus sparcv8plus+vis +EXTRA_BUILD_ISAS_i386 = pentium pentium_pro+mmx +TEST_TARGET = check + +EXTRA_CFLAGS = -I. + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --enable-ipv6 + include gar/category.mk - -post-install: - rm -f $(DESTDIR)$(libdir)/$(GARNAME).a Modified: csw/mgar/pkg/libpcap/trunk/checksums =================================================================== --- csw/mgar/pkg/libpcap/trunk/checksums 2009-04-09 02:08:32 UTC (rev 4238) +++ csw/mgar/pkg/libpcap/trunk/checksums 2009-04-09 02:42:30 UTC (rev 4239) @@ -1,3 +1,3 @@ -56a9d4615d8354fcfe8cff8c8443c77b download/libpcap-0.8.3.tar.gz -a6d2e7614701143a2e4e905814fead77 download/CSWlibpcap.gspec -0754daf384e4d107ef35ed2cb4e44f0e download/solib.diff +5208f24d0328ee7c20b52c43eaa9aa0e download/libpcap-0.9.8.tar.gz +d036716d6563bcad5fad70916f5c2c2e download/Makefile.in.diff +c0002322e0b90a3e9eed0b7ac9e6c050 download/scanner.l.diff Added: csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff (rev 0) +++ csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff 2009-04-09 02:42:30 UTC (rev 4239) @@ -0,0 +1,116 @@ +--- ../build-global/libpcap-0.9.8/Makefile.in 2007-07-24 04:35:15.000000000 +0200 ++++ libpcap-0.9.8/Makefile.in 2009-04-09 04:07:28.839392745 +0200 +@@ -37,6 +37,15 @@ + srcdir = @srcdir@ + VPATH = @srcdir@ + ++# some defines for shared library compilation - FIXME ++MAJ=0 ++MIN=9.8 ++VERSION=$(MAJ).$(MIN) ++LIBNAME=pcap ++LIBRARY=lib$(LIBNAME).a ++SOLIBRARY=lib$(LIBNAME).so ++SHAREDLIB=$(SOLIBRARY).$(VERSION) ++ + # + # You shouldn't need to edit anything below. + # +@@ -52,6 +61,7 @@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) ++CFLAGS_SHARED = -G $(LDFLAGS) -Wl,-h,$(SOLIBRARY).$(MAJ) + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -71,7 +81,11 @@ + # problem if you don't own the file but can write to the directory. + .c.o: + @rm -f $@ +- $(CC) $(CFLAGS) -c $(srcdir)/$*.c ++ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c ++ ++%_pic.o: %.c ++ @rm -f $@ ++ $(CC) -KPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c + + PSRC = pcap- at V_PCAP@.c + FSRC = fad- at V_FINDALLDEVS@.c +@@ -86,6 +100,8 @@ + # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot + # hack the extra indirection + OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) ++OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) ++ + HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ + ethertype.h gencode.h gnuc.h + GENHDR = \ +@@ -98,14 +114,22 @@ + $(SRC) $(HDR) $(TAGHDR) + + CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c ++CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* + +-all: libpcap.a ++all: libpcap.a $(SHAREDLIB) + + libpcap.a: $(OBJ) + @rm -f $@ + ar rc $@ $(OBJ) $(LIBS) + $(RANLIB) $@ + ++$(SHAREDLIB): $(OBJ_PIC) ++ - at rm -f $@ ++ - at rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) ++ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc ++ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) ++ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) ++ + shared: libpcap.$(DYEXT) + + # +@@ -131,6 +155,9 @@ + scanner.o: scanner.c tokdefs.h + $(CC) $(CFLAGS) -c scanner.c + ++scanner_pic.o: scanner.c tokdefs.h ++ $(CC) -KPIC $(CFLAGS) -o $@ -c scanner.c ++ + pcap.o: version.h + + tokdefs.h: grammar.c +@@ -144,9 +171,16 @@ + @rm -f $@ + $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + ++grammar_pic.o: grammar.c ++ @rm -f $@ ++ $(CC) -KPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c ++ + version.o: version.c + $(CC) $(CFLAGS) -c version.c + ++version_pic.o: version.c ++ $(CC) -KPIC $(CFLAGS) -o $@ -c version.c ++ + snprintf.o: $(srcdir)/missing/snprintf.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + +@@ -172,10 +206,16 @@ + bpf_filter.o: bpf_filter.c + $(CC) $(CFLAGS) -c bpf_filter.c + ++bpf_filter_pic.o: bpf_filter.c ++ $(CC) -KPIC $(CFLAGS) -o $@ -c bpf_filter.c ++ + install: libpcap.a + [ -d $(DESTDIR)$(libdir) ] || \ + (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) + $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a ++ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ ++ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) ++ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) + $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a + [ -d $(DESTDIR)$(includedir) ] || \ + (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) Added: csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff =================================================================== --- csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff (rev 0) +++ csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff 2009-04-09 02:42:30 UTC (rev 4239) @@ -0,0 +1,11 @@ +--- ../build-global/libpcap-0.9.8/scanner.l 2007-06-11 21:34:28.000000000 +0200 ++++ libpcap-0.9.8/scanner.l 2009-04-09 04:41:33.481612776 +0200 +@@ -32,6 +32,8 @@ + #include + #include + ++#include ++ + #include "pcap-int.h" + + #include "gencode.h" Deleted: csw/mgar/pkg/libpcap/trunk/files/solib.diff =================================================================== --- csw/mgar/pkg/libpcap/trunk/files/solib.diff 2009-04-09 02:08:32 UTC (rev 4238) +++ csw/mgar/pkg/libpcap/trunk/files/solib.diff 2009-04-09 02:42:30 UTC (rev 4239) @@ -1,159 +0,0 @@ -diff --speed-large-files --minimal -Nru libpcap-0.7.1.orig/Makefile.in libpcap-0.7.1/Makefile.in ---- libpcap-0.7.1.orig/Makefile.in 2001-01-17 20:05:12.000000000 -0800 -+++ libpcap-0.7.1/Makefile.in 2003-07-28 14:12:12.837173000 -0700 -@@ -37,6 +37,15 @@ - srcdir = @srcdir@ - VPATH = @srcdir@ - -+# some defines for shared library compilation - FIXME -+MAJ=0 -+MIN=7.1 -+VERSION=$(MAJ).$(MIN) -+LIBNAME=pcap -+LIBRARY=lib$(LIBNAME).a -+SOLIBRARY=lib$(LIBNAME).so -+SHAREDLIB=$(SOLIBRARY).$(VERSION) -+ - # - # You shouldn't need to edit anything below. - # -@@ -48,6 +57,7 @@ - - # Standard CFLAGS - CFLAGS = $(CCOPT) $(INCLS) $(DEFS) -+CFLAGS_SHARED = -G -Wl,-h,$(SOLIBRARY).$(MAJ) - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ -@@ -67,7 +77,11 @@ - # problem if you don't own the file but can write to the directory. - .c.o: - @rm -f $@ -- $(CC) $(CFLAGS) -c $(srcdir)/$*.c -+ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c -+ -+%_pic.o: %.c -+ @rm -f $@ -+ $(CC) -KPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c - - PSRC = pcap- at V_PCAP@.c - CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \ -@@ -80,6 +94,8 @@ - # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot - # hack the extra indirection - OBJ = $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o) # $(LIBOBJS) -+OBJ_PIC = $(PSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) -+ - HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ - ethertype.h gencode.h gnuc.h - GENHDR = \ -@@ -91,15 +107,22 @@ - TAGFILES = \ - $(SRC) $(HDR) $(TAGHDR) - --CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c -+CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* - --all: libpcap.a -+all: libpcap.a $(SHAREDLIB) - - libpcap.a: $(OBJ) - @rm -f $@ - ar rc $@ $(OBJ) - $(RANLIB) $@ - -+$(SHAREDLIB): $(OBJ_PIC) -+ - at rm -f $@ -+ - at rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) -+ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc -+ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) -+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) -+ - scanner.c: $(srcdir)/scanner.l - @rm -f $@ - $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@ -@@ -107,6 +130,9 @@ - scanner.o: scanner.c tokdefs.h - $(CC) $(CFLAGS) -c scanner.c - -+scanner_pic.o: scanner.c tokdefs.h -+ $(CC) -KPIC $(CFLAGS) -o $@ -c scanner.c -+ - tokdefs.h: grammar.c - grammar.c: $(srcdir)/grammar.y - @rm -f grammar.c tokdefs.h -@@ -118,9 +144,16 @@ - @rm -f $@ - $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c - -+grammar_pic.o: grammar.c -+ @rm -f $@ -+ $(CC) -KPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c -+ - version.o: version.c - $(CC) $(CFLAGS) -c version.c - -+version_pic.o: version.c -+ $(CC) -KPIC $(CFLAGS) -o $@ -c version.c -+ - snprintf.o: $(srcdir)/../tcpdump/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/../tcpdump/missing/snprintf.c - -@@ -135,31 +168,35 @@ - bpf_filter.o: bpf_filter.c - $(CC) $(CFLAGS) -c bpf_filter.c - -+bpf_filter_pic.o: bpf_filter.c -+ $(CC) -KPIC $(CFLAGS) -o $@ -c bpf_filter.c -+ - install: -- [ -d $(DESTDIR)$(libdir) ] || \ -- (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) -- $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a -- $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a -- [ -d $(DESTDIR)$(includedir) ] || \ -- (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) -- $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h -- $(INSTALL_DATA) $(srcdir)/pcap-namedb.h \ -- $(DESTDIR)$(includedir)/pcap-namedb.h -- [ -d $(DESTDIR)$(includedir)/net ] || \ -- (mkdir -p $(DESTDIR)$(includedir)/net; chmod 755 $(DESTDIR)$(includedir)/net) -- $(INSTALL_DATA) $(srcdir)/bpf/net/bpf.h \ -- $(DESTDIR)$(includedir)/net/bpf.h -- [ -d $(DESTDIR)$(mandir)/man3 ] || \ -- (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3) -- $(INSTALL_DATA) $(srcdir)/pcap.3 \ -- $(DESTDIR)$(mandir)/man3/pcap.3 -+ [ -d $(libdir) ] || \ -+ (mkdir -p $(libdir); chmod 755 $(libdir)) -+ $(INSTALL_DATA) libpcap.a $(libdir)/libpcap.a -+ $(INSTALL_DATA) $(SHAREDLIB) $(libdir)/ -+ ln -sf $(SHAREDLIB) $(libdir)/$(SOLIBRARY).$(MAJ) -+ ln -sf $(SOLIBRARY).$(MAJ) $(libdir)/$(SOLIBRARY) -+ $(RANLIB) $(libdir)/libpcap.a -+ [ -d $(includedir) ] || \ -+ (mkdir -p $(includedir); chmod 755 $(includedir)) -+ $(INSTALL_DATA) $(srcdir)/pcap.h $(includedir)/pcap.h -+ $(INSTALL_DATA) $(srcdir)/pcap-namedb.h $(includedir)/pcap-namedb.h -+ [ -d $(includedir)/net ] || \ -+ (mkdir -p $(includedir)/net; chmod 755 $(includedir)/net) -+ $(INSTALL_DATA) $(srcdir)/bpf/net/bpf.h $(includedir)/net/bpf.h -+ [ -d $(mandir)/man3 ] || \ -+ (mkdir -p $(mandir)/man3; chmod 755 $(mandir)/man3) -+ $(INSTALL_DATA) $(srcdir)/pcap.3 $(mandir)/man3/pcap.3 -+ - - uninstall: -- rm -f $(DESTDIR)$(libdir)/libpcap.a -- rm -f $(DESTDIR)$(includedir)/pcap.h -- rm -f $(DESTDIR)$(includedir)/pcap-namedb.h -- rm -f $(DESTDIR)$(includedir)/net/bpf.h -- rm -f $(DESTDIR)$(mandir)/man3/pcap.3 -+ rm -f $(libdir)/libpcap.a -+ rm -f $(includedir)/pcap.h -+ rm -f $(includedir)/pcap-namedb.h -+ rm -f $(includedir)/net/bpf.h -+ rm -f $(mandir)/man3/pcap.3 - - clean: - rm -f $(CLEANFILES) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 05:32:05 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 03:32:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4240] csw/mgar/pkg Message-ID: Revision: 4240 http://gar.svn.sourceforge.net/gar/?rev=4240&view=rev Author: hson Date: 2009-04-09 03:32:05 +0000 (Thu, 09 Apr 2009) Log Message: ----------- tcpdump: Initial commit Added Paths: ----------- csw/mgar/pkg/tcpdump/ csw/mgar/pkg/tcpdump/Makefile csw/mgar/pkg/tcpdump/branches/ csw/mgar/pkg/tcpdump/tags/ csw/mgar/pkg/tcpdump/trunk/ csw/mgar/pkg/tcpdump/trunk/Makefile csw/mgar/pkg/tcpdump/trunk/checksums csw/mgar/pkg/tcpdump/trunk/files/ Added: csw/mgar/pkg/tcpdump/Makefile =================================================================== --- csw/mgar/pkg/tcpdump/Makefile (rev 0) +++ csw/mgar/pkg/tcpdump/Makefile 2009-04-09 03:32:05 UTC (rev 4240) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/tcpdump/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/tcpdump/trunk/Makefile =================================================================== --- csw/mgar/pkg/tcpdump/trunk/Makefile (rev 0) +++ csw/mgar/pkg/tcpdump/trunk/Makefile 2009-04-09 03:32:05 UTC (rev 4240) @@ -0,0 +1,31 @@ +GARNAME = tcpdump +GARVERSION = 3.9.8 +CATEGORIES = utils + +DESCRIPTION = tcpdump allows you to dump the traffic on a network +define BLURB + +endef + +MASTER_SITES = http://www.tcpdump.org/release/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +LICENSE = LICENSE + +PREREQUISITE_PKGS = CSWlibpcap CSWosslrt CSWossldevel +REQUIRED_PKGS = CSWlibpcap CSWosslrt +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +# Shared libraries patch +#PATCHFILES = solib.diff + +# No test target for libpcap +TEST_SCRIPTS = + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --enable-ipv6 + +#INSTALL_OVERRIDE_DIRS = prefix exec_prefix includedir libdir mandir + +include gar/category.mk Added: csw/mgar/pkg/tcpdump/trunk/checksums =================================================================== --- csw/mgar/pkg/tcpdump/trunk/checksums (rev 0) +++ csw/mgar/pkg/tcpdump/trunk/checksums 2009-04-09 03:32:05 UTC (rev 4240) @@ -0,0 +1 @@ +c491a78c52fe73f1f7271aa5d8c6ab2e download/tcpdump-3.9.8.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 9 06:43:04 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 09 Apr 2009 04:43:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4241] csw/mgar/pkg/sudo-ldap/trunk Message-ID: Revision: 4241 http://gar.svn.sourceforge.net/gar/?rev=4241&view=rev Author: valholla Date: 2009-04-09 04:43:04 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Update to gar v2 and sudo 1.7 Modified Paths: -------------- csw/mgar/pkg/sudo-ldap/trunk/Makefile csw/mgar/pkg/sudo-ldap/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space Property Changed: ---------------- csw/mgar/pkg/sudo-ldap/trunk/ Property changes on: csw/mgar/pkg/sudo-ldap/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/sudo-ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,8 +1,8 @@ GARNAME = sudo -GARVERSION = 1.6.9p8 +GARVERSION = 1.7.0 CATEGORIES = utils -DESCRIPTION = Provides limited super user privileges to specific users +DESCRIPTION = Provides limited super user privileges (LDAP Enabled) define BLURB Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while @@ -12,19 +12,25 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PATCHFILES = install.diff -# We define upstream file regex so we can be notifed of new upstream software release -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +# We define upstream file regex so we can be notifed of new +# upstream software release +UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz -DISTFILES += CSWsudo-ldap.gspec CSWsudo-ldap.postinstall -DISTFILES += CSWsudo-ldap.prototype CSWsudo-ldap.depend -DISTFILES += CSWsudo-ldap.space CSWsudo-ldap.postremove +PACKAGES = CSWsudo-ldap -# Original maintainer's patch to disable strip on install -PATCHFILES = install.diff +CATALOGNAME_CSWsudo-ldap = sudo_ldap +SPKG_DESC_CSWsudo-ldap = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudo-ldap = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudo-ldap = CSWsudo +REQUIRED_PKGS_CSWsudo-ldap = CSWsudo-common CSWggettextrt CSWoldaprt CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam +CONFIGURE_ARGS += --with-logging=both +CONFIGURE_ARGS += --with-ignore-dot +CONFIGURE_ARGS += --with-env-editor CONFIGURE_ARGS += --with-ldap=$(prefix) CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf @@ -32,3 +38,12 @@ include gar/category.mk +PKGFILES_CSWsudo-ldap = .*/bin/.* + +post-install-modulated: + @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) + @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) + @$(MAKECOOKIE) + $(DONADA) Modified: csw/mgar/pkg/sudo-ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/checksums 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/checksums 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,8 +1,2 @@ -67a7f95664e9f3926dc3e36d8684f921 download/sudo-1.6.9p8.tar.gz -c8104c6902e496dba5bb18f9c6db1959 download/CSWsudo-ldap.gspec -f9eeac02cdb8e5a3c2d13b65f76a6cf2 download/CSWsudo-ldap.postinstall -e78775e8a1d8d3ce576d2c8d38afc008 download/CSWsudo-ldap.prototype -5bda7fbebf834933fb7b72d64da8d60b download/CSWsudo-ldap.depend -44fabb4ce87e861516533d80274a52c0 download/CSWsudo-ldap.space -cc346986b765441205b04e076a80ba0e download/CSWsudo-ldap.postremove +5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz 157b2e5e38ca54eb36e0364706bd0292 download/install.diff Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,5 +0,0 @@ -P CSWsudo-common - sudo_common - sudo common files -P CSWlibnet libnet - the libnet packet construction library -P CSWoldaprt openldap_rt - ldap runtime libraries -P CSWosslrt openssl_rt - Openssl runtime libraries -P CSWsasl sasl - Simple Authentication and Security Layer Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,5 +0,0 @@ -%var bitname sudo_ldap -%var pkgname CSWsudoldap -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%var desc Provides limited super user privileges (LDAP Enabled) -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,11 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit -ln -f sudo.ldap sudo -ln -f sudo.ldap sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,16 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit - -OTHERSUDO=`ls -1 sudo.* 2>/dev/null | head -1` -if [ -n "$OTHERSUDO" ]; then - rm -f sudo - ln -f $OTHERSUDO sudo - ln -f $OTHERSUDO sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,3 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sudo.ldap=/opt/csw/bin/sudo 4111 root root -l none /opt/csw/bin/sudoedit=/opt/csw/bin/sudo.ldap Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space 2009-04-09 04:43:04 UTC (rev 4241) @@ -1 +0,0 @@ -$BASEDIR 1 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 9 06:44:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 09 Apr 2009 04:44:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4242] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4242 http://gar.svn.sourceforge.net/gar/?rev=4242&view=rev Author: valholla Date: 2009-04-09 04:44:37 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Update to gar v2 and sudo 1.7 Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.depend csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype csw/mgar/pkg/sudo/trunk/files/CSWsudo.space Property Changed: ---------------- csw/mgar/pkg/sudo/trunk/ Property changes on: csw/mgar/pkg/sudo/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,5 +1,5 @@ GARNAME = sudo -GARVERSION = 1.6.9p8 +GARVERSION = 1.7.0 CATEGORIES = utils DESCRIPTION = Provides limited super user privileges @@ -12,30 +12,45 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PATCHFILES = install.diff -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of new +# upstream software release UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz -DISTFILES += CSWsudo.gspec CSWsudo.postinstall -DISTFILES += CSWsudo.prototype CSWsudo.depend -DISTFILES += CSWsudo.space CSWsudo.postremove +PACKAGES = CSWsudo CSWsudo-common -DISTFILES += CSWsudo-common.gspec CSWsudo-common.postinstall -DISTFILES += CSWsudo-common.prototype CSWsudo-common.depend -DISTFILES += CSWsudo-common.space +CATALOGNAME_CSWsudo = sudo +SPKG_DESC_CSWsudo = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudo = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudo = CSWsudo-ldap +REQUIRED_PKGS_CSWsudo = CSWsudo-common CSWggettextrt -# Original maintainer's patch to disable strip on install -PATCHFILES = install.diff +CATALOGNAME_CSWsudo-common = sudo_common +SPKG_DESC_CSWsudo-common = Common files for sudo +SPKG_SOURCEURL_CSWsudo-common = http://www.sudo.ws +REQUIRED_PKGS_CSWsudo-common = CSWggettextrt +DISTFILES += CSWsudo-common.postinstall + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam +CONFIGURE_ARGS += --with-logging=both +CONFIGURE_ARGS += --with-ignore-dot +CONFIGURE_ARGS += --with-env-editor TEST_TARGET = check FIXCONFIG_DIRS = $(DESTDIR)$(libexecdir) include gar/category.mk -post-install: +PKGFILES_CSWsudo = .*/bin/.* + +post-install-modulated: @( cd $(DESTDIR)$(sysconfdir) ; mv sudoers sudoers.CSW ) + @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) + @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.minimal ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudo ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudoedit ) @$(MAKECOOKIE) $(DONADA) Modified: csw/mgar/pkg/sudo/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo/trunk/checksums 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/checksums 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,13 +1,5 @@ -67a7f95664e9f3926dc3e36d8684f921 download/sudo-1.6.9p8.tar.gz -58d79819635f48eccc23c49028d01b55 download/CSWsudo.gspec +5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz 2264728d06b220edf5e47eb9da2b7e66 download/CSWsudo.postinstall -9fbef4bcd879914c4ebc7d8d1ca2a92a download/CSWsudo.prototype -82a6efe0a5c261689546cebfff198b0a download/CSWsudo.depend -44fabb4ce87e861516533d80274a52c0 download/CSWsudo.space e9bd76af1d6c4110121d6d784c910b3d download/CSWsudo.postremove -d009538c73a79d95974996ba3096194b download/CSWsudo-common.gspec 955d99eda1432c7b7e00d98b91e35a79 download/CSWsudo-common.postinstall -9203dbbf5dc2c1741fcea6b86895bd6a download/CSWsudo-common.prototype -d41d8cd98f00b204e9800998ecf8427e download/CSWsudo-common.depend -44fabb4ce87e861516533d80274a52c0 download/CSWsudo-common.space 157b2e5e38ca54eb36e0364706bd0292 download/install.diff Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,5 +0,0 @@ -%var bitname sudo_common -%var pkgname CSWsudo-common -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%var desc sudo common files -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,13 +0,0 @@ -d none /opt/csw/sbin 0755 root bin -f none /opt/csw/sbin/visudo 0111 root root -f none /opt/csw/etc/sudoers.CSW 0440 root root -d none /opt/csw/share 0755 root bin -d none /opt/csw/share/man 0755 root bin -d none /opt/csw/share/man/man1m 0755 root bin -f none /opt/csw/share/man/man1m/sudo.1m 0644 root root -l none /opt/csw/share/man/man1m/sudoedit.1m=/opt/csw/share/man/man1m/sudo.1m -f none /opt/csw/share/man/man1m/visudo.1m 0644 root root -d none /opt/csw/share/man/man4 0755 root bin -f none /opt/csw/share/man/man4/sudoers.4 0644 root root -f none /opt/csw/libexec/sudo_noexec.so 0755 root root -f none /opt/csw/libexec/sudo_noexec.la 0644 root root Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space 2009-04-09 04:44:37 UTC (rev 4242) @@ -1 +0,0 @@ -$BASEDIR 1 1 Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,2 +0,0 @@ -I CSWsudo-minimal sudo_minimal -P CSWsudo-common sudo_common - sudo common files Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,4 +0,0 @@ -%var bitname sudo -%var pkgname CSWsudo -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,12 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -# Set up links -cd $BINDIR -rm -f sudo sudoedit -ln -f sudo.minimal sudo -ln -f sudo.minimal sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,15 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit - -OTHERSUDO=`ls -1 sudo.* 2>/dev/null | head -1` -if [ -n "$OTHERSUDO" ]; then - ln -f $OTHERSUDO sudo - ln -f $OTHERSUDO sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,2 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sudo.minimal=/opt/csw/bin/sudo 4111 root root Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.space =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.space 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.space 2009-04-09 04:44:37 UTC (rev 4242) @@ -1 +0,0 @@ -$BASEDIR 1 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 10:19:51 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 08:19:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4243] csw/mgar/pkg/htmldoc/trunk/Makefile Message-ID: Revision: 4243 http://gar.svn.sourceforge.net/gar/?rev=4243&view=rev Author: hson Date: 2009-04-09 08:19:51 +0000 (Thu, 09 Apr 2009) Log Message: ----------- htmldoc: Enable check again Modified Paths: -------------- csw/mgar/pkg/htmldoc/trunk/Makefile Modified: csw/mgar/pkg/htmldoc/trunk/Makefile =================================================================== --- csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-09 04:44:37 UTC (rev 4242) +++ csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-09 08:19:51 UTC (rev 4243) @@ -46,5 +46,5 @@ TEST_SCRIPTS = # Disable check until package is released -ENABLE_CHECK = 0 +#ENABLE_CHECK = 0 include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 10:57:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 08:57:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4244] csw/mgar/gar/v2/gar.pkg.mk Message-ID: Revision: 4244 http://gar.svn.sourceforge.net/gar/?rev=4244&view=rev Author: dmichelsen Date: 2009-04-09 08:57:06 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Take out legacy feature inherited from Garnome Modified Paths: -------------- csw/mgar/gar/v2/gar.pkg.mk Modified: csw/mgar/gar/v2/gar.pkg.mk =================================================================== --- csw/mgar/gar/v2/gar.pkg.mk 2009-04-09 08:19:51 UTC (rev 4243) +++ csw/mgar/gar/v2/gar.pkg.mk 2009-04-09 08:57:06 UTC (rev 4244) @@ -127,9 +127,6 @@ SPKG_REVSTAMP ?= ,REV=$(shell date '+%Y.%m.%d') endif -# Is this a full or incremental build? -SPKG_INCREMENTAL ?= 1 - # Where we find our mkpackage global templates PKGLIB = $(CURDIR)/$(GARDIR)/pkglib This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 9 11:06:41 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 09 Apr 2009 09:06:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4245] csw/mgar/pkg/pkgutil/trunk Message-ID: Revision: 4245 http://gar.svn.sourceforge.net/gar/?rev=4245&view=rev Author: bonivart Date: 2009-04-09 09:06:41 +0000 (Thu, 09 Apr 2009) Log Message: ----------- pkgutil: rename LICENSE to license Modified Paths: -------------- csw/mgar/pkg/pkgutil/trunk/Makefile csw/mgar/pkg/pkgutil/trunk/checksums csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype Modified: csw/mgar/pkg/pkgutil/trunk/Makefile =================================================================== --- csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-09 09:06:41 UTC (rev 4245) @@ -45,7 +45,7 @@ @cp $(WORKSRC)/bldcat $(DESTDIR)$(bindir) @cp $(WORKSRC)/chkcat $(DESTDIR)$(bindir) @cp $(WORKSRC)/readme $(DESTDIR)$(docdir)/$(GARNAME)/ - @cp $(WORKSRC)/LICENSE $(DESTDIR)$(docdir)/$(GARNAME)/ + @cp $(WORKSRC)/license $(DESTDIR)$(docdir)/$(GARNAME)/ # @cp $(FILEDIR)/CSWpkgutil.i.cswpkgutil $(DESTDIR)/usr/sadm/install/scripts/i.cswpkgutil # @cp $(FILEDIR)/CSWpkgutil.r.cswpkgutil $(DESTDIR)/usr/sadm/install/scripts/r.cswpkgutil @cp $(WORKSRC)/admin $(DESTDIR)/var/opt/csw/$(GARNAME)/admin.CSW Modified: csw/mgar/pkg/pkgutil/trunk/checksums =================================================================== --- csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-09 09:06:41 UTC (rev 4245) @@ -1,5 +1,5 @@ -97349a661c6f779e33621b73b738925e download/pkgutil-1.5.zip -805cd30ad9f21cb1167d166fa99b5891 download/CSWpkgutil.gspec -54bd1af1cd6ca5ac7e63586ffc16842d download/CSWpkgutil.prototype +f9fdd7e5a2bf82ebabe1db387ef163a1 download/pkgutil-1.5.zip +a16c6f81bc537d6172fd65d8da1aeecc download/CSWpkgutil.gspec +bbfa438bcc97cd709f8d1b6716485925 download/CSWpkgutil.prototype e1407c24d47306dbc4cea22dcb291f1d download/CSWpkgutil.postinstall 2fb6c94a2d212f08b71d462082a2d31a download/CSWpkgutil.preremove Modified: csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec =================================================================== --- csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec 2009-04-09 09:06:41 UTC (rev 4245) @@ -6,5 +6,5 @@ %prototype url file://%{FILEDIR}/CSWpkgutil.prototype %copyright -Please see /opt/csw/share/doc/pkgutil/LICENSE for license information. +Please see /opt/csw/share/doc/pkgutil/license for license information. Modified: csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype =================================================================== --- csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype 2009-04-09 09:06:41 UTC (rev 4245) @@ -17,7 +17,7 @@ d none /opt/csw/share 0755 root bin d none /opt/csw/share/doc 0755 root bin d none /opt/csw/share/doc/pkgutil 0755 root bin -f none /opt/csw/share/doc/pkgutil/LICENSE 644 root bin +f none /opt/csw/share/doc/pkgutil/license 644 root bin f none /opt/csw/share/doc/pkgutil/readme 644 root bin d none /opt/csw/share/man 0755 root bin d none /opt/csw/share/man/man1 0755 root bin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Thu Apr 9 12:03:46 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Thu, 09 Apr 2009 10:03:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4246] csw/mgar/pkg/xterm/trunk Message-ID: Revision: 4246 http://gar.svn.sourceforge.net/gar/?rev=4246&view=rev Author: skayser Date: 2009-04-09 10:03:42 +0000 (Thu, 09 Apr 2009) Log Message: ----------- xterm: enable build against freetype2, added program suffix (86) Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/Makefile csw/mgar/pkg/xterm/trunk/files/README.CSW Modified: csw/mgar/pkg/xterm/trunk/Makefile =================================================================== --- csw/mgar/pkg/xterm/trunk/Makefile 2009-04-09 09:06:41 UTC (rev 4245) +++ csw/mgar/pkg/xterm/trunk/Makefile 2009-04-09 10:03:42 UTC (rev 4246) @@ -39,6 +39,8 @@ CONFIGURE_ARGS += --enable-sun-fkeys CONFIGURE_ARGS += --enable-warnings CONFIGURE_ARGS += --enable-wide-chars +CONFIGURE_ARGS += --program-suffix=86 --with-xterm-symlink +CONFIGURE_ARGS += --with-freetype-cflags="-I$(includedir)/freetype2" # luit comes with snv_85 # http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6662431 @@ -48,8 +50,6 @@ CONFIGURE_ARGS += $(CONFIGURE_ARGS_$(GARFLAVOR)) CONFIGURE_ARGS_DBG = --enable-trace --enable-warnings -EXTRA_INC = $(includedir)/freetype2 - include gar/category.mk # Hack for now to address the double /opt/csw/lib in $R*PATH. One comes Modified: csw/mgar/pkg/xterm/trunk/files/README.CSW =================================================================== --- csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-09 09:06:41 UTC (rev 4245) +++ csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-09 10:03:42 UTC (rev 4246) @@ -8,18 +8,21 @@ color support in some ncurses-based applications. To make full use of the capabilities of this xterm (including color-support) -set TERM=xterm-new. +set TERM=xterm-new. You might then however experience problems when +SSH'ing to machines where xterm-new isn't known to terminfo ("terminal not +fully functional" messages). That's the main reason TERM=xterm-new hasn't +been compiled in as a default by the way. -Note: app-defaults in /opt/csw/lib/X11/app-defaults ---------------------------------------------------- +Note: X resource files in /opt/csw/lib/X11/app-defaults +------------------------------------------------------- -Although this package delivers some x resource files in +Although this package delivers some X resource files in /opt/csw/lib/X11/app-defaults/ this folder is not evaluated by the Solaris libXt per default. Either treat them as example files and copy and paste what you need into -your system / personal x resource files or set XFILESEARCHPATH / +your system / personal X resource files or set XFILESEARCHPATH / XUSERFILESEARCHPATH to honor this directory. http://www.faqs.org/faqs/x-faq/part2/section-22.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Thu Apr 9 12:05:14 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Thu, 09 Apr 2009 10:05:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4247] csw/mgar/pkg/mcabber/trunk/Makefile Message-ID: Revision: 4247 http://gar.svn.sourceforge.net/gar/?rev=4247&view=rev Author: skayser Date: 2009-04-09 10:05:14 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mcabber: adjusted DESCRIPTION Modified Paths: -------------- csw/mgar/pkg/mcabber/trunk/Makefile Modified: csw/mgar/pkg/mcabber/trunk/Makefile =================================================================== --- csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-09 10:03:42 UTC (rev 4246) +++ csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-09 10:05:14 UTC (rev 4247) @@ -2,7 +2,7 @@ GARVERSION = 0.9.9 CATEGORIES = utils -DESCRIPTION = A small Jabber console client +DESCRIPTION = A small terminal-based Jabber client define BLURB mcabber is a small Jabber console client. mcabber includes features such as SSL support, MUC (Multi-User Chat) support, history logging, command This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 13:12:41 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 11:12:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4248] csw/mgar/pkg/maven2/trunk Message-ID: Revision: 4248 http://gar.svn.sourceforge.net/gar/?rev=4248&view=rev Author: trygvis Date: 2009-04-09 11:12:41 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Upgrading to Maven 2.0.10. Modified Paths: -------------- csw/mgar/pkg/maven2/trunk/Makefile csw/mgar/pkg/maven2/trunk/checksums Modified: csw/mgar/pkg/maven2/trunk/Makefile =================================================================== --- csw/mgar/pkg/maven2/trunk/Makefile 2009-04-09 10:05:14 UTC (rev 4247) +++ csw/mgar/pkg/maven2/trunk/Makefile 2009-04-09 11:12:41 UTC (rev 4248) @@ -1,5 +1,5 @@ GARNAME = maven2 -GARVERSION = 2.0.9 +GARVERSION = 2.0.10 CATEGORIES = devel GARCH = all Modified: csw/mgar/pkg/maven2/trunk/checksums =================================================================== --- csw/mgar/pkg/maven2/trunk/checksums 2009-04-09 10:05:14 UTC (rev 4247) +++ csw/mgar/pkg/maven2/trunk/checksums 2009-04-09 11:12:41 UTC (rev 4248) @@ -1,3 +1,3 @@ -6d842f7cb9696676982096c72d063133 download/apache-maven-2.0.9-bin.tar.gz +1673c4b206633155774ecbcab1c2fb2e download/apache-maven-2.0.10-bin.tar.gz 8c87a565ba53d763dbf82a2f27f1cff0 download/CSWmaven2.gspec f935bf12216ef6533ca53879a456ebeb download/bin-mvn This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 14:35:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 12:35:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4249] csw/mgar/pkg Message-ID: Revision: 4249 http://gar.svn.sourceforge.net/gar/?rev=4249&view=rev Author: dmichelsen Date: 2009-04-09 12:35:00 +0000 (Thu, 09 Apr 2009) Log Message: ----------- vncserver: Initial commit, unfinished Added Paths: ----------- csw/mgar/pkg/vncserver/ csw/mgar/pkg/vncserver/branches/ csw/mgar/pkg/vncserver/tags/ csw/mgar/pkg/vncserver/trunk/ csw/mgar/pkg/vncserver/trunk/Makefile csw/mgar/pkg/vncserver/trunk/checksums csw/mgar/pkg/vncserver/trunk/files/ csw/mgar/pkg/vncserver/trunk/files/vncservers Property changes on: csw/mgar/pkg/vncserver/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/vncserver/trunk/Makefile =================================================================== --- csw/mgar/pkg/vncserver/trunk/Makefile (rev 0) +++ csw/mgar/pkg/vncserver/trunk/Makefile 2009-04-09 12:35:00 UTC (rev 4249) @@ -0,0 +1,132 @@ +GARNAME = tightvnc +GARVERSION = 1.3.10 +CATEGORIES = utils + +DESCRIPTION = TightVNC server is a free remote control package derived from the popular VNC software +define BLURB +endef + +SF_PROJ = vnc-tight +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION)_unixsrc.tar.bz2 +DISTFILES += vncservers + +PACKAGES = CSWvncs +CATALOGNAME = vncserver + +SPKG_SOURCEURL = http://www.tightvnc.org/ + +REQUIRED_PKGS = CSWjpeg CSWtcpwrap + +# We define upstream file regex so we can be notifed of new upstream software release +UPSTREAM_USE_SF = 1 +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=14067 +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*)_unixsrc.tar.bz2 + +DISTNAME = vnc_unixsrc + +# Use tightvnc.spec + +EXTRA_DEFINES = -DUSE_LIBWRAP=1 +EXTRA_INCLUDE = $(CFLAGS) +LOCAL_LDFLAGS = $(LINKER_FLAGS) +BUILD_OVERRIDE_DIRS = EXTRA_DEFINES EXTRA_INCLUDE LOCAL_LDFLAGS + +CONFIGURE_SCRIPTS = $(WORKSRC)/Imakefile Xvnc +CONFIGURE_ARGS = -a + +BUILD_SCRIPTS = vnc Xvnc + +# VNC doesn't come with tests +TEST_SCRIPTS = + +INSTALL_SCRIPTS = vnc + +include gar/category.mk + +pre-configure-modulated: + perl -pi -e "s|/usr/local/vnc/classes|$(datadir)/vnc/classes|" $(WORKSRC)/vncserver + $(MAKECOOKIE) + +configure-Xvnc: + banner "Config Xvnc" + perl -pi -e "s|^(\s*make)\s*$$|\1 CC=$(CC)|" $(WORKSRC)/Xvnc/configure + cd $(WORKSRC)/Xvnc && ./configure + $(MAKECOOKIE) + +build-vnc: + banner "Build VNC" + #$(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $* $(BUILD_ARGS) + cd $(WORKSRC) && $(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") World + $(MAKECOOKIE) + +build-Xvnc: configure-Xvnc + banner "Build Xvnc" + cd $(WORKSRC)/Xvnc && $(MAKE) EXTRA_LIBRARIES="-lwrap" EXTRA_DEFINES="-DUSE_LIBWRAP=1" + +#xmkmf -a +#make CDEBUGFLAGS="$RPM_OPT_FLAGS" World +#cd Xvnc +#./configure +#make EXTRA_LIBRARIES="-lwrap -lnss_nis" CDEBUGFLAGS="$RPM_OPT_FLAGS" \ +# EXTRA_DEFINES="-DUSE_LIBWRAP=1" + +install-vnc: + ginstall -d $(DESTDIR)$(bindir) + ginstall -d $(DESTDIR)$(mandir)/man1 + (cd $(WORKSRC); ./vncinstall $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)) + ginstall -d $(DESTDIR)$(datadir)/vnc + (cd $(WORKSRC); cp -pR classes $(DESTDIR)$(datadir)/vnc) + #mkdir -p %{buildroot}/etc/rc.d/init.d + #install -m755 vncserver.init %{buildroot}/etc/rc.d/init.d/vncserver + ginstall -m 644 $(WORKDIR)/vncservers $(DESTDIR)$(sysconfdir)/vncservers + + + +# Build + +#patch < vnc-xclients.patch + +#xmkmf -a +#make CDEBUGFLAGS="$RPM_OPT_FLAGS" World +#cd Xvnc +#./configure +#make EXTRA_LIBRARIES="-lwrap -lnss_nis" CDEBUGFLAGS="$RPM_OPT_FLAGS" \ +# EXTRA_DEFINES="-DUSE_LIBWRAP=1" + + + + +# Install + +#rm -rf %{buildroot} + +#mkdir -p %{buildroot}%{_bindir} +#mkdir -p %{buildroot}%{_mandir}/man1 +#./vncinstall %{buildroot}%{_bindir} %{buildroot}%{_mandir} + +#mkdir -p %{buildroot}%{_datadir}/vnc +#cp -aR classes %{buildroot}%{_datadir}/vnc + +#strip %{buildroot}%{_bindir}/* || : + +#mkdir -p %{buildroot}/etc/rc.d/init.d +#install -m755 vncserver.init %{buildroot}/etc/rc.d/init.d/vncserver +# +#mkdir -p %{buildroot}/etc/sysconfig +#cat > %{buildroot}/etc/sysconfig/vncservers << EOF +# The VNCSERVERS variable is a list of display:user pairs. +# +# Uncomment the line below to start a VNC server on display :1 +# as my 'myusername' (adjust this to your own). You will also +# need to set a VNC password; run 'man vncpasswd' to see how +# to do that. +# +# DO NOT RUN THIS SERVICE if your local area network is +# untrusted! For a secure way of using VNC, see +# . + +# VNCSERVERS="1:myusername" +#EOF +#chmod 644 %{buildroot}/etc/sysconfig/vncservers + Added: csw/mgar/pkg/vncserver/trunk/checksums =================================================================== --- csw/mgar/pkg/vncserver/trunk/checksums (rev 0) +++ csw/mgar/pkg/vncserver/trunk/checksums 2009-04-09 12:35:00 UTC (rev 4249) @@ -0,0 +1,2 @@ +397b35faad32d5246b6d44b142f8304f download/tightvnc-1.3.10_unixsrc.tar.bz2 +56c09be17c17184e96193c13246fd649 download/vncservers Added: csw/mgar/pkg/vncserver/trunk/files/vncservers =================================================================== --- csw/mgar/pkg/vncserver/trunk/files/vncservers (rev 0) +++ csw/mgar/pkg/vncserver/trunk/files/vncservers 2009-04-09 12:35:00 UTC (rev 4249) @@ -0,0 +1,12 @@ +# The VNCSERVERS variable is a list of display:user pairs. + +# Uncomment the line below to start a VNC server on display :1 +# as my 'myusername' (adjust this to your own). You will also +# need to set a VNC password; run 'man vncpasswd' to see how +# to do that. + +# DO NOT RUN THIS SERVICE if your local area network is +# untrusted! For a secure way of using VNC, see +# . + +# VNCSERVERS="1:myusername" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 14:36:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 12:36:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4250] csw/mgar/gar/v2/gar.mk Message-ID: Revision: 4250 http://gar.svn.sourceforge.net/gar/?rev=4250&view=rev Author: dmichelsen Date: 2009-04-09 12:36:04 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Avoid double-inclusion of patches appearing on more than one modulation Modified Paths: -------------- csw/mgar/gar/v2/gar.mk Modified: csw/mgar/gar/v2/gar.mk =================================================================== --- csw/mgar/gar/v2/gar.mk 2009-04-09 12:35:00 UTC (rev 4249) +++ csw/mgar/gar/v2/gar.mk 2009-04-09 12:36:04 UTC (rev 4250) @@ -49,7 +49,7 @@ ALLFILES_PATCHFILES ?= $(PATCHFILES) $(foreach M,$(MODULATIONS),$(PATCHFILES_$M)) ALLFILES_DYNSCRIPTS ?= $(DYNSCRIPTS) ALLFILES_GIT_REPOS ?= $(foreach R,$(GIT_REPOS),$(call GITPROJ,$(R))) -ALLFILES ?= $(ALLFILES_DISTFILES) $(ALLFILES_PATCHFILES) $(ALLFILES_DYNSCRIPTS) $(ALLFILES_GIT_REPOS) +ALLFILES ?= $(sort $(ALLFILES_DISTFILES) $(ALLFILES_PATCHFILES) $(ALLFILES_DYNSCRIPTS) $(ALLFILES_GIT_REPOS) $(EXTRA_ALLFILES)) ifeq ($(MAKE_INSTALL_DIRS),1) INSTALL_DIRS = $(addprefix $(DESTDIR),$(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(libdir) $(infodir) $(lispdir) $(includedir) $(mandir) $(foreach NUM,1 2 3 4 5 6 7 8, $(mandir)/man$(NUM)) $(sourcedir)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 14:53:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 12:53:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4251] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4251 http://gar.svn.sourceforge.net/gar/?rev=4251&view=rev Author: dmichelsen Date: 2009-04-09 12:53:21 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Extend path to include imake-related things Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-09 12:36:04 UTC (rev 4250) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-09 12:53:21 UTC (rev 4251) @@ -489,7 +489,8 @@ # 1. Make sure everything works fine for SOS12 # 2. Allow us to use programs we just built. This is a bit complicated, # but we want PATH to be a recursive variable, or 'gmake isaenv' won't work -PATH = $(if $(filter SOS12,$(GARCOMPILER)),$(abspath $(GARBIN)/sos12-wrappers):)$(if $(IGNORE_DESTDIR),,$(abspath $(DESTDIR)$(binpath_install)/$(MM_BINDIR)):$(DESTDIR)$(binpath_install):$(abspath $(DESTDIR)$(sbinpath_install)/$(MM_BINDIR)):$(DESTDIR)$(sbinpath_install):)$(abspath $(binpath_install)/$(MM_BINDIR)):$(binpath_install):$(abspath $(sbinpath_install)/$(MM_BINDIR)):$(sbinpath_install):$(CC_HOME)/bin:$(abspath $(GARBIN)):/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin +# /usr/openwin/bin is needed for xmkmf used in gar.lib.mk +PATH = $(if $(filter SOS12,$(GARCOMPILER)),$(abspath $(GARBIN)/sos12-wrappers):)$(if $(IGNORE_DESTDIR),,$(abspath $(DESTDIR)$(binpath_install)/$(MM_BINDIR)):$(DESTDIR)$(binpath_install):$(abspath $(DESTDIR)$(sbinpath_install)/$(MM_BINDIR)):$(DESTDIR)$(sbinpath_install):)$(abspath $(binpath_install)/$(MM_BINDIR)):$(binpath_install):$(abspath $(sbinpath_install)/$(MM_BINDIR)):$(sbinpath_install):$(CC_HOME)/bin:$(abspath $(GARBIN)):/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin # This is for foo-config chaos PKG_CONFIG_DIRS ?= $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 15:13:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 13:13:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4252] csw/mgar/pkg/top/trunk/Makefile Message-ID: Revision: 4252 http://gar.svn.sourceforge.net/gar/?rev=4252&view=rev Author: dmichelsen Date: 2009-04-09 13:13:26 +0000 (Thu, 09 Apr 2009) Log Message: ----------- top: Don't include superflous runtime linker path Modified Paths: -------------- csw/mgar/pkg/top/trunk/Makefile Modified: csw/mgar/pkg/top/trunk/Makefile =================================================================== --- csw/mgar/pkg/top/trunk/Makefile 2009-04-09 12:53:21 UTC (rev 4251) +++ csw/mgar/pkg/top/trunk/Makefile 2009-04-09 13:13:26 UTC (rev 4252) @@ -19,6 +19,9 @@ BUILD64 = 1 +# No runtime linker path as we don't reference any libs from /opt/csw +RUNPATH_LINKER_FLAGS = + # autoconf tries to compile for the current kernel. Get rid of # these extra flags as we set them ourselves with BUILD64 = 1 BUILD_OVERRIDE_DIRS = ARCHFLAG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 15:40:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 13:40:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4253] csw/mgar/pkg/flac/trunk Message-ID: Revision: 4253 http://gar.svn.sourceforge.net/gar/?rev=4253&view=rev Author: dmichelsen Date: 2009-04-09 13:40:35 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: UModulate over 1.1.4 and 1.2.1 Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile csw/mgar/pkg/flac/trunk/checksums csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch Added Paths: ----------- csw/mgar/pkg/flac/trunk/bin/ csw/mgar/pkg/flac/trunk/bin/CC csw/mgar/pkg/flac/trunk/bin/cc Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 13:13:26 UTC (rev 4252) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 13:40:35 UTC (rev 4253) @@ -1,7 +1,17 @@ -GARNAME = flac +GARNAME = libflac GARVERSION = 1.2.1 CATEGORIES = lib +EXTRA_MODULATORS = GARVERSION +MODULATIONS_GARVERSION = 1.1.4 1.2.1 + +MODULATIONS = isa-sparcv8-garversion-1.1.4 +# There was no 64 bit legacy version. Do not provide it as new binaries should +# link against the new version. +#MODULATIONS += isa-sparcv9-garversion-1.1.4 +MODULATIONS += isa-sparcv8-garversion-1.2.1 +MODULATIONS += isa-sparcv9-garversion-1.2.1 + DESCRIPTION = Free lossless audio codec define BLURB FLAC stands for Free Lossless Audio Codec, an audio format similar @@ -15,13 +25,24 @@ SF_PROJ = flac MASTER_SITES = $(SF_MIRRORS) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTNAME = $(SF_PROJ)-$(GARVERSION) +DISTFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION),$(SF_PROJ)-$(VERSION).tar.gz) -PATCHFILES = no-stdint.patch -PATCHFILES += libtool-64bit.patch +PATCHFILES_isa-sparcv8-garversion-1.1.4 = libtool-64bit.patch +PATCHFILES_isa-sparcv9-garversion-1.1.4 = libtool-64bit.patch +PATCHFILES_isa-sparcv8-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PATCHFILES_isa-sparcv9-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PACKAGES = CSWflac CSWxmmsflac CATALOGNAME = libflac +CATALOGNAME = xmms_flac +REQUIRED_PKGS_CSWflac = CSWiconv CSWlibogg +REQUIRED_PKGS_CSWxmmsflac = CSWglib CSWgtk CSWxmms CSWflac + +SPKG_DESC_CSWflac = Free lossless audio codec +SPKG_DESC_CSWxmmsflac = FLAC plugin for XMMS + LICENSE = $(foreach lic,FDL GPL LGPL Xiph,COPYING.$(lic)) # We define upstream file regex so we can be notifed of new upstream software release @@ -29,14 +50,43 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = flac-(\d+(?:\.\d+)*)-src -REQUIRED_PKGS = CSWiconv CSWlibogg - BUILD64 = 1 +NODIRPATHS = --includedir +CPPFLAGS = + +# Must be defined and empty or -I$(includedir) is added too early +EXTRA_CFLAGS = -D__inline= +EXTRA_BUILD_EXPORTS = AM_CFLAGS + +EXTRA_CONFIGURE_ARGS_mm-64 = --disable-xmms-plugin CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += $(EXTRA_CONFIGURE_ARGS_mm-$(MEMORYMODEL)) TEST_TARGET = check +MERGE_SCRIPTS_isa-i386-garversion-1.1.4 = copy-only +MERGE_DIRS_isa-i386-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-amd64-garversion-1.1.4 = copy-relocated-only +MERGE_DIRS_isa-amd64-garversion-1.1.4 = $(libdir) + +MERGE_SCRIPTS_isa-i386-garversion-1.2.1 = copy-all +MERGE_SCRIPTS_isa-amd64-garversion-1.2.1 = copy-relocated-only +MERGE_DIRS_isa-amd64-garversion-1.2.1 = $(bindir) $(sbindir) $(libexecdir) $(libdir) + +MERGE_SCRIPTS_isa-sparcv8-garversion-1.1.4 = copy-only +MERGE_DIRS_isa-sparcv8-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-sparcv9-garversion-1.1.4 = copy-relocated-only +MERGE_DIRS_isa-sparcv9-garversion-1.1.4 = $(libdir) + +MERGE_SCRIPTS_isa-sparcv8-garversion-1.2.1 = copy-all +MERGE_SCRIPTS_isa-sparcv9-garversion-1.2.1 = copy-relocated-only +MERGE_DIRS_isa-sparcv9-garversion-1.2.1 = $(bindir) $(sbindir) $(libexecdir) $(libdir) + +PKGFILES_CSWxmmsflac = $(libdir)/xmms/.* + include gar/category.mk -PATH := $(PATH):/usr/ccs/bin +CC := $(abspath ./bin/cc) +CXX := $(abspath ./bin/CC) +PATH := ./bin:$(PATH):/usr/ccs/bin Added: csw/mgar/pkg/flac/trunk/bin/CC =================================================================== --- csw/mgar/pkg/flac/trunk/bin/CC (rev 0) +++ csw/mgar/pkg/flac/trunk/bin/CC 2009-04-09 13:40:35 UTC (rev 4253) @@ -0,0 +1 @@ +link cc \ No newline at end of file Property changes on: csw/mgar/pkg/flac/trunk/bin/CC ___________________________________________________________________ Added: svn:special + * Added: csw/mgar/pkg/flac/trunk/bin/cc =================================================================== --- csw/mgar/pkg/flac/trunk/bin/cc (rev 0) +++ csw/mgar/pkg/flac/trunk/bin/cc 2009-04-09 13:40:35 UTC (rev 4253) @@ -0,0 +1,22 @@ +#!/opt/csw/bin/perl -w + +use strict; + +my @oargs; + +my @includes = grep { /^-I/ } @ARGV; + at includes = ((grep { /^-I[^\/]/ } @includes),(grep { /^-I[\/]/ } @includes)); +my @argswoincludes = grep { !/^-I/ } @ARGV; + +foreach (@ARGV) { + if( /^-I/ ) { + push @oargs, @includes, @argswoincludes; + last; + } + push @oargs, shift @argswoincludes; +} + +my $cc = "/opt/studio/SOS11/SUNWspro/bin/" . ($0 =~ /cc/ ? "cc" : "CC"); + +print "$cc ", join( " ", @oargs ), "\n"; +exec( $cc, @oargs ); Property changes on: csw/mgar/pkg/flac/trunk/bin/cc ___________________________________________________________________ Added: svn:executable + * Modified: csw/mgar/pkg/flac/trunk/checksums =================================================================== --- csw/mgar/pkg/flac/trunk/checksums 2009-04-09 13:13:26 UTC (rev 4252) +++ csw/mgar/pkg/flac/trunk/checksums 2009-04-09 13:40:35 UTC (rev 4253) @@ -1,3 +1,4 @@ +3958cbd5b6ed8c14966792538e44223b download/flac-1.1.4.tar.gz 153c8b15a54da428d1f0fadc756c22c7 download/flac-1.2.1.tar.gz +c9e9052e1d1238a21ac6c4ab263d2b7f download/libtool-64bit.patch e3144fad8810ceaca718adb6f09dc8fa download/no-stdint.patch -099621e0dad419188acd42c588242131 download/libtool-64bit.patch Modified: csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch =================================================================== --- csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch 2009-04-09 13:13:26 UTC (rev 4252) +++ csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch 2009-04-09 13:40:35 UTC (rev 4253) @@ -1,7 +1,7 @@ -diff -Naur db-4.4.20.orig/dist/ltmain.sh db-4.4.20/dist/ltmain.sh ---- dist/ltmain.sh 2005-10-17 16:35:53.000000000 +0200 -+++ dist/ltmain.sh 2008-05-14 08:30:26.766534000 +0200 -@@ -1552,9 +1552,7 @@ +diff -Naur flac-1.1.4.orig/ltmain.sh flac-1.1.4.patched/ltmain.sh +--- flac-1.1.4.orig/ltmain.sh 2005-04-26 20:23:39.000000000 +0200 ++++ flac-1.1.4.patched/ltmain.sh 2009-04-09 13:59:57.521039544 +0200 +@@ -1545,9 +1545,7 @@ esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 15:57:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 13:57:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4254] csw/mgar/pkg/texinfo/trunk/Makefile Message-ID: Revision: 4254 http://gar.svn.sourceforge.net/gar/?rev=4254&view=rev Author: dmichelsen Date: 2009-04-09 13:57:33 +0000 (Thu, 09 Apr 2009) Log Message: ----------- texinfo: Fix runtime linker path from bug #3598 and depend on CSWbash from #3613 Modified Paths: -------------- csw/mgar/pkg/texinfo/trunk/Makefile Modified: csw/mgar/pkg/texinfo/trunk/Makefile =================================================================== --- csw/mgar/pkg/texinfo/trunk/Makefile 2009-04-09 13:40:35 UTC (rev 4253) +++ csw/mgar/pkg/texinfo/trunk/Makefile 2009-04-09 13:57:33 UTC (rev 4254) @@ -19,10 +19,14 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -REQUIRED_PKGS = CSWgsed CSWncurses CSWiconv CSWggettextrt +REQUIRED_PKGS = CSWbash CSWgsed CSWncurses CSWiconv CSWggettextrt CONFIGURE_ARGS = $(DIRPATHS) +# /opt/csw/lib is added automatically during the build and the +# required libraries don't offer optimized versions, hence no $ISALIST. +RUNPATH_LINKER_FLAGS = + TEST_TARGET = check EXTRA_MERGE_EXCLUDE_FILES = $(libdir)/charset.alias @@ -31,6 +35,10 @@ SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(RELEASE) +post-extract-modulated: + perl -pi -e "s(#! /bin/sh)(#!/opt/csw/bin/bash)" $(WORKSRC)/util/texi2dvi + @$(MAKECOOKIE) + post-install-modulated: ginstall -d $(DESTDIR)$(sbindir) ginstall -m 755 $(WORKDIR)/mkdirentries $(DESTDIR)$(sbindir)/mkdirentries This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 16:01:11 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 14:01:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4255] csw/mgar/pkg Message-ID: Revision: 4255 http://gar.svn.sourceforge.net/gar/?rev=4255&view=rev Author: trygvis Date: 2009-04-09 14:01:11 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Initial commit of Kawa. Added Paths: ----------- csw/mgar/pkg/kawa/ csw/mgar/pkg/kawa/Makefile csw/mgar/pkg/kawa/branches/ csw/mgar/pkg/kawa/tags/ csw/mgar/pkg/kawa/trunk/ csw/mgar/pkg/kawa/trunk/Makefile csw/mgar/pkg/kawa/trunk/checksums csw/mgar/pkg/kawa/trunk/files/ csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec Added: csw/mgar/pkg/kawa/Makefile =================================================================== --- csw/mgar/pkg/kawa/Makefile (rev 0) +++ csw/mgar/pkg/kawa/Makefile 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/kawa/trunk ___________________________________________________________________ Added: svn:ignore + Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile (rev 0) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,29 @@ +GARNAME = kawa +GARVERSION = 1.9.1 +CATEGORIES = utils +GARCH = all + +DESCRIPTION = Java implementation of Scheme and a framework for implementing high-level and dynamic languages + +MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa +DISTFILES = apache-maven-$(GARVERSION)-bin.tar.gz +DISTFILES += $(call admfiles,CSWkawa,) + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz + +#CONFIGURE_SCRIPTS = +#BUILD_SCRIPTS = +#TEST_SCRIPTS = +#INSTALL_SCRIPTS = common + +include gar/category.mk + +#install-common: +# mkdir -p $(DESTDIR)/opt/csw/bin +# rm -rf $(DESTDIR)/opt/csw/share/maven2 +# mkdir -p $(DESTDIR)/opt/csw/share/maven2 +# cp -r $(WORKDIR)/apache-maven-$(GARVERSION)/ $(DESTDIR)/opt/csw/share/maven2/home +# cp $(WORKDIR)/bin-mvn $(DESTDIR)/opt/csw/bin/mvn +# chmod +x $(DESTDIR)/opt/csw/bin/mvn +# $(MAKECOOKIE) Added: csw/mgar/pkg/kawa/trunk/checksums =================================================================== --- csw/mgar/pkg/kawa/trunk/checksums (rev 0) +++ csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,3 @@ +6d842f7cb9696676982096c72d063133 download/apache-maven-2.0.9-bin.tar.gz +8c87a565ba53d763dbf82a2f27f1cff0 download/CSWmaven2.gspec +f935bf12216ef6533ca53879a456ebeb download/bin-mvn Added: csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec =================================================================== --- csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec (rev 0) +++ csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,6 @@ +%var bitname kawa +%var pkgname CSWkawa +%include url file://%{PKGLIB}/csw_dyndepend.gspec +%copyright + +See /opt/csw/share/kawa/LICENSE.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 16:42:37 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 14:42:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4256] csw/mgar/pkg/kawa/trunk Message-ID: Revision: 4256 http://gar.svn.sourceforge.net/gar/?rev=4256&view=rev Author: trygvis Date: 2009-04-09 14:42:37 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Correcting master site and checksums. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile csw/mgar/pkg/kawa/trunk/checksums Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 14:01:11 UTC (rev 4255) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 14:42:37 UTC (rev 4256) @@ -5,8 +5,8 @@ DESCRIPTION = Java implementation of Scheme and a framework for implementing high-level and dynamic languages -MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa -DISTFILES = apache-maven-$(GARVERSION)-bin.tar.gz +MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWkawa,) # We define upstream file regex so we can be notifed of new upstream software release Modified: csw/mgar/pkg/kawa/trunk/checksums =================================================================== --- csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 14:01:11 UTC (rev 4255) +++ csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 14:42:37 UTC (rev 4256) @@ -1,3 +1,2 @@ -6d842f7cb9696676982096c72d063133 download/apache-maven-2.0.9-bin.tar.gz -8c87a565ba53d763dbf82a2f27f1cff0 download/CSWmaven2.gspec -f935bf12216ef6533ca53879a456ebeb download/bin-mvn +611209ca2f621cee8041321902a0466c download/CSWkawa.gspec +8a1cc2d67127392f6f3f180d53800725 download/kawa-1.9.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 16:48:02 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 14:48:02 +0000 Subject: [csw-devel] SF.net SVN: gar:[4257] csw/mgar/pkg/flac/trunk Message-ID: Revision: 4257 http://gar.svn.sourceforge.net/gar/?rev=4257&view=rev Author: dmichelsen Date: 2009-04-09 14:48:02 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Downgrade to legacy 1.1.2 Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile csw/mgar/pkg/flac/trunk/checksums Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 14:42:37 UTC (rev 4256) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 14:48:02 UTC (rev 4257) @@ -3,12 +3,13 @@ CATEGORIES = lib EXTRA_MODULATORS = GARVERSION -MODULATIONS_GARVERSION = 1.1.4 1.2.1 +# Version 1.1.2 is the last to contain libflac.so.7 where most of the binaries depend on +MODULATIONS_GARVERSION = 1.1.2 1.2.1 -MODULATIONS = isa-sparcv8-garversion-1.1.4 +MODULATIONS = isa-sparcv8-garversion-1.1.2 # There was no 64 bit legacy version. Do not provide it as new binaries should # link against the new version. -#MODULATIONS += isa-sparcv9-garversion-1.1.4 +#MODULATIONS += isa-sparcv9-garversion-1.1.2 MODULATIONS += isa-sparcv8-garversion-1.2.1 MODULATIONS += isa-sparcv9-garversion-1.2.1 @@ -28,8 +29,8 @@ DISTNAME = $(SF_PROJ)-$(GARVERSION) DISTFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION),$(SF_PROJ)-$(VERSION).tar.gz) -PATCHFILES_isa-sparcv8-garversion-1.1.4 = libtool-64bit.patch -PATCHFILES_isa-sparcv9-garversion-1.1.4 = libtool-64bit.patch +PATCHFILES_isa-sparcv8-garversion-1.1.2 = libtool-64bit.patch +PATCHFILES_isa-sparcv9-garversion-1.1.2 = libtool-64bit.patch PATCHFILES_isa-sparcv8-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch PATCHFILES_isa-sparcv9-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch @@ -43,6 +44,8 @@ SPKG_DESC_CSWflac = Free lossless audio codec SPKG_DESC_CSWxmmsflac = FLAC plugin for XMMS +SPKG_SOURCEURL = http://flac.sourceforge.net/ + LICENSE = $(foreach lic,FDL GPL LGPL Xiph,COPYING.$(lic)) # We define upstream file regex so we can be notifed of new upstream software release @@ -65,19 +68,19 @@ TEST_TARGET = check -MERGE_SCRIPTS_isa-i386-garversion-1.1.4 = copy-only -MERGE_DIRS_isa-i386-garversion-1.1.4 = $(libdir) -MERGE_SCRIPTS_isa-amd64-garversion-1.1.4 = copy-relocated-only -MERGE_DIRS_isa-amd64-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-i386-garversion-1.1.2 = copy-only +MERGE_DIRS_isa-i386-garversion-1.1.2 = $(libdir) +MERGE_SCRIPTS_isa-amd64-garversion-1.1.2 = copy-relocated-only +MERGE_DIRS_isa-amd64-garversion-1.1.2 = $(libdir) MERGE_SCRIPTS_isa-i386-garversion-1.2.1 = copy-all MERGE_SCRIPTS_isa-amd64-garversion-1.2.1 = copy-relocated-only MERGE_DIRS_isa-amd64-garversion-1.2.1 = $(bindir) $(sbindir) $(libexecdir) $(libdir) -MERGE_SCRIPTS_isa-sparcv8-garversion-1.1.4 = copy-only -MERGE_DIRS_isa-sparcv8-garversion-1.1.4 = $(libdir) -MERGE_SCRIPTS_isa-sparcv9-garversion-1.1.4 = copy-relocated-only -MERGE_DIRS_isa-sparcv9-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-sparcv8-garversion-1.1.2 = copy-only +MERGE_DIRS_isa-sparcv8-garversion-1.1.2 = $(libdir) +MERGE_SCRIPTS_isa-sparcv9-garversion-1.1.2 = copy-relocated-only +MERGE_DIRS_isa-sparcv9-garversion-1.1.2 = $(libdir) MERGE_SCRIPTS_isa-sparcv8-garversion-1.2.1 = copy-all MERGE_SCRIPTS_isa-sparcv9-garversion-1.2.1 = copy-relocated-only @@ -90,3 +93,7 @@ CC := $(abspath ./bin/cc) CXX := $(abspath ./bin/CC) PATH := ./bin:$(PATH):/usr/ccs/bin + +post-patch-isa-sparcv8-garversion-1.1.2: + perl -pi -e "s/-O2 //g" $(WORKSRC)/configure + $(MAKECOOKIE) Modified: csw/mgar/pkg/flac/trunk/checksums =================================================================== --- csw/mgar/pkg/flac/trunk/checksums 2009-04-09 14:42:37 UTC (rev 4256) +++ csw/mgar/pkg/flac/trunk/checksums 2009-04-09 14:48:02 UTC (rev 4257) @@ -1,4 +1,4 @@ -3958cbd5b6ed8c14966792538e44223b download/flac-1.1.4.tar.gz +2bfc127cdda02834d0491ab531a20960 download/flac-1.1.2.tar.gz 153c8b15a54da428d1f0fadc756c22c7 download/flac-1.2.1.tar.gz c9e9052e1d1238a21ac6c4ab263d2b7f download/libtool-64bit.patch e3144fad8810ceaca718adb6f09dc8fa download/no-stdint.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:14:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:14:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4258] csw/mgar/gar/v2/gar.mk Message-ID: Revision: 4258 http://gar.svn.sourceforge.net/gar/?rev=4258&view=rev Author: dmichelsen Date: 2009-04-09 15:14:33 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Allow skipping of specific modulations Modified Paths: -------------- csw/mgar/gar/v2/gar.mk Modified: csw/mgar/gar/v2/gar.mk =================================================================== --- csw/mgar/gar/v2/gar.mk 2009-04-09 14:48:02 UTC (rev 4257) +++ csw/mgar/gar/v2/gar.mk 2009-04-09 15:14:33 UTC (rev 4258) @@ -121,7 +121,7 @@ ),\ $(call expand_modulator_1,$(1))) -MODULATIONS ?= $(strip $(call modulations,$(strip $(MODULATORS)))) +MODULATIONS ?= $(filter-out $(SKIP_MODULATIONS),$(strip $(call modulations,$(strip $(MODULATORS))))) # _modulate(ISA STATIC,,,) # -> _modulate2(STATIC,isa-i386,ISA,ISA=i386) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 17:16:36 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:16:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4259] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4259 http://gar.svn.sourceforge.net/gar/?rev=4259&view=rev Author: trygvis Date: 2009-04-09 15:16:35 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adjustments. Thanks Ben!. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 15:14:33 UTC (rev 4258) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 15:16:35 UTC (rev 4259) @@ -12,18 +12,13 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz -#CONFIGURE_SCRIPTS = -#BUILD_SCRIPTS = -#TEST_SCRIPTS = -#INSTALL_SCRIPTS = common +CONFIGURE_ARGS = $(DIRPATHS) +TEST_SCRIPTS = include gar/category.mk -#install-common: -# mkdir -p $(DESTDIR)/opt/csw/bin -# rm -rf $(DESTDIR)/opt/csw/share/maven2 -# mkdir -p $(DESTDIR)/opt/csw/share/maven2 -# cp -r $(WORKDIR)/apache-maven-$(GARVERSION)/ $(DESTDIR)/opt/csw/share/maven2/home -# cp $(WORKDIR)/bin-mvn $(DESTDIR)/opt/csw/bin/mvn -# chmod +x $(DESTDIR)/opt/csw/bin/mvn -# $(MAKECOOKIE) +PATH := /usr/jdk1.5.0_15/bin:$(PATH) + +# checkpkg complains unless this file is removed. +post-install: + rm $(DESTDIR)/opt/csw/share/info/dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:17:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:17:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4260] csw/mgar/pkg/flac/trunk/Makefile Message-ID: Revision: 4260 http://gar.svn.sourceforge.net/gar/?rev=4260&view=rev Author: dmichelsen Date: 2009-04-09 15:17:22 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Add modulations for i386 Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:16:35 UTC (rev 4259) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:17:22 UTC (rev 4260) @@ -6,12 +6,10 @@ # Version 1.1.2 is the last to contain libflac.so.7 where most of the binaries depend on MODULATIONS_GARVERSION = 1.1.2 1.2.1 -MODULATIONS = isa-sparcv8-garversion-1.1.2 # There was no 64 bit legacy version. Do not provide it as new binaries should # link against the new version. -#MODULATIONS += isa-sparcv9-garversion-1.1.2 -MODULATIONS += isa-sparcv8-garversion-1.2.1 -MODULATIONS += isa-sparcv9-garversion-1.2.1 +SKIP_MODULATIONS = isa-sparcv9-garversion-1.1.2 +SKIP_MODULATIONS += isa-amd64-garversion-1.1.2 DESCRIPTION = Free lossless audio codec define BLURB @@ -34,6 +32,11 @@ PATCHFILES_isa-sparcv8-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch PATCHFILES_isa-sparcv9-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PATCHFILES_isa-i386-garversion-1.1.2 = libtool-64bit.patch +PATCHFILES_isa-amd64-garversion-1.1.2 = libtool-64bit.patch +PATCHFILES_isa-i386-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PATCHFILES_isa-amd64-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch + PACKAGES = CSWflac CSWxmmsflac CATALOGNAME = libflac CATALOGNAME = xmms_flac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 17:19:33 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:19:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4261] csw/mgar/pkg/kawa/trunk/ Message-ID: Revision: 4261 http://gar.svn.sourceforge.net/gar/?rev=4261&view=rev Author: trygvis Date: 2009-04-09 15:19:32 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adding ignores. Property Changed: ---------------- csw/mgar/pkg/kawa/trunk/ Property changes on: csw/mgar/pkg/kawa/trunk ___________________________________________________________________ Modified: svn:ignore - + cookies download work This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:35:25 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:35:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4262] csw/mgar/pkg/flac/trunk/Makefile Message-ID: Revision: 4262 http://gar.svn.sourceforge.net/gar/?rev=4262&view=rev Author: dmichelsen Date: 2009-04-09 15:35:24 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Add patch for i386 modulation Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:19:32 UTC (rev 4261) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:35:24 UTC (rev 4262) @@ -97,6 +97,10 @@ CXX := $(abspath ./bin/CC) PATH := ./bin:$(PATH):/usr/ccs/bin +post-patch-isa-i386-garversion-1.1.2: + perl -pi -e "s/-O2 //g" $(WORKSRC)/configure + $(MAKECOOKIE) + post-patch-isa-sparcv8-garversion-1.1.2: perl -pi -e "s/-O2 //g" $(WORKSRC)/configure $(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:51:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:51:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4263] csw/mgar/pkg/flac/trunk/Makefile Message-ID: Revision: 4263 http://gar.svn.sourceforge.net/gar/?rev=4263&view=rev Author: dmichelsen Date: 2009-04-09 15:51:19 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Fix catalog name Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:35:24 UTC (rev 4262) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:51:19 UTC (rev 4263) @@ -38,8 +38,8 @@ PATCHFILES_isa-amd64-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch PACKAGES = CSWflac CSWxmmsflac -CATALOGNAME = libflac -CATALOGNAME = xmms_flac +CATALOGNAME_CSWflac = libflac +CATALOGNAME_CSWxmmsflac = xmms_flac REQUIRED_PKGS_CSWflac = CSWiconv CSWlibogg REQUIRED_PKGS_CSWxmmsflac = CSWglib CSWgtk CSWxmms CSWflac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 22:00:54 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:00:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4264] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4264 http://gar.svn.sourceforge.net/gar/?rev=4264&view=rev Author: trygvis Date: 2009-04-09 20:00:54 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Fixing broken ARCH flag. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 15:51:19 UTC (rev 4263) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:00:54 UTC (rev 4264) @@ -1,7 +1,7 @@ GARNAME = kawa GARVERSION = 1.9.1 CATEGORIES = utils -GARCH = all +ARCHALL = 1 DESCRIPTION = Java implementation of Scheme and a framework for implementing high-level and dynamic languages This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 22:22:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:22:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4265] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4265 http://gar.svn.sourceforge.net/gar/?rev=4265&view=rev Author: dmichelsen Date: 2009-04-09 20:22:59 +0000 (Thu, 09 Apr 2009) Log Message: ----------- kawa: Removed unnecessary removal of info/dir Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:00:54 UTC (rev 4264) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:22:59 UTC (rev 4265) @@ -18,7 +18,3 @@ include gar/category.mk PATH := /usr/jdk1.5.0_15/bin:$(PATH) - -# checkpkg complains unless this file is removed. -post-install: - rm $(DESTDIR)/opt/csw/share/info/dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 22:42:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:42:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4266] csw/mgar/pkg/kawa/trunk Message-ID: Revision: 4266 http://gar.svn.sourceforge.net/gar/?rev=4266&view=rev Author: dmichelsen Date: 2009-04-09 20:42:35 +0000 (Thu, 09 Apr 2009) Log Message: ----------- kawa: Switch to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:22:59 UTC (rev 4265) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:42:35 UTC (rev 4266) @@ -7,7 +7,6 @@ MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWkawa,) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz Deleted: csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec =================================================================== --- csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec 2009-04-09 20:22:59 UTC (rev 4265) +++ csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec 2009-04-09 20:42:35 UTC (rev 4266) @@ -1,6 +0,0 @@ -%var bitname kawa -%var pkgname CSWkawa -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -See /opt/csw/share/kawa/LICENSE.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 22:48:54 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:48:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4267] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4267 http://gar.svn.sourceforge.net/gar/?rev=4267&view=rev Author: trygvis Date: 2009-04-09 20:48:54 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adding dependency information. o Enabling the readline wrapper. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:42:35 UTC (rev 4266) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:48:54 UTC (rev 4267) @@ -8,12 +8,22 @@ MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +REQUIRED_PKG = CSWncurses CSWreadline + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz -CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --enable-kawa-frontend TEST_SCRIPTS = include gar/category.mk PATH := /usr/jdk1.5.0_15/bin:$(PATH) + +# When building the 'kawa' binary, this flag is ignore from the ./configure stuff, but LIBS is used. +kawa_LDFLAGS = -L/opt/csw/lib +export kawa_LDFLAGS + +LIBS = -lsocket +export LIBS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 23:27:07 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 21:27:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4268] csw/mgar/pkg/kawa/trunk Message-ID: Revision: 4268 http://gar.svn.sourceforge.net/gar/?rev=4268&view=rev Author: trygvis Date: 2009-04-09 21:27:06 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Removing the native readline wrapper, no good. Adding custom one based on CSWrlwrap. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile csw/mgar/pkg/kawa/trunk/checksums Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:48:54 UTC (rev 4267) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 21:27:06 UTC (rev 4268) @@ -7,16 +7,17 @@ MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += bin-kawa -REQUIRED_PKG = CSWncurses CSWreadline +REQUIRED_PKG = CSWrlwrap # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz CONFIGURE_ARGS = $(DIRPATHS) -CONFIGURE_ARGS += --enable-kawa-frontend -TEST_SCRIPTS = +TEST_SCRIPTS = + include gar/category.mk PATH := /usr/jdk1.5.0_15/bin:$(PATH) @@ -27,3 +28,7 @@ LIBS = -lsocket export LIBS + +post-install-modulated: + # Overwrite the default kawa junk + cp $(WORKDIR)/bin-kawa $(DESTDIR)/opt/csw/bin/kawa Modified: csw/mgar/pkg/kawa/trunk/checksums =================================================================== --- csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 20:48:54 UTC (rev 4267) +++ csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 21:27:06 UTC (rev 4268) @@ -1,2 +1,2 @@ -611209ca2f621cee8041321902a0466c download/CSWkawa.gspec +ba051c4dde680a004ea89ed369355d0e download/bin-kawa 8a1cc2d67127392f6f3f180d53800725 download/kawa-1.9.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 23:27:41 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 21:27:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4269] csw/mgar/pkg/kawa/trunk/files/bin-kawa Message-ID: Revision: 4269 http://gar.svn.sourceforge.net/gar/?rev=4269&view=rev Author: trygvis Date: 2009-04-09 21:27:41 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adding missing file from previous commit. Added Paths: ----------- csw/mgar/pkg/kawa/trunk/files/bin-kawa Added: csw/mgar/pkg/kawa/trunk/files/bin-kawa =================================================================== --- csw/mgar/pkg/kawa/trunk/files/bin-kawa (rev 0) +++ csw/mgar/pkg/kawa/trunk/files/bin-kawa 2009-04-09 21:27:41 UTC (rev 4269) @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -z "$JAVA" ] +then + if [ -z "$JAVA_HOME" ] + then + JAVA=/usr/jdk/latest/bin/java + fi +fi + +exec /opt/csw/bin/rlwrap "$JAVA" -classpath /opt/csw/share/java/kawa.jar kawa.repl "$@" Property changes on: csw/mgar/pkg/kawa/trunk/files/bin-kawa ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 10 02:13:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 10 Apr 2009 00:13:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4270] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4270 http://gar.svn.sourceforge.net/gar/?rev=4270&view=rev Author: valholla Date: 2009-04-10 00:13:56 +0000 (Fri, 10 Apr 2009) Log Message: ----------- add binutils as a requirement, this gcc uses /opt/csw/bin/gas Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-09 21:27:41 UTC (rev 4269) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-10 00:13:56 UTC (rev 4270) @@ -64,7 +64,7 @@ REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4ada = CSWgcc4adart $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) CSWbinutils REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4g++rt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert CSWiconv This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Fri Apr 10 04:34:31 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Fri, 10 Apr 2009 02:34:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4271] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4271 http://gar.svn.sourceforge.net/gar/?rev=4271&view=rev Author: bdwalton Date: 2009-04-10 02:34:31 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Bump to 1.74.3. Convert to dynamic gspec. Updated postinstall script. Update makefile patch to reflect the fact that they now ship one (that doesn't do an install). Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch Removed Paths: ------------- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec Modified: csw/mgar/pkg/docbook-style-xsl/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,11 +1,16 @@ GARNAME = docbookxsl -GARVERSION = 1.69.1 -PATCHLEVEL = 5.1 +GARVERSION = 1.74.3 CATEGORIES = xtra # for our (modified from rhel) copied in Makefile. PREREQUISITE_PKGS = CSWgfile CSWbash +PACKAGES = CSWdocbookxsl CSWdocbookxsldoc +ARCHALL = 1 + +CATALOGNAME_CSWdocbookxsl = $(GARNAME) +CATALOGNAME_CSWdocbookxsldoc = $(GARNAME)doc + REQUIRED_PKGS_CSWdocbookxsl = CSWsgmlcommon CSWxmlcommon CSWdocbookdtds REQUIRED_PKGS_CSWdocbookxsl += CSWlibxml2 REQUIRED_PKGS_CSWdocbookxsldoc = CSWdocbookxsl @@ -28,21 +33,18 @@ MASTER_SITES = $(SF_MIRRORS) DISTFILES = docbook-xsl-$(GARVERSION).tar.bz2 DISTFILES += docbook-xsl-doc-$(GARVERSION).tar.bz2 -DISTFILES += $(call admfiles,CSWdocbookxsl,postinstall preremove) -DISTFILES += $(call admfiles,CSWdocbookxsldoc,) +DISTFILES += CSWdocbookxsl.postinstall CSWdocbookxsl.preremove -# These are listed in the same order they'd be applied during the rpm build... -# They don't apply cleanly, otherwise. -PATCHFILES = docbook-xsl-pagesetup.patch docbook-xsl-marginleft.patch -PATCHFILES += docbook-xsl-lists.patch docbook-xsl-sp.patch PATCHFILES += add_makefile.patch CONFIGURE_SCRIPTS = -BUILD_SCRIPTS = +BUILD_SCRIPTS = TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/Makefile.csw + INSTALL_ARGS = DESTDIR=$(DESTDIR) #to make the package extraction happy...(we don't use the - separator) @@ -50,5 +52,7 @@ include gar/category.mk -#override system checkpkg so that docbookxsldoc can depend on docbookxsl -PATH := /home/bwalton:$(PATH) +install-%/Makefile.csw: + @echo " ==> Running make install in $*" + @$(INSTALL_ENV) $(MAKE) -f Makefile.csw DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install + @$(MAKECOOKIE) \ No newline at end of file Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,11 +1,5 @@ -6ebd29a67f2dcc3f2220f475ee6f6552 download/docbook-xsl-1.69.1.tar.bz2 -b3bf09a0b1a368a3490e68ffc695d290 download/docbook-xsl-doc-1.69.1.tar.bz2 -4120f10e50070dd8fc2284d5214bf51d download/CSWdocbookxsl.gspec -e96ac786b8d7b1bd6bc76787c965017a download/CSWdocbookxsl.postinstall +c022eb8e15bf110605a4695235f20075 download/CSWdocbookxsl.postinstall 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove -a0c6ee83fdef595158d9eed95d508d8f download/CSWdocbookxsldoc.gspec -84b37b559cc95c747e39a5a8f79558a3 download/docbook-xsl-pagesetup.patch -1d1ff63f5ebd3527c925f68e55138b6f download/docbook-xsl-marginleft.patch -cec8c281ed1c9be99ad47a74362248d5 download/docbook-xsl-lists.patch -e7bbf777eadbb70aaed073006de0347e download/docbook-xsl-sp.patch -8b8a8d4307fa3f3dcb992ebd16c4fb09 download/add_makefile.patch +9ba4d6409de31404b8022f10630016e0 download/add_makefile.patch +c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 +2a032a95fbf24367d13acc8210f9cd72 download/docbook-xsl-doc-1.74.3.tar.bz2 Deleted: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,5 +0,0 @@ -%var bitname docbookxsl -%var pkgname CSWdocbookxsl -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec - Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-10 02:34:31 UTC (rev 4271) @@ -14,7 +14,7 @@ CATALOG=/opt/csw/etc/xml/catalog #we need a version here, since that will be referenced in URLS being redirected -VERSION=1.69.1 +VERSION=1.74.3 $PREFIX $CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/$VERSION" \ Deleted: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,6 +0,0 @@ -%var bitname docbookxsldoc -%var pkgname CSWdocbookxsldoc -%var arch all -%var desc Documentation for the Docbook XSL Stylesheets -%include url file://%{PKGLIB}/csw_dyndepend.gspec - Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,7 +1,6 @@ ---- /dev/null 2008-12-14 03:06:26.000000000 +0100 -+++ docbook-xsl-1.69.1/Makefile 2008-12-14 04:12:33.444192066 +0100 -@@ -0,0 +1,49 @@ -+ +--- /dev/null 2009-04-10 02:03:32.000000000 +0200 ++++ docbook-xsl-1.74.3/Makefile.csw 2009-04-10 04:25:32.872750482 +0200 +@@ -0,0 +1,46 @@ +DESTDIR ?= ... should be overridden by GAR ... + +SHELL = /opt/csw/bin/bash @@ -29,11 +28,9 @@ + cp htmlhelp/*.xsl $(instdir)/htmlhelp + cp javahelp/*.xsl $(instdir)/javahelp + cp lib/lib.xsl $(instdir)/lib -+ cp template/README $(instdir)/template + cp template/*.xml $(instdir)/template + cp template/*.xsl $(instdir)/template + cp xhtml/*.xsl $(instdir)/xhtml -+ cp manpages/README $(instdir)/manpages + cp manpages/*.xsl $(instdir)/manpages + cp profiling/*.xsl $(instdir)/profiling + @@ -48,6 +45,5 @@ + +install-docs: + gmkdir -p $(docdir) -+ cp BUGS ChangeLog README TODO $(docdir)/ ++ cp AUTHORS BUGS README TODO RELEASE-NOTES* NEWS* $(docdir)/ + cp -R doc $(docdir)/ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Fri Apr 10 12:49:05 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Fri, 10 Apr 2009 10:49:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4272] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4272 http://gar.svn.sourceforge.net/gar/?rev=4272&view=rev Author: chninkel Date: 2009-04-10 10:49:05 +0000 (Fri, 10 Apr 2009) Log Message: ----------- bash: updated to patch level 17 Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/checksums csw/mgar/pkg/bash/trunk/files/changelog.CSW Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 02:34:31 UTC (rev 4271) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 10:49:05 UTC (rev 4272) @@ -1,6 +1,6 @@ GARNAME = bash GARVERSION = 4.0 -PATCHLEVEL = 10 +PATCHLEVEL = 17 CATEGORIES = devel DESCRIPTION = A sh-compatible command language interpreter Modified: csw/mgar/pkg/bash/trunk/checksums =================================================================== --- csw/mgar/pkg/bash/trunk/checksums 2009-04-10 02:34:31 UTC (rev 4271) +++ csw/mgar/pkg/bash/trunk/checksums 2009-04-10 10:49:05 UTC (rev 4272) @@ -4,7 +4,7 @@ bcc9760316385d49ff31c2ed72f4be4a download/CSWbash.postinstall 589297e4f9a43d0c82632e99423db7ef download/CSWbash.postremove 293cc64a948ea3d49010ae6e58122b52 download/CSWbash.depend -a4c85be596685b1d7bdc469d17472f5f download/changelog.CSW +9fbdf25b297945fee52e6f7b7a5c218f download/changelog.CSW bc7f4762443939bd7dccb42370f0d932 download/bash40-001 c2a4a4786a83ed4ec366c6a8924369a2 download/bash40-002 22e8a824eddba21a8fce10d7984c2aba download/bash40-003 @@ -15,4 +15,11 @@ d3eb7b6f00d525e032478c33f51d46a8 download/bash40-008 340601c997ce569532417a7ae92248b8 download/bash40-009 0bd5ab96d514ffb1afbb8c7984b15146 download/bash40-010 +32cb20f339a20e1e9fb37a5d18f18fca download/bash40-011 +33fd9e93d30a17988c19554ef26d56e0 download/bash40-012 +a266b42df5e9ed7e8818a8b00d50e00b download/bash40-013 +86cac78f191a32cd1404f11264eb9b2a download/bash40-014 +bb41963d030bc61a20e8185367b337c5 download/bash40-015 +f75455048a086528971252fd979b8755 download/bash40-016 +34b2cd57271a452f4a26b39d77ff908f download/bash40-017 29607316cff22f7427322d8f190cbadf download/use_system_bashrc_and_logout.patch Modified: csw/mgar/pkg/bash/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 02:34:31 UTC (rev 4271) +++ csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 10:49:05 UTC (rev 4272) @@ -1,3 +1,9 @@ +bash (4.0,REV=2009.04.10) unstable + + * Added bash patches bash40-011 to bash40-017. + + -- Yann Rouillard Fri, 10 Apr 2009 12:06:33 +0200 + bash (4.0,REV=2009.03.21) unstable * Added bash patches bash40-001 to bash40-010. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Fri Apr 10 18:56:53 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Fri, 10 Apr 2009 16:56:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4273] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4273 http://gar.svn.sourceforge.net/gar/?rev=4273&view=rev Author: chninkel Date: 2009-04-10 16:56:53 +0000 (Fri, 10 Apr 2009) Log Message: ----------- bash: added patch level in package version and some reorganisation Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/files/changelog.CSW Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 10:49:05 UTC (rev 4272) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 16:56:53 UTC (rev 4273) @@ -1,6 +1,19 @@ +##################################################################### +# OpenCSW build recipe for bash +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = bash -GARVERSION = 4.0 -PATCHLEVEL = 17 +GARVERSION = 4.0.17 CATEGORIES = devel DESCRIPTION = A sh-compatible command language interpreter @@ -8,23 +21,29 @@ GNU Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incorporates useful features from the Korn and C shells (ksh and csh). Bash is intended to be a conforming implementation of the IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2). endef +BASH_VERSION = $(shell echo $(GARVERSION)c | cut -d. -f1-2) +BASH_PATCHLEVEL = $(shell echo -n $(GARVERSION) | cut -d. -f3) + + +###### Upstream and opencsw files information ####### + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = bash-(\d+\.\d+).tar.gz $(PATCHFILE_PREFIX)-(\d+) # Patches download location -MASTER_SITES = $(GNU_MIRROR)/bash-$(GARVERSION)-patches/ +MASTER_SITES = $(GNU_MIRROR)/bash-$(BASH_VERSION)-patches/ # Main archive location MASTER_SITES += $(GNU_MIRROR) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES = $(GARNAME)-$(BASH_VERSION).tar.gz DISTFILES += $(call admfiles,CSWbash,prototype postinstall postremove depend) DISTFILES += changelog.CSW -PATCHFILE_PREFIX = bash$(subst .,,$(GARVERSION)) +PATCHFILE_PREFIX = bash$(subst .,,$(BASH_VERSION)) PATCHDIRLEVEL = 0 # we generate the list of patches from the PATCHLEVEL PATCHFILES = $(shell LEVEL=1; \ PREFIX_0="00"; \ - while [ $$LEVEL -le $(PATCHLEVEL) ]; do \ + while [ $$LEVEL -le $(BASH_PATCHLEVEL) ]; do \ echo $(PATCHFILE_PREFIX)-$$PREFIX_0$$LEVEL; \ LEVEL=`expr $$LEVEL + 1`; \ if [ $$LEVEL -ge 10 ]; then \ @@ -34,6 +53,9 @@ PATCHFILES += use_system_bashrc_and_logout.patch + +##### Build and installation information ##### + CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/bash/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 10:49:05 UTC (rev 4272) +++ csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 16:56:53 UTC (rev 4273) @@ -1,6 +1,7 @@ -bash (4.0,REV=2009.04.10) unstable +bash (4.0.17,REV=2009.04.10) unstable * Added bash patches bash40-011 to bash40-017. + * Added patch level in package version. -- Yann Rouillard Fri, 10 Apr 2009 12:06:33 +0200 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sat Apr 11 17:35:57 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 11 Apr 2009 15:35:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4274] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4274 http://gar.svn.sourceforge.net/gar/?rev=4274&view=rev Author: chninkel Date: 2009-04-11 15:35:57 +0000 (Sat, 11 Apr 2009) Log Message: ----------- bash: switched to gar v2 Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/checksums csw/mgar/pkg/bash/trunk/files/CSWbash.prototype csw/mgar/pkg/bash/trunk/files/changelog.CSW Removed Paths: ------------- csw/mgar/pkg/bash/trunk/files/CSWbash.depend csw/mgar/pkg/bash/trunk/files/CSWbash.gspec Property Changed: ---------------- csw/mgar/pkg/bash/trunk/ Property changes on: csw/mgar/pkg/bash/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-11 15:35:57 UTC (rev 4274) @@ -24,7 +24,12 @@ BASH_VERSION = $(shell echo $(GARVERSION)c | cut -d. -f1-2) BASH_PATCHLEVEL = $(shell echo -n $(GARVERSION) | cut -d. -f3) +PACKAGES = CSWbash +REQUIRED_PKGS = CSWggettextrt +REQUIRED_PKGS += CSWiconv + + ###### Upstream and opencsw files information ####### # We define upstream file regex so we can be notifed of new upstream software release @@ -34,8 +39,9 @@ MASTER_SITES = $(GNU_MIRROR)/bash-$(BASH_VERSION)-patches/ # Main archive location MASTER_SITES += $(GNU_MIRROR) +DISTNAME = $(GARNAME)-$(BASH_VERSION) DISTFILES = $(GARNAME)-$(BASH_VERSION).tar.gz -DISTFILES += $(call admfiles,CSWbash,prototype postinstall postremove depend) +DISTFILES += CSWbash.prototype CSWbash.postinstall CSWbash.postremove DISTFILES += changelog.CSW PATCHFILE_PREFIX = bash$(subst .,,$(BASH_VERSION)) @@ -68,8 +74,9 @@ touch $(WORKSRC)/config.status -post-install: +post-merge: @( for FILE in README RBASH NEWS NOTES POSIX AUTHORS doc/FAQ doc/INTRO; do \ - ginstall -D $(WORKSRC)/$$FILE $(DESTDIR)$(docdir)/$(GARNAME)/`basename $$FILE`; \ + ginstall -D $(WORKSRC_FIRSTMOD)/$$FILE $(PKGROOT)$(docdir)/$(GARNAME)/`basename $$FILE`; \ done ) + ginstall -D $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW Modified: csw/mgar/pkg/bash/trunk/checksums =================================================================== --- csw/mgar/pkg/bash/trunk/checksums 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/checksums 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,10 +1,7 @@ -a90a1b5a6db4838483f05438e05e8eb9 download/bash-4.0.tar.gz -29e973aa9a6fca0a9e28c905b95609bf download/CSWbash.gspec -5ba80bd9a48fdccfb70739095fb77010 download/CSWbash.prototype bcc9760316385d49ff31c2ed72f4be4a download/CSWbash.postinstall 589297e4f9a43d0c82632e99423db7ef download/CSWbash.postremove -293cc64a948ea3d49010ae6e58122b52 download/CSWbash.depend -9fbdf25b297945fee52e6f7b7a5c218f download/changelog.CSW +949396065ba932e8af683eae510586e9 download/CSWbash.prototype +a90a1b5a6db4838483f05438e05e8eb9 download/bash-4.0.tar.gz bc7f4762443939bd7dccb42370f0d932 download/bash40-001 c2a4a4786a83ed4ec366c6a8924369a2 download/bash40-002 22e8a824eddba21a8fce10d7984c2aba download/bash40-003 @@ -22,4 +19,5 @@ bb41963d030bc61a20e8185367b337c5 download/bash40-015 f75455048a086528971252fd979b8755 download/bash40-016 34b2cd57271a452f4a26b39d77ff908f download/bash40-017 +4e4a9d374ce4291b6ba4974adc086767 download/changelog.CSW 29607316cff22f7427322d8f190cbadf download/use_system_bashrc_and_logout.patch Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.depend =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.depend 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.depend 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,2 +0,0 @@ -P CSWggettextrt ggettextrt - GNU gettext -P CSWiconv libiconv - GNU iconv library Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.gspec =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.gspec 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.gspec 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,4 +0,0 @@ -%var bitname bash -%var pkgname CSWbash -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING Modified: csw/mgar/pkg/bash/trunk/files/CSWbash.prototype =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.prototype 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.prototype 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,7 +1,7 @@ f none /opt/csw/bin/bash 0755 root bin f none /opt/csw/bin/bashbug 0555 root bin d none /opt/csw/share/doc/bash 0755 root bin -f none /opt/csw/share/doc/bash/changelog.CSW=changelog.CSW 0644 root bin +f none /opt/csw/share/doc/bash/changelog.CSW 0644 root bin f none /opt/csw/share/doc/bash/README 0644 root bin f none /opt/csw/share/doc/bash/FAQ 0644 root bin f none /opt/csw/share/doc/bash/RBASH 0644 root bin Modified: csw/mgar/pkg/bash/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,28 +1,28 @@ -bash (4.0.17,REV=2009.04.10) unstable +bash (4.0.17,REV=2009.04.11) unstable * Added bash patches bash40-011 to bash40-017. * Added patch level in package version. - -- Yann Rouillard Fri, 10 Apr 2009 12:06:33 +0200 + -- Yann Rouillard Fri, 11 Apr 2009 12:06:33 +0200 bash (4.0,REV=2009.03.21) unstable * Added bash patches bash40-001 to bash40-010. - -- Yann Rouillard Sat, 21 Mar 2009 12:55:58 +0100 + -- Yann Rouillard Sat, 21 Mar 2009 12:55:58 +0100 bash (4.0,REV=2009.02.21) unstable * New upstream release. - -- Yann Rouillard Sat, 21 Feb 2009 16:58:45 +0100 + -- Yann Rouillard Sat, 21 Feb 2009 16:58:45 +0100 bash (3.2,REV=2009.02.15) unstable * Changed gettext dependancy to follow gettext package split (Closes: #3147). - -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 + -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 bash (3.2,REV=2008.11.30) unstable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sat Apr 11 20:42:24 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 11 Apr 2009 18:42:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4275] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4275 http://gar.svn.sourceforge.net/gar/?rev=4275&view=rev Author: chninkel Date: 2009-04-11 18:42:23 +0000 (Sat, 11 Apr 2009) Log Message: ----------- bash: now uses build class action script provided by Solaris Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/checksums csw/mgar/pkg/bash/trunk/files/CSWbash.prototype csw/mgar/pkg/bash/trunk/files/changelog.CSW Added Paths: ----------- csw/mgar/pkg/bash/trunk/files/shells Removed Paths: ------------- csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall csw/mgar/pkg/bash/trunk/files/CSWbash.postremove Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-11 18:42:23 UTC (rev 4275) @@ -29,6 +29,7 @@ REQUIRED_PKGS = CSWggettextrt REQUIRED_PKGS += CSWiconv +SPKG_CLASSES = none build ###### Upstream and opencsw files information ####### @@ -41,9 +42,12 @@ MASTER_SITES += $(GNU_MIRROR) DISTNAME = $(GARNAME)-$(BASH_VERSION) DISTFILES = $(GARNAME)-$(BASH_VERSION).tar.gz -DISTFILES += CSWbash.prototype CSWbash.postinstall CSWbash.postremove +DISTFILES += CSWbash.prototype DISTFILES += changelog.CSW +# build action script to modify /etc/shells at package installation and removal time +DISTFILES += shells + PATCHFILE_PREFIX = bash$(subst .,,$(BASH_VERSION)) PATCHDIRLEVEL = 0 # we generate the list of patches from the PATCHLEVEL @@ -57,6 +61,8 @@ fi; \ done ) +# +# opencsw bash use /etc/bash.bashrc and /etc/bash.bash_logout files PATCHFILES += use_system_bashrc_and_logout.patch @@ -79,4 +85,4 @@ ginstall -D $(WORKSRC_FIRSTMOD)/$$FILE $(PKGROOT)$(docdir)/$(GARNAME)/`basename $$FILE`; \ done ) ginstall -D $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW - + ginstall -D $(WORKDIR_FIRSTMOD)/shells $(PKGROOT)/etc/shells Modified: csw/mgar/pkg/bash/trunk/checksums =================================================================== --- csw/mgar/pkg/bash/trunk/checksums 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/checksums 2009-04-11 18:42:23 UTC (rev 4275) @@ -1,6 +1,4 @@ -bcc9760316385d49ff31c2ed72f4be4a download/CSWbash.postinstall -589297e4f9a43d0c82632e99423db7ef download/CSWbash.postremove -949396065ba932e8af683eae510586e9 download/CSWbash.prototype +f93b41b44ce6b023df65b72f00386ac5 download/CSWbash.prototype a90a1b5a6db4838483f05438e05e8eb9 download/bash-4.0.tar.gz bc7f4762443939bd7dccb42370f0d932 download/bash40-001 c2a4a4786a83ed4ec366c6a8924369a2 download/bash40-002 @@ -19,5 +17,6 @@ bb41963d030bc61a20e8185367b337c5 download/bash40-015 f75455048a086528971252fd979b8755 download/bash40-016 34b2cd57271a452f4a26b39d77ff908f download/bash40-017 -4e4a9d374ce4291b6ba4974adc086767 download/changelog.CSW +e3a631b0798de159e48cdb8701dad334 download/changelog.CSW +60956e6be20f69dafbb06fcc83bab88e download/shells 29607316cff22f7427322d8f190cbadf download/use_system_bashrc_and_logout.patch Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall 2009-04-11 18:42:23 UTC (rev 4275) @@ -1,42 +0,0 @@ -#!/bin/sh -PATH=/usr/bin -export PATH - -if [ -f ${BASEDIR}/etc/shells ]; then - echo "${BASEDIR}/etc/shells already exists." -else - cat > ${BASEDIR}/etc/shells </dev/null >/dev/null; then - echo "${BASEDIR}/etc/shells is UNCHANGED because entry $THE_SHELL does already exists." -else - echo "$THE_SHELL" >> ${BASEDIR}/etc/shells - echo "ADDED $THE_SHELL to ${BASEDIR}/etc/shells." -fi - Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.postremove =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.postremove 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.postremove 2009-04-11 18:42:23 UTC (rev 4275) @@ -1,19 +0,0 @@ -#!/bin/sh -PATH=/usr/bin -export PATH - -# Removing bash from /etc/shells -THE_SHELL="`echo "${BASEDIR}/opt/csw/bin/bash" | /usr/bin/sed -e 's/\/\/*/\//g'`" - -if /usr/bin/cat "${BASEDIR}/etc/shells" | /usr/bin/sed -e 's/\/\/*/\//g' | /usr/bin/grep "$THE_SHELL" 2>/dev/null >/dev/null; then - /usr/bin/perl -i -pwe '$_ = "" if /\/+opt\/+csw\/+bin\/+bash$/' ${BASEDIR}/etc/shells - cat < Fri, 11 Apr 2009 12:06:33 +0200 Added: csw/mgar/pkg/bash/trunk/files/shells =================================================================== --- csw/mgar/pkg/bash/trunk/files/shells (rev 0) +++ csw/mgar/pkg/bash/trunk/files/shells 2009-04-11 18:42:23 UTC (rev 4275) @@ -0,0 +1,40 @@ +if [ install = "$1" ]; then + if [ -f "$PKG_INSTALL_ROOT/etc/shells" ]; then + cat "$PKG_INSTALL_ROOT/etc/shells" + else + cat <<-__EOT__ +# default entries +/usr/bin/sh +/usr/bin/csh +/usr/bin/ksh +/usr/bin/jsh +/bin/sh +/bin/csh +/bin/ksh +/bin/jsh +/sbin/sh +/sbin/jsh +/usr/bin/pfsh +/usr/bin/pfcsh +/usr/bin/pfksh +/usr/bin/bash +/usr/bin/tcsh +/usr/bin/zsh +/bin/pfsh +/bin/pfcsh +/bin/pfksh +/bin/bash +/bin/tcsh +/bin/zsh +/usr/xpg4/bin/sh + +# added entries +__EOT__ + fi && + cat <<-__EOT__ +/opt/csw/bin/bash # added by $PKGINST +__EOT__ + +elif [ remove = "$1" ] && [ -f "$PKG_INSTALL_ROOT/etc/shells" ]; then + egrep -v "^/opt/csw/bin/bash(#| | |\$)" <$PKG_INSTALL_ROOT/etc/shells || echo "#" +fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 00:03:28 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sat, 11 Apr 2009 22:03:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4276] csw/mgar/pkg/lame/trunk/Makefile Message-ID: Revision: 4276 http://gar.svn.sourceforge.net/gar/?rev=4276&view=rev Author: dmichelsen Date: 2009-04-11 22:03:27 +0000 (Sat, 11 Apr 2009) Log Message: ----------- lame: Fix sourceurl for next package build Modified Paths: -------------- csw/mgar/pkg/lame/trunk/Makefile Modified: csw/mgar/pkg/lame/trunk/Makefile =================================================================== --- csw/mgar/pkg/lame/trunk/Makefile 2009-04-11 18:42:23 UTC (rev 4275) +++ csw/mgar/pkg/lame/trunk/Makefile 2009-04-11 22:03:27 UTC (rev 4276) @@ -13,6 +13,8 @@ REQUIRED_PKGS = CSWncurses +SPKG_SOURCEURL = http://lame.sourceforge.net/ + # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=628063 UPSTREAM_USE_SF = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 00:09:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sat, 11 Apr 2009 22:09:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4277] csw/mgar/pkg/less/trunk Message-ID: Revision: 4277 http://gar.svn.sourceforge.net/gar/?rev=4277&view=rev Author: dmichelsen Date: 2009-04-11 22:09:49 +0000 (Sat, 11 Apr 2009) Log Message: ----------- less: Update to 429 Modified Paths: -------------- csw/mgar/pkg/less/trunk/Makefile csw/mgar/pkg/less/trunk/checksums Modified: csw/mgar/pkg/less/trunk/Makefile =================================================================== --- csw/mgar/pkg/less/trunk/Makefile 2009-04-11 22:03:27 UTC (rev 4276) +++ csw/mgar/pkg/less/trunk/Makefile 2009-04-11 22:09:49 UTC (rev 4277) @@ -1,5 +1,5 @@ GARNAME = less -GARVERSION = 418 +GARVERSION = 429 CATEGORIES = utils DESCRIPTION = Less is a free, open-source file pager Modified: csw/mgar/pkg/less/trunk/checksums =================================================================== --- csw/mgar/pkg/less/trunk/checksums 2009-04-11 22:03:27 UTC (rev 4276) +++ csw/mgar/pkg/less/trunk/checksums 2009-04-11 22:09:49 UTC (rev 4277) @@ -1 +1 @@ -b5864d76c54ddf4627fd57ab333c88b4 download/less-418.tar.gz +206f2f13b9b0a35e45df660fcb6af31d download/less-429.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 00:51:25 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 11 Apr 2009 22:51:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4278] csw/mgar/pkg/elinks/trunk Message-ID: Revision: 4278 http://gar.svn.sourceforge.net/gar/?rev=4278&view=rev Author: chninkel Date: 2009-04-11 22:51:24 +0000 (Sat, 11 Apr 2009) Log Message: ----------- elinks: updated to gar v2 Modified Paths: -------------- csw/mgar/pkg/elinks/trunk/Makefile csw/mgar/pkg/elinks/trunk/checksums csw/mgar/pkg/elinks/trunk/files/changelog.CSW Removed Paths: ------------- csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec Property Changed: ---------------- csw/mgar/pkg/elinks/trunk/ Property changes on: csw/mgar/pkg/elinks/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/elinks/trunk/Makefile =================================================================== --- csw/mgar/pkg/elinks/trunk/Makefile 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/Makefile 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,5 +1,19 @@ +##################################################################### +# OpenCSW build recipe for elinks +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = elinks -GARVERSION = 0.11.5 +GARVERSION = 0.11.6 CATEGORIES = net DESCRIPTION = An advanced text mode web browser @@ -10,25 +24,36 @@ scripts. It has limited support for CSS and Javascript. endef +PACKAGES = CSWelinks + +REQUIRED_PKGS = CSWbzip2 +REQUIRED_PKGS += CSWexpat +REQUIRED_PKGS += CSWiconv +REQUIRED_PKGS += CSWlibidn +REQUIRED_PKGS += CSWosslrt +REQUIRED_PKGS += CSWzlib + + +###### Upstream and opencsw files information ####### + MASTER_SITES = http://elinks.cz/download/ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 -DISTFILES += $(call admfiles,CSWelinks,prototype depend) +DISTFILES = CSWelinks.prototype DISTFILES += changelog.CSW # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -# suppress the rdynamic test which doesn't -# work correctly -# PATCHFILES = configure_no_rdynamic.patch - # Debian security path for CVE-2007-2027 PATCHFILES += elinks-417789.diff + +##### Build and installation information ##### + # we use bash instead of sh as the Makefiles # use "test -e" unsupported with sun sh CONFIG_SHELL = /bin/bash @@ -52,6 +77,6 @@ touch $(WORKSRC)/configure touch $(WORKSRC)/config.status -post-install: - @ginstall -D $(WORKDIR)/changelog.CSW $(DESTDIR)$(docdir)/$(GARNAME)/changelog.CSW +post-merge: + @ginstall -D $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW Modified: csw/mgar/pkg/elinks/trunk/checksums =================================================================== --- csw/mgar/pkg/elinks/trunk/checksums 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/checksums 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,6 +1,3 @@ -7dccdb6568d7eeda68912f6541496b7e download/elinks-0.11.5.tar.bz2 -69fa3fff33f6f6e3cbff0861f7ba7443 download/CSWelinks.gspec 9998467007acbd4cb8e46db6e5a9b306 download/CSWelinks.prototype -b928e13fa7db10428293f776939b4859 download/CSWelinks.depend -fcf32c4251bf50795365aa4f5c89dc03 download/changelog.CSW +14b871e8361937a10490cf1018d6f218 download/changelog.CSW 858331d6cc6c8459b2dba5e24f0c8cc3 download/elinks-417789.diff Deleted: csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend =================================================================== --- csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,6 +0,0 @@ -P CSWbzip2 bzip2 - a high-quality block-sorting file compressor -P CSWexpat expat - XML Parser Toolkit -P CSWiconv libiconv - GNU iconv library -P CSWlibidn libidn - Implementation of the Stringprep, Punycode and IDNA -P CSWosslrt openssl - The Open Source toolkit for SSL and TLS. -P CSWzlib zlib - Zlib Data Compression Library Deleted: csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec =================================================================== --- csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,4 +0,0 @@ -%var bitname elinks -%var pkgname CSWelinks -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING Modified: csw/mgar/pkg/elinks/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/elinks/trunk/files/changelog.CSW 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/files/changelog.CSW 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,3 +1,9 @@ +elinks (0.11.6,REV=2009.03.22) unstable + + * New upstream version. + + -- Yann Rouillard Sun, 22 Mar 2009 10:34:39 +0100 + elinks (0.11.5,REV=2008.10.04) unstable * New upstream version. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 14:13:38 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:13:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4279] csw/mgar/pkg/elinks/trunk Message-ID: Revision: 4279 http://gar.svn.sourceforge.net/gar/?rev=4279&view=rev Author: chninkel Date: 2009-04-12 12:13:38 +0000 (Sun, 12 Apr 2009) Log Message: ----------- elinks: fixed DISTFILES error Modified Paths: -------------- csw/mgar/pkg/elinks/trunk/Makefile csw/mgar/pkg/elinks/trunk/checksums Modified: csw/mgar/pkg/elinks/trunk/Makefile =================================================================== --- csw/mgar/pkg/elinks/trunk/Makefile 2009-04-11 22:51:24 UTC (rev 4278) +++ csw/mgar/pkg/elinks/trunk/Makefile 2009-04-12 12:13:38 UTC (rev 4279) @@ -42,7 +42,7 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 -DISTFILES = CSWelinks.prototype +DISTFILES += CSWelinks.prototype DISTFILES += changelog.CSW # We define upstream file regex so we can be notifed of new upstream software release Modified: csw/mgar/pkg/elinks/trunk/checksums =================================================================== --- csw/mgar/pkg/elinks/trunk/checksums 2009-04-11 22:51:24 UTC (rev 4278) +++ csw/mgar/pkg/elinks/trunk/checksums 2009-04-12 12:13:38 UTC (rev 4279) @@ -1,3 +1,4 @@ 9998467007acbd4cb8e46db6e5a9b306 download/CSWelinks.prototype 14b871e8361937a10490cf1018d6f218 download/changelog.CSW +463ec007b013822a82d197580117ea16 download/elinks-0.11.6.tar.bz2 858331d6cc6c8459b2dba5e24f0c8cc3 download/elinks-417789.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 14:28:20 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:28:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4280] csw/mgar/pkg/vsftpd/trunk/Makefile Message-ID: Revision: 4280 http://gar.svn.sourceforge.net/gar/?rev=4280&view=rev Author: chninkel Date: 2009-04-12 12:28:20 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: some Makefile cleanup Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 12:13:38 UTC (rev 4279) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 12:28:20 UTC (rev 4280) @@ -1,3 +1,17 @@ +##################################################################### +# OpenCSW build recipe for vsftpd +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = vsftpd GARVERSION = 2.1.0 CATEGORIES = server @@ -13,6 +27,14 @@ MASTER_SITES = ftp://vsftpd.beasts.org/users/cevans/ + +# adding configuration handling classes +# (init/smf classes are dynamically added in checkinstall) +SPKG_CLASSES = none conf + + +###### Upstream and opencsw files information ####### + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz @@ -23,10 +45,6 @@ DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd DISTFILES += i.conf r.conf -# adding configuration handling classes -# (init/smf classes are dynamically added in checkinstall) -SPKG_CLASSES = none conf - # build options are set by modifying # builddefs.h, so we patch it to enable # ssl and tcp wrapper support @@ -44,16 +62,11 @@ # privilege separation user PATCHFILES += set_priv_sep_user.patch -# patch to workaround the fact that -# solaris libc doesn t have tm_gmtoff -# update: not useful anymore since 2.0.5 -# PATCHFILES += tm_gmtoff.patch - # patch to add DESTDIR support to # vsftpd makfile PATCHFILES += destdir.patch -# Documents +# Documentation files DOCFILES = AUDIT BENCHMARKS BUGS COPYING COPYRIGHT Changelog FAQ INSTALL LICENSE REFS DOCFILES += REWARD SIZE SPEED TODO TUNING README README.ssl README.security DOCFILES += SECURITY/DESIGN SECURITY/IMPLEMENTATION SECURITY/OVERVIEW SECURITY/TRUST @@ -64,6 +77,9 @@ DOCFILES += EXAMPLE/INTERNET_SITE_NOINETD/README EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf + +##### Build and installation information ##### + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_SCRIPTS = fake This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 14:39:06 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:39:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4281] csw/mgar/pkg/vsftpd/trunk/ Message-ID: Revision: 4281 http://gar.svn.sourceforge.net/gar/?rev=4281&view=rev Author: chninkel Date: 2009-04-12 12:39:06 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to gar v2 Property Changed: ---------------- csw/mgar/pkg/vsftpd/trunk/ Property changes on: csw/mgar/pkg/vsftpd/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 12 14:59:04 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:59:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4282] csw/mgar/pkg/ImageMagick/trunk Message-ID: Revision: 4282 http://gar.svn.sourceforge.net/gar/?rev=4282&view=rev Author: hson Date: 2009-04-12 12:59:04 +0000 (Sun, 12 Apr 2009) Log Message: ----------- imagemagick: update to 6.5.1-1 Modified Paths: -------------- csw/mgar/pkg/ImageMagick/trunk/Makefile csw/mgar/pkg/ImageMagick/trunk/checksums Added Paths: ----------- csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff Modified: csw/mgar/pkg/ImageMagick/trunk/Makefile =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 12:39:06 UTC (rev 4281) +++ csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 12:59:04 UTC (rev 4282) @@ -1,6 +1,6 @@ GARNAME = imagemagick -GARVERSION = 6.4.9 -GARSUBREV = 10 +GARVERSION = 6.5.1 +GARSUBREV = 1 CATEGORIES = lib DESCRIPTION = A comprehensive package supporting automated and interative manipulation of images @@ -39,6 +39,8 @@ CONFIGURE_ARGS += --x-libraries=/usr/openwin/lib PATCHFILES += Makefile.patch +# Temporary patch until upstream make a more permenent fix +PATCHFILES += djvu.c.diff # Test has to be run *after* install TEST_SCRIPTS = Modified: csw/mgar/pkg/ImageMagick/trunk/checksums =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/checksums 2009-04-12 12:39:06 UTC (rev 4281) +++ csw/mgar/pkg/ImageMagick/trunk/checksums 2009-04-12 12:59:04 UTC (rev 4282) @@ -1,2 +1,3 @@ -4efbf9ba504ce228ed67e6db4c8245ff download/ImageMagick-6.4.9-10.tar.bz2 +2e5f775ac599ff2548395706fcc7eba0 download/ImageMagick-6.5.1-1.tar.bz2 6bd361fe352c7d497d60d8d2cbe7cfd4 download/Makefile.patch +de358462d89bfceb050888cf6b564257 download/djvu.c.diff Added: csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff (rev 0) +++ csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff 2009-04-12 12:59:04 UTC (rev 4282) @@ -0,0 +1,32 @@ +--- ../build-global/ImageMagick-6.5.1-1/coders/djvu.c 2009-03-31 17:44:40.000000000 +0200 ++++ ImageMagick-6.5.1-1/coders/djvu.c 2009-04-12 11:00:15.678316236 +0200 +@@ -58,6 +58,29 @@ + #if defined(MAGICKCORE_DJVU_DELEGATE) + #include + #endif ++ ++#if defined(__SunOS_5_8) || defined(__SunOS_5_9) ++#define signbit(x) copysign(1, x)<0 ++ ++ ++double ++fmax(double x, double y) ++{ ++ if (isnan(x)) ++ return (y); ++ if (isnan(y)) ++ return (x); ++ ++ if (signbit(x) != signbit(y)) { ++ if (signbit(x)) ++ return (y); ++ else ++ return (x); ++ } ++ ++ return (x > y ? x : y); ++} ++#endif + + /* + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:19:37 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:19:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4283] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4283 http://gar.svn.sourceforge.net/gar/?rev=4283&view=rev Author: chninkel Date: 2009-04-12 13:19:37 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: gar v2 fixes Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype Added Paths: ----------- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:19:37 UTC (rev 4283) @@ -80,11 +80,11 @@ ##### Build and installation information ##### +GARCOMPILER = SUN + CONFIGURE_ARGS = $(DIRPATHS) -CONFIGURE_SCRIPTS = fake -GARCOMPILER = SUN - +CONFIGURE_SCRIPTS = TEST_SCRIPTS = include gar/category.mk @@ -99,24 +99,29 @@ INSTALL_ENV += INSTALL="ginstall" -# no configure step with vsftpd -configure-fake: - $(MAKECOOKIE) # we create the csw directory hierarchy -pre-install: +pre-install-modulated: @echo "Creating csw directories" - ( install -d $(DESTDIR)$(sbindir); \ - install -d $(DESTDIR)$(mandir)/man5; \ - install -d $(DESTDIR)$(mandir)/man8; \ + ( ginstall -d $(DESTDIR)$(sbindir); \ + ginstall -d $(DESTDIR)$(mandir)/man5; \ + ginstall -d $(DESTDIR)$(mandir)/man8; \ ln -sf $(DESTDIR)$(mandir) $(DESTDIR)$(prefix)/man; \ - install -d $(DESTDIR)$(docdir)/vsftpd ) + ginstall -d $(DESTDIR)$(docdir)/vsftpd ) +post-merge: merge-doc-files merge-config-files merge-class-files -post-install: - cd $(WORKSRC) && \ +merge-config-files: + ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW" + ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist" + +merge-doc-files: for FILE in $(DOCFILES); do \ - ginstall -D $$FILE $(DESTDIR)$(docdir)/vsftpd/$$FILE; \ + ginstall -D "$(WORKSRC_FIRSTMOD)/$$FILE" "$(PKGROOT)$(docdir)/vsftpd/$$FILE"; \ done + ginstall -D "$(WORKDIR_FIRSTMOD)/changelog.CSW" "$(PKGROOT)$(docdir)/vsftpd/changelog.CSW" + ginstall -D "$(WORKDIR_FIRSTMOD)/README.CSW" "$(PKGROOT)$(docdir)/vsftpd/README.CSW" +merge-class-files: + ginstall "$(DOWNLOADDIR)/"*.conf $(WORKDIR)/ Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:19:37 UTC (rev 4283) @@ -1,20 +1,20 @@ -7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz -ad51a44007f43ed9ff736a38c764352b download/CSWvsftpd.gspec -eb9b4f253fa90f3b6187e44375306010 download/CSWvsftpd.prototype +314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config +81319e5dd110b08a476c3b31af2fd573 download/CSWvsftpd.depend +598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall -81319e5dd110b08a476c3b31af2fd573 download/CSWvsftpd.depend -314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config +c3916a9a49d6167fc67c07754d8aa980 download/CSWvsftpd.prototype +eeaf77528b2da0c7730323838f30b7ef download/README.CSW +281c51282cabd9475cceef363bbc699b download/build_options.patch 68178673c7d33baead2d7b97e878ed79 download/changelog.CSW -eeaf77528b2da0c7730323838f30b7ef download/README.CSW -f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf -60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist +54c1c39c6bfa8747a4457f135fd5bca1 download/csw_build_system.patch +a9e994d2b57999b76a0e03503745c01a download/csw_paths.patch 8a11892757760e07534a4a455f051e84 download/cswvsftpd 5d093652c802b21dd00a52b2d012d977 download/cswvsftpd.xml -32905b27a67ac3d4c93a52e10a3a80fd download/svc-cswvsftpd +73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch 9b2ae27f98333b73ff2b16ed98ee896a download/i.conf 5d9e9fb1a5b6af82ce915f72ebc5e3b7 download/r.conf -281c51282cabd9475cceef363bbc699b download/build_options.patch -a9e994d2b57999b76a0e03503745c01a download/csw_paths.patch -54c1c39c6bfa8747a4457f135fd5bca1 download/csw_build_system.patch a9a65f55cbfd01f9d72d1de25e67148d download/set_priv_sep_user.patch -73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch +32905b27a67ac3d4c93a52e10a3a80fd download/svc-cswvsftpd +7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz +f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf +60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 13:19:37 UTC (rev 4283) @@ -4,4 +4,4 @@ %copyright url file://%{WORKSRC}/LICENSE %var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf %include url file://%{PKGLIB}/smf_enabled.gspec -%include url file://%{PKGLIB}/csw_usrgrp.gspec +%include url file://files/csw_usrgrp.gspec Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:19:37 UTC (rev 4283) @@ -1,8 +1,8 @@ i i.conf i r.conf d none /opt/csw/etc/vsftpd 0755 root bin -f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW=vsftpd.conf 0755 root bin -e conf /opt/csw/etc/vsftpd/vsftpd.userlist=vsftpd.userlist 0755 root bin +f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0755 root bin +e conf /opt/csw/etc/vsftpd/vsftpd.userlist 0755 root bin f none /opt/csw/sbin/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin @@ -24,8 +24,8 @@ f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/vsftpd.xinetd 0644 root bin f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/README 0644 root bin f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/vsftpd.conf 0644 root bin -f none /opt/csw/share/doc/vsftpd/README.CSW=README.CSW 0755 root bin -f none /opt/csw/share/doc/vsftpd/changelog.CSW=changelog.CSW 0644 root bin +f none /opt/csw/share/doc/vsftpd/README.CSW 0755 root bin +f none /opt/csw/share/doc/vsftpd/changelog.CSW 0644 root bin f none /opt/csw/share/doc/vsftpd/AUDIT 0644 root bin f none /opt/csw/share/doc/vsftpd/BENCHMARKS 0644 root bin f none /opt/csw/share/doc/vsftpd/BUGS 0644 root bin Added: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec 2009-04-12 13:19:37 UTC (rev 4283) @@ -0,0 +1,3 @@ +%prototype:merge +i csw_usrgrp_config=CSW%{bitname}.csw_usrgrp_config +%preinstall:merge url file://files/csw_usrgrp.preinstall Added: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall 2009-04-12 13:19:37 UTC (rev 4283) @@ -0,0 +1,79 @@ +################################################################################ +# Start csw_usrgrp.postinstall +################################################################################ + +# This was once based upon the preinstallation script from vsftpd + +set -e + +################################################## +# create the given group if it doesn't exist +################################################## +create_group() +{ + NAME=$1 + + if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent group $NAME > /dev/null; then + /usr/bin/echo "Group already exist: $NAME" + else + /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/groupadd $NAME + /usr/bin/echo "Group created: $NAME" + fi +} + +################################################## +# create the given user if it doesn't exist +# paramters are: userid gid home shell gecos +################################################## +create_user() +{ + NAME=$1 + GROUP=$2 + HOME=$3 + SHELL=$4 + COMMENT="$5" + + if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent passwd $NAME > /dev/null; then + /usr/bin/echo "User already exists: $NAME" + else + /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/useradd -g "$GROUP" -c "$COMMENT" -d $HOME -s $SHELL $NAME + /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/pwconv + /usr/bin/echo "User created: $NAME" + fi +} + +PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-/} + +CSW_USRGRP_CONFIG="$PKGSAV/../install/csw_usrgrp_config" + +# Note to self: do not replace this with a "return" as additional scripts can be merged after this script +if [ -r "$CSW_USRGRP_CONFIG" ] +then + # Read the csw_usrgrp_config file and make sure that it has the correct version + set +e + version=`grep "^version=" "$CSW_USRGRP_CONFIG"` + set -e + + if [ "$version" != "version=1" ] + then + echo "ERROR: invalid csw_usrgrp_config file. Expected version=1" + exit 1 + fi + + OIFS="$IFS"; + IFS=":" + sed -n "s/^group=//p" "$CSW_USRGRP_CONFIG" | while read NAME + do + create_group "$NAME" + done + + sed -n "s/^user=//p" "$CSW_USRGRP_CONFIG" | while read NAME GROUP HOME SHELL COMMENT + do + create_user "$NAME" "$GROUP" "$HOME" "$SHELL" "$COMMENT" + done + IFS="$OIFS" +fi + +################################################################################ +# End csw_usrgrp.postinstall +################################################################################ Deleted: csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch 2009-04-12 13:19:37 UTC (rev 4283) @@ -1,23 +0,0 @@ -diff --speed-large-files --minimal -Nru vsftpd-2.0.4.orig/sysutil.c vsftpd-2.0.4/sysutil.c ---- vsftpd-2.0.4.orig/sysutil.c 2006-04-12 18:45:16.969532000 -0400 -+++ vsftpd-2.0.4/sysutil.c 2006-04-12 18:44:48.196361000 -0400 -@@ -2475,10 +2475,19 @@ - { - time_t the_time = 0; - struct tm* p_tm; -+#if defined (__SVR4) && defined (__sun) -+ struct tm* p_tm_utc; -+#endif -+ - tzset(); - the_time = time(NULL); - p_tm = localtime(&the_time); -+#if defined (__SVR4) && defined (__sun) -+ p_tm_utc = gmtime(&the_time); -+ s_timezone = -(mktime(p_tm) - mktime(p_tm_utc)); -+#else - s_timezone = -p_tm->tm_gmtoff; -+#endif - } - - const char* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:26:17 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:26:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4284] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4284 http://gar.svn.sourceforge.net/gar/?rev=4284&view=rev Author: chninkel Date: 2009-04-12 13:26:16 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to cswpreserveconf class Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/i.conf csw/mgar/pkg/vsftpd/trunk/files/r.conf Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:26:16 UTC (rev 4284) @@ -30,7 +30,7 @@ # adding configuration handling classes # (init/smf classes are dynamically added in checkinstall) -SPKG_CLASSES = none conf +SPKG_CLASSES = none cswpreserveconf ###### Upstream and opencsw files information ####### @@ -43,7 +43,6 @@ DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd -DISTFILES += i.conf r.conf # build options are set by modifying # builddefs.h, so we patch it to enable @@ -114,7 +113,7 @@ merge-config-files: ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW" - ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist" + ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist.CSW" merge-doc-files: for FILE in $(DOCFILES); do \ Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,8 +1,8 @@ 314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config -81319e5dd110b08a476c3b31af2fd573 download/CSWvsftpd.depend +6193a623b66f1132fa0d3e64904ecf15 download/CSWvsftpd.depend 598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall -c3916a9a49d6167fc67c07754d8aa980 download/CSWvsftpd.prototype +3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype eeaf77528b2da0c7730323838f30b7ef download/README.CSW 281c51282cabd9475cceef363bbc699b download/build_options.patch 68178673c7d33baead2d7b97e878ed79 download/changelog.CSW @@ -11,8 +11,6 @@ 8a11892757760e07534a4a455f051e84 download/cswvsftpd 5d093652c802b21dd00a52b2d012d977 download/cswvsftpd.xml 73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch -9b2ae27f98333b73ff2b16ed98ee896a download/i.conf -5d9e9fb1a5b6af82ce915f72ebc5e3b7 download/r.conf a9a65f55cbfd01f9d72d1de25e67148d download/set_priv_sep_user.patch 32905b27a67ac3d4c93a52e10a3a80fd download/svc-cswvsftpd 7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,2 +1,3 @@ P CSWtcpwrap tcpwrappers (ipv6.4 patched) lib and tools for pre-screening tcp connections P CSWosslrt openssl Openssl meta package +P CSWcswclassutils Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,8 +1,6 @@ -i i.conf -i r.conf d none /opt/csw/etc/vsftpd 0755 root bin f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0755 root bin -e conf /opt/csw/etc/vsftpd/vsftpd.userlist 0755 root bin +f cswpreserveconf /opt/csw/etc/vsftpd/vsftpd.userlist.CSW 0755 root bin f none /opt/csw/sbin/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin Deleted: csw/mgar/pkg/vsftpd/trunk/files/i.conf =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/i.conf 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/i.conf 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,54 +0,0 @@ -# -# Copyright 2006 Yann Rouillard -# All rights reserved. Use is subject to license terms. -# -# Redistribution and/or use, with or without modification, is -# permitted. This code is without warranty of any kind. The -# author(s) shall not be liable in the event that use of the -# software causes damage. -# -# i.conf - class script which install configuration files -# -# If the configuration file already exists on the filesystem, -# this script will let the existing file intact and will -# install a copy of the file provided in the package suffixed -# with .CSW -# except for service configuration files which are always installed -# CSW suffixed under Solaris 9 as they are used to enable/disable -# a service according to blastwave standards. -# -umask 0022 - -if [ -z "$PKG_INSTALL_ROOT" ]; then - PKG_INSTALL_ROOT=/ -fi - -while read SRC DEST; do - if [ -f "${PKG_INSTALL_ROOT}/$DEST" ]; then - cp "$SRC" "${PKG_INSTALL_ROOT}/$DEST.CSW" - else - cp "$SRC" "${PKG_INSTALL_ROOT}/$DEST" - fi -done - -# Unfortunately pkgadd doesn't backup the source file if the destination file is identical. -# It's a problem with zones installation where pkgadd try to find the backup files, so -# we do the backup manually -awk '{ if ( $3 == "conf" ) print $2,$3,$4,$5,$6,$7 }' $INST_DATADIR/$PKG/pkgmap | \ - while read FTYPE CLASS FPATH MODE OWNER GROUP; do - if echo $FPATH | grep "^/" >/dev/null; then - INST_PATH="$INST_DATADIR/$PKG/root/$FPATH" - SAVE_PATH="$PKGSAV/pspool/$PKG/root/$FPATH" - else - INST_PATH="$INST_DATADIR/$PKG/reloc/$FPATH" - SAVE_PATH="$PKGSAV/pspool/$PKG/reloc/$FPATH" - fi - - if [ ! -f "$SAVE_PATH" ]; then - mkdir -p "`LANG=C dirname $SAVE_PATH`" - cp "$INST_PATH" "$SAVE_PATH" - fi - done - -exit 0 - Deleted: csw/mgar/pkg/vsftpd/trunk/files/r.conf =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/r.conf 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/r.conf 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,21 +0,0 @@ -# -# Copyright 2006 Yann Rouillard -# All rights reserved. Use is subject to license terms. -# -# Redistribution and/or use, with or without modification, is -# permitted. This code is without warranty of any kind. The -# author(s) shall not be liable in the event that use of the -# software causes damage. -# -# r.conf - class script which removes configuration files -# -# This script doesn't delete config file, only backup ones -# installed by the package. -# - -while read DEST; do - if [ -f "$DEST.CSW" ]; then - rm "$DEST.CSW" - fi -done - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:32:04 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:32:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4285] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4285 http://gar.svn.sourceforge.net/gar/?rev=4285&view=rev Author: chninkel Date: 2009-04-12 13:32:03 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to dynamic depend files Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:26:16 UTC (rev 4284) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:32:03 UTC (rev 4285) @@ -32,14 +32,18 @@ # (init/smf classes are dynamically added in checkinstall) SPKG_CLASSES = none cswpreserveconf +REQUIRED_PKGS = CSWtcpwrap +REQUIRED_PKGS += CSWosslrt +REQUIRED_PKGS += CSWcswclassutils + ###### Upstream and opencsw files information ####### # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWvsftpd,prototype preinstall depend csw_usrgrp_config) +DISTFILES += $(call admfiles,CSWvsftpd,prototype preinstall csw_usrgrp_config) DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:26:16 UTC (rev 4284) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:32:03 UTC (rev 4285) @@ -1,5 +1,4 @@ 314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config -6193a623b66f1132fa0d3e64904ecf15 download/CSWvsftpd.depend 598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall 3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype Deleted: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:26:16 UTC (rev 4284) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:32:03 UTC (rev 4285) @@ -1,3 +0,0 @@ -P CSWtcpwrap tcpwrappers (ipv6.4 patched) lib and tools for pre-screening tcp connections -P CSWosslrt openssl Openssl meta package -P CSWcswclassutils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:46:37 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:46:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4286] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4286 http://gar.svn.sourceforge.net/gar/?rev=4286&view=rev Author: chninkel Date: 2009-04-12 13:46:36 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums Added Paths: ----------- csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:32:03 UTC (rev 4285) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:46:36 UTC (rev 4286) @@ -27,23 +27,24 @@ MASTER_SITES = ftp://vsftpd.beasts.org/users/cevans/ +PACKAGES = CSWvsftpd +REQUIRED_PKGS = CSWtcpwrap +REQUIRED_PKGS += CSWosslrt +REQUIRED_PKGS += CSWcswclassutils + # adding configuration handling classes # (init/smf classes are dynamically added in checkinstall) SPKG_CLASSES = none cswpreserveconf -REQUIRED_PKGS = CSWtcpwrap -REQUIRED_PKGS += CSWosslrt -REQUIRED_PKGS += CSWcswclassutils - ###### Upstream and opencsw files information ####### # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWvsftpd,prototype preinstall csw_usrgrp_config) +DISTFILES += CSWvsftpd.prototype CSWvsftpd.preinstall CSWvsftpd.csw_usrgrp_config DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd @@ -80,7 +81,12 @@ DOCFILES += EXAMPLE/INTERNET_SITE_NOINETD/README EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf +# little hack to be able to still use old smf support with gar v2 +# until openssh is migrated to cswclassutils init system +DISTFILES += vsftpd_dyngspec.fakespec +_CATEGORY_GSPEC_INCLUDE = ../../$(DOWNLOADDIR)/vsftpd_dyngspec.fakespec + ##### Build and installation information ##### GARCOMPILER = SUN Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:32:03 UTC (rev 4285) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:46:36 UTC (rev 4286) @@ -1,5 +1,4 @@ 314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config -598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall 3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype eeaf77528b2da0c7730323838f30b7ef download/README.CSW @@ -15,3 +14,4 @@ 7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf 60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist +0b0357e8470ccea567eabe6103daa769 download/vsftpd_dyngspec.fakespec Deleted: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 13:32:03 UTC (rev 4285) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 13:46:36 UTC (rev 4286) @@ -1,7 +0,0 @@ -%var bitname vsftpd -%var pkgname CSWvsftpd -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE -%var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf -%include url file://%{PKGLIB}/smf_enabled.gspec -%include url file://files/csw_usrgrp.gspec Added: csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec 2009-04-12 13:46:36 UTC (rev 4286) @@ -0,0 +1,4 @@ +%include url file://%{PKGLIB}/csw_dyngspec.gspec +%var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf +%include url file://%{PKGLIB}/smf_enabled.gspec +%include url file://files/csw_usrgrp.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 16:05:48 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 14:05:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4287] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4287 http://gar.svn.sourceforge.net/gar/?rev=4287&view=rev Author: chninkel Date: 2009-04-12 14:05:48 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to cswclassutils cswusergroup Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec Added Paths: ----------- csw/mgar/pkg/vsftpd/trunk/files/cswusergroup Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 14:05:48 UTC (rev 4287) @@ -35,7 +35,7 @@ # adding configuration handling classes # (init/smf classes are dynamically added in checkinstall) -SPKG_CLASSES = none cswpreserveconf +SPKG_CLASSES = none cswpreserveconf cswusergroup ###### Upstream and opencsw files information ####### @@ -44,10 +44,11 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += CSWvsftpd.prototype CSWvsftpd.preinstall CSWvsftpd.csw_usrgrp_config +DISTFILES += CSWvsftpd.prototype CSWvsftpd.preinstall DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd +DISTFILES += cswusergroup # build options are set by modifying # builddefs.h, so we patch it to enable @@ -119,11 +120,12 @@ ginstall -d $(DESTDIR)$(docdir)/vsftpd ) -post-merge: merge-doc-files merge-config-files merge-class-files +post-merge: merge-doc-files merge-config-files merge-config-files: ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW" ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist.CSW" + ginstall -D "$(WORKDIR_FIRSTMOD)/cswusergroup" "$(PKGROOT)$(sysconfdir)/pkg/CSWvsftpd/cswusergroup" merge-doc-files: for FILE in $(DOCFILES); do \ @@ -131,6 +133,3 @@ done ginstall -D "$(WORKDIR_FIRSTMOD)/changelog.CSW" "$(PKGROOT)$(docdir)/vsftpd/changelog.CSW" ginstall -D "$(WORKDIR_FIRSTMOD)/README.CSW" "$(PKGROOT)$(docdir)/vsftpd/README.CSW" - -merge-class-files: - ginstall "$(DOWNLOADDIR)/"*.conf $(WORKDIR)/ Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,11 +1,11 @@ -314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall -3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype +accf66084b40cc8ea89037f1cc351833 download/CSWvsftpd.prototype eeaf77528b2da0c7730323838f30b7ef download/README.CSW 281c51282cabd9475cceef363bbc699b download/build_options.patch 68178673c7d33baead2d7b97e878ed79 download/changelog.CSW 54c1c39c6bfa8747a4457f135fd5bca1 download/csw_build_system.patch a9e994d2b57999b76a0e03503745c01a download/csw_paths.patch +98e1d831801985daf5ce2ed01fbc0efd download/cswusergroup 8a11892757760e07534a4a455f051e84 download/cswvsftpd 5d093652c802b21dd00a52b2d012d977 download/cswvsftpd.xml 73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch @@ -14,4 +14,4 @@ 7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf 60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist -0b0357e8470ccea567eabe6103daa769 download/vsftpd_dyngspec.fakespec +372d9e524d45e1b62578ef3361c8524c download/vsftpd_dyngspec.fakespec Deleted: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,4 +0,0 @@ -version=1 -group=vsftpd -user=vsftpd:vsftpd:/opt/csw/var/empty/vsftpd:/bin/false:vsftpd privsep user -user=ftp:nogroup:/opt/csw/var/ftp:/bin/false:ftp user for anonymous access Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,6 +1,7 @@ d none /opt/csw/etc/vsftpd 0755 root bin -f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0755 root bin -f cswpreserveconf /opt/csw/etc/vsftpd/vsftpd.userlist.CSW 0755 root bin +f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0644 root bin +f cswpreserveconf /opt/csw/etc/vsftpd/vsftpd.userlist.CSW 0644 root bin +f cswusergroup /opt/csw/etc/pkg/CSWvsftpd/cswusergroup 0644 root bin f none /opt/csw/sbin/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin Deleted: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,3 +0,0 @@ -%prototype:merge -i csw_usrgrp_config=CSW%{bitname}.csw_usrgrp_config -%preinstall:merge url file://files/csw_usrgrp.preinstall Deleted: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,79 +0,0 @@ -################################################################################ -# Start csw_usrgrp.postinstall -################################################################################ - -# This was once based upon the preinstallation script from vsftpd - -set -e - -################################################## -# create the given group if it doesn't exist -################################################## -create_group() -{ - NAME=$1 - - if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent group $NAME > /dev/null; then - /usr/bin/echo "Group already exist: $NAME" - else - /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/groupadd $NAME - /usr/bin/echo "Group created: $NAME" - fi -} - -################################################## -# create the given user if it doesn't exist -# paramters are: userid gid home shell gecos -################################################## -create_user() -{ - NAME=$1 - GROUP=$2 - HOME=$3 - SHELL=$4 - COMMENT="$5" - - if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent passwd $NAME > /dev/null; then - /usr/bin/echo "User already exists: $NAME" - else - /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/useradd -g "$GROUP" -c "$COMMENT" -d $HOME -s $SHELL $NAME - /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/pwconv - /usr/bin/echo "User created: $NAME" - fi -} - -PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-/} - -CSW_USRGRP_CONFIG="$PKGSAV/../install/csw_usrgrp_config" - -# Note to self: do not replace this with a "return" as additional scripts can be merged after this script -if [ -r "$CSW_USRGRP_CONFIG" ] -then - # Read the csw_usrgrp_config file and make sure that it has the correct version - set +e - version=`grep "^version=" "$CSW_USRGRP_CONFIG"` - set -e - - if [ "$version" != "version=1" ] - then - echo "ERROR: invalid csw_usrgrp_config file. Expected version=1" - exit 1 - fi - - OIFS="$IFS"; - IFS=":" - sed -n "s/^group=//p" "$CSW_USRGRP_CONFIG" | while read NAME - do - create_group "$NAME" - done - - sed -n "s/^user=//p" "$CSW_USRGRP_CONFIG" | while read NAME GROUP HOME SHELL COMMENT - do - create_user "$NAME" "$GROUP" "$HOME" "$SHELL" "$COMMENT" - done - IFS="$OIFS" -fi - -################################################################################ -# End csw_usrgrp.postinstall -################################################################################ Added: csw/mgar/pkg/vsftpd/trunk/files/cswusergroup =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/cswusergroup (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/cswusergroup 2009-04-12 14:05:48 UTC (rev 4287) @@ -0,0 +1,2 @@ +vsftpd:vsftpd:vsftpd privsep user:/opt/csw/var/empty/vsftpd:/bin/false:: +ftp:nogroup:ftp user for anonymous access:/opt/csw/var/ftp:/bin/false:: Modified: csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,4 +1,3 @@ %include url file://%{PKGLIB}/csw_dyngspec.gspec %var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf %include url file://%{PKGLIB}/smf_enabled.gspec -%include url file://files/csw_usrgrp.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 12 17:15:28 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 12 Apr 2009 15:15:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4288] csw/mgar/pkg/ImageMagick/trunk/Makefile Message-ID: Revision: 4288 http://gar.svn.sourceforge.net/gar/?rev=4288&view=rev Author: hson Date: 2009-04-12 15:15:28 +0000 (Sun, 12 Apr 2009) Log Message: ----------- imagemagick: Add EXTRA_LD_OPTIONS to force libtool to use built libs instead of installed libs during install phase Modified Paths: -------------- csw/mgar/pkg/ImageMagick/trunk/Makefile Modified: csw/mgar/pkg/ImageMagick/trunk/Makefile =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 14:05:48 UTC (rev 4287) +++ csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 15:15:28 UTC (rev 4288) @@ -45,6 +45,7 @@ # Test has to be run *after* install TEST_SCRIPTS = +EXTRA_LD_OPTIONS = -L./magick/.libs MERGE_EXCLUDE_LIBTOOL ?= $(libdir)/lib.*\.la EXTRA_MERGE_EXCLUDE_FILES = .*/perllocal.pod This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 22:23:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 12 Apr 2009 20:23:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4289] csw/mgar/pkg/pcre/trunk Message-ID: Revision: 4289 http://gar.svn.sourceforge.net/gar/?rev=4289&view=rev Author: dmichelsen Date: 2009-04-12 20:23:53 +0000 (Sun, 12 Apr 2009) Log Message: ----------- pcre: Update to 7.9 Modified Paths: -------------- csw/mgar/pkg/pcre/trunk/Makefile csw/mgar/pkg/pcre/trunk/checksums Modified: csw/mgar/pkg/pcre/trunk/Makefile =================================================================== --- csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 15:15:28 UTC (rev 4288) +++ csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 20:23:53 UTC (rev 4289) @@ -1,5 +1,5 @@ GARNAME = pcre -GARVERSION = 7.8 +GARVERSION = 7.9 CATEGORIES = lib DESCRIPTION = Perl-compatible regular expression tools Modified: csw/mgar/pkg/pcre/trunk/checksums =================================================================== --- csw/mgar/pkg/pcre/trunk/checksums 2009-04-12 15:15:28 UTC (rev 4288) +++ csw/mgar/pkg/pcre/trunk/checksums 2009-04-12 20:23:53 UTC (rev 4289) @@ -1,3 +1 @@ -32fd7c7863b871d408d730e6ffa4aa71 download/pcre-7.8.tar.gz -ab54bd8abaae58cd88a86678977723e0 download/CSWpcre.gspec -9c278a0bbdb2766d198d585e5c73956a download/CSWpcrert.gspec +2256d0a1d0a358265165ca70e7cfc47a download/pcre-7.9.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 22:26:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 12 Apr 2009 20:26:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4290] csw/mgar/pkg/pcre/trunk/Makefile Message-ID: Revision: 4290 http://gar.svn.sourceforge.net/gar/?rev=4290&view=rev Author: dmichelsen Date: 2009-04-12 20:26:21 +0000 (Sun, 12 Apr 2009) Log Message: ----------- pcre: Use isaexec for pcregrep Modified Paths: -------------- csw/mgar/pkg/pcre/trunk/Makefile Modified: csw/mgar/pkg/pcre/trunk/Makefile =================================================================== --- csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 20:23:53 UTC (rev 4289) +++ csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 20:26:21 UTC (rev 4290) @@ -41,8 +41,6 @@ TEST_TARGET = check -NO_ISAEXEC = 1 - PKGFILES_CSWpcrert = $(PKGFILES_RT) include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 13 03:41:13 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 13 Apr 2009 01:41:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4291] csw/mgar/pkg/gcc4/trunk/Makefile Message-ID: Revision: 4291 http://gar.svn.sourceforge.net/gar/?rev=4291&view=rev Author: valholla Date: 2009-04-13 01:41:12 +0000 (Mon, 13 Apr 2009) Log Message: ----------- comment out amd merge Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-12 20:26:21 UTC (rev 4290) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-13 01:41:12 UTC (rev 4291) @@ -38,7 +38,7 @@ CONFIGURE_ARGS += --enable-languages=ada,c,c++,fortran,java,objc ## For cleanliness I split the Configuration into separate files -include files/amd_merge.mk +#include files/amd_merge.mk include files/gar_override.mk include files/package_def.mk include files/pkg_scripts.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 16:14:55 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 14:14:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4292] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4292 http://gar.svn.sourceforge.net/gar/?rev=4292&view=rev Author: bdwalton Date: 2009-04-13 14:14:55 +0000 (Mon, 13 Apr 2009) Log Message: ----------- converted to dynamic adm script Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall Modified: csw/mgar/pkg/docbook-style-xsl/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-13 01:41:12 UTC (rev 4291) +++ csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-13 14:14:55 UTC (rev 4292) @@ -33,8 +33,12 @@ MASTER_SITES = $(SF_MIRRORS) DISTFILES = docbook-xsl-$(GARVERSION).tar.bz2 DISTFILES += docbook-xsl-doc-$(GARVERSION).tar.bz2 -DISTFILES += CSWdocbookxsl.postinstall CSWdocbookxsl.preremove +DISTFILES += CSWdocbookxsl.preremove +#use the dynamic adm script feature so we don't need to edit file at +#version change +include files/CSWdocbookxsl.postinstall + PATCHFILES += add_makefile.patch CONFIGURE_SCRIPTS = Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 01:41:12 UTC (rev 4291) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 14:14:55 UTC (rev 4292) @@ -1,4 +1,3 @@ -c022eb8e15bf110605a4695235f20075 download/CSWdocbookxsl.postinstall 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove 9ba4d6409de31404b8022f10630016e0 download/add_makefile.patch c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 01:41:12 UTC (rev 4291) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 14:14:55 UTC (rev 4292) @@ -1,11 +1,12 @@ +define CSWdocbookxsl_postinstall #!/bin/sh -case "$PKG_INSTALL_ROOT" in +case "$$PKG_INSTALL_ROOT" in ""|"/") PREFIX= ;; - *) PREFIX="chroot $PKG_INSTALL_ROOT ";; + *) PREFIX="chroot $$PKG_INSTALL_ROOT ";; esac -PATH=/opt/csw/bin:$PATH +PATH=/opt/csw/bin:$$PATH CATCMD=/opt/csw/bin/xmlcatalog @@ -14,17 +15,18 @@ CATALOG=/opt/csw/etc/xml/catalog #we need a version here, since that will be referenced in URLS being redirected -VERSION=1.74.3 +VERSION=$(GARVERSION) -$PREFIX $CATCMD --noout --add "rewriteSystem" \ - "http://docbook.sourceforge.net/release/xsl/$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG -$PREFIX $CATCMD --noout --add "rewriteURI" \ - "http://docbook.sourceforge.net/release/xsl/$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG -$PREFIX $CATCMD --noout --add "rewriteSystem" \ +$$PREFIX $$CATCMD --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ + "file://$DBHOME/xsl-stylesheets" $$CATALOG +$$PREFIX $$CATCMD --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ + "file://$DBHOME/xsl-stylesheets" $$CATALOG +$$PREFIX $$CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG -$PREFIX $CATCMD --noout --add "rewriteURI" \ + "file://$DBHOME/xsl-stylesheets" $$CATALOG +$$PREFIX $$CATCMD --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG + "file://$DBHOME/xsl-stylesheets" $$CATALOG +endef This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 16:30:07 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 14:30:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4293] csw/mgar/pkg/docbook-style-xsl/trunk/files/ CSWdocbookxsl.postinstall Message-ID: Revision: 4293 http://gar.svn.sourceforge.net/gar/?rev=4293&view=rev Author: bdwalton Date: 2009-04-13 14:30:06 +0000 (Mon, 13 Apr 2009) Log Message: ----------- correct adm script Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 14:14:55 UTC (rev 4292) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 14:30:06 UTC (rev 4293) @@ -19,14 +19,14 @@ $$PREFIX $$CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG $$PREFIX $$CATCMD --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG $$PREFIX $$CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG $$PREFIX $$CATCMD --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG endef This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 16:53:03 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 14:53:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4294] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4294 http://gar.svn.sourceforge.net/gar/?rev=4294&view=rev Author: bdwalton Date: 2009-04-13 14:53:03 +0000 (Mon, 13 Apr 2009) Log Message: ----------- move GIT_USE_PROXY to .garrc instead of build recipe Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-13 14:30:06 UTC (rev 4293) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-13 14:53:03 UTC (rev 4294) @@ -66,7 +66,8 @@ SPKG_DESC_CSWgitdoc = Documentation for Git SPKG_DESC_CSWgitemacs = Git VCS support for Emacs -GIT_USE_PROXY = 1 +#NOTE: If you need to proxy git:// connections, set GIT_USE_PROXY in +# your .garrc file. (That leaves this recipe in a more generic form.) GIT_REPOS = git://git.kernel.org/pub/scm/git/git.git GIT_TREEISH_git.git = v$(GARVERSION) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 19:58:15 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 17:58:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4295] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4295 http://gar.svn.sourceforge.net/gar/?rev=4295&view=rev Author: bdwalton Date: 2009-04-13 17:58:14 +0000 (Mon, 13 Apr 2009) Log Message: ----------- rework local makefile to be more generic Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 14:53:03 UTC (rev 4294) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 17:58:14 UTC (rev 4295) @@ -1,4 +1,4 @@ 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove -9ba4d6409de31404b8022f10630016e0 download/add_makefile.patch +a92b47305b3499396aafda83e4bbfefb download/add_makefile.patch c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 2a032a95fbf24367d13acc8210f9cd72 download/docbook-xsl-doc-1.74.3.tar.bz2 Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-13 14:53:03 UTC (rev 4294) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-13 17:58:14 UTC (rev 4295) @@ -1,10 +1,17 @@ ---- /dev/null 2009-04-10 02:03:32.000000000 +0200 -+++ docbook-xsl-1.74.3/Makefile.csw 2009-04-10 04:25:32.872750482 +0200 -@@ -0,0 +1,46 @@ +--- /dev/null 2009-04-13 19:20:44.000000000 +0200 ++++ docbook-xsl-1.74.3/Makefile.csw 2009-04-13 19:24:36.996214871 +0200 +@@ -0,0 +1,43 @@ +DESTDIR ?= ... should be overridden by GAR ... + +SHELL = /opt/csw/bin/bash + ++# directories that don't get installed by the generic install-xsl target ++# note the . (to work around find output) ++SS_EX_DIRS = doc docsrc tools tests . ++# directories that do get installed by install-xsl ++DIRS = $(subst ./,,$(shell gfind . -maxdepth 1 -type d)) ++SS_DIRS = $(foreach D,$(filter-out $(SS_EX_DIRS),$(DIRS)),dir-$(D)) ++ +prefix = $(DESTDIR)/opt/csw +bindir = $(prefix)/bin +datadir = $(prefix)/share @@ -14,33 +21,23 @@ + +all: install + -+install: install-xsl install-img install-misc install-docs ++install: install-xsl install-misc install-docs + -+install-xsl: -+ gmkdir -p $(instdir)/{common,fo,html,htmlhelp/doc,javahelp,lib,template,xhtml,manpages,profiling} -+ cp common/*.dtd $(instdir)/common -+ cp common/*.xml $(instdir)/common -+ cp common/*.xsl $(instdir)/common -+ cp fo/*.xml $(instdir)/fo -+ cp fo/*.xsl $(instdir)/fo -+ cp html/*.xml $(instdir)/html -+ cp html/*.xsl $(instdir)/html -+ cp htmlhelp/*.xsl $(instdir)/htmlhelp -+ cp javahelp/*.xsl $(instdir)/javahelp -+ cp lib/lib.xsl $(instdir)/lib -+ cp template/*.xml $(instdir)/template -+ cp template/*.xsl $(instdir)/template -+ cp xhtml/*.xsl $(instdir)/xhtml -+ cp manpages/*.xsl $(instdir)/manpages -+ cp profiling/*.xsl $(instdir)/profiling ++$(instdir): ++ gmkdir -p $(instdir) + -+install-img: -+ gmkdir -p $(instdir)/images/callouts -+ cp images/*.gif $(instdir)/images -+ cp images/*.png $(instdir)/images -+ cp images/callouts/*.png $(instdir)/images/callouts ++#so we don't get the example bin files, etc. we can always install them ++# 'properly' to csw/bin/ if there is demand. ++dir-epub: $(instdir) ++ gmkdir -p $(instdir)/epub ++ cp epub/*xsl $(instdir)/epub + -+install-misc: ++dir-%: ++ cp -R $*/ $(instdir)/ ++ ++install-xsl: $(instdir) $(SS_DIRS) ++ ++install-misc: $(instdir) + cp VERSION $(instdir) + +install-docs: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 13 21:29:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 13 Apr 2009 19:29:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4296] csw/mgar/pkg/libtasn1/trunk Message-ID: Revision: 4296 http://gar.svn.sourceforge.net/gar/?rev=4296&view=rev Author: dmichelsen Date: 2009-04-13 19:29:36 +0000 (Mon, 13 Apr 2009) Log Message: ----------- libtasn1: Update to 2.0 Modified Paths: -------------- csw/mgar/pkg/libtasn1/trunk/Makefile csw/mgar/pkg/libtasn1/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec Modified: csw/mgar/pkg/libtasn1/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-13 17:58:14 UTC (rev 4295) +++ csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-13 19:29:36 UTC (rev 4296) @@ -1,25 +1,22 @@ GARNAME = libtasn1 -GARVERSION = 1.8 +GARVERSION = 2.0 CATEGORIES = lib DESCRIPTION = GNU ASN1 library define BLURB endef -MASTER_SITES = http://ftp.gnu.org/pub/gnu/gnutls/ -#DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES = $(GARNAME)-1-20090116.tar.gz -DISTFILES += $(call admfiles,CSWlibtasn1,) +MASTER_SITES = $(GNU_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz SPKG_SOURCEURL = http://www.gnu.org/software/gnutls/ # We define upstream file regex so we can be notifed of new upstream software release -UFILES_REGEX = -(\d+(?:\.\d+)*).tar.gz +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz REQUIRED_PKGS = BUILD64 = 1 -NO_ISAEXEC = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-static Modified: csw/mgar/pkg/libtasn1/trunk/checksums =================================================================== --- csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-13 17:58:14 UTC (rev 4295) +++ csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-13 19:29:36 UTC (rev 4296) @@ -1,2 +1 @@ -cd6fa14e1ae5e422edcd154c26d6c923 download/libtasn1-1-20090116.tar.gz -efdfe199ba7cec7c8c1d86c43a1bc43c download/CSWlibtasn1.gspec +e9b1462f04b2586b03905b0ed9528261 download/libtasn1-2.0.tar.gz Deleted: csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec =================================================================== --- csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec 2009-04-13 17:58:14 UTC (rev 4295) +++ csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec 2009-04-13 19:29:36 UTC (rev 4296) @@ -1,4 +0,0 @@ -%var bitname libtasn1 -%var pkgname CSWlibtasn1 -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 13:32:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 11:32:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4297] csw/mgar/pkg/libcairo/trunk Message-ID: Revision: 4297 http://gar.svn.sourceforge.net/gar/?rev=4297&view=rev Author: dmichelsen Date: 2009-04-14 11:32:34 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libcairo: Move to dynamic gspec, fix DISTNAME Modified Paths: -------------- csw/mgar/pkg/libcairo/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec Modified: csw/mgar/pkg/libcairo/trunk/Makefile =================================================================== --- csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-14 11:32:34 UTC (rev 4297) @@ -8,43 +8,43 @@ endef MASTER_SITES = http://www.cairographics.org/releases/ -DISTFILES = cairo-$(GARVERSION).tar.gz +DISTNAME = cairo-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +PACKAGES = CSWlibcairo CSWlibcairodevel CSWlibcairodoc +CATALOGNAME_CSWlibcairo = libcairo +CATALOGNAME_CSWlibcairodevel = libcairo_devel +CATALOGNAME_CSWlibcairodoc = libcairo_doc + SPKG_DESC_CSWlibcairo = $(DESCRIPTION) SPKG_DESC_CSWlibcairodevel = $(DESCRIPTION) development package SPKG_DESC_CSWlibcairodoc = $(DESCRIPTION) documentaiton -DISTFILES += $(call admfiles,CSWlibcairo, ) -DISTFILES += $(call admfiles,CSWlibcairodevel, ) -DISTFILES += $(call admfiles,CSWlibcairodoc, ) - PKGFILES_CSWlibcairodevel = $(PKGFILES_DEVEL) -PKGFILES_CSWlibcairodevel += /opt/csw/share/doc/libcairo_devel/.* -PKGFILES_CSWlibcairodoc = $(prefix)/share/gtk-doc.* -PKGFILES_CSWlibcairodoc += /opt/csw/share/doc/libcairo_doc/.* +PKGFILES_CSWlibcairodevel += $(docdir)/libcairo_devel/.* +PKGFILES_CSWlibcairodoc = $(sharedstatedir)/gtk-doc.* +PKGFILES_CSWlibcairodoc += $(docdir)/libcairo_doc/.* -REQUIRED_PKGS_CSWlibcairodevel = CSWlibcairo -REQUIRED_PKGS_CSWlibcairodoc = -REQUIRED_PKGS_CSWlibcairo += CSWfconfig -REQUIRED_PKGS_CSWlibcairo += CSWftype2 -REQUIRED_PKGS_CSWlibcairo += CSWlibxrender -REQUIRED_PKGS_CSWlibcairo += CSWpixman -REQUIRED_PKGS_CSWlibcairo += CSWpng -REQUIRED_PKGS_CSWlibcairo += CSWzlib +REQUIRED_PKGS_CSWlibcairo = CSWfconfig +REQUIRED_PKGS_CSWlibcairo += CSWftype2 +REQUIRED_PKGS_CSWlibcairo += CSWlibxrender +REQUIRED_PKGS_CSWlibcairo += CSWpixman +REQUIRED_PKGS_CSWlibcairo += CSWpng +REQUIRED_PKGS_CSWlibcairo += CSWzlib +REQUIRED_PKGS_CSWlibcairodevel = CSWlibcairo +REQUIRED_PKGS_CSWlibcairodoc = +# Wait for libpixman, libfontconfig and libXrender to be 64 bit +#BUILD64 = 1 + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-tests --enable-xlib=yes --enable-xlib-xrender=yes --enable-ft=yes --with-x CONFIGURE_ARGS += --enable-png=yes --enable-ps=yes --enable-pdf=yes --enable-svg=yes CONFIGURE_ARGS += --enable-gtk-doc --enable-test-surfaces=yes -post-extract: - ( cd $(WORKROOTDIR)/build-$(firstword $(MODULATIONS)) ; \ - mv cairo-$(GARVERSION) $(GARNAME)-$(GARVERSION) ) - @$(MAKECOOKIE) - include gar/category.mk Deleted: csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec =================================================================== --- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec 2009-04-14 11:32:34 UTC (rev 4297) @@ -1,9 +0,0 @@ -%var bitname libcairo -%var pkgname CSWlibcairo -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - Deleted: csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec =================================================================== --- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec 2009-04-14 11:32:34 UTC (rev 4297) @@ -1,9 +0,0 @@ -%var bitname libcairo_devel -%var pkgname CSWlibcairodevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - Deleted: csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec =================================================================== --- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec 2009-04-14 11:32:34 UTC (rev 4297) @@ -1,9 +0,0 @@ -%var bitname libcairo_doc -%var pkgname CSWlibcairodoc -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 13:48:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 11:48:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4298] csw/mgar/pkg Message-ID: Revision: 4298 http://gar.svn.sourceforge.net/gar/?rev=4298&view=rev Author: dmichelsen Date: 2009-04-14 11:48:50 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libspectre: Initial commit Added Paths: ----------- csw/mgar/pkg/libspectre/ csw/mgar/pkg/libspectre/branches/ csw/mgar/pkg/libspectre/tags/ csw/mgar/pkg/libspectre/trunk/ csw/mgar/pkg/libspectre/trunk/Makefile csw/mgar/pkg/libspectre/trunk/checksums csw/mgar/pkg/libspectre/trunk/files/ csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff Property changes on: csw/mgar/pkg/libspectre/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libspectre/trunk/Makefile =================================================================== --- csw/mgar/pkg/libspectre/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:48:50 UTC (rev 4298) @@ -0,0 +1,22 @@ +GARNAME = libspectre +GARVERSION = 0.2.2 +CATEGORIES = lib + +DESCRIPTION = A small library for rendering Postscript documents +define BLURB +endef + +MASTER_SITES = http://libspectre.freedesktop.org/releases/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PATCHFILES = patch-stdint.diff + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +REQUIRED_PKGS = CSWgs + +# Disable for now as libgs is missing 64 bit +#BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +include gar/category.mk Added: csw/mgar/pkg/libspectre/trunk/checksums =================================================================== --- csw/mgar/pkg/libspectre/trunk/checksums (rev 0) +++ csw/mgar/pkg/libspectre/trunk/checksums 2009-04-14 11:48:50 UTC (rev 4298) @@ -0,0 +1,2 @@ +0600653653d9313e3be135b2217ea7fd download/libspectre-0.2.2.tar.gz +7f3edd354885de75d806dfd740a23881 download/patch-stdint.diff Added: csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff =================================================================== --- csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff (rev 0) +++ csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff 2009-04-14 11:48:50 UTC (rev 4298) @@ -0,0 +1,15 @@ +diff -Naur libspectre-0.2.2.orig/libspectre/spectre-device.c libspectre-0.2.2.patched/libspectre/spectre-device.c +--- libspectre-0.2.2.orig/libspectre/spectre-device.c 2008-11-25 16:15:50.000000000 +0100 ++++ libspectre-0.2.2.patched/libspectre/spectre-device.c 2009-04-14 13:38:53.249669809 +0200 +@@ -21,7 +21,11 @@ + #include + #include + #include ++#ifdef __sun ++#include ++#else + #include ++#endif + + #include "spectre-device.h" + #include "spectre-gs.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 13:50:11 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 11:50:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4299] csw/mgar/pkg/libspectre/trunk/Makefile Message-ID: Revision: 4299 http://gar.svn.sourceforge.net/gar/?rev=4299&view=rev Author: dmichelsen Date: 2009-04-14 11:50:11 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libspectre: Fix SOURCEURL Modified Paths: -------------- csw/mgar/pkg/libspectre/trunk/Makefile Modified: csw/mgar/pkg/libspectre/trunk/Makefile =================================================================== --- csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:48:50 UTC (rev 4298) +++ csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:50:11 UTC (rev 4299) @@ -10,6 +10,8 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PATCHFILES = patch-stdint.diff +SPKG_SOURCEURL = http://libspectre.freedesktop.org + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 14:12:17 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 12:12:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4300] csw/mgar/pkg/libspectre/trunk Message-ID: Revision: 4300 http://gar.svn.sourceforge.net/gar/?rev=4300&view=rev Author: dmichelsen Date: 2009-04-14 12:12:17 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libspectre: Add fixconfig for missing .la-files Modified Paths: -------------- csw/mgar/pkg/libspectre/trunk/Makefile csw/mgar/pkg/libspectre/trunk/checksums Added Paths: ----------- csw/mgar/pkg/libspectre/trunk/files/fixme.sh Modified: csw/mgar/pkg/libspectre/trunk/Makefile =================================================================== --- csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:50:11 UTC (rev 4299) +++ csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 12:12:17 UTC (rev 4300) @@ -8,6 +8,7 @@ MASTER_SITES = http://libspectre.freedesktop.org/releases/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += fixme.sh PATCHFILES = patch-stdint.diff SPKG_SOURCEURL = http://libspectre.freedesktop.org @@ -22,3 +23,8 @@ CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk + +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) Modified: csw/mgar/pkg/libspectre/trunk/checksums =================================================================== --- csw/mgar/pkg/libspectre/trunk/checksums 2009-04-14 11:50:11 UTC (rev 4299) +++ csw/mgar/pkg/libspectre/trunk/checksums 2009-04-14 12:12:17 UTC (rev 4300) @@ -1,2 +1,3 @@ +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh 0600653653d9313e3be135b2217ea7fd download/libspectre-0.2.2.tar.gz 7f3edd354885de75d806dfd740a23881 download/patch-stdint.diff Copied: csw/mgar/pkg/libspectre/trunk/files/fixme.sh (from rev 4263, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/libspectre/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/libspectre/trunk/files/fixme.sh 2009-04-14 12:12:17 UTC (rev 4300) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 14:33:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 12:33:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4301] csw/mgar/pkg Message-ID: Revision: 4301 http://gar.svn.sourceforge.net/gar/?rev=4301&view=rev Author: dmichelsen Date: 2009-04-14 12:33:42 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libatk: Fix garname Added Paths: ----------- csw/mgar/pkg/libatk/ Removed Paths: ------------- csw/mgar/pkg/atk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 15:21:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 13:21:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4302] csw/mgar/pkg/libatk/trunk Message-ID: Revision: 4302 http://gar.svn.sourceforge.net/gar/?rev=4302&view=rev Author: dmichelsen Date: 2009-04-14 13:21:50 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libatk: Update to 1.26.0 Modified Paths: -------------- csw/mgar/pkg/libatk/trunk/Makefile csw/mgar/pkg/libatk/trunk/checksums Modified: csw/mgar/pkg/libatk/trunk/Makefile =================================================================== --- csw/mgar/pkg/libatk/trunk/Makefile 2009-04-14 12:33:42 UTC (rev 4301) +++ csw/mgar/pkg/libatk/trunk/Makefile 2009-04-14 13:21:50 UTC (rev 4302) @@ -1,8 +1,8 @@ -GARNAME = atk -GARVERSION = 1.6.0 +GARNAME = libatk +GARVERSION = 1.26.0 CATEGORIES = lib -DESCRIPTION = An accessibility toolkit for GNOME. +DESCRIPTION = An accessibility toolkit for GNOME define BLURB Accessibility is enabling people with disabilities to participate in substantial life activities that include work and the use of services, @@ -11,22 +11,19 @@ utilize all of the functionality of the GNOME user environment. endef -DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 - +MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/atk/1.26/ +DISTNAME = atk-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.bz2 # We define upstream file regex so we can be notifed of new upstream software release # UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 UFILES_REGEX = (\d+(?:\.\d+)*) -MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/atk/ -LIBDEPS += lib/glib2 +REQUIRED_PKGS = CSWggettextrt CSWglib2 +BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-debug=yes TEST_TARGET = check include gar/category.mk - -CFLAGS := -g $(CFLAGS) -CXXFLAGS := -g $(CXXFLAGS) -export CFLAGS CXXFLAGS Modified: csw/mgar/pkg/libatk/trunk/checksums =================================================================== --- csw/mgar/pkg/libatk/trunk/checksums 2009-04-14 12:33:42 UTC (rev 4301) +++ csw/mgar/pkg/libatk/trunk/checksums 2009-04-14 13:21:50 UTC (rev 4302) @@ -1 +1 @@ -5e699af22a934ea3c1c1ed3742da0500 download/atk-1.6.0.tar.bz2 +719229408019c548855673840679f156 download/atk-1.26.0.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Tue Apr 14 16:28:13 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 14 Apr 2009 14:28:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4303] csw/mgar/pkg/mysql5/trunk Message-ID: Revision: 4303 http://gar.svn.sourceforge.net/gar/?rev=4303&view=rev Author: bdwalton Date: 2009-04-14 14:28:12 +0000 (Tue, 14 Apr 2009) Log Message: ----------- bump to 5.1.33 Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile csw/mgar/pkg/mysql5/trunk/checksums Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-14 13:21:50 UTC (rev 4302) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-14 14:28:12 UTC (rev 4303) @@ -1,5 +1,5 @@ GARNAME = mysql5 -GARVERSION = 5.1.32 +GARVERSION = 5.1.33 CATEGORIES = server GARCOMPILER = GCC4 Modified: csw/mgar/pkg/mysql5/trunk/checksums =================================================================== --- csw/mgar/pkg/mysql5/trunk/checksums 2009-04-14 13:21:50 UTC (rev 4302) +++ csw/mgar/pkg/mysql5/trunk/checksums 2009-04-14 14:28:12 UTC (rev 4303) @@ -1,2 +1,2 @@ -f2d14b5e3b9d50b809c9b9985e4513b7 download/mysql-5.1.32.tar.gz +9c5711e9bea4514df6f2659f283f0aa0 download/mysql-5.1.33.tar.gz 5a55ac71abe980fe2a909d9712364cae download/CSWmysql5.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Tue Apr 14 17:00:11 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 14 Apr 2009 15:00:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4304] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4304 http://gar.svn.sourceforge.net/gar/?rev=4304&view=rev Author: bdwalton Date: 2009-04-14 15:00:11 +0000 (Tue, 14 Apr 2009) Log Message: ----------- install COPYING file; use addprefix for the SS_DIRS list intead of a foreach Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-14 14:28:12 UTC (rev 4303) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-14 15:00:11 UTC (rev 4304) @@ -1,4 +1,4 @@ 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove -a92b47305b3499396aafda83e4bbfefb download/add_makefile.patch +6c34caa4c60bf8bd16d6059fee60eb85 download/add_makefile.patch c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 2a032a95fbf24367d13acc8210f9cd72 download/docbook-xsl-doc-1.74.3.tar.bz2 Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-14 14:28:12 UTC (rev 4303) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-14 15:00:11 UTC (rev 4304) @@ -10,7 +10,7 @@ +SS_EX_DIRS = doc docsrc tools tests . +# directories that do get installed by install-xsl +DIRS = $(subst ./,,$(shell gfind . -maxdepth 1 -type d)) -+SS_DIRS = $(foreach D,$(filter-out $(SS_EX_DIRS),$(DIRS)),dir-$(D)) ++SS_DIRS = $(addprefix dir-,$(filter-out $(SS_EX_DIRS),$(DIRS))) + +prefix = $(DESTDIR)/opt/csw +bindir = $(prefix)/bin @@ -42,5 +42,5 @@ + +install-docs: + gmkdir -p $(docdir) -+ cp AUTHORS BUGS README TODO RELEASE-NOTES* NEWS* $(docdir)/ ++ cp COPYING AUTHORS BUGS README TODO RELEASE-NOTES* NEWS* $(docdir)/ + cp -R doc $(docdir)/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Tue Apr 14 17:01:16 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 14 Apr 2009 15:01:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4305] csw/mgar/pkg/docbook-style-xsl/trunk/Makefile Message-ID: Revision: 4305 http://gar.svn.sourceforge.net/gar/?rev=4305&view=rev Author: bdwalton Date: 2009-04-14 15:01:13 +0000 (Tue, 14 Apr 2009) Log Message: ----------- use post-extract-modulated to correct directory name instead of modifying WORKSRC (cleaner for other things) Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile Modified: csw/mgar/pkg/docbook-style-xsl/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-14 15:00:11 UTC (rev 4304) +++ csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-14 15:01:13 UTC (rev 4305) @@ -51,11 +51,16 @@ INSTALL_ARGS = DESTDIR=$(DESTDIR) -#to make the package extraction happy...(we don't use the - separator) -WORKSRC = $(WORKDIR)/docbook-xsl-$(GARVERSION) - include gar/category.mk +post-extract-modulated: WRONGDIR=docbook-xsl-$(GARVERSION) +post-extract-modulated: + @( cd $(WORKDIR); \ + if test -d $(WRONGDIR); then \ + mv $(WRONGDIR) $(DISTNAME); \ + fi; ) + @$(MAKECOOKIE) + install-%/Makefile.csw: @echo " ==> Running make install in $*" @$(INSTALL_ENV) $(MAKE) -f Makefile.csw DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 17:50:12 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 15:50:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4306] csw/mgar/pkg/pango/trunk Message-ID: Revision: 4306 http://gar.svn.sourceforge.net/gar/?rev=4306&view=rev Author: dmichelsen Date: 2009-04-14 15:50:11 +0000 (Tue, 14 Apr 2009) Log Message: ----------- pango: Update to 1.24.1 and dynamic gspec Modified Paths: -------------- csw/mgar/pkg/pango/trunk/Makefile csw/mgar/pkg/pango/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/pango/trunk/files/CSWpango.gspec csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec Modified: csw/mgar/pkg/pango/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango/trunk/Makefile 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/Makefile 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,5 +1,5 @@ GARNAME = libpango -GARVERSION = 1.24.0 +GARVERSION = 1.24.1 CATEGORIES = lib DESCRIPTION = A framework for the layout and rendering of international text @@ -11,11 +11,16 @@ endef MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/pango/1.24/ -DISTFILES = pango-$(GARVERSION).tar.bz2 -DISTFILES += $(call admfiles,CSWpango, postinstall) -DISTFILES += $(call admfiles,CSWpangodoc,) -DISTFILES += $(call admfiles,CSWpangodevel,) +DISTNAME = pango-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.bz2 +PACKAGES = CSWpango CSWpangodevel CSWpangodoc +CATALOGNAME_CSWpango = libpango +CATALOGNAME_CSWpangodevel = libpango_devel +CATALOGNAME_CSWpangodoc = libpango_doc + +SPKG_SOURCEURL = http://www.pango.org/ + # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/pango/ UFILES_REGEX = (\d+(?:\.\d+)*) @@ -24,21 +29,15 @@ CONFIGURE_ARGS += --with-x --enable-gtk-doc # CONFIGURE_ARGS += --with-included-modules -PREREQUISITE_PKGS += CSWgtk-doc CSWlibxslt - +PREREQUISITE_PKGS = CSWgtk-doc CSWlibxslt REQUIRED_PKGS_CSWpango = CSWggettextrt CSWglib2 +REQUIRED_PKGS_CSWpangodevel = CSWpango # Dynamic prototype PKGFILES_CSWpangodevel = $(PKGFILES_DEVEL) -PKGFILES_CSWpangodevel += /opt/csw/share/doc/libpango_devel/license -PKGFILES_CSWpangodoc = /opt/csw/share/gtk-doc/.* -PKGFILES_CSWpangodoc += /opt/csw/share/doc/libpango_doc/license +PKGFILES_CSWpangodoc = $(sharedstatedir)/gtk-doc/.* # Do not execute make test step TEST_SCRIPTS = include gar/category.mk - -post-extract: - ( cd $(WORKROOTDIR) ; for i in build-isa-* ; do mv $$i/pango-$(GARVERSION) $$i/$(GARNAME)-$(GARVERSION) ; done ) - @$(MAKECOOKIE) Modified: csw/mgar/pkg/pango/trunk/checksums =================================================================== --- csw/mgar/pkg/pango/trunk/checksums 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/checksums 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,5 +1 @@ -d209f41079833cd2ef2c5e580ab9c5ee download/pango-1.24.0.tar.bz2 -da5c6f501c3e86786917439354c131ce download/CSWpango.gspec -d37130471541f2025b465e9d21471dd3 download/CSWpango.postinstall -7c66de2a6fe8dabb01f04e23e93c83ba download/CSWpangodoc.gspec -b71fe2f312d197099f67bab293fdace2 download/CSWpangodevel.gspec +af0beac1dd1825e241c5728081f16acd download/pango-1.24.1.tar.bz2 Deleted: csw/mgar/pkg/pango/trunk/files/CSWpango.gspec =================================================================== --- csw/mgar/pkg/pango/trunk/files/CSWpango.gspec 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/files/CSWpango.gspec 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,9 +0,0 @@ -%var bitname libpango -%var pkgname CSWpango -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - Deleted: csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec =================================================================== --- csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,7 +0,0 @@ -%var bitname libpango_devel -%var pkgname CSWpangodevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information Deleted: csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec =================================================================== --- csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,9 +0,0 @@ -%var bitname libpango_doc -%var pkgname CSWpangodoc -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Tue Apr 14 17:51:55 2009 From: bwalton at opencsw.org (Ben Walton) Date: Tue, 14 Apr 2009 11:51:55 -0400 Subject: [csw-devel] updated gar svn check Message-ID: <1239724080-sup-288@ntdws12.chass.utoronto.ca> Hi All, Here is an updated patch against the current gar r4305 that implements package renaming when the svn repo is in the UNCOMMITTED state. I opted against altering the package contents in favour of simply renaming the completed package files. This avoided REV= being changed to something that checkpkg wouldn't like, which I felt was good. The other points Dago raised (directory based packages and a release target) will be addressed separately. Feedback welcome. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: svn_check.patch Type: application/octet-stream Size: 2061 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From valholla at users.sourceforge.net Tue Apr 14 20:30:47 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 14 Apr 2009 18:30:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4307] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4307 http://gar.svn.sourceforge.net/gar/?rev=4307&view=rev Author: valholla Date: 2009-04-14 18:30:47 +0000 (Tue, 14 Apr 2009) Log Message: ----------- update packages for correct runtime versions Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/gar_override.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-14 15:50:11 UTC (rev 4306) +++ csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-14 18:30:47 UTC (rev 4307) @@ -3,7 +3,7 @@ WORKDIR = $(WORKROOTDIR)/build-$(MODULATION)-$(GAROSREL)-$(GARCH) PATCHDIR = $(WORKDIR)/$(GARNAME)-$(GARVERSION) INSTALLISADIR = $(WORKROOTDIR)/install-$(MODULATION)-$(GAROSREL)-$(GARCH) -PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GARCH)) +PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GAROSREL)-$(GARCH)) OBJECT_DIR = $(WORKDIR)/objdir WORKSRC = $(OBJECT_DIR) DIRPATHS = @@ -38,7 +38,7 @@ CONFIGURE_SCRIPTS = objdir TEST_SCRIPTS = skip post-configure-modulated: fix-bootflags -MERGE_SCRIPTS_isa-i386 = amd +#MERGE_SCRIPTS_isa-i386 = amd ## Run checkpkg Manually ENABLE_CHECK = 0 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 15:50:11 UTC (rev 4306) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 18:30:47 UTC (rev 4307) @@ -62,121 +62,119 @@ ## Define Dependencies COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4ada = CSWgcc4adart $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) CSWbinutils +REQUIRED_PKGS_CSWgcc4core = $(COMMON_REQUIRE) CSWbinutils CSWggettextrt REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4gfortranrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt CSWiconv -REQUIRED_PKGS_CSWgcc4java = CSWgcc4javart CSWgcc4corert -REQUIRED_PKGS_CSWgcc4java += CSWzlib $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWzlib $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4objc = CSWgcc4objcrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core $(COMMON_REQUIRE) ## Define the Contents of the Packages ## gcc4ada Definitions -PKGFILES_CSWgcc4ada = .*/libexec/.*gnat1 -PKGFILES_CSWgcc4ada += .*/adalib/.* -PKGFILES_CSWgcc4ada += .*/adainclude/.* -PKGFILES_CSWgcc4ada += .*/info/.*gnat.* -PKGFILES_CSWgcc4ada += .*/bin/gnat.* +PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* +PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* +PKGFILES_CSWgcc4ada += .*/gcc4/bin/gnat.* ## gcc4gfortran Definitions -PKGFILES_CSWgcc4gfortran = .*/bin/.*gfortran -PKGFILES_CSWgcc4gfortran += .*/libexec/.*f951 -PKGFILES_CSWgcc4gfortran += .*/man1/gfortran.1 -PKGFILES_CSWgcc4gfortran += .*/info/gfortran.* +PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran +PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 +PKGFILES_CSWgcc4gfortran += .*/gcc4/man1/gfortran.1 +PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* ## gcc4g++ Definitions -PKGFILES_CSWgcc4g++ = .*/bin/.*g\+\+ -PKGFILES_CSWgcc4g++ += .*/bin/.*c\+\+ -PKGFILES_CSWgcc4g++ += .*/libexec/.*cc1plus -PKGFILES_CSWgcc4g++ += .*/man1/g\+\+.1 -PKGFILES_CSWgcc4g++ += .*/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* -PKGFILES_CSWgcc4g++ += .*/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* +PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus +PKGFILES_CSWgcc4g++ += .*/gcc4/man1/g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* ## gcc4java Definitions -PKGFILES_CSWgcc4java = .*/bin/.*gcj.* -PKGFILES_CSWgcc4java += .*/bin/.*jv-scan -PKGFILES_CSWgcc4java += .*/bin/.*jv-convert -PKGFILES_CSWgcc4java += .*/bin/.*jcf-dump -PKGFILES_CSWgcc4java += .*/bin/.*grmi.* -PKGFILES_CSWgcc4java += .*/bin/.*grepjar -PKGFILES_CSWgcc4java += .*/bin/.*gjnih -PKGFILES_CSWgcc4java += .*/bin/.*gij -PKGFILES_CSWgcc4java += .*/bin/.*fastjar -PKGFILES_CSWgcc4java += .*/bin/.*gjar.* -PKGFILES_CSWgcc4java += .*/bin/.*gjavah -PKGFILES_CSWgcc4java += .*/bin/.*gorbd -PKGFILES_CSWgcc4java += .*/bin/.*addr2name.awk -PKGFILES_CSWgcc4java += .*/bin/.*gappletviewer -PKGFILES_CSWgcc4java += .*/bin/.*gkeytool -PKGFILES_CSWgcc4java += .*/bin/.*gserialver -PKGFILES_CSWgcc4java += .*/bin/.*gtnameserv -PKGFILES_CSWgcc4java += .*/bin/.*gnative2ascii -PKGFILES_CSWgcc4java += .*/bin/.*gc-analyze -PKGFILES_CSWgcc4java += .*/man1/gcj.* -PKGFILES_CSWgcc4java += .*/man1/gij.* -PKGFILES_CSWgcc4java += .*/man1/jv.* -PKGFILES_CSWgcc4java += .*/man1/jcf.* -PKGFILES_CSWgcc4java += .*/man1/grmi.* -PKGFILES_CSWgcc4java += .*/man1/.*jar.* -PKGFILES_CSWgcc4java += .*/man1/.*jni.* -PKGFILES_CSWgcc4java += .*/man1/.*java.* -PKGFILES_CSWgcc4java += .*/man1/gorbd.* -PKGFILES_CSWgcc4java += .*/man1/gapplet.* -PKGFILES_CSWgcc4java += .*/man1/gkeytool.* -PKGFILES_CSWgcc4java += .*/man1/gserialver.* -PKGFILES_CSWgcc4java += .*/man1/gtnameserv.* -PKGFILES_CSWgcc4java += .*/man1/gnative2ascii.* -PKGFILES_CSWgcc4java += .*/man1/gc-analyze.* -PKGFILES_CSWgcc4java += .*/libexec/.*collect.* -PKGFILES_CSWgcc4java += .*/libexec/.*jvgenmain -PKGFILES_CSWgcc4java += .*/libexec/.*jc1.* -PKGFILES_CSWgcc4java += .*/info/gcj.* -PKGFILES_CSWgcc4java += .*/include/.*gcj/.* -PKGFILES_CSWgcc4java += .*/include/.*awt/.* -PKGFILES_CSWgcc4java += .*/include/.*classpath/.* -PKGFILES_CSWgcc4java += .*/include/.*java.* -PKGFILES_CSWgcc4java += .*/include/.*ffi.h -PKGFILES_CSWgcc4java += .*/include/.*org/.* +PKGFILES_CSWgcc4java = .*/gcc4/bin/.*gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-scan +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-convert +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jcf-dump +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grepjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjnih +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gij +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*fastjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjar.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjavah +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gorbd +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*addr2name.awk +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gappletviewer +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gkeytool +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gserialver +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze +PKGFILES_CSWgcc4java += .*/gcc4/man1/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gij.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/jv.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/jcf.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jar.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jni.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gorbd.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gapplet.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gkeytool.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gserialver.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gtnameserv.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gnative2ascii.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* +PKGFILES_CSWgcc4java += .*/gcc4/info/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*gcj/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*awt/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*classpath/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*ffi.h +PKGFILES_CSWgcc4java += .*/gcc4/include/.*org/.* ## gcc4objc Definitions -PKGFILES_CSWgcc4objc = .*/libexec/.*cc1obj -PKGFILES_CSWgcc4objc += .*/include/.*objc/.* +PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj +PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* ####### RunTime Packages ## gcc4adart -PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* -PKGFILES_CSWgcc4adart += .*/lib/.*libgnarl.* +PKGFILES_CSWgcc4adart = .*/opt/csw/lib/.*libgnat.* +PKGFILES_CSWgcc4adart += .*/opt/csw/lib/.*libgnarl.* ## gcc4corert -PKGFILES_CSWgcc4corert = .*/lib/.*libgcc_s.* -PKGFILES_CSWgcc4corert += .*/lib/.*libgomp.* -PKGFILES_CSWgcc4corert += .*/lib/.*libiberty.* -PKGFILES_CSWgcc4corert += .*/lib/.*libssp.* +PKGFILES_CSWgcc4corert = .*/opt/csw/lib/.*libgcc_s.* +PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libgomp.* +PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libiberty.* +PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libssp.* ## gcc4gfortranrt -PKGFILES_CSWgcc4gfortranrt = .*/lib/.*libgfortran.* +PKGFILES_CSWgcc4gfortranrt = .*/opt/csw/lib/.*libgfortran.* ## gcc4g++rt -PKGFILES_CSWgcc4g++rt = .*/lib/.*libstdc.* -PKGFILES_CSWgcc4g++rt += .*/lib/.*libsupc\+\+.* +PKGFILES_CSWgcc4g++rt = .*/opt/csw/lib/.*libstdc.* +PKGFILES_CSWgcc4g++rt += .*/opt/csw/lib/.*libsupc\+\+.* ## gcc4javart -PKGFILES_CSWgcc4javart = .*/share/java/.* -PKGFILES_CSWgcc4javart += .*/lib/.*libgij.* -PKGFILES_CSWgcc4javart += .*/lib/.*libffi.* -PKGFILES_CSWgcc4javart += .*/lib/.*lib-gnu-awt.* -PKGFILES_CSWgcc4javart += .*/lib/.*security/classpath.* -PKGFILES_CSWgcc4javart += .*/lib/.*logging.properties -PKGFILES_CSWgcc4javart += .*/lib/.*pkgconfig.* -PKGFILES_CSWgcc4javart += .*/lib/.*gcj.* -PKGFILES_CSWgcc4javart += .*/lib/.*libgcj.* +PKGFILES_CSWgcc4javart = .*/opt/csw/lib/.*libgij.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libffi.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*lib-gnu-awt.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*security/classpath.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*logging.properties +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*pkgconfig.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*gcj.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libgcj.* ## gcc4objc Runtime -PKGFILES_CSWgcc4objcrt = .*/lib/.*libobjc.* +PKGFILES_CSWgcc4objcrt = .*/opt/csw/lib/.*libobjc.* Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-14 15:50:11 UTC (rev 4306) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-14 18:30:47 UTC (rev 4307) @@ -27,6 +27,29 @@ $(WORKSRC)/Makefile) @$(MAKECOOKIE) +post-merge-modulated: + @( gecho "[===> Creating Runtime Package files <===]" ) + @( ginstall -d $(PKGROOT)/opt/csw/lib ) + @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/*.so* $(PKGROOT)/opt/csw/lib/ ) + @( gchmod 0755 $(PKGROOT)/opt/csw/lib/*.so* ) + @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ + $(PKGROOT)/opt/csw/lib/ ) + @( if [ "`uname -p`" = 'i386' ]; then \ + if [ "`uname -r`" = '5.10' ]; then \ + ginstall -d $(PKGROOT)/opt/csw/lib/amd64; \ + gcp -d $(PKGROOT)/opt/csw/gcc4/lib/amd64/*.so* \ + $(PKGROOT)/opt/csw/lib/amd64/; \ + gchmod 0755 $(PKGROOT)/opt/csw/lib/amd64/*.so*; \ + fi; \ + fi ) + @( if [ "`uname -p`" = 'sparc' ]; then \ + ginstall -d $(PKGROOT)/opt/csw/lib/sparcv9; \ + gcp -d $(PKGROOT)/opt/csw/gcc4/lib/sparcv9/*.so* \ + $(PKGROOT)/opt/csw/lib/sparcv9/; \ + gchmod 0755 $(PKGROOT)/opt/csw/lib/sparcv9/*.so*; \ + fi ) + @$(MAKECOOKIE) + test-skip: @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dam at opencsw.org Tue Apr 14 21:02:02 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Tue, 14 Apr 2009 21:02:02 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239724080-sup-288@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> Message-ID: <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> Hi Ben, Am 14.04.2009 um 17:51 schrieb Ben Walton: > Here is an updated patch against the current gar r4305 that implements > package renaming when the svn repo is in the UNCOMMITTED state. I > opted against altering the package contents in favour of simply > renaming the completed package files. This avoided REV= being changed > to something that checkpkg wouldn't like, which I felt was good. I see two issues here: - svncheck is skipped on ENABLE_CHECK=0, which currently must be done for packages with Solaris 10 x86 dependencies build on Solaris 8 (especially to libm.so.2). So this renaming is skipped on a number of cases. I would also add it to the other case. - Renaming afterwards looks unclean to me instead of just writing the package to another name. The already used 'mkpackage -qs' looks more complicated than necessary to me. Maybe we should change mkpackage and pass the package name explicitly. Best regards -- Dago From dmichelsen at users.sourceforge.net Tue Apr 14 21:05:34 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 19:05:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4308] csw/mgar/pkg/pcre/trunk/Makefile Message-ID: Revision: 4308 http://gar.svn.sourceforge.net/gar/?rev=4308&view=rev Author: dmichelsen Date: 2009-04-14 19:05:33 +0000 (Tue, 14 Apr 2009) Log Message: ----------- pcre: Add direct dependencies to pcre to keep checkpkg quiet Modified Paths: -------------- csw/mgar/pkg/pcre/trunk/Makefile Modified: csw/mgar/pkg/pcre/trunk/Makefile =================================================================== --- csw/mgar/pkg/pcre/trunk/Makefile 2009-04-14 18:30:47 UTC (rev 4307) +++ csw/mgar/pkg/pcre/trunk/Makefile 2009-04-14 19:05:33 UTC (rev 4308) @@ -16,8 +16,8 @@ SPKG_SOURCEURL = http://www.pcre.org PREREQUISITE_PKGS = CSWgnulinks -REQUIRED_PKGS_CSWpcre = CSWpcrert REQUIRED_PKGS_CSWpcrert = CSWzlib CSWbzip2 CSWreadline CSWncurses +REQUIRED_PKGS_CSWpcre = CSWpcrert $(REQUIRED_PKGS_CSWpcrert) PACKAGES = CSWpcre CSWpcrert CATALOGNAME_CSWpcrert = pcre_rt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 21:21:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 19:21:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4309] csw/mgar/pkg/libtheora/trunk/Makefile Message-ID: Revision: 4309 http://gar.svn.sourceforge.net/gar/?rev=4309&view=rev Author: dmichelsen Date: 2009-04-14 19:21:23 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libtheora: Disable non-functioning asm-optimizations in x86 Modified Paths: -------------- csw/mgar/pkg/libtheora/trunk/Makefile Modified: csw/mgar/pkg/libtheora/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-14 19:05:33 UTC (rev 4308) +++ csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-14 19:21:23 UTC (rev 4309) @@ -25,6 +25,7 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-examples +CONFIGURE_ARGS += --disable-asm TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 14 21:43:17 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 14 Apr 2009 19:43:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4310] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4310 http://gar.svn.sourceforge.net/gar/?rev=4310&view=rev Author: valholla Date: 2009-04-14 19:43:17 +0000 (Tue, 14 Apr 2009) Log Message: ----------- fix package contents Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 19:21:23 UTC (rev 4309) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 19:43:17 UTC (rev 4310) @@ -78,6 +78,8 @@ ## gcc4ada Definitions PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnat.* +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnarl.* PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* @@ -85,6 +87,7 @@ ## gcc4gfortran Definitions PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran +PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.* PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 PKGFILES_CSWgcc4gfortran += .*/gcc4/man1/gfortran.1 PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* @@ -93,7 +96,11 @@ PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus -PKGFILES_CSWgcc4g++ += .*/gcc4/man1/g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.* +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.* +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libstdc\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libsupc\+\+.1 PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* @@ -117,21 +124,30 @@ PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze -PKGFILES_CSWgcc4java += .*/gcc4/man1/gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gij.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/jv.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/jcf.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/grmi.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jar.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jni.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/.*java.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gorbd.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gapplet.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gkeytool.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gserialver.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gtnameserv.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gnative2ascii.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gij.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/jv.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/jcf.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jar.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jni.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gorbd.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gapplet.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gkeytool.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gserialver.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gtnameserv.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gnative2ascii.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/share/java/.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgij.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libffi.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*lib-gnu-awt.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*security/classpath.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*logging.properties +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*pkgconfig.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgcj.* PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* @@ -145,6 +161,7 @@ ## gcc4objc Definitions PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.* PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* ####### RunTime Packages This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 22:01:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 20:01:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4311] csw/mgar/pkg Message-ID: Revision: 4311 http://gar.svn.sourceforge.net/gar/?rev=4311&view=rev Author: dmichelsen Date: 2009-04-14 20:01:08 +0000 (Tue, 14 Apr 2009) Log Message: ----------- speex: Initial commit Added Paths: ----------- csw/mgar/pkg/speex/ csw/mgar/pkg/speex/branches/ csw/mgar/pkg/speex/tags/ csw/mgar/pkg/speex/trunk/ csw/mgar/pkg/speex/trunk/Makefile csw/mgar/pkg/speex/trunk/checksums csw/mgar/pkg/speex/trunk/files/ Property changes on: csw/mgar/pkg/speex/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/speex/trunk/Makefile =================================================================== --- csw/mgar/pkg/speex/trunk/Makefile (rev 0) +++ csw/mgar/pkg/speex/trunk/Makefile 2009-04-14 20:01:08 UTC (rev 4311) @@ -0,0 +1,23 @@ +GARNAME = speex +GARVERSION = 1.2rc1 +CATEGORIES = lib + +DESCRIPTION = Speex audio codec support library +define BLURB +endef + +MASTER_SITES = http://downloads.xiph.org/releases/speex/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +PACKAGES = CSWspeex +CATALOGNAME = libspeex + +SPKG_SOURCEURL = http://www.speex.org/ + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +include gar/category.mk Added: csw/mgar/pkg/speex/trunk/checksums =================================================================== --- csw/mgar/pkg/speex/trunk/checksums (rev 0) +++ csw/mgar/pkg/speex/trunk/checksums 2009-04-14 20:01:08 UTC (rev 4311) @@ -0,0 +1 @@ +c4438b22c08e5811ff10e2b06ee9b9ae download/speex-1.2rc1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 14 22:10:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 14 Apr 2009 20:10:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4312] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4312 http://gar.svn.sourceforge.net/gar/?rev=4312&view=rev Author: valholla Date: 2009-04-14 20:10:50 +0000 (Tue, 14 Apr 2009) Log Message: ----------- fix package contents Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 20:01:08 UTC (rev 4311) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 20:10:50 UTC (rev 4312) @@ -89,7 +89,7 @@ PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.* PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 -PKGFILES_CSWgcc4gfortran += .*/gcc4/man1/gfortran.1 +PKGFILES_CSWgcc4gfortran += .*/gcc4/man/.*gfortran.1 PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* ## gcc4g++ Definitions @@ -163,6 +163,7 @@ PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.* PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* ####### RunTime Packages This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 22:16:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 20:16:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4313] csw/mgar/pkg/vorbistools/trunk Message-ID: Revision: 4313 http://gar.svn.sourceforge.net/gar/?rev=4313&view=rev Author: dmichelsen Date: 2009-04-14 20:16:35 +0000 (Tue, 14 Apr 2009) Log Message: ----------- vorbistools: Add dependencys, libtool fix Modified Paths: -------------- csw/mgar/pkg/vorbistools/trunk/Makefile csw/mgar/pkg/vorbistools/trunk/checksums Added Paths: ----------- csw/mgar/pkg/vorbistools/trunk/files/fixme.sh Modified: csw/mgar/pkg/vorbistools/trunk/Makefile =================================================================== --- csw/mgar/pkg/vorbistools/trunk/Makefile 2009-04-14 20:10:50 UTC (rev 4312) +++ csw/mgar/pkg/vorbistools/trunk/Makefile 2009-04-14 20:16:35 UTC (rev 4313) @@ -13,10 +13,16 @@ DISTNAME = vorbis-tools-$(GARVERSION) MASTER_SITES = http://downloads.xiph.org/releases/vorbis/ DISTFILES = $(DISTNAME).tar.gz +DISTFILES += fixme.sh +SPKG_SOURCEURL = http://www.vorbis.com + PACKAGES = CSWvtools CATALOGNAME = vorbistools +REQUIRED_PKGS = CSWcurlrt CSWflac CSWggettextrt CSWiconv CSWlibao +REQUIRED_PKGS += CSWlibogg CSWspeex CSWsunmath CSWvorbis + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) @@ -30,3 +36,9 @@ TEST_TARGET = check include gar/category.mk + +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + Modified: csw/mgar/pkg/vorbistools/trunk/checksums =================================================================== --- csw/mgar/pkg/vorbistools/trunk/checksums 2009-04-14 20:10:50 UTC (rev 4312) +++ csw/mgar/pkg/vorbistools/trunk/checksums 2009-04-14 20:16:35 UTC (rev 4313) @@ -1 +1,2 @@ +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh df976d24e51ef3d87cd462edf747bf9a download/vorbis-tools-1.2.0.tar.gz Copied: csw/mgar/pkg/vorbistools/trunk/files/fixme.sh (from rev 4263, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/vorbistools/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/vorbistools/trunk/files/fixme.sh 2009-04-14 20:16:35 UTC (rev 4313) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 15 13:32:54 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 15 Apr 2009 11:32:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4314] csw/mgar/pkg/libtheora/trunk/Makefile Message-ID: Revision: 4314 http://gar.svn.sourceforge.net/gar/?rev=4314&view=rev Author: dmichelsen Date: 2009-04-15 11:32:54 +0000 (Wed, 15 Apr 2009) Log Message: ----------- libtheora: Fix package name Modified Paths: -------------- csw/mgar/pkg/libtheora/trunk/Makefile Modified: csw/mgar/pkg/libtheora/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-14 20:16:35 UTC (rev 4313) +++ csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-15 11:32:54 UTC (rev 4314) @@ -18,6 +18,9 @@ PREREQUISITE_PKGS = CSWtransfig REQUIRED_PKGS = CSWlibogg +PACKAGES = CSWtheora +CATALOGNAME = libtheora + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*).tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 15 14:17:52 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 15 Apr 2009 12:17:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4315] csw/mgar/pkg Message-ID: Revision: 4315 http://gar.svn.sourceforge.net/gar/?rev=4315&view=rev Author: dmichelsen Date: 2009-04-15 12:17:52 +0000 (Wed, 15 Apr 2009) Log Message: ----------- binutils: Initial commit Added Paths: ----------- csw/mgar/pkg/binutils/ csw/mgar/pkg/binutils/branches/ csw/mgar/pkg/binutils/tags/ csw/mgar/pkg/binutils/trunk/ csw/mgar/pkg/binutils/trunk/Makefile csw/mgar/pkg/binutils/trunk/checksums csw/mgar/pkg/binutils/trunk/files/ Property changes on: csw/mgar/pkg/binutils/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/binutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/binutils/trunk/Makefile (rev 0) +++ csw/mgar/pkg/binutils/trunk/Makefile 2009-04-15 12:17:52 UTC (rev 4315) @@ -0,0 +1,20 @@ +GARNAME = binutils +GARVERSION = 2.19.1 +CATEGORIES = utils + +DESCRIPTION = GNU binary utilities: gas, gld, gprof, and others +define BLURB +endef + +MASTER_SITES = $(GNU_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 + +REQUIRED_PKGS = CSWzlib CSWiconv CSWggettextrt + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +include gar/category.mk Added: csw/mgar/pkg/binutils/trunk/checksums =================================================================== --- csw/mgar/pkg/binutils/trunk/checksums (rev 0) +++ csw/mgar/pkg/binutils/trunk/checksums 2009-04-15 12:17:52 UTC (rev 4315) @@ -0,0 +1 @@ +09a8c5821a2dfdbb20665bc0bd680791 download/binutils-2.19.1.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 15 14:56:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 15 Apr 2009 12:56:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4316] csw/mgar/pkg/binutils/trunk/Makefile Message-ID: Revision: 4316 http://gar.svn.sourceforge.net/gar/?rev=4316&view=rev Author: dmichelsen Date: 2009-04-15 12:56:06 +0000 (Wed, 15 Apr 2009) Log Message: ----------- binutils: Fix test target Modified Paths: -------------- csw/mgar/pkg/binutils/trunk/Makefile Modified: csw/mgar/pkg/binutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/binutils/trunk/Makefile 2009-04-15 12:17:52 UTC (rev 4315) +++ csw/mgar/pkg/binutils/trunk/Makefile 2009-04-15 12:56:06 UTC (rev 4316) @@ -17,4 +17,6 @@ BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) +TEST_TARGET = check + include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 15 15:53:17 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 15 Apr 2009 13:53:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4317] csw/mgar/pkg/mysql5/trunk Message-ID: Revision: 4317 http://gar.svn.sourceforge.net/gar/?rev=4317&view=rev Author: bdwalton Date: 2009-04-15 13:53:17 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Convert to dynamic gspec, add initial framework for package splitting. Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile csw/mgar/pkg/mysql5/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 12:56:06 UTC (rev 4316) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 13:53:17 UTC (rev 4317) @@ -10,9 +10,18 @@ (Structured Query Language) database server. endef +PACKAGES = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel +PACKAGES += CSWmysql5rt CSWmysql5test + +CATALOGNAME_CSWmysql5 = $(GARNAME) +CATALOGNAME_CSWmysql5bench = $(GARNAME)bench +CATALOGNAME_CSWmysql5clien = $(GARNAME)client +CATALOGNAME_CSWmysql5devel = $(GARNAME)devel +CATALOGNAME_CSWmysql5rt = $(GARNAME)rt +CATALOGNAME_CSWmysql5test = $(GARNAME)test + MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/ DISTFILES = mysql-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWmysql5,) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz @@ -20,8 +29,8 @@ # Change prefix to /opt/csw/mysql5 prefix = /opt/csw/mysql5 -WORKSRC = $(WORKDIR)/mysql-$(GARVERSION) - +# because we alter the prefix. this gets us proper linking as well as +# LD_OPTIONS (RPATH) EXTRA_LIB = /opt/csw/lib # Set ./configure options @@ -42,3 +51,9 @@ include gar/category.mk +post-extract-modulated: + @( cd $(WORKDIR); \ + if test -d mysql-$(GARVERSION); then \ + mv mysql-$(GARVERSION) $(DISTNAME); \ + fi; ) + @$(MAKECOOKIE) \ No newline at end of file Modified: csw/mgar/pkg/mysql5/trunk/checksums =================================================================== --- csw/mgar/pkg/mysql5/trunk/checksums 2009-04-15 12:56:06 UTC (rev 4316) +++ csw/mgar/pkg/mysql5/trunk/checksums 2009-04-15 13:53:17 UTC (rev 4317) @@ -1,2 +1 @@ 9c5711e9bea4514df6f2659f283f0aa0 download/mysql-5.1.33.tar.gz -5a55ac71abe980fe2a909d9712364cae download/CSWmysql5.gspec Deleted: csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec =================================================================== --- csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec 2009-04-15 12:56:06 UTC (rev 4316) +++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec 2009-04-15 13:53:17 UTC (rev 4317) @@ -1,4 +0,0 @@ -%var bitname mysql5 -%var pkgname CSWmysql5 -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Wed Apr 15 16:13:48 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:13:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4318] csw/mgar/pkg/curl/trunk Message-ID: Revision: 4318 http://gar.svn.sourceforge.net/gar/?rev=4318&view=rev Author: harpchad Date: 2009-04-15 14:13:48 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Fix header files to support both 32 and 64bit (sparc) Modified Paths: -------------- csw/mgar/pkg/curl/trunk/Makefile csw/mgar/pkg/curl/trunk/checksums Added Paths: ----------- csw/mgar/pkg/curl/trunk/files/curlbuild.h Modified: csw/mgar/pkg/curl/trunk/Makefile =================================================================== --- csw/mgar/pkg/curl/trunk/Makefile 2009-04-15 13:53:17 UTC (rev 4317) +++ csw/mgar/pkg/curl/trunk/Makefile 2009-04-15 14:13:48 UTC (rev 4318) @@ -19,6 +19,7 @@ DISTFILES += libcurl.so.2.0.2.s DISTFILES += libcurl.so.3.0.0.i DISTFILES += libcurl.so.2.0.2.i +DISTFILES += curlbuild.h PACKAGES = CSWcurl CSWcurlrt CSWcurldevel CATALOGNAME_CSWcurl = curl @@ -52,8 +53,18 @@ @cp $(FILEDIR)/libcurl.so.2.0.2.s $(INSTALLISADIR)/opt/csw/lib/libcurl.so.2.0.2 @( cd $(INSTALLISADIR)/opt/csw/lib; ln -s libcurl.so.3.0.0 libcurl.so.3 ) @( cd $(INSTALLISADIR)/opt/csw/lib; ln -s libcurl.so.2.0.2 libcurl.so.2 ) + @mv $(INSTALLISADIR)/opt/csw/include/curl/curlbuild.h $(INSTALLISADIR)/opt/csw/include/curl/curlbuild-32.h + @cp $(FILEDIR)/curlbuild.h $(INSTALLISADIR)/opt/csw/include/curl/curlbuild.h $(DONADA) +post-install-isa-sparcv9: + @mv $(INSTALLISADIR)/opt/csw/include/curl/curlbuild.h $(INSTALLISADIR)/opt/csw/include/curl/curlbuild-64.h + $(DONADA) + +post-merge-isa-sparcv9: + @cp $(INSTALLISADIR)/opt/csw/include/curl/curlbuild-64.h $(PKGROOT)/opt/csw/include/curl/curlbuild-64.h + $(DONADA) + post-install-isa-i386: @cp $(FILEDIR)/libcurl.so.3.0.0.i $(INSTALLISADIR)/opt/csw/lib/libcurl.so.3.0.0 @cp $(FILEDIR)/libcurl.so.2.0.2.i $(INSTALLISADIR)/opt/csw/lib/libcurl.so.2.0.2 Modified: csw/mgar/pkg/curl/trunk/checksums =================================================================== --- csw/mgar/pkg/curl/trunk/checksums 2009-04-15 13:53:17 UTC (rev 4317) +++ csw/mgar/pkg/curl/trunk/checksums 2009-04-15 14:13:48 UTC (rev 4318) @@ -3,3 +3,4 @@ b46b41659b805013740eeb76e759af4b download/libcurl.so.2.0.2.s 30e826ef67b6ce799b32154250014dd9 download/libcurl.so.3.0.0.i a09fcad6dfcd9636061dfab7598357be download/libcurl.so.2.0.2.i +e4d1b44b1176769755e51ba43408b0b3 download/curlbuild.h Added: csw/mgar/pkg/curl/trunk/files/curlbuild.h =================================================================== --- csw/mgar/pkg/curl/trunk/files/curlbuild.h (rev 0) +++ csw/mgar/pkg/curl/trunk/files/curlbuild.h 2009-04-15 14:13:48 UTC (rev 4318) @@ -0,0 +1,6 @@ +#Allow 32 and 64 bit headers to coexist +#if defined __arch64__ || defined __sparcv9 +#include "curlbuild-64.h" +#else +#include "curlbuild-32.h" +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 15 16:14:43 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:14:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4319] csw/mgar/pkg/mysql5/trunk/Makefile Message-ID: Revision: 4319 http://gar.svn.sourceforge.net/gar/?rev=4319&view=rev Author: bdwalton Date: 2009-04-15 14:14:43 +0000 (Wed, 15 Apr 2009) Log Message: ----------- override distname instead of moving the tarball extracted dir. Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 14:13:48 UTC (rev 4318) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 14:14:43 UTC (rev 4319) @@ -4,6 +4,8 @@ GARCOMPILER = GCC4 +DISTNAME = mysql-$(GARVERSION) + DESCRIPTION = Multithreaded SQL database define BLURB MySQL is a very fast, multi-threaded, multi-user and robust SQL @@ -50,10 +52,3 @@ # BUILD64 = 1 include gar/category.mk - -post-extract-modulated: - @( cd $(WORKDIR); \ - if test -d mysql-$(GARVERSION); then \ - mv mysql-$(GARVERSION) $(DISTNAME); \ - fi; ) - @$(MAKECOOKIE) \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Wed Apr 15 16:26:58 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:26:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4320] csw/mgar/pkg/curl/trunk Message-ID: Revision: 4320 http://gar.svn.sourceforge.net/gar/?rev=4320&view=rev Author: harpchad Date: 2009-04-15 14:26:57 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Fix typo Modified Paths: -------------- csw/mgar/pkg/curl/trunk/checksums csw/mgar/pkg/curl/trunk/files/curlbuild.h Modified: csw/mgar/pkg/curl/trunk/checksums =================================================================== --- csw/mgar/pkg/curl/trunk/checksums 2009-04-15 14:14:43 UTC (rev 4319) +++ csw/mgar/pkg/curl/trunk/checksums 2009-04-15 14:26:57 UTC (rev 4320) @@ -3,4 +3,4 @@ b46b41659b805013740eeb76e759af4b download/libcurl.so.2.0.2.s 30e826ef67b6ce799b32154250014dd9 download/libcurl.so.3.0.0.i a09fcad6dfcd9636061dfab7598357be download/libcurl.so.2.0.2.i -e4d1b44b1176769755e51ba43408b0b3 download/curlbuild.h +5aebb27149d80000d1107b58d65b551b download/curlbuild.h Modified: csw/mgar/pkg/curl/trunk/files/curlbuild.h =================================================================== --- csw/mgar/pkg/curl/trunk/files/curlbuild.h 2009-04-15 14:14:43 UTC (rev 4319) +++ csw/mgar/pkg/curl/trunk/files/curlbuild.h 2009-04-15 14:26:57 UTC (rev 4320) @@ -1,4 +1,4 @@ -#Allow 32 and 64 bit headers to coexist +/* Allow 32 and 64 bit headers to coexist */ #if defined __arch64__ || defined __sparcv9 #include "curlbuild-64.h" #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:36:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:36:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4321] csw/mgar/pkg/sudo-ldap/trunk Message-ID: Revision: 4321 http://gar.svn.sourceforge.net/gar/?rev=4321&view=rev Author: valholla Date: 2009-04-15 14:36:20 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix conflicting files Modified Paths: -------------- csw/mgar/pkg/sudo-ldap/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove Modified: csw/mgar/pkg/sudo-ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-15 14:26:57 UTC (rev 4320) +++ csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-15 14:36:20 UTC (rev 4321) @@ -12,33 +12,35 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += CSWsudoldap.postinstall +DISTFILES += CSWsudoldap.postremove PATCHFILES = install.diff # We define upstream file regex so we can be notifed of new # upstream software release UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz -PACKAGES = CSWsudo-ldap +PACKAGES = CSWsudoldap -CATALOGNAME_CSWsudo-ldap = sudo_ldap -SPKG_DESC_CSWsudo-ldap = $(DESCRIPTION) -SPKG_SOURCEURL_CSWsudo-ldap = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudo-ldap = CSWsudo -REQUIRED_PKGS_CSWsudo-ldap = CSWsudo-common CSWggettextrt CSWoldaprt +CATALOGNAME_CSWsudoldap = sudo_ldap +SPKG_DESC_CSWsudoldap = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudoldap = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudoldap = CSWsudo +REQUIRED_PKGS_CSWsudoldap = CSWsudo-common CSWggettextrt CSWoldaprt CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam CONFIGURE_ARGS += --with-logging=both CONFIGURE_ARGS += --with-ignore-dot CONFIGURE_ARGS += --with-env-editor -CONFIGURE_ARGS += --with-ldap=$(prefix) -CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf +CONFIGURE_ARGS += --withldap=$(prefix) +CONFIGURE_ARGS += --withldap-conf-file=$(sysconfdir)/ldap.conf TEST_TARGET = check include gar/category.mk -PKGFILES_CSWsudo-ldap = .*/bin/.* +PKGFILES_CSWsudoldap = .*/bin/.* post-install-modulated: @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) @@ -46,4 +48,7 @@ @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) @$(MAKECOOKIE) - $(DONADA) + +post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @$(MAKECOOKIE) Added: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall (rev 0) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall 2009-04-15 14:36:20 UTC (rev 4321) @@ -0,0 +1,11 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit + +exit 0 + Added: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove (rev 0) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 14:36:20 UTC (rev 4321) @@ -0,0 +1,13 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin +SUDO_MINIMAL=${BINDIR}/sudo.minimal + +if [ -f ${SUDO_MINIMAL} ]; then + rm -f sudo sudoedit + ln -f $SUDO_MINIMAL ${BINDIR}/sudo + ln -f $SUDO_MINIMAL ${BINDIR}/sudoedit +fi + +exit 0 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:40:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:40:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4322] csw/mgar/pkg Message-ID: Revision: 4322 http://gar.svn.sourceforge.net/gar/?rev=4322&view=rev Author: valholla Date: 2009-04-15 14:40:20 +0000 (Wed, 15 Apr 2009) Log Message: ----------- rename sudo-ldap to sudo_ldap Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/sudo_ldap/ csw/mgar/pkg/sudo_ldap/trunk/ csw/mgar/pkg/sudo_ldap/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/files/ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Removed Paths: ------------- csw/mgar/pkg/sudo_ldap/trunk/ csw/mgar/pkg/sudo_ldap/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/files/ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.depend csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.gspec csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postinstall csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postremove csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.prototype csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.space Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 14:36:20 UTC (rev 4321) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) @@ -54,3 +54,7 @@ @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudoedit ) @$(MAKECOOKIE) $(DONADA) + +post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @$(MAKECOOKIE) Deleted: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,49 +0,0 @@ -GARNAME = sudo -GARVERSION = 1.7.0 -CATEGORIES = utils - -DESCRIPTION = Provides limited super user privileges (LDAP Enabled) -define BLURB - Sudo (superuser do) allows a system administrator to give certain users (or - groups of users) the ability to run some (or all) commands as root while - logging all commands and arguments. Sudo operates on a per-command basis, it - is not a replacement for the shell. -endef - -MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PATCHFILES = install.diff - -# We define upstream file regex so we can be notifed of new -# upstream software release -UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz - -PACKAGES = CSWsudo-ldap - -CATALOGNAME_CSWsudo-ldap = sudo_ldap -SPKG_DESC_CSWsudo-ldap = $(DESCRIPTION) -SPKG_SOURCEURL_CSWsudo-ldap = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudo-ldap = CSWsudo -REQUIRED_PKGS_CSWsudo-ldap = CSWsudo-common CSWggettextrt CSWoldaprt - -CONFIGURE_ARGS = $(DIRPATHS) -CONFIGURE_ARGS += --with-pam -CONFIGURE_ARGS += --with-logging=both -CONFIGURE_ARGS += --with-ignore-dot -CONFIGURE_ARGS += --with-env-editor -CONFIGURE_ARGS += --with-ldap=$(prefix) -CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf - -TEST_TARGET = check - -include gar/category.mk - -PKGFILES_CSWsudo-ldap = .*/bin/.* - -post-install-modulated: - @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) - @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) - @$(MAKECOOKIE) - $(DONADA) Copied: csw/mgar/pkg/sudo_ldap/trunk/Makefile (from rev 4321, csw/mgar/pkg/sudo-ldap/trunk/Makefile) =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile (rev 0) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) @@ -0,0 +1,54 @@ +GARNAME = sudo +GARVERSION = 1.7.0 +CATEGORIES = utils + +DESCRIPTION = Provides limited super user privileges (LDAP Enabled) +define BLURB + Sudo (superuser do) allows a system administrator to give certain users (or + groups of users) the ability to run some (or all) commands as root while + logging all commands and arguments. Sudo operates on a per-command basis, it + is not a replacement for the shell. +endef + +MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += CSWsudoldap.postinstall +DISTFILES += CSWsudoldap.postremove +PATCHFILES = install.diff + +# We define upstream file regex so we can be notifed of new +# upstream software release +UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz + +PACKAGES = CSWsudoldap + +CATALOGNAME_CSWsudoldap = sudo_ldap +SPKG_DESC_CSWsudoldap = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudoldap = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudoldap = CSWsudo +REQUIRED_PKGS_CSWsudoldap = CSWsudo-common CSWggettextrt CSWoldaprt + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --with-pam +CONFIGURE_ARGS += --with-logging=both +CONFIGURE_ARGS += --with-ignore-dot +CONFIGURE_ARGS += --with-env-editor +CONFIGURE_ARGS += --withldap=$(prefix) +CONFIGURE_ARGS += --withldap-conf-file=$(sysconfdir)/ldap.conf + +TEST_TARGET = check + +include gar/category.mk + +PKGFILES_CSWsudoldap = .*/bin/.* + +post-install-modulated: + @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) + @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) + @$(MAKECOOKIE) + +post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @$(MAKECOOKIE) Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.depend =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.depend 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,5 +0,0 @@ -P CSWsudo-common - sudo_common - sudo common files -P CSWlibnet libnet - the libnet packet construction library -P CSWoldaprt openldap_rt - ldap runtime libraries -P CSWosslrt openssl_rt - Openssl runtime libraries -P CSWsasl sasl - Simple Authentication and Security Layer Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.gspec =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,5 +0,0 @@ -%var bitname sudo_ldap -%var pkgname CSWsudoldap -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%var desc Provides limited super user privileges (LDAP Enabled) -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postinstall =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,11 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit -ln -f sudo.ldap sudo -ln -f sudo.ldap sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postremove =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,16 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit - -OTHERSUDO=`ls -1 sudo.* 2>/dev/null | head -1` -if [ -n "$OTHERSUDO" ]; then - rm -f sudo - ln -f $OTHERSUDO sudo - ln -f $OTHERSUDO sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.prototype =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,3 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sudo.ldap=/opt/csw/bin/sudo 4111 root root -l none /opt/csw/bin/sudoedit=/opt/csw/bin/sudo.ldap Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.space =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.space 2009-04-15 14:40:20 UTC (rev 4322) @@ -1 +0,0 @@ -$BASEDIR 1 1 Copied: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall (from rev 4321, csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall) =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall (rev 0) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall 2009-04-15 14:40:20 UTC (rev 4322) @@ -0,0 +1,11 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit + +exit 0 + Copied: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove (from rev 4321, csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove) =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove (rev 0) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 14:40:20 UTC (rev 4322) @@ -0,0 +1,13 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin +SUDO_MINIMAL=${BINDIR}/sudo.minimal + +if [ -f ${SUDO_MINIMAL} ]; then + rm -f sudo sudoedit + ln -f $SUDO_MINIMAL ${BINDIR}/sudo + ln -f $SUDO_MINIMAL ${BINDIR}/sudoedit +fi + +exit 0 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:45:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:45:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4323] csw/mgar/pkg/sudo_ldap/trunk/Makefile Message-ID: Revision: 4323 http://gar.svn.sourceforge.net/gar/?rev=4323&view=rev Author: valholla Date: 2009-04-15 14:45:27 +0000 (Wed, 15 Apr 2009) Log Message: ----------- remove post-install-modulated Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:45:27 UTC (rev 4323) @@ -40,15 +40,9 @@ include gar/category.mk -PKGFILES_CSWsudoldap = .*/bin/.* +PKGFILES_CSWsudoldap = .*/bin/sudo.ldap -post-install-modulated: - @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) - @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) - @$(MAKECOOKIE) - post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo.ldap ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:47:46 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:47:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4324] csw/mgar/pkg/sudo_ldap/trunk Message-ID: Revision: 4324 http://gar.svn.sourceforge.net/gar/?rev=4324&view=rev Author: valholla Date: 2009-04-15 14:47:46 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix configure typo Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/checksums Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:45:27 UTC (rev 4323) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:47:46 UTC (rev 4324) @@ -33,8 +33,8 @@ CONFIGURE_ARGS += --with-logging=both CONFIGURE_ARGS += --with-ignore-dot CONFIGURE_ARGS += --with-env-editor -CONFIGURE_ARGS += --withldap=$(prefix) -CONFIGURE_ARGS += --withldap-conf-file=$(sysconfdir)/ldap.conf +CONFIGURE_ARGS += --with-ldap=$(prefix) +CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf TEST_TARGET = check Modified: csw/mgar/pkg/sudo_ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 14:45:27 UTC (rev 4323) +++ csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 14:47:46 UTC (rev 4324) @@ -1,2 +1,4 @@ +05fb6b46e36528fb889aca7f53106708 download/CSWsudoldap.postinstall +a28a033964a3c7e21446b2517bcbc38d download/CSWsudoldap.postremove +157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz -157b2e5e38ca54eb36e0364706bd0292 download/install.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 17:06:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 15:06:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4325] csw/mgar/pkg/sudo Message-ID: Revision: 4325 http://gar.svn.sourceforge.net/gar/?rev=4325&view=rev Author: valholla Date: 2009-04-15 15:06:56 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix conflicting files for sudo packages Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Added Paths: ----------- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 14:47:46 UTC (rev 4324) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 15:06:56 UTC (rev 4325) @@ -32,6 +32,8 @@ REQUIRED_PKGS_CSWsudo-common = CSWggettextrt DISTFILES += CSWsudo-common.postinstall +DISTFILES += CSWsudo.postinstall +DISTFILES += CSWsudo.postremove CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam @@ -44,17 +46,9 @@ include gar/category.mk -PKGFILES_CSWsudo = .*/bin/.* +PKGFILES_CSWsudo = .*/bin/sudo.minimal -post-install-modulated: - @( cd $(DESTDIR)$(sysconfdir) ; mv sudoers sudoers.CSW ) - @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) - @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.minimal ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudo ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudoedit ) - @$(MAKECOOKIE) - $(DONADA) - post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.minimal ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Added: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall (rev 0) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-15 15:06:56 UTC (rev 4325) @@ -0,0 +1,24 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +## First check to see if sudo.ldap is installed +## If it is make sure the liks are in place +## and permissions are set accordingly +if [ -f ${BINDIR}/sudo.ldap ]; then + chmod 4755 ${BINDIR}/sudo.ldap + if [ ! -f ${BINDIR}/sudo ]; then + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo + fi + if [ ! -f ${BINDIR}/sudoedit ]; then + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit + fi +else + rm -f ${BINDIR}/sudo + rm -f ${BINDIR}/sudoedit + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit +fi + +exit 0 + Added: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove (rev 0) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-15 15:06:56 UTC (rev 4325) @@ -0,0 +1,14 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +if [ -f ${BINDIR}/sudo.ldap ]; then + chmod 4755 ${BINDIR}/sudo.ldap + rm -f ${BINDIR}/sudo + rm -f ${BINDIR}/sudoedit + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit +fi + +exit 0 + Modified: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 14:47:46 UTC (rev 4324) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 15:06:56 UTC (rev 4325) @@ -1,12 +1,12 @@ #!/bin/sh BINDIR=$BASEDIR/opt/csw/bin -SUDO_MINIMAL=${BINDIR}/sudo.minimal -if [ -f ${SUDO_MINIMAL} ]; then - rm -f sudo sudoedit - ln -f $SUDO_MINIMAL ${BINDIR}/sudo - ln -f $SUDO_MINIMAL ${BINDIR}/sudoedit +if [ -f ${BINDIR}/sudo.minimal ]; then + rm -f ${BINDIR}/sudo + rm -f ${BINDIR}/sudoedit + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit fi exit 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 17:27:22 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 15:27:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4326] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4326 http://gar.svn.sourceforge.net/gar/?rev=4326&view=rev Author: valholla Date: 2009-04-15 15:27:21 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix sudoers Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo/trunk/checksums Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 15:06:56 UTC (rev 4325) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 15:27:21 UTC (rev 4326) @@ -50,5 +50,6 @@ post-merge-modulated: @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.minimal ) + @( cd $(PKGROOT)$(sysconfdir) ; mv sudoers sudoers.CSW ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Modified: csw/mgar/pkg/sudo/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo/trunk/checksums 2009-04-15 15:06:56 UTC (rev 4325) +++ csw/mgar/pkg/sudo/trunk/checksums 2009-04-15 15:27:21 UTC (rev 4326) @@ -1,5 +1,5 @@ -5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz -2264728d06b220edf5e47eb9da2b7e66 download/CSWsudo.postinstall -e9bd76af1d6c4110121d6d784c910b3d download/CSWsudo.postremove 955d99eda1432c7b7e00d98b91e35a79 download/CSWsudo-common.postinstall +ca867ca77bda965a44bcd665bae7dc6c download/CSWsudo.postinstall +2324b0bb3e9cf71398aaab1751aa63c5 download/CSWsudo.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff +5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 17:37:58 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 15:37:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4327] csw/mgar/pkg/sudo_ldap/trunk/checksums Message-ID: Revision: 4327 http://gar.svn.sourceforge.net/gar/?rev=4327&view=rev Author: valholla Date: 2009-04-15 15:37:58 +0000 (Wed, 15 Apr 2009) Log Message: ----------- checksums Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/checksums Modified: csw/mgar/pkg/sudo_ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 15:27:21 UTC (rev 4326) +++ csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 15:37:58 UTC (rev 4327) @@ -1,4 +1,4 @@ 05fb6b46e36528fb889aca7f53106708 download/CSWsudoldap.postinstall -a28a033964a3c7e21446b2517bcbc38d download/CSWsudoldap.postremove +f727decc2c3a7189614b657584b8e45f download/CSWsudoldap.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 18:15:27 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 16:15:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4328] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4328 http://gar.svn.sourceforge.net/gar/?rev=4328&view=rev Author: idogan23 Date: 2009-04-15 16:15:27 +0000 (Wed, 15 Apr 2009) Log Message: ----------- wget: added modulation for static binary, config file handled by cswpreserveconf Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 15:37:58 UTC (rev 4327) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 16:15:27 UTC (rev 4328) @@ -20,12 +20,40 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +EXTRA_MODULATORS = STATIC +MODULATIONS_STATIC = disable enable + +EXTRA_CONFIGURE_STATIC-disable = --with-ssl +EXTRA_CONFIGURE_STATIC-enable = --disable-shared +EXTRA_CONFIGURE_STATIC-enable += --enable-static +EXTRA_CONFIGURE_STATIC-enable += --without-ssl + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl CONFIGURE_ARGS += --disable-nls +CONFIGURE_ARGS += $(EXTRA_CONFIGURE_STATIC-$(STATIC)) -REQUIRED_PKGS = CSWosslrt - TEST_TARGET = check +REQUIRED_PKGS = CSWosslrt CSWcswclassutils +SPKG_CLASSES = none cswcpsampleconf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/wgetrc.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' + +MERGE_SCRIPTS_isa-sparcv8-static-disable = copy-all + +MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only +MERGE_DIRS_isa-sparcv8-static-enable = $(bindir) + +merge-rename-wget: + @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static + +post-install-modulated: + (cd $(DESTDIR)$(prefix)/etc; \ + for i in wgetrc; do \ + if [ -r "$$i" ]; then \ + echo "$$i -> $$i.CSW"; \ + mv "$$i" "$$i.CSW"; \ + fi \ + done) + include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 18:21:57 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 16:21:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4329] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4329 http://gar.svn.sourceforge.net/gar/?rev=4329&view=rev Author: idogan23 Date: 2009-04-15 16:21:57 +0000 (Wed, 15 Apr 2009) Log Message: ----------- wget: added MERGE_SCRIPTS also for i386 Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 16:15:27 UTC (rev 4328) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 16:21:57 UTC (rev 4329) @@ -40,9 +40,12 @@ PROTOTYPE_FILTER = awk '$$$$3 ~ /\/wgetrc.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' MERGE_SCRIPTS_isa-sparcv8-static-disable = copy-all + MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only + MERGE_DIRS_isa-sparcv8-static-enable = $(bindir) -MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only -MERGE_DIRS_isa-sparcv8-static-enable = $(bindir) + MERGE_SCRIPTS_isa-i386-static-disable = copy-all + MERGE_SCRIPTS_isa-i386-static-enable = rename-wget copy-only + MERGE_DIRS_isa-i386-static-enable = $(bindir) merge-rename-wget: @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 18:56:11 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 16:56:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4330] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4330 http://gar.svn.sourceforge.net/gar/?rev=4330&view=rev Author: idogan23 Date: 2009-04-15 16:56:10 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: changed UFILES_REGEX Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 16:21:57 UTC (rev 4329) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 16:56:10 UTC (rev 4330) @@ -8,12 +8,12 @@ authoritative DNS nameserver. endef -MASTER_SITES = http://www.nlnetlabs.nl/downloads/nsd/ +MASTER_SITES = http://ww$(GARNAME)w.nlnetlabs.nl/downloads/nsd/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnsd,) # We define upstream file regex so we can be notifed of new upstream software release -#UFILES_REGEX = -(\d+(?:\.\d+)*).tar.gz +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz # If the url used to check for software update is different of MASTER_SITES, then # uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 19:36:10 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 17:36:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4331] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4331 http://gar.svn.sourceforge.net/gar/?rev=4331&view=rev Author: valholla Date: 2009-04-15 17:35:58 +0000 (Wed, 15 Apr 2009) Log Message: ----------- test results Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Added Paths: ----------- csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/ csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/ csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s9/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs9/ Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-15 16:56:10 UTC (rev 4330) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-15 17:35:58 UTC (rev 4331) @@ -99,8 +99,6 @@ PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.* PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.* PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 -PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libstdc\+\+.1 -PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libsupc\+\+.1 PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* @@ -174,7 +172,6 @@ ## gcc4corert PKGFILES_CSWgcc4corert = .*/opt/csw/lib/.*libgcc_s.* PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libgomp.* -PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libiberty.* PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libssp.* ## gcc4gfortranrt Deleted: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd 2009-04-15 16:56:10 UTC (rev 4330) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd 2009-04-15 17:35:58 UTC (rev 4331) @@ -1,397 +0,0 @@ -$ make check -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gcc || mkdir testsuite/gcc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gcc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 01:17:49 2009 -Native configuration is i386-pc-solaris2.10 - - === gcc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... -FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 -FAIL: gcc.c-torture/execute/990127-2.c execution, -Os -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... - -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... -XPASS: gcc.dg/ucnid-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-3.c (test for excess errors) -XPASS: gcc.dg/ucnid-4.c (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... -FAIL: gcc.target/i386/sse-13.c (test for excess errors) -FAIL: gcc.target/i386/sse-14.c (test for excess errors) -FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable -FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... -skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined - - === gcc Summary === - -# of expected passes 48837 -# of unexpected failures 6 -# of unexpected successes 3 -# of expected failures 176 -# of untested testcases 42 -# of unsupported tests 314 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gcc] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' - === acats configuration === -target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/ -Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/specs Target: i386-pc-solaris2.10 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) -host=i386-pc-solaris2.8 -target=i386-pc-solaris2.10 -gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/gnatmake - - === acats support === -Generating support files... done. -Compiling support files... done. - - === acats tests === -Running chapter a ... -Running chapter c2 ... -Running chapter c3 ... -Running chapter c4 ... -Running chapter c5 ... -Running chapter c6 ... -Running chapter c7 ... -Running chapter c8 ... -Running chapter c9 ... -Running chapter ca ... -Running chapter cb ... -Running chapter cc ... -Running chapter cd ... -Running chapter ce ... -Running chapter cxa ... -Running chapter cxb ... -Running chapter cxf ... -Running chapter cxg ... -Running chapter cxh ... -Running chapter cz ... -Running chapter d ... -Running chapter e ... -Running chapter gcc ... -Running chapter l ... - === acats Summary === -# of expected passes 2315 -# of unexpected failures 0 -test -d testsuite || mkdir testsuite -test -d testsuite/gnat || mkdir testsuite/gnat -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gnat; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 05:27:21 2009 -Native configuration is i386-pc-solaris2.10 - - === gnat tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... - - === gnat Summary === - -# of expected passes 374 -# of expected failures 1 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/g++ || mkdir testsuite/g++ -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/g++; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 05:31:24 2009 -Native configuration is i386-pc-solaris2.10 - - === g++ tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... -XPASS: g++.dg/other/ucnid-1.C (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... -XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) -XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) -XPASS: g++.old-deja/g++.other/init19.C execution test - - === g++ Summary === - -# of expected passes 17496 -# of unexpected successes 4 -# of expected failures 83 -# of unsupported tests 172 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) - -gmake[1]: [check-parallel-g++] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gfortran || mkdir testsuite/gfortran -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gfortran; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 06:21:32 2009 -Native configuration is i386-pc-solaris2.10 - - === gfortran tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... -FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/array_constructor_23.f -O3 -g execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... - - === gfortran Summary === - -# of expected passes 25233 -# of unexpected failures 4 -# of expected failures 3 -# of unsupported tests 32 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gfortran] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/objc || mkdir testsuite/objc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/objc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 08:04:18 2009 -Native configuration is i386-pc-solaris2.10 - - === objc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... - - === objc Summary === - -# of expected passes 1812 -# of expected failures 7 -# of unsupported tests 24 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - Deleted: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 2009-04-15 16:56:10 UTC (rev 4330) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 2009-04-15 17:35:58 UTC (rev 4331) @@ -1,512 +0,0 @@ -$ make check -Making a new config file... -echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite" >> ./tmp0 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gcc || mkdir testsuite/gcc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gcc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 10:07:08 2009 -Native configuration is i386-pc-solaris2.8 - - === gcc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... -FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 -FAIL: gcc.c-torture/execute/990127-2.c execution, -Os -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... - -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... -FAIL: gcc.dg/builtins-8.c execution test -FAIL: gcc.dg/pr36584.c execution test -FAIL: gcc.dg/pthread-init-1.c (test for excess errors) -FAIL: gcc.dg/pthread-init-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-3.c (test for excess errors) -XPASS: gcc.dg/ucnid-4.c (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... -FAIL: largefile.c -O0 -g (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O0 -g assembly comparison -FAIL: largefile.c -O0 (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O0 assembly comparison -FAIL: largefile.c -O1 (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O1 assembly comparison -FAIL: largefile.c -O2 (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O2 assembly comparison -FAIL: largefile.c -O3 -fomit-frame-pointer (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O3 -fomit-frame-pointer assembly comparison -FAIL: largefile.c -O3 -g (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O3 -g assembly comparison -FAIL: largefile.c -Os (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -Os assembly comparison -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... -FAIL: gcc.dg/torture/complex-alias-1.c -O0 execution test -FAIL: gcc.dg/torture/complex-alias-1.c -O1 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... -XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized "link_error" 0 -FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "converted loop nest to perfect loop nest" 1 -FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-4.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-5.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-6.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-8.c scan-tree-dump-times ltrans "transformed loop" 1 -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... -FAIL: gcc.dg/vect/pr36493.c execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... -FAIL: gcc.target/i386/20060512-1.c execution test -FAIL: gcc.target/i386/20060512-3.c execution test -FAIL: gcc.target/i386/abi-1.c scan-assembler xmm0 -FAIL: gcc.target/i386/asm-2.c (internal compiler error) -FAIL: gcc.target/i386/asm-2.c (test for excess errors) -FAIL: gcc.target/i386/fastcall-sseregparm.c execution test -FAIL: gcc.target/i386/fpprec-1.c execution test -FAIL: gcc.target/i386/pr13685.c execution test -FAIL: gcc.target/i386/pr37191.c (test for excess errors) -FAIL: gcc.target/i386/reload-1.c (test for excess errors) -ERROR: gcc.target/i386/reload-1.c: error executing dg-final: no files matched glob pattern "reload-1.c.[0-9][0-9][0-9]r.csa" -FAIL: gcc.target/i386/sse-10.c execution test -FAIL: gcc.target/i386/sse-11.c execution test -FAIL: gcc.target/i386/sse-13.c (test for excess errors) -FAIL: gcc.target/i386/sse-14.c (test for excess errors) -FAIL: gcc.target/i386/sse-17.c execution test -FAIL: gcc.target/i386/sse-18.c execution test -FAIL: gcc.target/i386/sse-3.c execution test -FAIL: gcc.target/i386/sse-6.c execution test -FAIL: gcc.target/i386/sse-recip-vec.c execution test -FAIL: gcc.target/i386/sse-recip.c execution test -FAIL: gcc.target/i386/sse2-lrint-vec.c execution test -FAIL: gcc.target/i386/sse2-lrintf-vec.c execution test -FAIL: gcc.target/i386/sse2-vec-1.c execution test -FAIL: gcc.target/i386/sse2-vec-2.c execution test -FAIL: gcc.target/i386/sse2-vec-3.c execution test -FAIL: gcc.target/i386/sse2-vec-4.c execution test -FAIL: gcc.target/i386/sse2-vec-5.c execution test -FAIL: gcc.target/i386/sse2-vec-6.c execution test -FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable -FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... -skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined - - === gcc Summary === - -# of expected passes 48710 -# of unexpected failures 59 -# of unexpected successes 4 -# of expected failures 168 -# of unresolved testcases 1 -# of untested testcases 35 -# of unsupported tests 340 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gcc] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' - === acats configuration === -target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/ -Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/specs Target: i386-pc-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) -host=i386-pc-solaris2.8 -target=i386-pc-solaris2.8 -gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/gnatmake - - === acats support === -Generating support files... done. -Compiling support files... done. - - === acats tests === -Running chapter a ... -Running chapter c2 ... -Running chapter c3 ... -Running chapter c4 ... -Running chapter c5 ... -Running chapter c6 ... -Running chapter c7 ... -Running chapter c8 ... -Running chapter c9 ... -Running chapter ca ... -Running chapter cb ... -Running chapter cc ... -Running chapter cd ... -Running chapter ce ... -Running chapter cxa ... -Running chapter cxb ... -Running chapter cxf ... -Running chapter cxg ... -Running chapter cxh ... -Running chapter cz ... -Running chapter d ... -Running chapter e ... -Running chapter gcc ... -Running chapter l ... - === acats Summary === -# of expected passes 2315 -# of unexpected failures 0 -test -d testsuite || mkdir testsuite -test -d testsuite/gnat || mkdir testsuite/gnat -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gnat; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 14:20:14 2009 -Native configuration is i386-pc-solaris2.8 - - === gnat tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... - - === gnat Summary === - -# of expected passes 374 -# of expected failures 1 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/g++ || mkdir testsuite/g++ -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/g++; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 14:24:10 2009 -Native configuration is i386-pc-solaris2.8 - - === g++ tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... -FAIL: g++.dg/other/i386-1.C execution test -XPASS: g++.dg/other/ucnid-1.C (test for excess errors) -FAIL: g++.dg/warn/miss-format-1.C printf attribute warning (test for warnings, line 15) -FAIL: g++.dg/warn/miss-format-1.C printf attribute warning 2 (test for warnings, line 40) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... -FAIL: g++.dg/torture/pr34099.C -O0 execution test -FAIL: g++.dg/torture/pr34099.C -O1 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... -FAIL: g++.old-deja/g++.brendan/complex1.C execution test -XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) -XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) -FAIL: g++.old-deja/g++.other/headers1.C (test for excess errors) -WARNING: g++.old-deja/g++.other/headers1.C compilation failed to produce executable -XPASS: g++.old-deja/g++.other/init19.C execution test - - === g++ Summary === - -# of expected passes 17488 -# of unexpected failures 7 -# of unexpected successes 4 -# of expected failures 84 -# of unsupported tests 172 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) - -gmake[1]: [check-parallel-g++] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gfortran || mkdir testsuite/gfortran -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gfortran; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 15:18:21 2009 -Native configuration is i386-pc-solaris2.8 - - === gfortran tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... -FAIL: gfortran.dg/c_by_val_1.f -O0 execution test -FAIL: gfortran.dg/c_by_val_1.f -O1 execution test -FAIL: gfortran.dg/c_by_val_1.f -O2 execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -g execution test -FAIL: gfortran.dg/c_by_val_1.f -Os execution test -FAIL: gfortran.dg/f2c_2.f90 -O0 execution test -FAIL: gfortran.dg/f2c_2.f90 -O1 execution test -FAIL: gfortran.dg/f2c_2.f90 -O2 execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -g execution test -FAIL: gfortran.dg/f2c_2.f90 -Os execution test -FAIL: gfortran.dg/ltrans-7.f90 -O scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gfortran.dg/specifics_1.f90 -O0 execution test -FAIL: gfortran.dg/specifics_1.f90 -O1 execution test -FAIL: gfortran.dg/specifics_1.f90 -O2 execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -g execution test -FAIL: gfortran.dg/specifics_1.f90 -Os execution test -FAIL: gfortran.dg/value_4.f90 -O0 execution test -FAIL: gfortran.dg/value_4.f90 -O1 execution test -FAIL: gfortran.dg/value_4.f90 -O2 execution test -FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/value_4.f90 -O3 -g execution test -FAIL: gfortran.dg/value_4.f90 -Os execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... -FAIL: gfortran.dg/vect/vect-5.f90 -O execution test -FAIL: gfortran.dg/vect/fast-math-pr33299.f90 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... -FAIL: gfortran.fortran-torture/execute/common.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/common_size.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/forall_4.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/forall_5.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/seq_io.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O0 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O1 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions -funroll-loops -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fbounds-check -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O3 -g -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -Os -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/stack_varsize.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/where_2.f90 execution, -O2 -ftree-vectorize -msse2 - - === gfortran Summary === - -# of expected passes 24969 -# of unexpected failures 52 -# of expected failures 3 -# of unsupported tests 136 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gfortran] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/objc || mkdir testsuite/objc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/objc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 17:01:58 2009 -Native configuration is i386-pc-solaris2.8 - - === objc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... - - === objc Summary === - -# of expected passes 1812 -# of expected failures 7 -# of unsupported tests 24 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - Added: csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log 2009-04-15 17:35:58 UTC (rev 4331) @@ -0,0 +1,58890 @@ +Test Run By mwatters on Sun Apr 5 05:31:24 2009 +Native configuration is i386-pc-solaris2.10 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +set_ld_library_path_env_vars: ld_library_path=.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +ALWAYS_CXXFLAGS set to {additional_flags=-nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util} {ldflags= -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty } additional_flags =-fmessage-length=0 +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -fno-show-column -c -o uclibc10234.o uclibc10234.c (timeout = 300) +uclibc10234.c:2: error: features.h: No such file or directory +uclibc10234.c:4: error: #error FOO +compiler exited with status 1 +output is: +uclibc10234.c:2: error: features.h: No such file or directory +uclibc10234.c:4: error: #error FOO + +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -g -fprofile-arcs -fno-show-column -L/home/mwatters/mga r/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x01 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -g -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -g -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -g -fbranch-probabilities -fno-show-column -L/home/mwat ters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x02 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -g -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -g -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O0 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x11 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O0 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O0 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O0 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x12 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O0 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O0 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O1 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x21 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O1 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O1 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O1 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x22 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O1 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O1 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x31 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O2 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O2 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x32 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O2 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O2 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x41 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x42 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -g -fprofile-arcs -fno-show-column -L/home/mwatters /mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x51 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -g -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -g -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -g -fbranch-probabilities -fno-show-column -L/home/ mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x52 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -g -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -g -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -Os -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x61 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -Os -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -Os -fprofile-arcs @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 20:11:18 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 18:11:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4332] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4332 http://gar.svn.sourceforge.net/gar/?rev=4332&view=rev Author: idogan23 Date: 2009-04-15 18:11:17 +0000 (Wed, 15 Apr 2009) Log Message: ----------- wget: fixed description Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 17:35:58 UTC (rev 4331) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 18:11:17 UTC (rev 4332) @@ -2,7 +2,7 @@ GARVERSION = 1.11.4 CATEGORIES = net -DESCRIPTION = A network utility to retrieve files from the Web. +DESCRIPTION = A network utility to retrieve files from the Web define BLURB GNU Wget is a utility for noninteractive download of files from the Web. It supports HTTP and FTP protocols, as well as retrieval through HTTP proxies. It This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Wed Apr 15 22:09:28 2009 From: bwalton at opencsw.org (Ben Walton) Date: Wed, 15 Apr 2009 16:09:28 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> Message-ID: <1239824241-sup-2245@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Tue Apr 14 15:02:02 -0400 2009: Hi Dago, I dug into mkpackage and discovered that we are already supplying the package filename (pkgname) via the csw_vars.gspec file that gets pulled in. So, I added a very small change to the dynamic gspec generation code that supplies a %var that will supersede the %cvar if the svn repo is in an uncommitted state. This seems to work for ENABLE_CHECK=0 and doesn't require an after-the-fact rename. The downside to this approach is that if the maintainer hasn't converted to dynamic gspec, then this modification won't be used. I'm ok with that personally. What do you think? [I added the UNCOMMITED at the end of the filename as replacing REV=... was triggering a checkpkg rule.] Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: svn_uncommitted_pkgfile.patch Type: application/octet-stream Size: 632 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dam at opencsw.org Wed Apr 15 22:21:19 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Wed, 15 Apr 2009 22:21:19 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239824241-sup-2245@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> Message-ID: <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> Hi Ben, Am 15.04.2009 um 22:09 schrieb Ben Walton: > I dug into mkpackage and discovered that we are already supplying the > package filename (pkgname) via the csw_vars.gspec file that gets > pulled in. So, I added a very small change to the dynamic gspec > generation code that supplies a %var that will supersede the %cvar if > the svn repo is in an uncommitted state. This seems to work for > ENABLE_CHECK=0 and doesn't require an after-the-fact rename. > > The downside to this approach is that if the maintainer hasn't > converted to dynamic gspec, then this modification won't be used. I'm > ok with that personally. What do you think? In my opinion we should move the package name generation completely inside gar.pkg.mk and put it in a variable. This can then either be passed in dynamic gspec like you did and additionally by redefining pkgfile here: > dam at login [login]:/home/dam/mgar/gar/v2/pkglib > more csw_vars.gspec > %cvar arch %{GARCH} > %cvar desc %{SPKG_DESC} > %cvar pkgfile %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-% > {SPKG_OSNAME}-%{arch}-CSW.pkg > %cvar RC_INIT_SCRIPT csw%{bitname} > %cvar SMF_SCRIPT svc-csw%{bitname} > %cvar SMF_MANIFEST csw%{bitname}.xml ...to something that is passed in PKG_EXPORTS. Then we can control the name fine-grained in one place both for dynamic and classic gspec. I may have time tomorrow to take a look. Anyway, thanks for the inspiration :-) It is always easier to improve something than to invent it completely new. Best regards -- Dago From harpchad at users.sourceforge.net Wed Apr 15 23:11:06 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 15 Apr 2009 21:11:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4333] csw/mgar/pkg/gnutls/trunk Message-ID: Revision: 4333 http://gar.svn.sourceforge.net/gar/?rev=4333&view=rev Author: harpchad Date: 2009-04-15 21:11:06 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Bump to 2.6.5 Modified Paths: -------------- csw/mgar/pkg/gnutls/trunk/Makefile csw/mgar/pkg/gnutls/trunk/checksums Modified: csw/mgar/pkg/gnutls/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnutls/trunk/Makefile 2009-04-15 18:11:17 UTC (rev 4332) +++ csw/mgar/pkg/gnutls/trunk/Makefile 2009-04-15 21:11:06 UTC (rev 4333) @@ -1,5 +1,5 @@ GARNAME = gnutls -GARVERSION = 2.6.4 +GARVERSION = 2.6.5 CATEGORIES = lib DESCRIPTION = GNU Transport Layer Security libraries and tools Modified: csw/mgar/pkg/gnutls/trunk/checksums =================================================================== --- csw/mgar/pkg/gnutls/trunk/checksums 2009-04-15 18:11:17 UTC (rev 4332) +++ csw/mgar/pkg/gnutls/trunk/checksums 2009-04-15 21:11:06 UTC (rev 4333) @@ -1,4 +1,4 @@ -747111ab0d86e7b06a4bb120ba456ad8 download/gnutls-2.6.4.tar.bz2 +92b92c36b616aa8bd69a9a0fb2b8eb24 download/gnutls-2.6.5.tar.bz2 073c509902375c40b885f5adc9f7dba9 download/libgnutls-openssl.so.13.i 02e4011d400d262b8d4b5c7311d8a5b0 download/libgnutls-openssl.so.13.s b0eee0d29e3d260a146e626c6ca75b16 download/libgnutls.so.13.i This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 15 23:55:57 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 15 Apr 2009 21:55:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4334] csw/mgar/pkg/watch/trunk/Makefile Message-ID: Revision: 4334 http://gar.svn.sourceforge.net/gar/?rev=4334&view=rev Author: skayser Date: 2009-04-15 21:55:57 +0000 (Wed, 15 Apr 2009) Log Message: ----------- watch: pass via in custom build rules Modified Paths: -------------- csw/mgar/pkg/watch/trunk/Makefile Modified: csw/mgar/pkg/watch/trunk/Makefile =================================================================== --- csw/mgar/pkg/watch/trunk/Makefile 2009-04-15 21:11:06 UTC (rev 4333) +++ csw/mgar/pkg/watch/trunk/Makefile 2009-04-15 21:55:57 UTC (rev 4334) @@ -59,10 +59,10 @@ build-custom: BUILD_ARGS:=ALL_CFLAGS="$(CFLAGS)" ALL_LDFLAGS="$(LDFLAGS)" build-custom: - @gmake -C $(WORKSRC) $(BUILD_ARGS) snprintf.o - @gmake -C $(WORKSRC) $(BUILD_ARGS) getopt.o - @gmake -C $(WORKSRC) $(BUILD_ARGS) getopt1.o - @gmake -C $(WORKSRC) \ + @$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) snprintf.o + @$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) getopt.o + @$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) getopt1.o + @$(BUILD_ENV) gmake -C $(WORKSRC) \ ALL_CFLAGS="$(CFLAGS) snprintf.o getopt.o getopt1.o" \ ALL_LDFLAGS="$(LDFLAGS)" watch $(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 00:42:03 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 22:42:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4335] csw/mgar/pkg/nsd/trunk Message-ID: Revision: 4335 http://gar.svn.sourceforge.net/gar/?rev=4335&view=rev Author: idogan23 Date: 2009-04-15 22:42:02 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: user & group for nsd are handled with cswusergroup class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/nsd/trunk/files/cswusergroup Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 21:55:57 UTC (rev 4334) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 22:42:02 UTC (rev 4335) @@ -11,7 +11,13 @@ MASTER_SITES = http://ww$(GARNAME)w.nlnetlabs.nl/downloads/nsd/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnsd,) +DISTFILES += cswusergroup +SPKG_CLASSES = none cswusergroup +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } { print }' + +REQUIRED_PKGS = CSWcswclassutils + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz @@ -22,4 +28,8 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw +post-install-modulated: + @ginstall -d $(DESTDIR)/etc/opt/csw/nsd + @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup + include gar/category.mk Added: csw/mgar/pkg/nsd/trunk/files/cswusergroup =================================================================== --- csw/mgar/pkg/nsd/trunk/files/cswusergroup (rev 0) +++ csw/mgar/pkg/nsd/trunk/files/cswusergroup 2009-04-15 22:42:02 UTC (rev 4335) @@ -0,0 +1 @@ +nsd:nsd:Name Server Daemon:/:/bin/false:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 00:42:53 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 22:42:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4336] csw/mgar/pkg/nsd/trunk/checksums Message-ID: Revision: 4336 http://gar.svn.sourceforge.net/gar/?rev=4336&view=rev Author: idogan23 Date: 2009-04-15 22:42:53 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: addedd missing checksum file to svn Added Paths: ----------- csw/mgar/pkg/nsd/trunk/checksums Added: csw/mgar/pkg/nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/nsd/trunk/checksums (rev 0) +++ csw/mgar/pkg/nsd/trunk/checksums 2009-04-15 22:42:53 UTC (rev 4336) @@ -0,0 +1,3 @@ +193710012704d807e85445886c72aca8 download/CSWnsd.gspec +7a7560acb5d56847ea16fb8cd77b6ca5 download/cswusergroup +66b602a793b851ad109403d3d2654fad download/nsd-3.2.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 00:48:14 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 22:48:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4337] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4337 http://gar.svn.sourceforge.net/gar/?rev=4337&view=rev Author: idogan23 Date: 2009-04-15 22:48:14 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: changes sysconfdir to /etc/opt/csw/nsd, changed pid file path to /var/run Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 22:42:53 UTC (rev 4336) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 22:48:14 UTC (rev 4337) @@ -27,6 +27,8 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw +CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid +CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw post-install-modulated: @ginstall -d $(DESTDIR)/etc/opt/csw/nsd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Thu Apr 16 03:14:30 2009 From: bwalton at opencsw.org (Ben Walton) Date: Wed, 15 Apr 2009 21:14:30 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> Message-ID: <1239844317-sup-687@ntdws12.chass.utoronto.ca> Hi Dago, Here's one more stab at this. It addresses the points your raised with my last attempt. Thoughts? Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: svn_spkg_pkgfile.patch Type: application/octet-stream Size: 1442 bytes Desc: not available URL: From dam at opencsw.org Thu Apr 16 08:46:28 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Thu, 16 Apr 2009 08:46:28 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239844317-sup-687@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> Message-ID: <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> Hi Ben, Am 16.04.2009 um 03:14 schrieb Ben Walton: > Here's one more stab at this. It addresses the points your raised > with my last attempt. > > Thoughts? Almost perfect ;-) SPKG_PKGFILE contains many %-expansions from environment variables passed. We can set all these directly without the need of deep-passing values into mkpackage: +SPKG_PKGFILE = %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-% {SPKG_OSNAME}-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- UNCOMMITTED).pkg +SPKG_PKGFILE = %{bitname}-$(SPKG_VERSION)$(SPKG_REVSTAMP)-$ (SPKG_OSNAME)-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- UNCOMMITTED).pkg But then it is not possible any more to overwrite any of these during mkpackage (if that is desirable of course...) I guess we just stick to your proposal. We must stick to %{bitname} and %{arch} for static gspec anyway. One more thing: SPKG_PSTAMP contains the value of $(_REVISION), and there are more fault values: UNCOMMITTED, NOTVERSIONED (svn found, but not added to the repository) and NOSVN (no subversion installed). This should do it $(filter $(SPKG_PSTAMP),UNCOMMITTED NOTVERSIONED NOSVN) Best regards -- Dago From dmichelsen at users.sourceforge.net Thu Apr 16 10:02:24 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 08:02:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4338] csw/mgar/gar/v2 Message-ID: Revision: 4338 http://gar.svn.sourceforge.net/gar/?rev=4338&view=rev Author: dmichelsen Date: 2009-04-16 08:02:24 +0000 (Thu, 16 Apr 2009) Log Message: ----------- mGAR v2: Append UNCOMMITTED etc. to package filename if sources have not been fully checked in Modified Paths: -------------- csw/mgar/gar/v2/gar.pkg.mk csw/mgar/gar/v2/pkglib/csw_vars.gspec Modified: csw/mgar/gar/v2/gar.pkg.mk =================================================================== --- csw/mgar/gar/v2/gar.pkg.mk 2009-04-15 22:48:14 UTC (rev 4337) +++ csw/mgar/gar/v2/gar.pkg.mk 2009-04-16 08:02:24 UTC (rev 4338) @@ -112,6 +112,8 @@ SPKG_DEPEND_DB = $(GARDIR)/csw/depend.db +SPKG_PKGFILE ?= %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg + PKGGET_DESTDIR ?= DEPMAKER_EXTRA_ARGS = --noscript --nodep SUNW @@ -134,7 +136,7 @@ PKG_EXPORTS += CURDIR WORKDIR WORKDIR_FIRSTMOD WORKSRC WORKSRC_FIRSTMOD PKGROOT PKG_EXPORTS += SPKG_REVSTAMP SPKG_PKGNAME SPKG_DESC SPKG_VERSION SPKG_CATEGORY PKG_EXPORTS += SPKG_VENDOR SPKG_EMAIL SPKG_PSTAMP SPKG_BASEDIR SPKG_CLASSES -PKG_EXPORTS += SPKG_OSNAME SPKG_SOURCEURL SPKG_PACKAGER TIMESTAMP +PKG_EXPORTS += SPKG_OSNAME SPKG_SOURCEURL SPKG_PACKAGER SPKG_PKGFILE TIMESTAMP PKG_EXPORTS += DEPMAKER_EXTRA_ARGS PKGLIB DESTDIR define _PKG_ENV Modified: csw/mgar/gar/v2/pkglib/csw_vars.gspec =================================================================== --- csw/mgar/gar/v2/pkglib/csw_vars.gspec 2009-04-15 22:48:14 UTC (rev 4337) +++ csw/mgar/gar/v2/pkglib/csw_vars.gspec 2009-04-16 08:02:24 UTC (rev 4338) @@ -1,6 +1,6 @@ %cvar arch %{GARCH} %cvar desc %{SPKG_DESC} -%cvar pkgfile %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-CSW.pkg +%cvar pkgfile %{SPKG_PKGFILE} %cvar RC_INIT_SCRIPT csw%{bitname} %cvar SMF_SCRIPT svc-csw%{bitname} %cvar SMF_MANIFEST csw%{bitname}.xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 13:15:00 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 11:15:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4339] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4339 http://gar.svn.sourceforge.net/gar/?rev=4339&view=rev Author: idogan23 Date: 2009-04-16 11:15:00 +0000 (Thu, 16 Apr 2009) Log Message: ----------- wget: small cosmetic fix of MASTER_SITES Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-16 08:02:24 UTC (rev 4338) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-16 11:15:00 UTC (rev 4339) @@ -13,10 +13,12 @@ whole file has been retrieved. endef -MASTER_SITES = $(GNU_MIRROR) +MASTER_SITES = http://www.gnu.org/software/wget/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 DISTFILES += $(call admfiles,CSWwget) +UPSTREAM_MASTER_SITES = $(GNU_MIRROR) + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 13:55:27 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 11:55:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4340] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4340 http://gar.svn.sourceforge.net/gar/?rev=4340&view=rev Author: idogan23 Date: 2009-04-16 11:55:27 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: config file handling by cswsampleconf class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 11:15:00 UTC (rev 4339) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 11:55:27 UTC (rev 4340) @@ -13,8 +13,8 @@ DISTFILES += $(call admfiles,CSWnsd,) DISTFILES += cswusergroup -SPKG_CLASSES = none cswusergroup -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } { print }' +SPKG_CLASSES = none cswusergroup cswcpsampleconf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' REQUIRED_PKGS = CSWcswclassutils @@ -31,7 +31,7 @@ CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw post-install-modulated: - @ginstall -d $(DESTDIR)/etc/opt/csw/nsd + @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:23:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:23:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4341] csw/mgar/pkg Message-ID: Revision: 4341 http://gar.svn.sourceforge.net/gar/?rev=4341&view=rev Author: dmichelsen Date: 2009-04-16 12:23:32 +0000 (Thu, 16 Apr 2009) Log Message: ----------- libthai: Initial commit Added Paths: ----------- csw/mgar/pkg/libthai/ csw/mgar/pkg/libthai/branches/ csw/mgar/pkg/libthai/tags/ csw/mgar/pkg/libthai/trunk/ csw/mgar/pkg/libthai/trunk/Makefile csw/mgar/pkg/libthai/trunk/checksums csw/mgar/pkg/libthai/trunk/files/ Property changes on: csw/mgar/pkg/libthai/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/libthai/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:23:32 UTC (rev 4341) @@ -0,0 +1,23 @@ +GARNAME = libthai +GARVERSION = 0.1.4 +CATEGORIES = lib + +DESCRIPTION = Thai language support routines +define BLURB +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +# We define upstream file regex so we can be notifed of new upstream software release + +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448&package_id=26558 +UPSTREAM_USE_SF = 1 +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +TEST_TARGET = check + +include gar/category.mk Added: csw/mgar/pkg/libthai/trunk/checksums =================================================================== --- csw/mgar/pkg/libthai/trunk/checksums (rev 0) +++ csw/mgar/pkg/libthai/trunk/checksums 2009-04-16 12:23:32 UTC (rev 4341) @@ -0,0 +1 @@ +844dad9f8e7b915b4791409611fe816b download/libthai-0.1.4.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:24:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:24:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4342] csw/mgar/pkg Message-ID: Revision: 4342 http://gar.svn.sourceforge.net/gar/?rev=4342&view=rev Author: dmichelsen Date: 2009-04-16 12:24:18 +0000 (Thu, 16 Apr 2009) Log Message: ----------- pango-libthai: Initial commit Added Paths: ----------- csw/mgar/pkg/pango-libthai/ csw/mgar/pkg/pango-libthai/branches/ csw/mgar/pkg/pango-libthai/tags/ csw/mgar/pkg/pango-libthai/trunk/ csw/mgar/pkg/pango-libthai/trunk/Makefile csw/mgar/pkg/pango-libthai/trunk/checksums csw/mgar/pkg/pango-libthai/trunk/files/ Property changes on: csw/mgar/pkg/pango-libthai/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/pango-libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango-libthai/trunk/Makefile (rev 0) +++ csw/mgar/pkg/pango-libthai/trunk/Makefile 2009-04-16 12:24:18 UTC (rev 4342) @@ -0,0 +1,25 @@ +GARNAME = pango-libthai +GARVERSION = 0.1.4 +CATEGORIES = lib + +DESCRIPTION = Pango bindings for Thai language support +define BLURB +endef + +SF_PROJ = libthai +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448 +UPSTREAM_USE_SF = 1 +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +REQUIRED_PKGS = CSWlibthai + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +PACKAGES = CSWpango-libthai +CATALOGNAME = pango_libthai + +include gar/category.mk Added: csw/mgar/pkg/pango-libthai/trunk/checksums =================================================================== --- csw/mgar/pkg/pango-libthai/trunk/checksums (rev 0) +++ csw/mgar/pkg/pango-libthai/trunk/checksums 2009-04-16 12:24:18 UTC (rev 4342) @@ -0,0 +1 @@ +d7a082c2da46379a55da0d3c0eccf8cd download/pango-libthai-0.1.4.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:26:56 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:26:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4343] csw/mgar/pkg/pango/trunk Message-ID: Revision: 4343 http://gar.svn.sourceforge.net/gar/?rev=4343&view=rev Author: dmichelsen Date: 2009-04-16 12:26:56 +0000 (Thu, 16 Apr 2009) Log Message: ----------- pango: Add libtool fix Modified Paths: -------------- csw/mgar/pkg/pango/trunk/Makefile csw/mgar/pkg/pango/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pango/trunk/files/fixme.sh Modified: csw/mgar/pkg/pango/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:24:18 UTC (rev 4342) +++ csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:26:56 UTC (rev 4343) @@ -13,6 +13,7 @@ MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/pango/1.24/ DISTNAME = pango-$(GARVERSION) DISTFILES = $(DISTNAME).tar.bz2 +DISTFILES += fixme.sh PACKAGES = CSWpango CSWpangodevel CSWpangodoc CATALOGNAME_CSWpango = libpango @@ -41,3 +42,10 @@ TEST_SCRIPTS = include gar/category.mk + +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + + Modified: csw/mgar/pkg/pango/trunk/checksums =================================================================== --- csw/mgar/pkg/pango/trunk/checksums 2009-04-16 12:24:18 UTC (rev 4342) +++ csw/mgar/pkg/pango/trunk/checksums 2009-04-16 12:26:56 UTC (rev 4343) @@ -1 +1,2 @@ +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh af0beac1dd1825e241c5728081f16acd download/pango-1.24.1.tar.bz2 Copied: csw/mgar/pkg/pango/trunk/files/fixme.sh (from rev 4338, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/pango/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/pango/trunk/files/fixme.sh 2009-04-16 12:26:56 UTC (rev 4343) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:29:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:29:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4344] csw/mgar/pkg/pango/trunk/Makefile Message-ID: Revision: 4344 http://gar.svn.sourceforge.net/gar/?rev=4344&view=rev Author: dmichelsen Date: 2009-04-16 12:29:49 +0000 (Thu, 16 Apr 2009) Log Message: ----------- pango: Add more required packages Modified Paths: -------------- csw/mgar/pkg/pango/trunk/Makefile Modified: csw/mgar/pkg/pango/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:26:56 UTC (rev 4343) +++ csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:29:49 UTC (rev 4344) @@ -31,7 +31,8 @@ # CONFIGURE_ARGS += --with-included-modules PREREQUISITE_PKGS = CSWgtk-doc CSWlibxslt -REQUIRED_PKGS_CSWpango = CSWggettextrt CSWglib2 +REQUIRED_PKGS_CSWpango = CSWggettextrt CSWglib2 CSWfconfig CSWftype2 +REQUIRED_PKGS_CSWpango += CSWlibcairo CSWlibxft2 CSWlibxrender CSWzlib REQUIRED_PKGS_CSWpangodevel = CSWpango # Dynamic prototype This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:43:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:43:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4345] csw/mgar/pkg/libthai/trunk/Makefile Message-ID: Revision: 4345 http://gar.svn.sourceforge.net/gar/?rev=4345&view=rev Author: dmichelsen Date: 2009-04-16 12:43:01 +0000 (Thu, 16 Apr 2009) Log Message: ----------- libthai: Skip runpath Modified Paths: -------------- csw/mgar/pkg/libthai/trunk/Makefile Modified: csw/mgar/pkg/libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:29:49 UTC (rev 4344) +++ csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:43:01 UTC (rev 4345) @@ -11,11 +11,12 @@ # We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448&package_id=26558 +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448 UPSTREAM_USE_SF = 1 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz BUILD64 = 1 +NORUNPATH = 1 CONFIGURE_ARGS = $(DIRPATHS) TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 14:43:17 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:43:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4346] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4346 http://gar.svn.sourceforge.net/gar/?rev=4346&view=rev Author: idogan23 Date: 2009-04-16 12:43:17 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: changed db file paths to /var/opt/csw/nsd Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 12:43:01 UTC (rev 4345) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 12:43:17 UTC (rev 4346) @@ -29,8 +29,12 @@ CONFIGURE_ARGS += --with-ssl=/opt/csw CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw +CONFIGURE_ARGS += --with-dbfile=/var/opt/csw/nsd/nsd.db +CONFIGURE_ARGS += --with-difffile=/var/opt/csw/nsd/ixfr.db +CONFIGURE_ARGS += --with-xfrdfile=/var/opt/csw/nsd/xfrd.state post-install-modulated: + @ginstall -d $(DESTDIR)/var/opt/csw/nsd @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:54:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:54:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4347] csw/mgar/pkg/libthai/trunk/Makefile Message-ID: Revision: 4347 http://gar.svn.sourceforge.net/gar/?rev=4347&view=rev Author: dmichelsen Date: 2009-04-16 12:54:33 +0000 (Thu, 16 Apr 2009) Log Message: ----------- libthai: Added blurb and SOURCEURL Modified Paths: -------------- csw/mgar/pkg/libthai/trunk/Makefile Modified: csw/mgar/pkg/libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:43:17 UTC (rev 4346) +++ csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:54:33 UTC (rev 4347) @@ -4,17 +4,23 @@ DESCRIPTION = Thai language support routines define BLURB + LibThai is a set of Thai language support routines aimed to ease + developers tasks to incorporate Thai language support in their applications. + It includes important Thai-specific functions e.g. word breaking, input + and output methods as well as basic character and string supports. + LibThai is an Open Source and collaborative effort initiated by + Thai Linux Working Group and opened for all contributors. endef MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -# We define upstream file regex so we can be notifed of new upstream software release - UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448 UPSTREAM_USE_SF = 1 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +SPKG_SOURCEURL = http://linux.thai.net/projects/libthai/ + BUILD64 = 1 NORUNPATH = 1 CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Thu Apr 16 14:56:54 2009 From: bwalton at opencsw.org (Ben Walton) Date: Thu, 16 Apr 2009 08:56:54 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> Message-ID: <1239886400-sup-3534@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Thu Apr 16 02:46:28 -0400 2009: > Almost perfect ;-) SPKG_PKGFILE contains many %-expansions from > environment variables passed. We can set all these directly without > the need of deep-passing values into mkpackage: > > +SPKG_PKGFILE = %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-% > {SPKG_OSNAME}-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- > UNCOMMITTED).pkg > > +SPKG_PKGFILE = %{bitname}-$(SPKG_VERSION)$(SPKG_REVSTAMP)-$ > (SPKG_OSNAME)-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- > UNCOMMITTED).pkg I had thought about this as well. I decided to leave it all for mkpackage, as I didn't see that it was hugely wasteful (a little, yes). > One more thing: SPKG_PSTAMP contains the value of $(_REVISION), and > there are more fault values: UNCOMMITTED, NOTVERSIONED (svn found, > but not added to the repository) and NOSVN (no subversion > installed). This should do it $(filter $(SPKG_PSTAMP),UNCOMMITTED > NOTVERSIONED NOSVN) I had considered this also, but chose the path I did because in both the NOSVN and NOTVERSIONED case, I didn't think that flagging the package file name was appropriate. If someone builds packages with GAR, but outside of the svn tree, would we release a package with the NOTVERSIONED or NOSVN tags? If so, I'd say that CSW is still the best choice. I'm not fussy either way though. Thanks for putting up with my patch parade! :) -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dam at opencsw.org Thu Apr 16 15:11:58 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Thu, 16 Apr 2009 15:11:58 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239886400-sup-3534@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> Message-ID: Hi Ben, Am 16.04.2009 um 14:56 schrieb Ben Walton: > If someone builds packages with > GAR, but outside of the svn tree, would we release a package with the > NOTVERSIONED or NOSVN tags? No. If a package is build with GAR it must be fully checked in or it will not be released. > Thanks for putting up with my patch parade! :) Your welcome :) Best regards -- Dago From bwalton at opencsw.org Thu Apr 16 15:24:46 2009 From: bwalton at opencsw.org (Ben Walton) Date: Thu, 16 Apr 2009 09:24:46 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> Message-ID: <1239888018-sup-3416@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Thu Apr 16 09:11:58 -0400 2009: Hi Dago, > No. If a package is build with GAR it must be fully checked in or it > will not be released. Does that not preclude people from building on their own farms if they're not a maintainer and then contributing the work back? Since the repo is public, anyone could checkout GAR and build a package. GAR might have the SVN stuff, but their local package description might not. Would we refuse to release a package in this case? [My own feeling is that we'd simply request that they open a maintainer account and commit the source in that case, but since we don't even force the use of GAR/svn within the existing maintainer base, this may seem heavy handed.] Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dam at opencsw.org Thu Apr 16 15:33:28 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Thu, 16 Apr 2009 15:33:28 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239888018-sup-3416@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> <1239888018-sup-3416@ntdws12.chass.utoronto.ca> Message-ID: <9493E636-4635-4BF4-90B4-285F6AB7387E@opencsw.org> Hi Ben, Am 16.04.2009 um 15:24 schrieb Ben Walton: > Excerpts from Dagobert Michelsen's message of Thu Apr 16 09:11:58 > -0400 2009: >> No. If a package is build with GAR it must be fully checked in or it >> will not be released. > > Does that not preclude people from building on their own farms if > they're not a maintainer and then contributing the work back? Since > the repo is public, anyone could checkout GAR and build a package. > GAR might have the SVN stuff, but their local package description > might not. Would we refuse to release a package in this case? Yes. If the package is going to be officially released under OpenCSW he must become a maintainer and contribute his work back. > [My own feeling is that we'd simply request that they open a > maintainer account and commit the source in that case, but since we > don't even force the use of GAR/svn within the existing maintainer > base, this may seem heavy handed.] We don't force it on long-time maintainers who already have potentially complex build processed on their own. For new maintainers GAR is, umh, strongly recommended. Releasable packages must be build on the buildfarm anyway. Best regards -- Dago PS: I guess you should post on maintainers@ next time as devel@ doesn't seem to be read widely due to commit mails. From bwalton at opencsw.org Thu Apr 16 15:35:43 2009 From: bwalton at opencsw.org (Ben Walton) Date: Thu, 16 Apr 2009 09:35:43 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <9493E636-4635-4BF4-90B4-285F6AB7387E@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> <1239888018-sup-3416@ntdws12.chass.utoronto.ca> <9493E636-4635-4BF4-90B4-285F6AB7387E@opencsw.org> Message-ID: <1239888897-sup-1987@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Thu Apr 16 09:33:28 -0400 2009: Hi Dago, > Yes. If the package is going to be officially released under > OpenCSW he must become a maintainer and contribute his work back. Ok. Then I like your additional file tags. > We don't force it on long-time maintainers who already have > potentially complex build processed on their own. For new > maintainers GAR is, umh, strongly recommended. Releasable > packages must be build on the buildfarm anyway. Ok. This works for me too. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From valholla at users.sourceforge.net Thu Apr 16 16:16:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:16:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4348] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4348 http://gar.svn.sourceforge.net/gar/?rev=4348&view=rev Author: valholla Date: 2009-04-16 14:16:56 +0000 (Thu, 16 Apr 2009) Log Message: ----------- fixed postinstall and other pkg tweaks Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/checksums csw/mgar/pkg/gcc4/trunk/files/gar_override.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Added Paths: ----------- csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space csw/mgar/pkg/gcc4/trunk/files/package_files.mk Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-16 14:16:56 UTC (rev 4348) @@ -42,5 +42,7 @@ include files/gar_override.mk include files/package_def.mk include files/pkg_scripts.mk +include files/package_files.mk +include files/amd_merge.mk ## include mGar definitions include gar/category.mk Modified: csw/mgar/pkg/gcc4/trunk/checksums =================================================================== --- csw/mgar/pkg/gcc4/trunk/checksums 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/checksums 2009-04-16 14:16:56 UTC (rev 4348) @@ -1,3 +1,2 @@ cc3c5565fdb9ab87a05ddb106ba0bd1f download/gcc-4.3.3.tar.bz2 -9644641dee1c5433930319b20710dca3 download/re-enable-alloc.diff -57900f0dad9f424a43e7d1aa502070b8 download/split-insn-attrtab.diff +9883bd7887c22e1180b9dae4f2acd8ec download/CSWgcc4core.space Added: csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space 2009-04-16 14:16:56 UTC (rev 4348) @@ -0,0 +1 @@ +/opt 1340 200 Modified: csw/mgar/pkg/gcc4/trunk/files/gar_override.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -38,7 +38,7 @@ CONFIGURE_SCRIPTS = objdir TEST_SCRIPTS = skip post-configure-modulated: fix-bootflags -#MERGE_SCRIPTS_isa-i386 = amd +MERGE_SCRIPTS_isa-i386 = amd ## Run checkpkg Manually ENABLE_CHECK = 0 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -1,7 +1,7 @@ ### Package Section ### -PACKAGES = CSWgcc4ada CSWgcc4adart CSWgcc4core CSWgcc4corert CSWgcc4gfortran -PACKAGES += CSWgcc4gfortranrt CSWgcc4java CSWgcc4javart CSWgcc4objc -PACKAGES += CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt +PACKAGES = CSWgcc4ada CSWgcc4adart CSWgcc4gfortran CSWgcc4gfortranrt +PACKAGES += CSWgcc4java CSWgcc4javart CSWgcc4objc CSWgcc4objcrt +PACKAGES += CSWgcc4g++ CSWgcc4g++rt CSWgcc4corert CSWgcc4core ## Define Package Catalog Names CATALOGNAME_CSWgcc4ada = gcc4ada @@ -60,136 +60,91 @@ SPKG_DESC_CSWgcc4objcrt = GNU Objective C Compiler Run Time ## Define Dependencies -COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr -REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core $(COMMON_REQUIRE) +COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr CSWggettextrt +REQUIRED_PKGS_CSWgcc4adart = CSWgcc4corert CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4ada += CSWgcc4adart $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4core = $(COMMON_REQUIRE) CSWbinutils CSWggettextrt -REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt CSWiconv -REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWzlib $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert CSWbinutils $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4g++ += CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4gfortran += CSWgcc4gfortranrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWgcc4corert CSWjavart CSWzlib +REQUIRED_PKGS_CSWgcc4java += CSWgcc4g++ CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4objc += CSWgcc4objcrt $(COMMON_REQUIRE) -## Define the Contents of the Packages +DISTFILES += CSWgcc4core.space -## gcc4ada Definitions -PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 -PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnat.* -PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnarl.* -PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* -PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* -PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* -PKGFILES_CSWgcc4ada += .*/gcc4/bin/gnat.* +define CSWgcc4core_postinstall +#!/bin/sh -## gcc4gfortran Definitions -PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran -PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.* -PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 -PKGFILES_CSWgcc4gfortran += .*/gcc4/man/.*gfortran.1 -PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* +Error() +{ + echo "=====> postinstall Error: $$1" >&2 + exit 1 +} -## gcc4g++ Definitions -PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ -PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ -PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus -PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.* -PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.* -PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 -PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* -PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* +OS_REV="`/usr/bin/uname -r | sed -e 's/[^.]*//'`" +case `/usr/bin/uname -p` in + "sparc") OS_TARGET="sparc-sun-solaris2.8" ;; + "i386") OS_TARGET="i386-pc-solaris2$${OS_REV}" ;; +esac -## gcc4java Definitions -PKGFILES_CSWgcc4java = .*/gcc4/bin/.*gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-scan -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-convert -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jcf-dump -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grmi.* -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grepjar -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjnih -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gij -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*fastjar -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjar.* -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjavah -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gorbd -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*addr2name.awk -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gappletviewer -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gkeytool -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gserialver -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gij.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/jv.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/jcf.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/grmi.* -PKGFILES_CSWgcc4java += .*/gcc4/man/.*jar.* -PKGFILES_CSWgcc4java += .*/gcc4/man/.*jni.* -PKGFILES_CSWgcc4java += .*/gcc4/man/.*java.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gorbd.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gapplet.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gkeytool.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gserialver.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gtnameserv.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gnative2ascii.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gc-analyze.* -PKGFILES_CSWgcc4java += .*/gcc4/share/java/.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgij.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libffi.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*lib-gnu-awt.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*security/classpath.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*logging.properties -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*pkgconfig.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgcj.* -PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* -PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain -PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* -PKGFILES_CSWgcc4java += .*/gcc4/info/gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*gcj/.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*awt/.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*classpath/.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*java.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*ffi.h -PKGFILES_CSWgcc4java += .*/gcc4/include/.*org/.* +TOOLS_DIR="$${PKG_INSTALL_ROOT}/opt/csw/gcc4/libexec/gcc" +TOOLS_DIR="$${TOOLS_DIR}/$${OS_TARGET}/$(GARVERSION)/install-tools" +MKHEADERS_CMD="$${PKG_INSTALL_ROOT}/opt/csw/gcc4/bin/mkheaders" +INCLUDE_DIR="$${PKG_INSTALL_ROOT}/opt/csw/gcc4/lib/gcc" +INCLUDE_DIR="$${INCLUDE_DIR}/$${OS_TARGET}/$(GARVERSION)/include" -## gcc4objc Definitions -PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj -PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.* -PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* -PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* +cat << _EOF_ +****************************************************************************** +* NOTICE: Fixing the system headers +* +* Do not forget: whenever your system headers change +* Run the $${MKHEADERS_CMD} script! +****************************************************************************** +_EOF_ -####### RunTime Packages +if [ -f $${TOOLS_DIR}/mkheaders ]; then + cp $${TOOLS_DIR}/mkheaders $${MKHEADERS_CMD} + installf $${PKGINST} "$${MKHEADERS_CMD}" +else + Error "$${TOOLS_DIR}/mkheaders Not Found" +fi -## gcc4adart -PKGFILES_CSWgcc4adart = .*/opt/csw/lib/.*libgnat.* -PKGFILES_CSWgcc4adart += .*/opt/csw/lib/.*libgnarl.* +if [ -f $${MKHEADERS_CMD} ];then + chmod 0755 $${MKHEADERS_CMD} 2>/dev/null + chown root:bin $${MKHEADERS_CMD} 2>/dev/null + "$${MKHEADERS_CMD}" || Error "$${MKHEADERS_CMD} Failed." +else + Error "Could not find $${MKHEADERS_CMD}" +fi -## gcc4corert -PKGFILES_CSWgcc4corert = .*/opt/csw/lib/.*libgcc_s.* -PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libgomp.* -PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libssp.* +if [ -d $${INCLUDE_DIR} ]; then + chmod 0755 $${INCLUDE_DIR} || Error "Failed to chmod $${INCLUDE_DIR}" + chown -R root:bin $${INCLUDE_DIR} || + Error "Failed to change ownership for $${INCLUDE_DIR}" + find $${INCLUDE_DIR} -print | installf $${PKGINST} - +fi -## gcc4gfortranrt -PKGFILES_CSWgcc4gfortranrt = .*/opt/csw/lib/.*libgfortran.* -## gcc4g++rt -PKGFILES_CSWgcc4g++rt = .*/opt/csw/lib/.*libstdc.* -PKGFILES_CSWgcc4g++rt += .*/opt/csw/lib/.*libsupc\+\+.* +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully fixed system headers +* +* Do not forget: whenever your system headers change +* Run the $${MKHEADERS_CMD} script! +****************************************************************************** +_EOF_ + +installf -f $${PKGINST} -## gcc4javart -PKGFILES_CSWgcc4javart = .*/opt/csw/lib/.*libgij.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libffi.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*lib-gnu-awt.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*security/classpath.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*logging.properties -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*pkgconfig.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*gcj.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libgcj.* +exit 0 +endef -## gcc4objc Runtime -PKGFILES_CSWgcc4objcrt = .*/opt/csw/lib/.*libobjc.* Added: csw/mgar/pkg/gcc4/trunk/files/package_files.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_files.mk (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -0,0 +1,119 @@ +## Define the Contents of the Packages + +## gcc4ada Definitions +PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnat.*a +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnarl.*a +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* +PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* +PKGFILES_CSWgcc4ada += .*/gcc4/bin/gnat.* + +## gcc4gfortran Definitions +PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran +PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.*a +PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 +PKGFILES_CSWgcc4gfortran += .*/gcc4/man/.*gfortran.1 +PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* + +## gcc4g++ Definitions +PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.*a +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.*a +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* + +## gcc4java Definitions +PKGFILES_CSWgcc4java = .*/gcc4/bin/.*gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-scan +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-convert +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jcf-dump +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grepjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjnih +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gij +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*fastjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjar.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjavah +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gorbd +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*addr2name.awk +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gappletviewer +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gkeytool +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gserialver +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gij.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/jv.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/jcf.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jar.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jni.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gorbd.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gapplet.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gkeytool.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gserialver.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gtnameserv.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gnative2ascii.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/share/java/.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgij.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libffi.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*lib-gnu-awt.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*security.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*logging.properties +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*pkgconfig.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*gcj.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgcj.*a +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* +PKGFILES_CSWgcc4java += .*/gcc4/info/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*gcj/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*awt/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*classpath/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*ffi.h +PKGFILES_CSWgcc4java += .*/gcc4/include/.*org/.* + +## gcc4objc Definitions +PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.*a +PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* + +####### RunTime Packages + +## gcc4adart +PKGFILES_CSWgcc4adart = .*/gcc4/lib/.*libgnat.*\.so.* +PKGFILES_CSWgcc4adart += .*/gcc4/lib/.*libgnarl.*\.so.* + +## gcc4corert +PKGFILES_CSWgcc4corert = .*/gcc4/lib/.*libgcc_s.*\.so.* +PKGFILES_CSWgcc4corert += .*/gcc4/lib/.*libgomp.*\.so.* +PKGFILES_CSWgcc4corert += .*/gcc4/lib/.*libssp.*\.so.* + +## gcc4gfortranrt +PKGFILES_CSWgcc4gfortranrt = .*/gcc4/lib/.*libgfortran.*\.so.* + +## gcc4g++rt +PKGFILES_CSWgcc4g++rt = .*/gcc4/lib/.*libstdc.*\.so.* +PKGFILES_CSWgcc4g++rt += .*/gcc4/lib/.*libsupc\+\+.*\.so.* + +## gcc4javart +PKGFILES_CSWgcc4javart = .*/gcc4/lib/.*libgij.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*libffi.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*lib-gnu-awt.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*security/classpath.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*logging.properties +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*pkgconfig.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*gcj.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*libgcj.*\.so.* + +## gcc4objc Runtime +PKGFILES_CSWgcc4objcrt = .*/gcc4/lib/.*libobjc.*\.so.* Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -1,55 +1,37 @@ +ifeq ($(PKG_DEBUG),) + _DBG=@ +else + _DBG= +endif -post-patch-modulated: - @(echo "==> Running autoheader and autoconf") - @(cd $(PATCHDIR)/gcc && autoheader) - @(cd $(PATCHDIR)/gcc && autoconf) - @$(MAKECOOKIE) ## Create $(OBJECT_DIR) to build in post-extract-$(addprefix post-extract-,$(MODULATIONS)): - @(echo "==> Creating Object Dir for Building") - @( mkdir $(OBJECT_DIR) ) - $(MAKECOOKIE) + $(_DBG)(echo "==> Creating Object Dir for Building") + $(_DBG)(mkdir $(OBJECT_DIR)) + $(_DBG)$(MAKECOOKIE) ## instead of changing to $(WORKSRC) and running configure ## Run it from the $(OBJECT_DIR) configure-objdir: - echo "==> Running Configure from $(OBJECT_DIR)" - cd $(OBJECT_DIR) && $(CONFIGURE_ENV) \ - ../$(DISTNAME)/configure $(CONFIGURE_ARGS) - $(MAKECOOKIE) + $(_DBG)(echo "==> Running Configure from $(OBJECT_DIR)") + $(_DBG)(cd $(OBJECT_DIR) && $(CONFIGURE_ENV) \ + ../$(DISTNAME)/configure $(CONFIGURE_ARGS)) + $(_DBG)$(MAKECOOKIE) ## Set the CFLAGS so the correct architecture is used fix-bootflags: - @(perl -i -plne "s|^BOOT_CFLAGS.*|BOOT_CFLAGS= $(BOOT_CFLAGS)|" \ + $(_DBG)(perl -i -plne "s|^BOOT_CFLAGS.*|BOOT_CFLAGS= $(BOOT_CFLAGS)|" \ $(WORKSRC)/Makefile) - @(perl -i -plne "s|^BOOT_LDFLAGS.*|BOOT_LDFLAGS= $(BOOT_LDFLAGS)|" \ + $(_DBG)(perl -i -plne "s|^BOOT_LDFLAGS.*|BOOT_LDFLAGS= $(BOOT_LDFLAGS)|" \ $(WORKSRC)/Makefile) - @$(MAKECOOKIE) + $(_DBG)$(MAKECOOKIE) post-merge-modulated: - @( gecho "[===> Creating Runtime Package files <===]" ) - @( ginstall -d $(PKGROOT)/opt/csw/lib ) - @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/*.so* $(PKGROOT)/opt/csw/lib/ ) - @( gchmod 0755 $(PKGROOT)/opt/csw/lib/*.so* ) - @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ - $(PKGROOT)/opt/csw/lib/ ) - @( if [ "`uname -p`" = 'i386' ]; then \ - if [ "`uname -r`" = '5.10' ]; then \ - ginstall -d $(PKGROOT)/opt/csw/lib/amd64; \ - gcp -d $(PKGROOT)/opt/csw/gcc4/lib/amd64/*.so* \ - $(PKGROOT)/opt/csw/lib/amd64/; \ - gchmod 0755 $(PKGROOT)/opt/csw/lib/amd64/*.so*; \ - fi; \ - fi ) - @( if [ "`uname -p`" = 'sparc' ]; then \ - ginstall -d $(PKGROOT)/opt/csw/lib/sparcv9; \ - gcp -d $(PKGROOT)/opt/csw/gcc4/lib/sparcv9/*.so* \ - $(PKGROOT)/opt/csw/lib/sparcv9/; \ - gchmod 0755 $(PKGROOT)/opt/csw/lib/sparcv9/*.so*; \ - fi ) - @$(MAKECOOKIE) + $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ + $(PKGROOT)/opt/csw/gcc4/lib/ ) + $(_DBG)$(MAKECOOKIE) test-skip: - @$(MAKECOOKIE) + $(_DBG)$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 16 16:18:42 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:18:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4349] csw/mgar/pkg/gcc4/trunk/files/test-results Message-ID: Revision: 4349 http://gar.svn.sourceforge.net/gar/?rev=4349&view=rev Author: valholla Date: 2009-04-16 14:18:42 +0000 (Thu, 16 Apr 2009) Log Message: ----------- remove s9 test result directories Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/test-results/i386s9/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs9/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 16 16:19:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:19:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4350] csw/mgar/pkg/gcc4/trunk/files/test-results/ gcc4-sparc Message-ID: Revision: 4350 http://gar.svn.sourceforge.net/gar/?rev=4350&view=rev Author: valholla Date: 2009-04-16 14:19:57 +0000 (Thu, 16 Apr 2009) Log Message: ----------- remove s9 test result directories Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc Deleted: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc 2009-04-16 14:18:42 UTC (rev 4349) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc 2009-04-16 14:19:57 UTC (rev 4350) @@ -1,410 +0,0 @@ -$ make check -Making a new config file... -echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite" >> ./tmp0 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gcc || mkdir testsuite/gcc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gcc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 13:48:45 2009 -Native configuration is sparc-sun-solaris2.8 - - === gcc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... - -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... -WARNING: program timed out. -FAIL: gcc.dg/pr28796-2.c execution test -FAIL: gcc.dg/pthread-init-1.c (test for excess errors) -FAIL: gcc.dg/pthread-init-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-3.c (test for excess errors) -XPASS: gcc.dg/ucnid-4.c (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... -FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 -FAIL: gcc.dg/vect/vect-35.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-iv-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-multitypes-5.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-multitypes-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 -FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "zero step in outer loop." 1 -FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 -FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "zero step in outer loop." 1 -FAIL: gcc.dg/vect/vect-vfa-slp.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/slp-15.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 -FAIL: gcc.dg/vect/slp-25.c scan-tree-dump-times vect "Alignment of access forced using peeling" 2 -FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorized 3 loops" 1 -FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorizing stmts using SLP" 3 -FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 0 loops" 2 -FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/no-vfa-vect-depend-1.c scan-tree-dump-times vect "vectorized 1 loops" 1 -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... -skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined - - === gcc Summary === - -# of expected passes 46968 -# of unexpected failures 21 -# of unexpected successes 3 -# of expected failures 192 -# of untested testcases 35 -# of unsupported tests 531 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gcc] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' - === acats configuration === -target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/ -Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/specs Target: sparc-sun-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) -host=sparc-sun-solaris2.8 -target=sparc-sun-solaris2.8 -gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/gnatmake - - === acats support === -Generating support files... done. -Compiling support files... done. - - === acats tests === -Running chapter a ... -Running chapter c2 ... -Running chapter c3 ... -Running chapter c4 ... -Running chapter c5 ... -Running chapter c6 ... -Running chapter c7 ... -Running chapter c8 ... -Running chapter c9 ... -Running chapter ca ... -Running chapter cb ... -Running chapter cc ... -Running chapter cd ... -Running chapter ce ... -Running chapter cxa ... -Running chapter cxb ... -Running chapter cxf ... -Running chapter cxg ... -Running chapter cxh ... -Running chapter cz ... -Running chapter d ... -Running chapter e ... -Running chapter gcc ... -Running chapter l ... - === acats Summary === -# of expected passes 2315 -# of unexpected failures 0 -test -d testsuite || mkdir testsuite -test -d testsuite/gnat || mkdir testsuite/gnat -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gnat; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 18:48:17 2009 -Native configuration is sparc-sun-solaris2.8 - - === gnat tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... - - === gnat Summary === - -# of expected passes 375 -# of expected failures 1 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/g++ || mkdir testsuite/g++ -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/g++; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 18:52:36 2009 -Native configuration is sparc-sun-solaris2.8 - - === g++ tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... -FAIL: g++.dg/opt/anchor1.C execution test -XPASS: g++.dg/other/ucnid-1.C (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... -XPASS: g++.old-deja/g++.other/init19.C execution test - - === g++ Summary === - -# of expected passes 17327 -# of unexpected failures 1 -# of unexpected successes 2 -# of expected failures 84 -# of unsupported tests 227 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) - -gmake[1]: [check-parallel-g++] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gfortran || mkdir testsuite/gfortran -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gfortran; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 19:59:55 2009 -Native configuration is sparc-sun-solaris2.8 - - === gfortran tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... -FAIL: gfortran.dg/nint_2.f90 -O0 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... - - === gfortran Summary === - -# of expected passes 24901 -# of unexpected failures 1 -# of expected failures 5 -# of unsupported tests 171 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gfortran] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/objc || mkdir testsuite/objc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/objc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 22:13:33 2009 -Native configuration is sparc-sun-solaris2.8 - - === objc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... - - === objc Summary === - -# of expected passes 1812 -# of expected failures 7 -# of unsupported tests 24 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 16 16:42:26 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:42:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4351] csw/mgar/pkg/freetype/trunk Message-ID: Revision: 4351 http://gar.svn.sourceforge.net/gar/?rev=4351&view=rev Author: harpchad Date: 2009-04-16 14:42:26 +0000 (Thu, 16 Apr 2009) Log Message: ----------- Bump to 2.3.9 Modified Paths: -------------- csw/mgar/pkg/freetype/trunk/Makefile csw/mgar/pkg/freetype/trunk/checksums Modified: csw/mgar/pkg/freetype/trunk/Makefile =================================================================== --- csw/mgar/pkg/freetype/trunk/Makefile 2009-04-16 14:19:57 UTC (rev 4350) +++ csw/mgar/pkg/freetype/trunk/Makefile 2009-04-16 14:42:26 UTC (rev 4351) @@ -1,5 +1,5 @@ GARNAME = freetype -GARVERSION = 2.3.8 +GARVERSION = 2.3.9 CATEGORIES = lib DESCRIPTION = A free and portable TrueType font rendering engine Modified: csw/mgar/pkg/freetype/trunk/checksums =================================================================== --- csw/mgar/pkg/freetype/trunk/checksums 2009-04-16 14:19:57 UTC (rev 4350) +++ csw/mgar/pkg/freetype/trunk/checksums 2009-04-16 14:42:26 UTC (rev 4351) @@ -1,2 +1,2 @@ +d76233108aca9c9606cdbd341562ad9a download/freetype-2.3.9.tar.bz2 4155af32f82cb784be209147eb8b67ee download/COPYING -6cf31a08826715a0d16ae366da9c7d3b download/freetype-2.3.8.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 17:27:28 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 15:27:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4352] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4352 http://gar.svn.sourceforge.net/gar/?rev=4352&view=rev Author: idogan23 Date: 2009-04-16 15:27:28 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: changed ownder and group for /var/opt/csw/nsd Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 14:42:26 UTC (rev 4351) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 15:27:28 UTC (rev 4352) @@ -14,7 +14,7 @@ DISTFILES += cswusergroup SPKG_CLASSES = none cswusergroup cswcpsampleconf -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' REQUIRED_PKGS = CSWcswclassutils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 17:57:13 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 15:57:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4353] csw/mgar/pkg/nsd/trunk Message-ID: Revision: 4353 http://gar.svn.sourceforge.net/gar/?rev=4353&view=rev Author: idogan23 Date: 2009-04-16 15:57:13 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: fixed MASTER_SITES, init script handled by cswinitsmf class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile csw/mgar/pkg/nsd/trunk/checksums Added Paths: ----------- csw/mgar/pkg/nsd/trunk/files/cswnsd Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 15:27:28 UTC (rev 4352) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 15:57:13 UTC (rev 4353) @@ -8,23 +8,25 @@ authoritative DNS nameserver. endef -MASTER_SITES = http://ww$(GARNAME)w.nlnetlabs.nl/downloads/nsd/ +MASTER_SITES = http://www.nlnetlabs.nl/projects/nsd/ + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +UPSTREAM_MASTER_SITES = http://www.nlnetlabs.nl/downloads/nsd/ + DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnsd,) DISTFILES += cswusergroup +DISTFILES += cswnsd -SPKG_CLASSES = none cswusergroup cswcpsampleconf -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' +SPKG_CLASSES = none cswusergroup cswcpsampleconf cswinitsmf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' REQUIRED_PKGS = CSWcswclassutils # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid @@ -35,6 +37,8 @@ post-install-modulated: @ginstall -d $(DESTDIR)/var/opt/csw/nsd + @ginstall -d $(DESTDIR)/etc/opt/csw/init.d + @ginstall -m 755 $(FILEDIR)/cswnsd $(DESTDIR)/etc/opt/csw/init.d/cswnsd @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup Modified: csw/mgar/pkg/nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/nsd/trunk/checksums 2009-04-16 15:27:28 UTC (rev 4352) +++ csw/mgar/pkg/nsd/trunk/checksums 2009-04-16 15:57:13 UTC (rev 4353) @@ -1,3 +1,4 @@ 193710012704d807e85445886c72aca8 download/CSWnsd.gspec +0eece57abde9d1cef8a962461b453d03 download/cswnsd 7a7560acb5d56847ea16fb8cd77b6ca5 download/cswusergroup 66b602a793b851ad109403d3d2654fad download/nsd-3.2.1.tar.gz Added: csw/mgar/pkg/nsd/trunk/files/cswnsd =================================================================== --- csw/mgar/pkg/nsd/trunk/files/cswnsd (rev 0) +++ csw/mgar/pkg/nsd/trunk/files/cswnsd 2009-04-16 15:57:13 UTC (rev 4353) @@ -0,0 +1,30 @@ +#!/sbin/sh + +case "$1" in + start) + echo "Starting nsd." + if [ ! -f /var/opt/csw/nsd/nsd.db ]; then + /opt/csw/sbin/nsdc rebuild >/dev/null 2>/dev/null + fi + /opt/csw/sbin/nsdc start + ;; + stop) + echo "Stopping nsd." + /opt/csw/sbin/nsdc stop + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + refresh) + echo "Refreshing nsd." + /opt/csw/sbin/nsdc reload + ;; + *) + echo "Usage: $0 { start | stop | restart | refresh }" + exit 1 + ;; +esac + +exit 0 Property changes on: csw/mgar/pkg/nsd/trunk/files/cswnsd ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 16 19:50:35 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 17:50:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4354] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4354 http://gar.svn.sourceforge.net/gar/?rev=4354&view=rev Author: valholla Date: 2009-04-16 17:50:35 +0000 (Thu, 16 Apr 2009) Log Message: ----------- update to 1.6.1 upstream Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-16 15:57:13 UTC (rev 4353) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-16 17:50:35 UTC (rev 4354) @@ -1,5 +1,5 @@ GARNAME = subversion -DISTVERSION = 1.5.6 +DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 20:02:54 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 18:02:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4355] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4355 http://gar.svn.sourceforge.net/gar/?rev=4355&view=rev Author: bdwalton Date: 2009-04-16 18:02:54 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Updated to included the 4.5 sgml/xml dtds. - Updated to include the 5.0 schemas (xml only: rng, dtd, etc). - Steps up to install work. Still need to handle the adm scripts. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/Makefile csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch Modified: csw/mgar/pkg/docbook-dtds/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 17:50:35 UTC (rev 4354) +++ csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 18:02:54 UTC (rev 4355) @@ -8,9 +8,8 @@ # NOTE NOTE NOTE GARNAME = docbookdtds -GARVERSION = 1.0 +GARVERSION = 5.0 -PATCHLEVEL = 30.1 CATEGORIES = xtra REQUIRED_PKGS = CSWsgmlcommon CSWxmlcommon CSWlibxml2 @@ -48,12 +47,14 @@ O_SRC += $(OASIS)/sgml/4.1/ $(OASIS)/xml/4.1.2/ $(OASIS)/sgml/4.2/ O_SRC += $(OASIS)/xml/4.2/ D_SRC = $(DOCBOOK)/sgml/4.3/ $(DOCBOOK)/xml/4.3/ $(DOCBOOK)/sgml/4.4/ -D_SRC += $(DOCBOOK)/xml/4.4/ +D_SRC += $(DOCBOOK)/xml/4.4/ $(DOCBOOK)/sgml/4.5/ $(DOCBOOK)/xml/4.5/ +D_SRC += $(DOCBOOK)/xml/5.0/ # the various files we'll need to fetch from the various sources DBFILES = docbk30.zip docbk31.zip docbk40.zip docbk41.zip docbkx412.zip DBFILES += docbook-4.2.zip docbook-xml-4.2.zip docbook-4.3.zip DBFILES += docbook-xml-4.3.zip docbook-4.4.zip docbook-xml-4.4.zip +DBFILES += docbook-4.5.zip docbook-xml-4.5.zip docbook-5.0.zip MASTER_SITES = $(O_SRC) $(D_SRC) DISTFILES = $(DBFILES) @@ -75,7 +76,7 @@ # nothing to build either... BUILD_SCRIPTS = -INSTALL_ARGS = DESTDIR=$(DESTDIR) GARVERSION=$(GARVERSION) PATCHLEVEL=$(PATCHLEVEL) +INSTALL_ARGS = DESTDIR=$(DESTDIR) include gar/category.mk @@ -111,7 +112,6 @@ unzip $(DOWNLOADDIR)/docbkx412.zip -d $(WORKSRC)/4.1.2-xml @$(MAKECOOKIE) - zip-extract-docbook-4.3.zip: ginstall -d $(WORKSRC)/4.3-sgml unzip $(DOWNLOADDIR)/docbook-4.3.zip -d $(WORKSRC)/4.3-sgml @@ -122,6 +122,11 @@ unzip $(DOWNLOADDIR)/docbook-4.4.zip -d $(WORKSRC)/4.4-sgml @$(MAKECOOKIE) +zip-extract-docbook-4.5.zip: + ginstall -d $(WORKSRC)/4.5-sgml + unzip $(DOWNLOADDIR)/docbook-4.5.zip -d $(WORKSRC)/4.5-sgml + @$(MAKECOOKIE) + zip-extract-docbook-xml-4.2.zip: ginstall -d $(WORKSRC)/4.2-xml unzip $(DOWNLOADDIR)/docbook-xml-4.2.zip -d $(WORKSRC)/4.2-xml @@ -137,6 +142,18 @@ unzip $(DOWNLOADDIR)/docbook-xml-4.4.zip -d $(WORKSRC)/4.4-xml @$(MAKECOOKIE) +zip-extract-docbook-xml-4.5.zip: + ginstall -d $(WORKSRC)/4.5-xml + unzip $(DOWNLOADDIR)/docbook-4.5.zip -d $(WORKSRC)/4.5-xml + @$(MAKECOOKIE) + +zip-extract-docbook-5.0.zip: + ginstall -d $(WORKSRC)/5.0-xml + unzip $(DOWNLOADDIR)/docbook-5.0.zip -d $(WORKSRC)/5.0-xml + mv $(WORKSRC)/5.0-xml/docbook-5.0/* $(WORKSRC)/5.0-xml/ + rmdir $(WORKSRC)/5.0-xml/docbook-5.0 + @$(MAKECOOKIE) + post-extract: # Increase NAMELEN (bug #36058, bug #159382). [bug references from # rpm .spec file] Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 17:50:35 UTC (rev 4354) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 18:02:54 UTC (rev 4355) @@ -1,3 +1,7 @@ +536104a1ab1e8eac583cf27f4f8844a4 download/CSWdocbookdtds.gspec +58c926e94c472fd0842d7850732cbcc8 download/CSWdocbookdtds.postinstall +81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove +d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip 432749c0c806dbae81c8bcb70da3b5d3 download/docbk31.zip fabcf7dd1d88b94797b7e5344389eab9 download/docbk40.zip @@ -3,14 +7,10 @@ 489f6ff2a2173eb1e14216c10533ede2 download/docbk41.zip 900d7609fb7e6d78901b357e4acfbc17 download/docbkx412.zip +318742d3a6648a6905727f071cbc9847 download/docbook-4.2-euro.patch 0dfeb94569334dd22a62d90d99fc0630 download/docbook-4.2.zip -73fe50dfe74ca631c1602f558ed8961f download/docbook-xml-4.2.zip e3beb1b0b2923c24fa55a68e88654b01 download/docbook-4.3.zip -ab200202b9e136a144db1e0864c45074 download/docbook-xml-4.3.zip f89e1bd0b2c7a361e3f1f739e16b5d0d download/docbook-4.4.zip -cbb04e9a700955d88c50962ef22c1634 download/docbook-xml-4.4.zip -536104a1ab1e8eac583cf27f4f8844a4 download/CSWdocbookdtds.gspec -58c926e94c472fd0842d7850732cbcc8 download/CSWdocbookdtds.postinstall -81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove -318742d3a6648a6905727f071cbc9847 download/docbook-4.2-euro.patch +07c581f4bbcba6d3aac85360a19f95f7 download/docbook-4.5.zip +2411c19ed4fb141f3fa3d389fae40736 download/docbook-5.0.zip e3067045964536cc7445d5c3f1e99916 download/docbook-dtd30-sgml-1.0.catalog.patch 856d40f5d1e3fc8fd939b88bf5fedc87 download/docbook-dtd31-sgml-1.0.catalog.patch @@ -19,4 +19,7 @@ e976c302070ec2e14316d4a601c224cb download/docbook-dtd41-sgml-1.0.catalog.patch 0ee42c28835cd448b6b47b2345394b28 download/docbook-dtd42-sgml-1.0.catalog.patch 1dae3f33fe7dda3fd68a4d4a3df2c653 download/docbook-dtds-ents.patch -e95f2615b1a3f50b9d14efdb4d188f3d download/add_makefile.patch +73fe50dfe74ca631c1602f558ed8961f download/docbook-xml-4.2.zip +ab200202b9e136a144db1e0864c45074 download/docbook-xml-4.3.zip +cbb04e9a700955d88c50962ef22c1634 download/docbook-xml-4.4.zip +03083e288e87a7e829e437358da7ef9e download/docbook-xml-4.5.zip Modified: csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch 2009-04-16 17:50:35 UTC (rev 4354) +++ csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch 2009-04-16 18:02:54 UTC (rev 4355) @@ -1,6 +1,6 @@ --- /dev/null 2008-12-15 18:41:04.000000000 +0100 -+++ docbookdtds-1.0/Makefile 2008-12-15 18:55:18.651895350 +0100 -@@ -0,0 +1,81 @@ ++++ docbookdtds-5.0/Makefile 2008-12-15 18:55:18.651895350 +0100 +@@ -0,0 +1,96 @@ +prefix = /opt/csw +sysconfdir = $(prefix)/etc +datadir = $(prefix)/share @@ -19,6 +19,9 @@ +SGMLTARG = $(patsubst %,inst-%,$(SGML)) +XMLTARG = $(patsubst %,inst-%,$(XML)) + ++CUR_SGML = $(lastword $(sort $(subst -sgml,,$(SGMLTARG)))) ++CUR_XML = $(lastword $(sort $(subst -xml,,$(XMLTARG)))) ++ +.PHONY: $(SGML) $(XMLT) + +all: build @@ -30,10 +33,10 @@ + @( $(INSTALL_DIR) $(DESTDIR)/$(sysconfdir)/sgml; \ + cd $(DESTDIR)/$(sysconfdir)/sgml; \ + [ -h $(DESTDIR)/$(sysconfdir)/sgml/sgml-docbook.cat ] || \ -+ ln -s sgml-docbook-4.4-$(GARVERSION)-$(PATCHLEVEL).cat \ ++ ln -s sgml-docbook-$(CUR_SGML).cat \ + $(DESTDIR)/$(sysconfdir)/sgml/sgml-docbook.cat; \ + [ -h $(DESTDIR)/$(sysconfdir)/sgml/xml-docbook.cat ] || \ -+ ln -s xml-docbook-4.4-$(GARVERSION)-$(PATCHLEVEL).cat \ ++ ln -s xml-docbook-$(CUR_XML).cat \ + $(DESTDIR)/$(sysconfdir)/sgml/xml-docbook.cat ) + +docs: @@ -50,8 +53,10 @@ + [ -d $$dir ] || $(INSTALL_DIR) $$dir; \ + $(INSTALL_DATA) $$x.1-sgml/ChangeLog $$dir/; \ + done ++ $(INSTALL_DIR) $(DESTDIR)/$(docdir)/5.0 ++ cp -R 5.0-xml/docs/ $(DESTDIR)/$(docdir)/5.0/ + -+inst-%-sgml: DD=$(DESTDIR)/$(docbookdir)/sgml-dtd-$*-$(GARVERSION)-$(PATCHLEVEL) ++inst-%-sgml: DD=$(DESTDIR)/$(docbookdir)/sgml-dtd-$* +inst-%-sgml: + @echo Installing $*-sgml + @( cd $*-sgml; \ @@ -64,7 +69,7 @@ + $(INSTALL_DATA) ent/* $(DD)/ent/; \ + fi ) + -+inst-%-xml: DD=$(DESTDIR)/$(docbookdir)/xml-dtd-$*-$(GARVERSION)-$(PATCHLEVEL) ++inst-%-xml: DD=$(DESTDIR)/$(docbookdir)/xml-dtd-$* +inst-%-xml: + @echo Installing $*-xml + @( cd $*-xml; \ @@ -77,6 +82,16 @@ + $(INSTALL_DATA) ent/* $(DD)/ent/; \ + fi ) + ++inst-5.0-xml: DD=$(DESTDIR)/$(docbookdir)/xml-schemas-5.0 ++inst-5.0-xml: ++ @echo Installing 5.0-xml ++ @( cd 5.0-xml/; \ ++ gmkdir -p $(DD); \ ++ for d in dtd rng sch xsd; do \ ++ cp -R $$d $(DD); \ ++ done; \ ++ $(INSTALL_DATA) catalog.xml $(DD)/catalog; ) ++ +build: + @echo Nothing to build...dummy statement in action. + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 21:11:00 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 19:11:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4356] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4356 http://gar.svn.sourceforge.net/gar/?rev=4356&view=rev Author: bdwalton Date: 2009-04-16 19:10:59 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Convert to dynamic gspec. - Remove package version specific identifiers from filenames in postinstall. - Remove unnecessary depend and gspec files. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/Makefile csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall Removed Paths: ------------- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec Modified: csw/mgar/pkg/docbook-dtds/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,18 +1,17 @@ # Replicate the RHEL5 docbook-dtds-1.0.30.1 rpm for CSW. Patches are taken # from that srpm and modified (so paths work for GAR). +# As of 20090416, we're no longer tracking the rhel5 package. We'll add +# 4.5 and 5.0 support and have our version number track the highest docbook +# version supplied in the package. -# NOTE NOTE NOTE -# If these version numbers change, you'll need to update the postinstall -# and preremove scripts also. -# 20081204 -bw -# NOTE NOTE NOTE - GARNAME = docbookdtds GARVERSION = 5.0 CATEGORIES = xtra +PACKAGES = CSWdocbookdtds REQUIRED_PKGS = CSWsgmlcommon CSWxmlcommon CSWlibxml2 +ARCHALL = 1 DESCRIPTION = SGML and XML document type definitions for DocBook. define BLURB @@ -58,7 +57,7 @@ MASTER_SITES = $(O_SRC) $(D_SRC) DISTFILES = $(DBFILES) -DISTFILES += $(call admfiles,CSWdocbookdtds,postinstall preremove) +DISTFILES += CSWdocbookdtds.postinstall CSWdocbookdtds.preremove PATCHFILES = docbook-4.2-euro.patch docbook-dtd30-sgml-1.0.catalog.patch PATCHFILES += docbook-dtd31-sgml-1.0.catalog.patch @@ -144,7 +143,7 @@ zip-extract-docbook-xml-4.5.zip: ginstall -d $(WORKSRC)/4.5-xml - unzip $(DOWNLOADDIR)/docbook-4.5.zip -d $(WORKSRC)/4.5-xml + unzip $(DOWNLOADDIR)/docbook-xml-4.5.zip -d $(WORKSRC)/4.5-xml @$(MAKECOOKIE) zip-extract-docbook-5.0.zip: Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,5 +1,4 @@ -536104a1ab1e8eac583cf27f4f8844a4 download/CSWdocbookdtds.gspec -58c926e94c472fd0842d7850732cbcc8 download/CSWdocbookdtds.postinstall +d1da7c5cc43dbc23ea0b149d597a48a3 download/CSWdocbookdtds.postinstall 81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip Deleted: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,6 +0,0 @@ -P CSWcommon common - common files and dirs for CSW packages -P CSWsgmlcommon sgmlcommon - A collection of entities and DTDs -P CSWxmlcommon xmlcommon - A collection of entities and DTDs -P CSWopenjade openjade - A DSSSL implementation -P CSWlibxml2 libxml2 - A library providing XML and HTML support - Deleted: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,4 +0,0 @@ -%var bitname docbookdtds -%var pkgname CSWdocbookdtds -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 19:10:59 UTC (rev 4356) @@ -13,9 +13,6 @@ CSWSGMLCNF=/opt/csw/etc/sgml CSWSGML=/opt/csw/share/sgml -VERSION=1.0 -RELEASE=30.1 - ## ## SGML catalog ## @@ -23,92 +20,116 @@ # Update the centralized catalog corresponding to this version of the DTD # DocBook V3.0 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-3.0.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-3.0-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-3.0.cat \ + $CSWSGML/docbook/sgml-dtd-3.0/catalog # DocBook V3.1 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-3.1.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-3.1-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-3.1.cat \ + $CSWSGML/docbook/sgml-dtd-3.1/catalog # DocBook V4.0 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.0.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.0-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.0.cat \ + $CSWSGML/docbook/sgml-dtd-4.0/catalog # DocBook V4.1 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.1.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.1-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.1.cat \ + $CSWSGML/docbook/sgml-dtd-4.1/catalog # DocBook XML V4.1.2 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.1.2.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.1.2-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.1.2.cat \ + $CSWSGML/docbook/xml-dtd-4.1.2/catalog # DocBook V4.2 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.2.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.2-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.2.cat \ + $CSWSGML/docbook/sgml-dtd-4.2/catalog # DocBook XML V4.2 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.2.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.2-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.2.cat \ + $CSWSGML/docbook/xml-dtd-4.2/catalog # DocBook V4.3 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.3.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.3-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.3.cat \ + $CSWSGML/docbook/sgml-dtd-4.3/catalog # DocBook XML V4.3 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.3.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.3-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.3.cat \ + $CSWSGML/docbook/xml-dtd-4.3/catalog # DocBook V4.4 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.4.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.4-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.4.cat \ + $CSWSGML/docbook/sgml-dtd-4.4/catalog # DocBook XML V4.4 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.4.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.4-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.4.cat \ + $CSWSGML/docbook/xml-dtd-4.4/catalog +# DocBook V4.5 +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/sgml-docbook-4.5.cat \ + $CSWSGML/sgml-iso-entities-8879.1986/catalog +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/sgml-docbook-4.5.cat \ + $CSWSGML/docbook/sgml-dtd-4.5/catalog + +# DocBook XML V4.5 +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-4.5.cat \ + $CSWSGML/sgml-iso-entities-8879.1986/catalog +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-4.5.cat \ + $CSWSGML/docbook/xml-dtd-4.5/catalog + +# DocBook 5.0 +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-5.0.cat \ + $CSWSGML/sgml-iso-entities-8879.1986/catalog +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-5.0.cat \ + $CSWSGML/docbook/xml-schemas-5.0/catalog + # Fix up SGML super catalog so that there isn't an XML DTD before an # SGML one. We need to do this (*sigh*) because xmlcatalog messes up # the order of the lines, and SGML tools don't like to see XML things @@ -142,358 +163,358 @@ # DocBook XML V4.1.2 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.1.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.1.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.1.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.1.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.1.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.1.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.1.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.1.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.1.2" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.1.2" $CATALOG # DocBook XML V4.2 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.2" \ - "xml-dtd-4.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.2" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.2" \ - "xml-dtd-4.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.2" $CATALOG # DocBook XML V4.3 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.3/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.3/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.3/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.3/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.3/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.3/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.3/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.3/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.3/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.3/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.3/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.3/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.3/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.3" \ - "xml-dtd-4.3-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.3" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.3" \ - "xml-dtd-4.3-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.3" $CATALOG # DocBook XML V4.4 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.4/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.4/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.4/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.4/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.4/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.4/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.4/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.4/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.4/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.4/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.4/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.4/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.4/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.4" \ - "xml-dtd-4.4-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.4" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.4" \ - "xml-dtd-4.4-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.4" $CATALOG fi # Finally, make sure everything in $CSWSGMLCNF is readable! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 21:42:25 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 19:42:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4357] csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds .postinstall Message-ID: Revision: 4357 http://gar.svn.sourceforge.net/gar/?rev=4357&view=rev Author: bdwalton Date: 2009-04-16 19:42:25 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Add registrations for the 4.5 stuff to the postinstall script. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 19:10:59 UTC (rev 4356) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 19:42:25 UTC (rev 4357) @@ -515,6 +515,89 @@ $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.4" \ "xml-dtd-4.4" $CATALOG + + # DocBook XML V4.5 + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML" \ + "xml-dtd-4.5/ent/isoamsa.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML" \ + "xml-dtd-4.5/ent/isoamsb.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML" \ + "xml-dtd-4.5/ent/isoamsc.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML" \ + "xml-dtd-4.5/ent/isoamsn.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML" \ + "xml-dtd-4.5/ent/isoamso.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" \ + "xml-dtd-4.5/ent/isoamsr.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML" \ + "xml-dtd-4.5/ent/isobox.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML" \ + "xml-dtd-4.5/ent/isocyr1.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" \ + "xml-dtd-4.5/ent/isocyr2.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML" \ + "xml-dtd-4.5/ent/isodia.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Greek Letters//EN//XML" \ + "xml-dtd-4.5/ent/isogrk1.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML" \ + "xml-dtd-4.5/ent/isogrk2.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Greek Symbols//EN//XML" \ + "xml-dtd-4.5/ent/isogrk3.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML" \ + "xml-dtd-4.5/ent/isogrk4.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" \ + "xml-dtd-4.5/ent/isolat1.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Latin 2//EN//XML" \ + "xml-dtd-4.5/ent/isolat2.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" \ + "xml-dtd-4.5/ent/isonum.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Publishing//EN//XML" \ + "xml-dtd-4.5/ent/isopub.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES General Technical//EN//XML" \ + "xml-dtd-4.5/ent/isotech.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Character Entities V4.5//EN" \ + "xml-dtd-4.5/dbcentx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN" \ + "xml-dtd-4.5/dbgenent.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN" \ + "xml-dtd-4.5/dbhierx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Notations V4.5//EN" \ + "xml-dtd-4.5/dbnotnx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \ + "xml-dtd-4.5/dbpoolx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \ + "xml-dtd-4.5/htmltblx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//DTD DocBook XML V4.5//EN" \ + "xml-dtd-4.5/docbookx.dtd" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "xml-dtd-4.5/soextblx.dtd" $CATALOG fi # Finally, make sure everything in $CSWSGMLCNF is readable! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 21:44:23 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 19:44:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4358] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4358 http://gar.svn.sourceforge.net/gar/?rev=4358&view=rev Author: bdwalton Date: 2009-04-16 19:44:23 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Remove version specific things from paths in preremove script. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:42:25 UTC (rev 4357) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:44:23 UTC (rev 4358) @@ -1,5 +1,5 @@ -d1da7c5cc43dbc23ea0b149d597a48a3 download/CSWdocbookdtds.postinstall -81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove +6be301db3001ff1ff49ce22187502c29 download/CSWdocbookdtds.postinstall +ebff690d6182d2009222cf5c1c685eeb download/CSWdocbookdtds.preremove d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip 432749c0c806dbae81c8bcb70da3b5d3 download/docbk31.zip Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 19:42:25 UTC (rev 4357) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 19:44:23 UTC (rev 4358) @@ -13,9 +13,6 @@ CSWSGMLCNF=/opt/csw/etc/sgml CSWSGML=/opt/csw/share/sgml -VERSION=1.0 -RELEASE=30.1 - ## ## SGML catalog ## @@ -23,58 +20,58 @@ # Update the centralized catalog corresponding to this version of the DTD # DocBook V3.0 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-3.0.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.0.cat # DocBook V3.1 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-3.1.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.1.cat # DocBook V4.0 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.0.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.0.cat # DocBook V4.1 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.1.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.1.cat # DocBook XML V4.1.2 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.1.2.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.1.2.cat # DocBook V4.2 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.2.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.2.cat # DocBook XML V4.2 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.2.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.2.cat # DocBook V4.3 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.3.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.3.cat # DocBook XML V4.3 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.3.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.3.cat # DocBook V4.4 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.4.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.4.cat # DocBook XML V4.4 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.4.cat +rm -f $PKG_INSTALL_ROOT/$PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4.cat # Fix up SGML super catalog so that there isn't an XML DTD before an # SGML one. We need to do this (*sigh*) because xmlcatalog messes up @@ -104,233 +101,233 @@ then # DocBook XML V4.1.2 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.1.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.1.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.1.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.1.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.1.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.1.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.1.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.1.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.1.2" $CATALOG # DocBook XML V4.2 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.2" $CATALOG # DocBook XML V4.3 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.3/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.3/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.3/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.3/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.3/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.3/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.3/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.3/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.3/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.3/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.3/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.3/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.3/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.3" $CATALOG # DocBook XML V4.4 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.4/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.4/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.4/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.4/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.4/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.4/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.4/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.4/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.4/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.4/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.4/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.4/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.4/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.4" $CATALOG fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 22:02:23 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 20:02:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4359] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4359 http://gar.svn.sourceforge.net/gar/?rev=4359&view=rev Author: bdwalton Date: 2009-04-16 20:02:23 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Added 4.5 deregistration. - Need 5.0 register/deregister still. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:44:23 UTC (rev 4358) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 20:02:23 UTC (rev 4359) @@ -1,5 +1,5 @@ 6be301db3001ff1ff49ce22187502c29 download/CSWdocbookdtds.postinstall -ebff690d6182d2009222cf5c1c685eeb download/CSWdocbookdtds.preremove +b531bfd5f43d49469f1bfe2daba471cf download/CSWdocbookdtds.preremove d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip 432749c0c806dbae81c8bcb70da3b5d3 download/docbk31.zip Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 19:44:23 UTC (rev 4358) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 20:02:23 UTC (rev 4359) @@ -71,8 +71,23 @@ # DocBook XML V4.4 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ $CSWSGMLCNF/xml-docbook-4.4.cat -rm -f $PKG_INSTALL_ROOT/$PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4.cat +# DocBook V4.5 +$PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ + $CSWSGMLCNF/sgml-docbook-4.5.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.5.cat + +# DocBook XML V4.5 +$PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ + $CSWSGMLCNF/xml-docbook-4.5.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.5.cat + +# DocBook XML V5.0 +$PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ + $CSWSGMLCNF/xml-docbook-5.0.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-5.0.cat + # Fix up SGML super catalog so that there isn't an XML DTD before an # SGML one. We need to do this (*sigh*) because xmlcatalog messes up # the order of the lines, and SGML tools don't like to see XML things @@ -330,4 +345,60 @@ "xml-dtd-4.4/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ "xml-dtd-4.4" $CATALOG + + # DocBook XML V4.4 + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsa.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsb.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsc.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsn.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsr.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isobox.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isocyr1.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isocyr2.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isodia.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk1.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk2.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk3.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk4.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isolat1.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isolat2.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isonum.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isopub.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isotech.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbcentx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbgenent.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbhierx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbnotnx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbpoolx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/htmltblx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/docbookx.dtd" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/soextblx.dtd" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5" $CATALOG fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 05:15:42 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 03:15:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4360] csw/mgar/pkg/pysqlite2/trunk Message-ID: Revision: 4360 http://gar.svn.sourceforge.net/gar/?rev=4360&view=rev Author: valholla Date: 2009-04-17 03:15:41 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update to 2.4.0 Modified Paths: -------------- csw/mgar/pkg/pysqlite2/trunk/Makefile csw/mgar/pkg/pysqlite2/trunk/checksums Modified: csw/mgar/pkg/pysqlite2/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-16 20:02:23 UTC (rev 4359) +++ csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-17 03:15:41 UTC (rev 4360) @@ -1,13 +1,15 @@ GARNAME = pysqlite -GARVERSION = 2.3.5 +GARVERSION = 2.4.0 CATEGORIES = lang +RELVER = $(shell echo $(GARVERSION) |gsed 's/\(^[0-9].*\)\.[0-9]*/\1/') + DESCRIPTION = SQLite3 support for Python define BLURB SQLite support for Python endef -MASTER_SITES = http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/ +MASTER_SITES = http://initd.org/pub/software/pysqlite/releases/$(RELVER)/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpysqlite2 @@ -28,7 +30,7 @@ include gar/category.mk -post-install: +post-install-modulated: install -d $(DESTDIR)$(docdir) mv $(DESTDIR)$(prefix)/pysqlite2-doc $(DESTDIR)$(docdir)/pysqlite2 $(DONADA) Modified: csw/mgar/pkg/pysqlite2/trunk/checksums =================================================================== --- csw/mgar/pkg/pysqlite2/trunk/checksums 2009-04-16 20:02:23 UTC (rev 4359) +++ csw/mgar/pkg/pysqlite2/trunk/checksums 2009-04-17 03:15:41 UTC (rev 4360) @@ -1 +1 @@ -b4a185e936848370fcc1a5b17755b641 download/pysqlite-2.3.5.tar.gz +46b4590c51b9fb62cd0be1439646549e download/pysqlite-2.4.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Fri Apr 17 12:47:28 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Fri, 17 Apr 2009 10:47:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4361] csw/mgar/pkg Message-ID: Revision: 4361 http://gar.svn.sourceforge.net/gar/?rev=4361&view=rev Author: idogan23 Date: 2009-04-17 10:47:28 +0000 (Fri, 17 Apr 2009) Log Message: ----------- bind2nsd: initial commit Added Paths: ----------- csw/mgar/pkg/bind2nsd/ csw/mgar/pkg/bind2nsd/branches/ csw/mgar/pkg/bind2nsd/tags/ csw/mgar/pkg/bind2nsd/trunk/ csw/mgar/pkg/bind2nsd/trunk/Makefile csw/mgar/pkg/bind2nsd/trunk/files/ Property changes on: csw/mgar/pkg/bind2nsd/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-17 10:47:28 UTC (rev 4361) @@ -0,0 +1,36 @@ +GARNAME = bind2nsd +GARVERSION = 0.7.2 +CATEGORIES = utils + +DESCRIPTION = scripts to translate DNS information in BIND format to NSD format +define BLURB + This project builds scripts that translate DNS information in BIND format to NSD + format, and then copy that translation to an NSD server. The goal is to make it + simple to run redundant BIND and NSD servers and keep them in sync, using only + the BIND configuration files. +endef + +MASTER_SITES = http://bind2nsd.sourceforge.net/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +# UPSTREAM_MASTER_SITES = + +PACKAGES = CSWbind2nsd +REQUIRED_PKGS = CSWpython +CATALOGNAME = bind2nsd +SPKG_DESC = scripts to translate DNS information in BIND format to NSD format + +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = $(WORKSRC)/setup.py +TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/setup.py + +INSTALL_ARGS += --root=$(DESTDIR) +INSTALL_ARGS += --prefix=$(prefix) + +include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Fri Apr 17 14:29:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Fri, 17 Apr 2009 12:29:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4362] csw/mgar/pkg/libtasn1/trunk Message-ID: Revision: 4362 http://gar.svn.sourceforge.net/gar/?rev=4362&view=rev Author: dmichelsen Date: 2009-04-17 12:29:26 +0000 (Fri, 17 Apr 2009) Log Message: ----------- libtasn1: Update to 2.1 Modified Paths: -------------- csw/mgar/pkg/libtasn1/trunk/Makefile csw/mgar/pkg/libtasn1/trunk/checksums Modified: csw/mgar/pkg/libtasn1/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-17 10:47:28 UTC (rev 4361) +++ csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-17 12:29:26 UTC (rev 4362) @@ -1,5 +1,5 @@ GARNAME = libtasn1 -GARVERSION = 2.0 +GARVERSION = 2.1 CATEGORIES = lib DESCRIPTION = GNU ASN1 library Modified: csw/mgar/pkg/libtasn1/trunk/checksums =================================================================== --- csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-17 10:47:28 UTC (rev 4361) +++ csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-17 12:29:26 UTC (rev 4362) @@ -1 +1 @@ -e9b1462f04b2586b03905b0ed9528261 download/libtasn1-2.0.tar.gz +9c6869cca08b7392415c7939ffd2bbae download/libtasn1-2.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Fri Apr 17 18:23:47 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Fri, 17 Apr 2009 16:23:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4363] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4363 http://gar.svn.sourceforge.net/gar/?rev=4363&view=rev Author: bdwalton Date: 2009-04-17 16:23:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- Depend on openssh_client now that it's available. Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-17 12:29:26 UTC (rev 4362) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-17 16:23:47 UTC (rev 4363) @@ -28,7 +28,7 @@ PREREQUISITE_PKGS += CSWautoconf REQUIRED_PKGS_CSWgit = CSWzlib CSWperl CSWrsync CSWcurlrt CSWosslrt -REQUIRED_PKGS_CSWgit += CSWossh CSWiconv CSWexpat CSWbash CSWpmerror +REQUIRED_PKGS_CSWgit += CSWosshclient CSWiconv CSWexpat CSWbash CSWpmerror REQUIRED_PKGS_CSWgit += CSWpmtermreadkey REQUIRED_PKGS_CSWgitk = CSWgit CSWtk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 19:41:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 17:41:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4364] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4364 http://gar.svn.sourceforge.net/gar/?rev=4364&view=rev Author: valholla Date: 2009-04-17 17:41:05 +0000 (Fri, 17 Apr 2009) Log Message: ----------- checkin current Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 16:23:47 UTC (rev 4363) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 17:41:05 UTC (rev 4364) @@ -26,23 +26,22 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/bin $(PKGROOT)) - $(_DBG)(gmv -f $(PPREFIX)/bin/i386-pc* $(PPREFIX)/bin/i386/) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/include $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/info $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/man $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/share $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/lib $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/libexec $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/share $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/lib $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/libexec $(PKGROOT)) $(_DBG)$(MAKECOOKIE) merge-amd64-files: @echo "[===== Merging isa-amd64 =====]" $(_DBG)(cd $(AMD_BASE); \ for dir in `gfind . -name "*solaris2\.10*" -type d` ; do \ - /usr/bin/pax -rw $$dir $(PKGROOT); done ) - $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw $(MPREFIX)/lib/amd64 $(PKGROOT)) - $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw * $(PPREFIX)/bin/amd64) + /usr/bin/pax -rw -v $$dir $(PKGROOT); done ) + $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw -v $(MPREFIX)/lib/amd64 $(PKGROOT)) + $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/amd64) $(_DBG)$(MAKECOOKIE) ifeq ($(shell uname -p), i386) Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-17 16:23:47 UTC (rev 4363) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-17 17:41:05 UTC (rev 4364) @@ -73,7 +73,8 @@ REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core CSWgcc4corert REQUIRED_PKGS_CSWgcc4gfortran += CSWgcc4gfortranrt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWgcc4corert CSWjavart CSWzlib +REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4java += CSWgcc4javart CSWzlib REQUIRED_PKGS_CSWgcc4java += CSWgcc4g++ CSWgcc4g++rt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core CSWgcc4corert This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 20:04:22 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 18:04:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4365] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4365 http://gar.svn.sourceforge.net/gar/?rev=4365&view=rev Author: valholla Date: 2009-04-17 18:04:22 +0000 (Fri, 17 Apr 2009) Log Message: ----------- add os branded files to isaexec_files Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 17:41:05 UTC (rev 4364) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 18:04:22 UTC (rev 4365) @@ -87,4 +87,16 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref +ISAEXEC_FILES += i386-pc-solaris2.8-c++ +ISAEXEC_FILES += i386-pc-solaris2.8-g++ +ISAEXEC_FILES += i386-pc-solaris2.8-gcc +ISAEXEC_FILES += i386-pc-solaris2.8-gcc-4.3.3 +ISAEXEC_FILES += i386-pc-solaris2.8-gcj +ISAEXEC_FILES += i386-pc-solaris2.8-gfortran +ISAEXEC_FILES += i386-pc-solaris2.10-c++ +ISAEXEC_FILES += i386-pc-solaris2.10-g++ +ISAEXEC_FILES += i386-pc-solaris2.10-gcc +ISAEXEC_FILES += i386-pc-solaris2.10-gcc-4.3.3 +ISAEXEC_FILES += i386-pc-solaris2.10-gcj +ISAEXEC_FILES += i386-pc-solaris2.10-gfortran endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 20:15:26 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 18:15:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4366] csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Message-ID: Revision: 4366 http://gar.svn.sourceforge.net/gar/?rev=4366&view=rev Author: valholla Date: 2009-04-17 18:15:26 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove ~ backup files Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-17 18:04:22 UTC (rev 4365) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-17 18:15:26 UTC (rev 4366) @@ -30,6 +30,7 @@ post-merge-modulated: $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ $(PKGROOT)/opt/csw/gcc4/lib/ ) + $(_DBG)( gfind $(PKGROOT) -type f -name "*.*~" -exec grm -f {} \; ) $(_DBG)$(MAKECOOKIE) test-skip: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 20:44:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 18:44:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4367] csw/mgar/pkg/sudo/trunk/Makefile Message-ID: Revision: 4367 http://gar.svn.sourceforge.net/gar/?rev=4367&view=rev Author: valholla Date: 2009-04-17 18:44:37 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove incompatables Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 18:15:26 UTC (rev 4366) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 18:44:37 UTC (rev 4367) @@ -23,7 +23,6 @@ CATALOGNAME_CSWsudo = sudo SPKG_DESC_CSWsudo = $(DESCRIPTION) SPKG_SOURCEURL_CSWsudo = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudo = CSWsudo-ldap REQUIRED_PKGS_CSWsudo = CSWsudo-common CSWggettextrt CATALOGNAME_CSWsudo-common = sudo_common This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:00:35 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:00:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4368] csw/mgar/pkg/sudo_ldap/trunk/Makefile Message-ID: Revision: 4368 http://gar.svn.sourceforge.net/gar/?rev=4368&view=rev Author: valholla Date: 2009-04-17 19:00:34 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove incompatibles Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-17 18:44:37 UTC (rev 4367) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-17 19:00:34 UTC (rev 4368) @@ -25,7 +25,6 @@ CATALOGNAME_CSWsudoldap = sudo_ldap SPKG_DESC_CSWsudoldap = $(DESCRIPTION) SPKG_SOURCEURL_CSWsudoldap = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudoldap = CSWsudo REQUIRED_PKGS_CSWsudoldap = CSWsudo-common CSWggettextrt CSWoldaprt CONFIGURE_ARGS = $(DIRPATHS) @@ -40,9 +39,10 @@ include gar/category.mk -PKGFILES_CSWsudoldap = .*/bin/sudo.ldap +PKGFILES_CSWsudoldap = .*$(bindir)/sudo.ldap post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(PKGROOT)$(bindir) ; gmv sudo sudo.ldap ) + @( cd $(PKGROOT)$(bindir) ; grm sudoedit ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo.ldap ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:08:40 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:08:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4369] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4369 http://gar.svn.sourceforge.net/gar/?rev=4369&view=rev Author: valholla Date: 2009-04-17 19:08:40 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix postremove Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 19:00:34 UTC (rev 4368) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 19:08:40 UTC (rev 4369) @@ -45,10 +45,11 @@ include gar/category.mk -PKGFILES_CSWsudo = .*/bin/sudo.minimal +PKGFILES_CSWsudo = .*$(bindir)/sudo.minimal post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.minimal ) - @( cd $(PKGROOT)$(sysconfdir) ; mv sudoers sudoers.CSW ) + @( cd $(PKGROOT)$(bindir) ; gmv sudo sudo.minimal ) + @( cd $(PKGROOT)$(bindir) ; grm sudoedit ) + @( cd $(PKGROOT)$(sysconfdir) ; gmv sudoers sudoers.CSW ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Modified: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-17 19:00:34 UTC (rev 4368) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-17 19:08:40 UTC (rev 4369) @@ -2,10 +2,11 @@ BINDIR=$BASEDIR/opt/csw/bin +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit + if [ -f ${BINDIR}/sudo.ldap ]; then chmod 4755 ${BINDIR}/sudo.ldap - rm -f ${BINDIR}/sudo - rm -f ${BINDIR}/sudoedit ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:09:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:09:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4370] csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap. postremove Message-ID: Revision: 4370 http://gar.svn.sourceforge.net/gar/?rev=4370&view=rev Author: valholla Date: 2009-04-17 19:09:49 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix postremove Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Modified: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-17 19:08:40 UTC (rev 4369) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-17 19:09:49 UTC (rev 4370) @@ -2,9 +2,10 @@ BINDIR=$BASEDIR/opt/csw/bin +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit + if [ -f ${BINDIR}/sudo.minimal ]; then - rm -f ${BINDIR}/sudo - rm -f ${BINDIR}/sudoedit ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:19:09 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:19:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4371] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4371 http://gar.svn.sourceforge.net/gar/?rev=4371&view=rev Author: valholla Date: 2009-04-17 19:19:01 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove duplicate isaexec_file Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 19:09:49 UTC (rev 4370) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 19:19:01 UTC (rev 4371) @@ -79,7 +79,6 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:20:28 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:20:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4372] csw/mgar/pkg/sudo/trunk/checksums Message-ID: Revision: 4372 http://gar.svn.sourceforge.net/gar/?rev=4372&view=rev Author: valholla Date: 2009-04-17 19:20:28 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update checksum Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/checksums Modified: csw/mgar/pkg/sudo/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo/trunk/checksums 2009-04-17 19:19:01 UTC (rev 4371) +++ csw/mgar/pkg/sudo/trunk/checksums 2009-04-17 19:20:28 UTC (rev 4372) @@ -1,5 +1,5 @@ 955d99eda1432c7b7e00d98b91e35a79 download/CSWsudo-common.postinstall ca867ca77bda965a44bcd665bae7dc6c download/CSWsudo.postinstall -2324b0bb3e9cf71398aaab1751aa63c5 download/CSWsudo.postremove +880c6c8b92f9c3ef3b5014a0b29c0b02 download/CSWsudo.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:30:48 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:30:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4373] csw/mgar/pkg/sudo_ldap/trunk/checksums Message-ID: Revision: 4373 http://gar.svn.sourceforge.net/gar/?rev=4373&view=rev Author: valholla Date: 2009-04-17 19:30:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update checksums Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/checksums Modified: csw/mgar/pkg/sudo_ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-17 19:20:28 UTC (rev 4372) +++ csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-17 19:30:47 UTC (rev 4373) @@ -1,4 +1,4 @@ 05fb6b46e36528fb889aca7f53106708 download/CSWsudoldap.postinstall -f727decc2c3a7189614b657584b8e45f download/CSWsudoldap.postremove +4fcbbf0054c3d2e5f73f83a8730554f1 download/CSWsudoldap.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:09:34 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:09:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4374] csw/mgar/pkg/php5_apc/trunk Message-ID: Revision: 4374 http://gar.svn.sourceforge.net/gar/?rev=4374&view=rev Author: valholla Date: 2009-04-17 20:09:29 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/php5_apc/trunk/Makefile csw/mgar/pkg/php5_apc/trunk/checksums Modified: csw/mgar/pkg/php5_apc/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5_apc/trunk/Makefile 2009-04-17 19:30:47 UTC (rev 4373) +++ csw/mgar/pkg/php5_apc/trunk/Makefile 2009-04-17 20:09:29 UTC (rev 4374) @@ -20,9 +20,9 @@ PATCHFILES = apc_pool.diff PACKAGES = CSWphp5apc -MASTER_SITES = http://us.php.net/apc -SPKG_SOURCEURL = http://pecl.php.net/package/apc -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tgz +SPKG_SOURCEURL = http://us.php.net/apc/ +MASTER_SITES = http://pecl.php.net/package/apc/ +UFILES_REGEX = (\d+(?:\.\d+)*).tgz DISTFILES = $(DISTNAME).tgz Modified: csw/mgar/pkg/php5_apc/trunk/checksums =================================================================== --- csw/mgar/pkg/php5_apc/trunk/checksums 2009-04-17 19:30:47 UTC (rev 4373) +++ csw/mgar/pkg/php5_apc/trunk/checksums 2009-04-17 20:09:29 UTC (rev 4374) @@ -1,2 +1,2 @@ -951f43d2873e3572f5d5ae71a9b66f90 download/APC-3.0.19.tgz +36ad5ca094eed387be1d98341d06d4fd download/APC-3.0.19.tgz 945e5502e45a48f47ed2521d3142afdd download/apc_pool.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:20:49 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:20:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4375] csw/mgar/pkg/mysql-python/trunk Message-ID: Revision: 4375 http://gar.svn.sourceforge.net/gar/?rev=4375&view=rev Author: valholla Date: 2009-04-17 20:20:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/mysql-python/trunk/Makefile csw/mgar/pkg/mysql-python/trunk/checksums Modified: csw/mgar/pkg/mysql-python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-17 20:09:29 UTC (rev 4374) +++ csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-17 20:20:47 UTC (rev 4375) @@ -7,7 +7,8 @@ MySQL support for Python endef -MASTER_SITES = $(SF_MIRROR)/$(call TOLOWER,$(GARNAME))/ +SF_PROJ = $(call TOLOWER,$(GARNAME)) +MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpymysql @@ -15,9 +16,8 @@ CATALOGNAME_CSWpymysql = pymysql SPKG_DESC = MySQL Support for Python -# We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=22307 -UPSTREAM_USE_SF = 1 +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) CONFIGURE_SCRIPTS = @@ -33,9 +33,7 @@ mysql_prefix = $(prefix)/mysql5 mysql_bindir = $(mysql_prefix)/bin -NOISALIST = 1 -LD_OPTIONS := -R/opt/csw/mysql5/lib/mysql/\$$ISALIST:/opt/csw/lib/\$$ISALIST +EXTRA_LD_OPTIONS = -R/opt/csw/mysql5/lib/mysql/\$$ISALIST PATH := $(mysql_bindir):$(PATH) -LDFLAGS = -export LD_OPTIONS PATH LDFLAGS +export PATH Modified: csw/mgar/pkg/mysql-python/trunk/checksums =================================================================== --- csw/mgar/pkg/mysql-python/trunk/checksums 2009-04-17 20:09:29 UTC (rev 4374) +++ csw/mgar/pkg/mysql-python/trunk/checksums 2009-04-17 20:20:47 UTC (rev 4375) @@ -1,3 +1 @@ 532268f02870bea18c1d465e88afff30 download/MySQL-python-1.2.2.tar.gz -ca37b1ff16fa2ede6e19383e7b59245a download/setuptools-0.6c9-py2.6.egg -fba3b56e42a61b562ea4b9a5eb37a1d3 download/setup.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:29:18 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:29:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4376] csw/mgar/pkg Message-ID: Revision: 4376 http://gar.svn.sourceforge.net/gar/?rev=4376&view=rev Author: valholla Date: 2009-04-17 20:29:18 +0000 (Fri, 17 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/python3/ csw/mgar/pkg/python3/Makefile csw/mgar/pkg/python3/branches/ csw/mgar/pkg/python3/tags/ csw/mgar/pkg/python3/trunk/ csw/mgar/pkg/python3/trunk/Makefile csw/mgar/pkg/python3/trunk/checksums csw/mgar/pkg/python3/trunk/files/ Added: csw/mgar/pkg/python3/Makefile =================================================================== --- csw/mgar/pkg/python3/Makefile (rev 0) +++ csw/mgar/pkg/python3/Makefile 2009-04-17 20:29:18 UTC (rev 4376) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/python3/trunk/Makefile =================================================================== --- csw/mgar/pkg/python3/trunk/Makefile (rev 0) +++ csw/mgar/pkg/python3/trunk/Makefile 2009-04-17 20:29:18 UTC (rev 4376) @@ -0,0 +1,56 @@ +GARNAME = Python +GARVERSION = 3.0 +CATEGORIES = lang +PACKAGES = CSWpython3 CSWpython3-tk CSWidle3 + +DESCRIPTION = A high-level scripting language. +define BLURB + Python is an interpreted, interactive, object-oriented programming language. + It combines remarkable power with very clear syntax, and isnt difficult to + learn. It has modules, classes, exceptions, very high level data types, and + dynamic typing. There are interfaces to many system calls and libraries, as + well as to various windowing systems (Tk, Mac, MFC, GTK+, Qt, wxWindows). + Newbuilt-in modules are easily written in C or C++. Python is also usable as + an extension language for applications that need a programmable interface. +endef + +SPKG_SOURCEURL = http://www.python.org/ +MASTER_SITES = http://www.python.org/ftp/python/$(GARVERSION)/ + +DISTFILES = $(DISTNAME).tar.bz2 + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +# Patches +PATCHFILES += + +# Test for sunaudiodev fails. +SKIPTEST = 1 + +CONFIGURE_ARGS = $(DIRPATHS) + +PKGFILES_CSWidle = $(libdir)/python(\d+(?:\.\d+)*)/idlelib/.* +PKGFILES_CSWidle += $(bindir)/idle +PKGFILES_CSWpython-tk = $(libdir)/python(\d+(?:\.\d+)*)/lib-tk/.* +PKGFILES_CSWpython-tk += $(libdir)/python(\d+(?:\.\d+)*)/lib-dynload/_tkinter.so.* + +REQUIRED_PKGS_CSWpython = CSWbdb44 CSWbzip2 CSWgdbm CSWggettextrt +REQUIRED_PKGS_CSWpython += CSWncurses CSWosslrt CSWreadline CSWzlib +REQUIRED_PKGS_CSWpython += CSWsqlite3 CSWtcl CSWtk +REQUIRED_PKGS_CSWpython-tk = CSWpython CSWtcl CSWtk +REQUIRED_PKGS_CSWidle = CSWpython CSWpython-tk + +CATALOGNAME_CSWpython = python +CATALOGNAME_CSWpython-tk = python_tk +CATALOGNAME_CSWidle = idle + +SPKG_DESC_CSWpython = A high-level scripting language. +SPKG_DESC_CSWpython-tk = Python Tk Interface (TkInter) +SPKG_DESC_CSWidle = Python IDE + +include gar/category.mk + + + Added: csw/mgar/pkg/python3/trunk/checksums =================================================================== --- csw/mgar/pkg/python3/trunk/checksums (rev 0) +++ csw/mgar/pkg/python3/trunk/checksums 2009-04-17 20:29:18 UTC (rev 4376) @@ -0,0 +1 @@ +d31a19f8ef795bec0ea1f69a19410f63 download/Python-3.0.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:30:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:30:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4377] csw/mgar/pkg/python3/trunk/ Message-ID: Revision: 4377 http://gar.svn.sourceforge.net/gar/?rev=4377&view=rev Author: valholla Date: 2009-04-17 20:30:05 +0000 (Fri, 17 Apr 2009) Log Message: ----------- external propset Property Changed: ---------------- csw/mgar/pkg/python3/trunk/ Property changes on: csw/mgar/pkg/python3/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:37:55 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:37:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4378] csw/mgar/pkg/silvercity/trunk/Makefile Message-ID: Revision: 4378 http://gar.svn.sourceforge.net/gar/?rev=4378&view=rev Author: valholla Date: 2009-04-17 20:37:55 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/silvercity/trunk/Makefile Modified: csw/mgar/pkg/silvercity/trunk/Makefile =================================================================== --- csw/mgar/pkg/silvercity/trunk/Makefile 2009-04-17 20:30:05 UTC (rev 4377) +++ csw/mgar/pkg/silvercity/trunk/Makefile 2009-04-17 20:37:55 UTC (rev 4378) @@ -8,7 +8,8 @@ analysis for over 20 programming and markup langauges. endef -MASTER_SITES = $(SF_MIRROR)/silvercity/ +SF_PROJ = $(call TOLOWER,$(GARNAME)) +MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWsilvercity @@ -16,11 +17,11 @@ CATALOGNAME_CSWsilvercity = silvercity SPKG_DESC_CSWsilvercity = Lexical analysis package for Python -# We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=45693 -UPSTREAM_USE_SF = 1 +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +NOISALIST = 1 CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:40:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:40:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4379] csw/mgar/pkg/alpine/trunk/Makefile Message-ID: Revision: 4379 http://gar.svn.sourceforge.net/gar/?rev=4379&view=rev Author: valholla Date: 2009-04-17 20:40:56 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/alpine/trunk/Makefile Modified: csw/mgar/pkg/alpine/trunk/Makefile =================================================================== --- csw/mgar/pkg/alpine/trunk/Makefile 2009-04-17 20:37:55 UTC (rev 4378) +++ csw/mgar/pkg/alpine/trunk/Makefile 2009-04-17 20:40:56 UTC (rev 4379) @@ -12,13 +12,13 @@ is highly customizable through the use of the Alpine Setup command. endef -MASTER_SITES = http://www.washington.edu/alpine/ -UPSTREAM_MASTER_SITES = ftp://ftp.cac.washington.edu/alpine/ +MASTER_SITES = ftp://ftp.cac.washington.edu/alpine/ +SPKG_SOURCEURL = http://www.washington.edu/alpine/ DISTFILES = $(GARNAME).tar.bz2 PACKAGES = CSWalpine -CATALOGNAME_CSWgd = alpine -SPKG_DESC_CSWgd = $(DESCRIPTION) +CATALOGNAME_CSWalpine = alpine +SPKG_DESC_CSWalpine = $(DESCRIPTION) # We define upstream file regex so we can be notifed of new # upstream software release @@ -29,26 +29,28 @@ ## GCC4 thows the following errors: ## warning: pointer targets in passing argument 2 of 'compare_cstring' ## differ in signedness -GARCOMPILER = GCC3 +GARCOMPILER = GCC4 # Patch for solaris explained in the following thread # http://mailman2.u.washington.edu/pipermail/alpine-info/2007-December/000047.html PATCHFILES = pubcookie.diff +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-quotas CONFIGURE_ARGS += --enable-from-encoding -CONFIGURE_ARGS += --with-libiconv-prefix=$(prefix) -CONFIGURE_ARGS += --with-libintl-prefix=$(prefix) +CONFIGURE_ARGS += --with-libiconv-prefix=/opt/csw +CONFIGURE_ARGS += --with-libintl-prefix=/opt/csw +CONFIGURE_ARGS += --with-system-pinerc=$(prefix)/etc/pine.conf +CONFIGURE_ARGS += --with-system-fixed-pinercc=$(prefix)/etc/pine.conf.fixed +CONFIGURE_ARGS += --with-ssl-dir=/opt/csw +CONFIGURE_ARGS += --with-krb5-dir=/opt/csw +CONFIGURE_ARGS += --with-ldap-dir=/opt/csw +CONFIGURE_ARGS += --with-tcl-lib=/opt/csw/lib/tcl8.4 +CONFIGURE_ARGS += --with-c-client-target=gso CONFIGURE_ARGS += --with-pubcookie -CONFIGURE_ARGS += --with-system-pinerc=$(libdir)/pine.conf -CONFIGURE_ARGS += --with-system-fixed-pinercc=$(libdir)/pine.conf.fixed -CONFIGURE_ARGS += --with-ssl-dir=$(prefix) -CONFIGURE_ARGS += --with-krb5-dir=$(prefix) -CONFIGURE_ARGS += --with-ldap-dir=$(prefix) -CONFIGURE_ARGS += --with-tcl-lib=$(libdir)/tcl8.4 -CONFIGURE_ARGS += --with-c-client-target=gso CONFIGURE_ARGS += --with-web-bin=$(libexecdir)/alpine/bin +CONFIGURE_ARGS += --with-spellcheck-prog=$(bindir)/aspell ## Libs that are not get set correctly in Makefiles LIBS += -lm -lgssapi_krb5 -lkrb5 -lintl -liconv @@ -56,4 +58,9 @@ TEST_TARGET = check +REQUIRED_PKGS = CSWgcc3corert CSWggettextrt CSWiconv +REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWaspell +REQUIRED_PKGS += CSWoldaprt CSWosslrt CSWsasl CSWtcl + +include files/install_scripts.mk include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:49:54 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:49:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4380] csw/mgar/pkg/chrpath/trunk/Makefile Message-ID: Revision: 4380 http://gar.svn.sourceforge.net/gar/?rev=4380&view=rev Author: valholla Date: 2009-04-17 20:49:54 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/chrpath/trunk/Makefile Modified: csw/mgar/pkg/chrpath/trunk/Makefile =================================================================== --- csw/mgar/pkg/chrpath/trunk/Makefile 2009-04-17 20:40:56 UTC (rev 4379) +++ csw/mgar/pkg/chrpath/trunk/Makefile 2009-04-17 20:49:54 UTC (rev 4380) @@ -6,7 +6,8 @@ define BLURB endef -MASTER_SITES = http://directory.fsf.org/project/chrpath/ +SPKG_SOURCEURL = http://directory.fsf.org/project/chrpath/ +MASTER_SITES = http://ftp.tux.org/pub/X-Windows/ftp.hungry.com/chrpath/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWchrpath @@ -19,7 +20,7 @@ # We define upstream file regex so we can be notifed of # new upstream software release -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +UFILES_REGEX = (\d+(?:\.\d+)*).tar.gz BUILD64 = 1 NOISALIST = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:51:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:51:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4381] csw/mgar/pkg/clearsilver/trunk Message-ID: Revision: 4381 http://gar.svn.sourceforge.net/gar/?rev=4381&view=rev Author: valholla Date: 2009-04-17 20:51:31 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/clearsilver/trunk/Makefile csw/mgar/pkg/clearsilver/trunk/checksums Modified: csw/mgar/pkg/clearsilver/trunk/Makefile =================================================================== --- csw/mgar/pkg/clearsilver/trunk/Makefile 2009-04-17 20:49:54 UTC (rev 4380) +++ csw/mgar/pkg/clearsilver/trunk/Makefile 2009-04-17 20:51:31 UTC (rev 4381) @@ -21,7 +21,7 @@ CATALOGNAME_CSWcs = clearsilver CATALOGNAME_CSWpmcs = pm_clearsilver -CATALOGNAME_CSWpycs = py_clearsilver +CATALOGNAME_CSWpycs = pyclearsilver SPKG_DESC_CSWcs = Language-neutral HTML template system SPKG_DESC_CSWpmcs = Clearsilver Perl language binding @@ -29,12 +29,13 @@ PKGFILES_CSWpmcs = $(libdir)/perl/.* PKGFILES_CSWpmcs += $(mandir)/.*perl.* -PKGFILES_CSWpycs = $(libdir)/python*/.* +PKGFILES_CSWpycs = $(libdir)/python.*/.* PKGFILES_CSWpycs += $(mandir)/.*python.* -GARCOMPILER = GNU +#GARCOMPILER = GNU -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*) PATCHFILES += perlbuild.diff Modified: csw/mgar/pkg/clearsilver/trunk/checksums =================================================================== --- csw/mgar/pkg/clearsilver/trunk/checksums 2009-04-17 20:49:54 UTC (rev 4380) +++ csw/mgar/pkg/clearsilver/trunk/checksums 2009-04-17 20:51:31 UTC (rev 4381) @@ -1,4 +1,2 @@ b8c0c7fbe0ef5e06e0c935f134304d44 download/clearsilver-0.10.5.tar.gz 1c25fda8bb2666658d8ddcf3ad9b7235 download/perlbuild.diff -f951221b633994f85c45fe78008d8965 download/pybuild.diff -64cd57ea3f54da10c45046578b767d12 download/rules.mk.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Fri Apr 17 22:58:03 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:58:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4382] csw/mgar/pkg/amavisd-new/trunk Message-ID: Revision: 4382 http://gar.svn.sourceforge.net/gar/?rev=4382&view=rev Author: idogan23 Date: 2009-04-17 20:58:03 +0000 (Fri, 17 Apr 2009) Log Message: ----------- amavisd_new: fixed typo in config file patch Modified Paths: -------------- csw/mgar/pkg/amavisd-new/trunk/checksums csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff Modified: csw/mgar/pkg/amavisd-new/trunk/checksums =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-17 20:51:31 UTC (rev 4381) +++ csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-17 20:58:03 UTC (rev 4382) @@ -7,6 +7,6 @@ b9cafe6715bc2703ac9411f24f248cd3 download/amavisd-agent.diff 3e81998c8b933129870e3cab68d40261 download/amavisd-nanny.diff f218d10e5280940268a3ffaa125a00ae download/amavisd-release.diff -721d0037d0dfcdbe254a76becad8ad25 download/amavisd.conf.diff +9c3d4118cf3837e559a6026d6b89b377 download/amavisd.conf.diff 071af9fb79ee5e9d045905043fea2b96 download/amavisd.diff befafc9594d5e1c1c8710b7d4d129d0b download/p0f-analyzer.pl.diff Modified: csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff 2009-04-17 20:51:31 UTC (rev 4381) +++ csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff 2009-04-17 20:58:03 UTC (rev 4382) @@ -1,6 +1,6 @@ -diff --speed-large-files --minimal -Nru amavisd-new-2.6.0.orig/amavisd.conf amavisd-new-2.6.0/amavisd.conf ---- amavisd-new-2.6.0.orig/amavisd.conf 2008-04-23 20:49:58.000000000 +0200 -+++ amavisd-new-2.6.0/amavisd.conf 2008-11-09 22:45:24.947430600 +0100 +diff --speed-large-files --minimal -Nru amavisd-new-2.6.2.orig/amavisd.conf amavisd-new-2.6.2/amavisd.conf +--- amavisd-new-2.6.2.orig/amavisd.conf 2008-12-15 01:50:03.000000000 +0100 ++++ amavisd-new-2.6.2/amavisd.conf 2009-04-17 22:51:46.060535660 +0200 @@ -15,12 +15,12 @@ # $bypass_decode_parts = 1; # controls running of decoders&dearchivers @@ -22,7 +22,7 @@ # when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+ -$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; -+$path = '/opt/csw/bin:/opt/csw/sbin:/usr/sfw/bin:/usr/sfw/sbin::/sbin:/usr/bin:/bin'; ++$path = '/opt/csw/bin:/opt/csw/sbin:/usr/sfw/bin:/usr/sfw/sbin:/sbin:/usr/bin:/bin'; # $dspam = 'dspam'; $MAXLEVELS = 14; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:00:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:00:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4383] csw/mgar/pkg/cmake/trunk Message-ID: Revision: 4383 http://gar.svn.sourceforge.net/gar/?rev=4383&view=rev Author: valholla Date: 2009-04-17 21:00:21 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/cmake/trunk/Makefile csw/mgar/pkg/cmake/trunk/checksums Modified: csw/mgar/pkg/cmake/trunk/Makefile =================================================================== --- csw/mgar/pkg/cmake/trunk/Makefile 2009-04-17 20:58:03 UTC (rev 4382) +++ csw/mgar/pkg/cmake/trunk/Makefile 2009-04-17 21:00:21 UTC (rev 4383) @@ -12,8 +12,9 @@ generation, code generation, and template instantiation. endef -UPSTREAM_MASTER_SITES = http://www.cmake.org/files/ -MASTER_SITES = http://www.cmake.org/files/v2.6/ +RELVER = $(shell echo $(GARVERSION) |gsed 's/\(^[0-9].*\)\.[0-9]*/\1/') +SPKG_SOURCEURL = http://www.cmake.org/ +MASTER_SITES = http://www.cmake.org/files/v$(RELVER)/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWcmake Modified: csw/mgar/pkg/cmake/trunk/checksums =================================================================== --- csw/mgar/pkg/cmake/trunk/checksums 2009-04-17 20:58:03 UTC (rev 4382) +++ csw/mgar/pkg/cmake/trunk/checksums 2009-04-17 21:00:21 UTC (rev 4383) @@ -1,2 +1 @@ 5ba47a94ce276f326abca1fd72a7e7c6 download/cmake-2.6.3.tar.gz -871d267960a850d05e99246f5c438e62 download/CSWcmake.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:06:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:06:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4384] csw/mgar/pkg/gnupg2/trunk/Makefile Message-ID: Revision: 4384 http://gar.svn.sourceforge.net/gar/?rev=4384&view=rev Author: valholla Date: 2009-04-17 21:06:23 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/gnupg2/trunk/Makefile Modified: csw/mgar/pkg/gnupg2/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-17 21:00:21 UTC (rev 4383) +++ csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-17 21:06:23 UTC (rev 4384) @@ -25,7 +25,7 @@ # new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) -RUNPATHQUOTE = 1 +NOISALIST = 1 BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:09:25 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:09:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4385] csw/mgar/pkg/mod_python/trunk Message-ID: Revision: 4385 http://gar.svn.sourceforge.net/gar/?rev=4385&view=rev Author: valholla Date: 2009-04-17 21:09:25 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/mod_python/trunk/Makefile csw/mgar/pkg/mod_python/trunk/checksums Modified: csw/mgar/pkg/mod_python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-17 21:06:23 UTC (rev 4384) +++ csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-17 21:09:25 UTC (rev 4385) @@ -18,15 +18,13 @@ REQUIRED_PKGS_CSWap2modpython = CSWap2prefork CSWpython CATALOGNAME_CSWap2modpython = ap2_modpython SPKG_DESC_CSWap2modpython = an Apache/Python integration module +DISTFILES += fixme.sh PATCHFILES += connobject.diff # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) -LD_OPTIONS = -LDFLAGS = -L/opt/csw/lib -NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-apxs=$(prefix)/apache2/sbin/apxs CONFIGURE_ARGS += --with-python=$(bindir)/python @@ -36,8 +34,8 @@ include gar/category.mk DESTDOC = $(DESTDIR)$(docdir)/ap2_modpython -DISTFILES += fixme.sh + post-configure-modulated: @echo " ==> Fixing libtool files" @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) Modified: csw/mgar/pkg/mod_python/trunk/checksums =================================================================== --- csw/mgar/pkg/mod_python/trunk/checksums 2009-04-17 21:06:23 UTC (rev 4384) +++ csw/mgar/pkg/mod_python/trunk/checksums 2009-04-17 21:09:25 UTC (rev 4385) @@ -2,4 +2,5 @@ 6fda2f740f138af54536b87fb598426b download/postinstall 6892dd209d16d2c565581e9de272cf3e download/preremove 0dd379f20ceb32fc77bb3a9bf045097f download/space +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh 44e80c5a863ba40809ad889f9c5d0307 download/connobject.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:15:28 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:15:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4386] csw/mgar/pkg/mod_wsgi/trunk Message-ID: Revision: 4386 http://gar.svn.sourceforge.net/gar/?rev=4386&view=rev Author: valholla Date: 2009-04-17 21:15:28 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/mod_wsgi/trunk/Makefile csw/mgar/pkg/mod_wsgi/trunk/checksums Modified: csw/mgar/pkg/mod_wsgi/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_wsgi/trunk/Makefile 2009-04-17 21:09:25 UTC (rev 4385) +++ csw/mgar/pkg/mod_wsgi/trunk/Makefile 2009-04-17 21:15:28 UTC (rev 4386) @@ -1,5 +1,5 @@ GARNAME = mod_wsgi -GARVERSION = 2.3 +GARVERSION = 2.4 CATEGORIES = lib DESCRIPTION = an Apache/Python WSGI adapter module @@ -7,7 +7,7 @@ Mod_wsgi is a python WSGI adapter module for Apache. endef -MASTER_SITES = http://code.google.com/p/modwsgi +MASTER_SITES = http://modwsgi.googlecode.com/files/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += postinstall preremove space Modified: csw/mgar/pkg/mod_wsgi/trunk/checksums =================================================================== --- csw/mgar/pkg/mod_wsgi/trunk/checksums 2009-04-17 21:09:25 UTC (rev 4385) +++ csw/mgar/pkg/mod_wsgi/trunk/checksums 2009-04-17 21:15:28 UTC (rev 4386) @@ -1,4 +1,4 @@ -c686e1c498dbe5753fe491c3cf61cff4 download/mod_wsgi-2.3.tar.gz +a2b964cc51d6ff86c38c74db5748eab5 download/mod_wsgi-2.4.tar.gz a2e8679f45232e56efbc352597ffe456 download/postinstall a67766841dedbaba0d7b15e7f08c8658 download/preremove 0dd379f20ceb32fc77bb3a9bf045097f download/space This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:26:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:26:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4387] csw/mgar/pkg/pysqlite/trunk/Makefile Message-ID: Revision: 4387 http://gar.svn.sourceforge.net/gar/?rev=4387&view=rev Author: valholla Date: 2009-04-17 21:26:34 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/pysqlite/trunk/Makefile Modified: csw/mgar/pkg/pysqlite/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-17 21:15:28 UTC (rev 4386) +++ csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-17 21:26:34 UTC (rev 4387) @@ -10,7 +10,8 @@ SQLite support for Python endef -MASTER_SITES = $(SF_MIRROR)/$(call TOLOWER,$(GARNAME))/ +MASTER_SITES = $(SF_MIRRORS) + WORKSRC = $(WORKDIR)/$(GARNAME) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz @@ -19,9 +20,8 @@ SPKG_DESC_CSWpysqlite = SQLite 1.x support for Python REQUIRED_PKGS_CSWpysqlite = CSWpython CSWsqlite3rt -# We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=54058 -UPSTREAM_USE_SF = 1 +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) EXTRA_CPPFLAGS = -I/opt/csw/include This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:28:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:28:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4388] csw/mgar/pkg/pysetuptools/trunk Message-ID: Revision: 4388 http://gar.svn.sourceforge.net/gar/?rev=4388&view=rev Author: valholla Date: 2009-04-17 21:28:24 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update to 0.6c9 Modified Paths: -------------- csw/mgar/pkg/pysetuptools/trunk/Makefile csw/mgar/pkg/pysetuptools/trunk/checksums Modified: csw/mgar/pkg/pysetuptools/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-17 21:26:34 UTC (rev 4387) +++ csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-17 21:28:24 UTC (rev 4388) @@ -1,5 +1,5 @@ GARNAME = setuptools -GARVERSION = 0.6c7 +GARVERSION = 0.6c9 CATEGORIES = lang SPKG_SOURCEURL = http://peak.telecommunity.com/DevCenter/setuptools Modified: csw/mgar/pkg/pysetuptools/trunk/checksums =================================================================== --- csw/mgar/pkg/pysetuptools/trunk/checksums 2009-04-17 21:26:34 UTC (rev 4387) +++ csw/mgar/pkg/pysetuptools/trunk/checksums 2009-04-17 21:28:24 UTC (rev 4388) @@ -1 +1 @@ -dedbf6a4f71cd6deaf13ee885054f16b download/setuptools-0.6c7.tar.gz +3864c01d9c719c8924c455714492295e download/setuptools-0.6c9.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:30:25 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:30:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4389] csw/mgar/pkg/php5_xdebug/trunk/Makefile Message-ID: Revision: 4389 http://gar.svn.sourceforge.net/gar/?rev=4389&view=rev Author: valholla Date: 2009-04-17 21:30:23 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/php5_xdebug/trunk/Makefile Modified: csw/mgar/pkg/php5_xdebug/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5_xdebug/trunk/Makefile 2009-04-17 21:28:24 UTC (rev 4388) +++ csw/mgar/pkg/php5_xdebug/trunk/Makefile 2009-04-17 21:30:23 UTC (rev 4389) @@ -26,8 +26,7 @@ PACKAGES = CSWphp5xdebug -MASTER_SITES = http://www.xdebug.org/ -SPKG_SOURCEURL = http://www.xdebug.org/files/ +MASTER_SITES = http://www.xdebug.org/files/ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tgz DISTFILES = $(DISTNAME).tgz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:33:26 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:33:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4390] csw/mgar/pkg Message-ID: Revision: 4390 http://gar.svn.sourceforge.net/gar/?rev=4390&view=rev Author: valholla Date: 2009-04-17 21:33:24 +0000 (Fri, 17 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/ss5/ csw/mgar/pkg/ss5/Makefile csw/mgar/pkg/ss5/branch/ csw/mgar/pkg/ss5/tags/ csw/mgar/pkg/ss5/trunk/ csw/mgar/pkg/ss5/trunk/Makefile csw/mgar/pkg/ss5/trunk/checksums csw/mgar/pkg/ss5/trunk/files/ csw/mgar/pkg/ss5/trunk/files/ss5.init Added: csw/mgar/pkg/ss5/Makefile =================================================================== --- csw/mgar/pkg/ss5/Makefile (rev 0) +++ csw/mgar/pkg/ss5/Makefile 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/ss5/trunk/Makefile =================================================================== --- csw/mgar/pkg/ss5/trunk/Makefile (rev 0) +++ csw/mgar/pkg/ss5/trunk/Makefile 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1,59 @@ +GARNAME = ss5 +GARVERSION = 3.6.7-1 +CATEGORIES = lib + +DESCRIPTION = A SOCKS server that implements SOCKS v4 and v5 protocol +define BLURB + SS5 is a socks server that implements the SOCKS v4 and v5 protocol. + As a proxy server, SS5 authenticates, profiles and processes network + requests for clients. It establishes connections to application + hosts for client applications. When the client attempts to access + the network, the client connects to the SS5 daemon instead of the + application host. +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +DISTNAME = $(GARNAME)-$(shell gecho $(GARVERSION) |gsed -e 's/-[0-9]//') + +PACKAGES = CSWss5 +CATALOGNAME_CSWss5 = ss5 +SPKG_DESC_CSWss5 = $(DESCRIPTION) + +#REQUIRED_PKGS_CSWss5 = + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*(-\d)*).tar.bz2 + +GARCOMPILER = GNU +TEST_SCRIPTS = skip + +test-skip: + @$(DONADA) + +#BUILD64 = 1 +#NO_ISAEXEC = 1 + +prefix = $(DESTDIR) + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --with-configfile=/opt/csw/etc/ss5/ss5.conf +CONFIGURE_ARGS += --with-passwordfile=/opt/csw/etc/ss5/ss5.passwd +CONFIGURE_ARGS += --with-logfile=/opt/csw/var/log/ss5/ss5.log +CONFIGURE_ARGS += --with-profilepath=/opt/csw/etc/ss5 +CONFIGURE_ARGS += --with-libpath=/opt/csw/lib +CONFIGURE_ARGS += --with-tracepath=/opt/csw/var/log/ss5 + +CONFIGURE_ARGS += --with-confpathbase=/opt/csw/etc +CONFIGURE_ARGS += --with-binpathbase=/opt/csw/sbin +CONFIGURE_ARGS += --with-docpathbase=/opt/csw/share/doc +CONFIGURE_ARGS += --with-manpathbase=/opt/csw/man +CONFIGURE_ARGS += --with-logpathbase=/opt/csw/var/log/ss5 +CONFIGURE_ARGS += --with-tracepathbase=/opt/csw/var/log/ss5 + +post-install-modulated: + @(gcp downlad/ss5.init $(DESTDIR)/etc/init.d/ss5 + +include gar/category.mk Added: csw/mgar/pkg/ss5/trunk/checksums =================================================================== --- csw/mgar/pkg/ss5/trunk/checksums (rev 0) +++ csw/mgar/pkg/ss5/trunk/checksums 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1 @@ +34c8188c28b25a393e51f6938e4b7806 download/ss5-3.6.7-1.tar.gz Added: csw/mgar/pkg/ss5/trunk/files/ss5.init =================================================================== --- csw/mgar/pkg/ss5/trunk/files/ss5.init (rev 0) +++ csw/mgar/pkg/ss5/trunk/files/ss5.init 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1,27 @@ +#!/bin/sh + +case "$1" in + start) + # Start daemon + echo -n "Starting ss5... " + /opt/csw/sbin/ss5 -t + ;; + stop) + # Stop daemon + /usr/sbin/killall ss5 + ;; + reload) + # Reload configuration + /usr/bin/pkill -HUP ss5 + ;; + restart) + # restart daemon + $0 stop + $0 start + ;; + *) + echo "Usage: ss5 {start|stop|restart|reload}" + exit 1 + ;; +esac +exit 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:34:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:34:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4391] csw/mgar/pkg/ss5/trunk/ Message-ID: Revision: 4391 http://gar.svn.sourceforge.net/gar/?rev=4391&view=rev Author: valholla Date: 2009-04-17 21:34:04 +0000 (Fri, 17 Apr 2009) Log Message: ----------- external propset Property Changed: ---------------- csw/mgar/pkg/ss5/trunk/ Property changes on: csw/mgar/pkg/ss5/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:35:47 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:35:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4392] csw/mgar/pkg/pydocutils/trunk/Makefile Message-ID: Revision: 4392 http://gar.svn.sourceforge.net/gar/?rev=4392&view=rev Author: valholla Date: 2009-04-17 21:35:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/pydocutils/trunk/Makefile Modified: csw/mgar/pkg/pydocutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/pydocutils/trunk/Makefile 2009-04-17 21:34:04 UTC (rev 4391) +++ csw/mgar/pkg/pydocutils/trunk/Makefile 2009-04-17 21:35:47 UTC (rev 4392) @@ -7,7 +7,7 @@ Documentation Utilities for Python endef -MASTER_SITES = $(SF_MIRROR)/$(GARNAME)/ +MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpydocutils @@ -15,7 +15,8 @@ CATALOGNAME_CSWpydocutils = pydocutils SPKG_DESC = Documentation Utiltiies for Python -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz CONFIGURE_SCRIPTS = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:41:24 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:41:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4393] csw/mgar/pkg/libffi/trunk Message-ID: Revision: 4393 http://gar.svn.sourceforge.net/gar/?rev=4393&view=rev Author: valholla Date: 2009-04-17 21:41:24 +0000 (Fri, 17 Apr 2009) Log Message: ----------- checkin Added Paths: ----------- csw/mgar/pkg/libffi/trunk/checksums csw/mgar/pkg/libffi/trunk/files/ Added: csw/mgar/pkg/libffi/trunk/checksums =================================================================== --- csw/mgar/pkg/libffi/trunk/checksums (rev 0) +++ csw/mgar/pkg/libffi/trunk/checksums 2009-04-17 21:41:24 UTC (rev 4393) @@ -0,0 +1 @@ +188a4f79fdac2310044b44b7d3918ef9 download/libffi-3.0.8.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 05:23:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 03:23:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4394] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4394 http://gar.svn.sourceforge.net/gar/?rev=4394&view=rev Author: valholla Date: 2009-04-18 03:23:56 +0000 (Sat, 18 Apr 2009) Log Message: ----------- remove static libraries Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -102,6 +102,7 @@ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc @(grm -fr $(DESTDIR)/.[a-z]*) + @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -13,7 +13,6 @@ PKGFILES_CSWphp5dba = .*/lib/php/extensions/.*/dba\.so -PKGFILES_CSWphp5dba += .*/lib/php/extensions/.*/dba\.a define CSWphp5dba_postinstall #!/bin/sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -9,7 +9,6 @@ CONFIGURE_ARGS += --with-mysql=shared,$(prefix) PKGFILES_CSWphp5mysql = .*/lib/php/extensions/.*/mysql\.so -PKGFILES_CSWphp5mysql += .*/lib/php/extensions/.*/mysql\.a define CSWphp5mysql_postinstall #!/bin/sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -7,7 +7,6 @@ REQUIRED_PKGS_CSWphp5pdo = CSWphp5 PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* -PKGFILES_CSWphp5pdo += .*/lib/php/extensions/.*/pdo\.a* define CSWphp5pdo_postinstall #!/bin/sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 11:59:22 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 09:59:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4395] csw/mgar/pkg/bind2nsd/trunk Message-ID: Revision: 4395 http://gar.svn.sourceforge.net/gar/?rev=4395&view=rev Author: idogan23 Date: 2009-04-18 09:59:21 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: added patches to fix file locations Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 03:23:56 UTC (rev 4394) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 09:59:21 UTC (rev 4395) @@ -12,7 +12,12 @@ MASTER_SITES = http://bind2nsd.sourceforge.net/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += setup.py.diff +DISTFILES += Config.py.diff +PATCHFILES = setup.py.diff +PATCHFILES += Config.py.diff + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Added: csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff 2009-04-18 09:59:21 UTC (rev 4395) @@ -0,0 +1,62 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Config.py bind2nsd-0.7.2/bind2nsd/Config.py +--- bind2nsd-0.7.2.orig/bind2nsd/Config.py 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Config.py 2009-04-18 11:50:52.347203690 +0200 +@@ -53,7 +53,7 @@ + self.fname = '' + self.config = \ + { 'acl_list' : 'acl_list', +- 'bind2nsd' : '/usr/bin/bind2nsd', ++ 'bind2nsd' : '/opt/csw/bin/bind2nsd', + 'database' : '"nsd.db"', + 'DEBUG' : False, + 'DEMO-MODE' : False, +@@ -70,28 +70,28 @@ + 'masters_for_slaves' : '127.0.0.1', + 'named-checkconf' : '/usr/sbin/named-checkconf', + 'named-checkzone' : '/usr/sbin/named-checkzone', +- 'named_root' : '/etc/bind9', ++ 'named_root' : '/etc', + 'named_conf' : 'named.conf', + 'named_watchlist' : '/etc/named.conf', +- 'nsd-checkconf' : '/usr/sbin/nsd-checkconf', ++ 'nsd-checkconf' : '/opt/csw/sbin/nsd-checkconf', + 'nsd_conf' : 'nsd.conf', +- 'nsd_conf_dir' : '/etc/nsd/', ++ 'nsd_conf_dir' : '/etc/opt/csw/nsd/', + 'nsd_preamble' : 'nsd.conf-preamble', +- 'password_file' : '/etc/bind2nsd/passwd', +- 'pidfile' : '"nsd.pid"', ++ 'password_file' : '/etc/opt/csw/bind2nsd/passwd', ++ 'pidfile' : '"/var/run/nsd.pid"', + 'port' : '53', +- 'rebuild_cmd' : '/etc/init.d/nsdc rebuild', +- 'restart_cmd' : '/etc/init.d/nsdc restart', ++ 'rebuild_cmd' : '/opt/csw/sbin/nsdc rebuild', ++ 'restart_cmd' : '/opt/csw/sbin/nsdc restart', + 'sleep_time' : '5', +- 'start_cmd' : '/etc/init.d/nsdc start', ++ 'start_cmd' : '/opt/csw/sbin/nsdc start', + 'statistics' : '3600', +- 'stop_cmd' : '/etc/init.d/nsdc stop', ++ 'stop_cmd' : '/opt/csw/sbin/nsdc stop', + 'syspw' : 'iforgot', + 'tmpdir' : '/tmp/secure64/', # must have trailing '/' + 'username' : 'nsd', + 'version' : '0.7.2', + 'xfrd-reload-timeout' : '10', +- 'zonec_cmd' : '/etc/init.d/zonec', ++ 'zonec_cmd' : '/opt/csw/sbin/zonec', + } + + self.init() +@@ -110,8 +110,8 @@ + if os.path.exists(fname): + self.fname = fname + else: +- if os.path.exists('/etc/bind2nsd/bind2nsd.conf'): +- self.fname = '/etc/bind2nsd/bind2nsd.conf' ++ if os.path.exists('/etc/opt/csw/bind2nsd/bind2nsd.conf'): ++ self.fname = '/etc/opt/csw/bind2nsd/bind2nsd.conf' + else: + print '? hrm. no config file found -- did you _mean_ that?' + Added: csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff 2009-04-18 09:59:21 UTC (rev 4395) @@ -0,0 +1,14 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/setup.py bind2nsd-0.7.2/setup.py +--- bind2nsd-0.7.2.orig/setup.py 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/setup.py 2009-04-18 11:22:14.530664816 +0200 +@@ -37,8 +37,8 @@ + packages = [ 'bind2nsd' ], + scripts = [ 'scripts/bind2nsd', 'scripts/s64-sync', 'scripts/nsd-sync', + 'scripts/s64-mkpw', 'scripts/bind2nsd-slave', ], +- data_files = [ ('/usr/share/doc/bind2nsd', ['./README', './TODO']), +- ('/etc/bind2nsd', ['etc/bind2nsd.conf']), ++ data_files = [ ('/opt/csw/share/doc/bind2nsd', ['./README', './TODO']), ++ ('/etc/opt/csw/bind2nsd', ['etc/bind2nsd.conf']), + ] + ) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 12:59:21 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 10:59:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4396] csw/mgar/pkg Message-ID: Revision: 4396 http://gar.svn.sourceforge.net/gar/?rev=4396&view=rev Author: idogan23 Date: 2009-04-18 10:59:19 +0000 (Sat, 18 Apr 2009) Log Message: ----------- pydes: initial commit Added Paths: ----------- csw/mgar/pkg/pydes/ csw/mgar/pkg/pydes/branches/ csw/mgar/pkg/pydes/tags/ csw/mgar/pkg/pydes/trunk/ csw/mgar/pkg/pydes/trunk/Makefile csw/mgar/pkg/pydes/trunk/files/ Property changes on: csw/mgar/pkg/pydes/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/pydes/trunk/Makefile =================================================================== --- csw/mgar/pkg/pydes/trunk/Makefile (rev 0) +++ csw/mgar/pkg/pydes/trunk/Makefile 2009-04-18 10:59:19 UTC (rev 4396) @@ -0,0 +1,34 @@ +GARNAME = pyDes +GARVERSION = 2.0.0 +CATEGORIES = lang + +DESCRIPTION = implementation of the DES encryption algorithm +define BLURB + implementation of the DES encryption algorithm +endef + +MASTER_SITES = http://pydes.sourceforge.net/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = (\d+(?:\.\d+)*).tar.gz + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +# UPSTREAM_MASTER_SITES = + +PACKAGES = CSWpydes +REQUIRED_PKGS = CSWpython +CATALOGNAME = pydes +SPKG_DESC = implementation of the DES encryption algorithm + +ARCHALL = 1 + +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = $(WORKSRC)/setup.py +TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/setup.py + +INSTALL_ARGS += --root=$(DESTDIR) +INSTALL_ARGS += --prefix=$(prefix) +include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 13:28:22 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 11:28:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4397] csw/mgar/pkg/pydes/trunk/checksums Message-ID: Revision: 4397 http://gar.svn.sourceforge.net/gar/?rev=4397&view=rev Author: idogan23 Date: 2009-04-18 11:28:22 +0000 (Sat, 18 Apr 2009) Log Message: ----------- pydes: checksum was not in svn Added Paths: ----------- csw/mgar/pkg/pydes/trunk/checksums Added: csw/mgar/pkg/pydes/trunk/checksums =================================================================== --- csw/mgar/pkg/pydes/trunk/checksums (rev 0) +++ csw/mgar/pkg/pydes/trunk/checksums 2009-04-18 11:28:22 UTC (rev 4397) @@ -0,0 +1 @@ +b61d69acc89e19220fcf8efe82e33438 download/pyDes-2.0.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 17:34:16 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 15:34:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4398] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4398 http://gar.svn.sourceforge.net/gar/?rev=4398&view=rev Author: valholla Date: 2009-04-18 15:34:16 +0000 (Sat, 18 Apr 2009) Log Message: ----------- checkin changes Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/package_files.mk Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-18 15:34:16 UTC (rev 4398) @@ -86,16 +86,10 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref -ISAEXEC_FILES += i386-pc-solaris2.8-c++ -ISAEXEC_FILES += i386-pc-solaris2.8-g++ -ISAEXEC_FILES += i386-pc-solaris2.8-gcc -ISAEXEC_FILES += i386-pc-solaris2.8-gcc-4.3.3 -ISAEXEC_FILES += i386-pc-solaris2.8-gcj -ISAEXEC_FILES += i386-pc-solaris2.8-gfortran -ISAEXEC_FILES += i386-pc-solaris2.10-c++ -ISAEXEC_FILES += i386-pc-solaris2.10-g++ -ISAEXEC_FILES += i386-pc-solaris2.10-gcc -ISAEXEC_FILES += i386-pc-solaris2.10-gcc-4.3.3 -ISAEXEC_FILES += i386-pc-solaris2.10-gcj -ISAEXEC_FILES += i386-pc-solaris2.10-gfortran +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-c++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-g++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc-4.3.3 +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcj +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gfortran endif Modified: csw/mgar/pkg/gcc4/trunk/files/package_files.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-18 15:34:16 UTC (rev 4398) @@ -86,7 +86,7 @@ PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.*a PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* - +EXTRA_PKGFILES_EXCLUDED_CSWgcc4objc = /opt/csw/gcc4/lib/gcc/.*/(\d+(?:\.\d+)*)/include ####### RunTime Packages ## gcc4adart Deleted: csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff 2009-04-18 15:34:16 UTC (rev 4398) @@ -1,55 +0,0 @@ ---- gcc-4.3.3/include/libiberty.h.o 2009-03-26 11:20:58.286509650 -0500 -+++ gcc-4.3.3/include/libiberty.h 2009-03-26 11:18:37.103118030 -0500 -@@ -48,6 +48,17 @@ - - #include - -+# ifndef alloca -+/* Make alloca work the best possible way. */ -+# ifdef __GNUC__ -+# define alloca __builtin_alloca -+# else /* not __GNUC__ */ -+# if HAVE_ALLOCA_H -+# include -+# endif /* HAVE_ALLOCA_H */ -+# endif /* not __GNUC__ */ -+# endif /* not alloca */ -+ - /* If the OS supports it, ensure that the supplied stream is setup to - avoid any multi-threaded locking. Otherwise leave the FILE pointer - unchanged. If the stream is NULL do nothing. */ -@@ -621,8 +632,8 @@ - also set/unset as it is often used to indicate whether code needs - to call alloca(0). */ - extern void *C_alloca (size_t) ATTRIBUTE_MALLOC; --#undef alloca - #if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA -+#undef alloca - # define alloca(x) __builtin_alloca(x) - # undef C_ALLOCA - # define ASTRDUP(X) \ -@@ -631,11 +642,14 @@ - char *const libiberty_nptr = (char *const) alloca (libiberty_len); \ - (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); })) - #else -+#if defined USE_C_ALLOCA || !defined HAVE_ALLOCA -+# undef alloca - # define alloca(x) C_alloca(x) - # undef USE_C_ALLOCA - # define USE_C_ALLOCA 1 - # undef C_ALLOCA - # define C_ALLOCA 1 -+#endif - extern const char *libiberty_optr; - extern char *libiberty_nptr; - extern unsigned long libiberty_len; ---- gcc-4.3.3/gcc/configure.ac.o 2009-03-26 11:19:37.352289013 -0500 -+++ gcc-4.3.3/gcc/configure.ac 2009-03-26 11:20:24.112575128 -0500 -@@ -1011,6 +1011,7 @@ - sysconf strsignal getrusage nl_langinfo scandir alphasort \ - gettimeofday mbstowcs wcswidth mmap mincore setlocale \ - gcc_UNLOCKED_FUNCS) -+AC_FUNC_ALLOCA - - if test x$ac_cv_func_mbstowcs = xyes; then - AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works, Deleted: csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff 2009-04-18 15:34:16 UTC (rev 4398) @@ -1,224 +0,0 @@ ---- gcc-4.3.3/gcc/Makefile.in.o 2009-03-26 10:54:05.816690285 -0500 -+++ gcc-4.3.3/gcc/Makefile.in 2009-03-26 10:53:26.456066920 -0500 -@@ -1010,6 +1010,8 @@ - # last objects to finish building. - OBJS-common = \ - insn-attrtab.o \ -+ insn-dfatab.o \ -+ insn-latencytab.o \ - insn-automata.o \ - insn-emit.o \ - insn-extract.o \ -@@ -1270,12 +1272,13 @@ - - OBJS-onestep = libbackend.o $(OBJS-archive) - --BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER) -+BACKEND = libbackend.a main.o @TREEBROWSER@ $(CPPLIB) $(LIBDECNUMBER) -+ - - MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ - insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ -- insn-attr.h insn-attrtab.c insn-opinit.c insn-preds.c insn-constants.h \ -- tm-preds.h tm-constrs.h \ -+ insn-attr.h insn-attrtab.c insn-dfatab.c insn-latencytab.c insn-opinit.c \ -+ insn-preds.c insn-constants.h tm-preds.h tm-constrs.h \ - tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \ - genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \ - xgcc$(exeext) cpp$(exeext) cc1$(exeext) cc1*-dummy$(exeext) $(EXTRA_PASSES) \ -@@ -2937,8 +2940,9 @@ - # and compile them. - - .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \ -- insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \ -- insn-attr.h insn-attrtab.c insn-preds.c -+ insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \ -+ insn-attr.h insn-attrtab.c insn-dfatab.c insn-latencytab.c insn-preds.c -+ - - # Dependencies for the md file. The first time through, we just assume - # the md file itself and the generated dependency file (in order to get -@@ -2957,6 +2961,12 @@ - insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ - insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) -+insn-dfatab.o : insn-dfatab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ -+ $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ -+ insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) -+insn-latencytab.o : insn-latencytab.c $(CONFIG_H) $(SYSTEM_H) \ -+ coretypes.h $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h \ -+ $(INSN_ATTR_H) insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) - insn-automata.o : insn-automata.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ - insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) -@@ -2997,9 +3007,9 @@ - - simple_generated_h = insn-attr.h insn-codes.h insn-config.h insn-flags.h - --simple_generated_c = insn-attrtab.c insn-automata.c insn-emit.c \ -- insn-extract.c insn-opinit.c insn-output.c \ -- insn-peep.c insn-recog.c -+simple_generated_c = insn-automata.c insn-emit.c \ -+ insn-extract.c insn-opinit.c insn-output.c \ -+ insn-peep.c insn-recog.c - - $(simple_generated_h): insn-%.h: s-%; @true - -@@ -3018,6 +3028,20 @@ - $(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c - $(STAMP) s-$* - -+# genattrtab produces three files. -+insn-attrtab.c insn-dfatab.c insn-latencytab.c: insn-%.c: s-%; @true -+ -+s-attrtab s-dfatab s-latencytab: build/genattrtab$(build_exeext) \ -+ $(MD_DEPS) insn-conditions.md -+ $(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) \ -+ insn-conditions.md -atmp-attrtab.c -dtmp-dfatab.c > tmp-latencytab.c -+ $(SHELL) $(srcdir)/../move-if-change tmp-attrtab.c insn-attrtab.c -+ $(SHELL) $(srcdir)/../move-if-change tmp-dfatab.c insn-dfatab.c -+ $(SHELL) $(srcdir)/../move-if-change tmp-latencytab.c insn-latencytab.c -+ $(STAMP) s-attrtab -+ $(STAMP) s-dfatab -+ $(STAMP) s-latencytab -+ - # genconstants needs to run before insn-conditions.md is available - # (because the constants may be used in the conditions). - insn-constants.h: s-constants; @true - ---- gcc-4.3.3/gcc/genattrtab.c.o 2009-03-25 20:32:28.189775642 -0500 -+++ gcc-4.3.3/gcc/genattrtab.c 2009-03-25 20:39:51.459202637 -0500 -@@ -4433,6 +4433,61 @@ - make_internal_attr ("*bypass_p", byps_exp, ATTR_NONE); - } - -+static void -+write_header (void) -+{ -+ printf ("/* Generated automatically by the program `genattrtab'\n\ -+from the machine description file `md'. */\n\n"); -+ -+ printf ("#include \"config.h\"\n"); -+ printf ("#include \"system.h\"\n"); -+ printf ("#include \"coretypes.h\"\n"); -+ printf ("#include \"tm.h\"\n"); -+ printf ("#include \"rtl.h\"\n"); -+ printf ("#include \"insn-attr.h\"\n"); -+ printf ("#include \"tm_p.h\"\n"); -+ printf ("#include \"insn-config.h\"\n"); -+ printf ("#include \"recog.h\"\n"); -+ printf ("#include \"regs.h\"\n"); -+ printf ("#include \"real.h\"\n"); -+ printf ("#include \"output.h\"\n"); -+ printf ("#include \"toplev.h\"\n"); -+ printf ("#include \"flags.h\"\n"); -+ printf ("#include \"function.h\"\n"); -+ printf ("\n"); -+ printf ("#define operands recog_data.operand\n\n"); -+} -+ -+static void -+switch_stdout (const char *file_name) -+{ -+ if (fflush (stdout) || ferror (stdout)) -+ exit (FATAL_EXIT_CODE); -+ if (!freopen (file_name, "w", stdout)) -+ fatal ("cannot open file %s: %s", file_name, strerror (errno)); -+ write_header (); -+} -+ -+static const char *dfa_file_name = 0; -+static const char *attr_file_name = 0; -+ -+static bool -+handle_arg (const char *arg) -+{ -+ switch (arg[1]) -+ { -+ case 'a': -+ attr_file_name = &arg[2]; -+ return true; -+ case 'd': -+ dfa_file_name = &arg[2]; -+ return true; -+ default: -+ return false; -+ } -+} -+ -+ - int - main (int argc, char **argv) - { -@@ -4444,7 +4499,7 @@ - - progname = "genattrtab"; - -- if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE) -+ if (init_md_reader_args_cb (argc, argv, handle_arg) != SUCCESS_EXIT_CODE) - return (FATAL_EXIT_CODE); - - obstack_init (hash_obstack); -@@ -4464,9 +4519,6 @@ - delay_1_0_str = DEF_ATTR_STRING ("*delay_1_0"); - num_delay_slots_str = DEF_ATTR_STRING ("*num_delay_slots"); - -- printf ("/* Generated automatically by the program `genattrtab'\n\ --from the machine description file `md'. */\n\n"); -- - /* Read the machine description. */ - - while (1) -@@ -4525,24 +4577,6 @@ - if (num_delays) - expand_delays (); - -- printf ("#include \"config.h\"\n"); -- printf ("#include \"system.h\"\n"); -- printf ("#include \"coretypes.h\"\n"); -- printf ("#include \"tm.h\"\n"); -- printf ("#include \"rtl.h\"\n"); -- printf ("#include \"insn-attr.h\"\n"); -- printf ("#include \"tm_p.h\"\n"); -- printf ("#include \"insn-config.h\"\n"); -- printf ("#include \"recog.h\"\n"); -- printf ("#include \"regs.h\"\n"); -- printf ("#include \"real.h\"\n"); -- printf ("#include \"output.h\"\n"); -- printf ("#include \"toplev.h\"\n"); -- printf ("#include \"flags.h\"\n"); -- printf ("#include \"function.h\"\n"); -- printf ("\n"); -- printf ("#define operands recog_data.operand\n\n"); -- - /* Make `insn_alternatives'. */ - insn_alternatives = oballoc (insn_code_number * sizeof (int)); - for (id = defs; id; id = id->next) -@@ -4582,13 +4616,26 @@ - optimize_attrs (); - - /* Now write out all the `gen_attr_...' routines. Do these before the -- special routines so that they get defined before they are used. */ -+ special routines so that they get defined before they are used. -+ Because GCC has problems compiling two large functions in the same file -+ (PR other/29442), "*insn_default_latency" and "*internal_dfa_insn_code" -+ can be output to separate files, stdout and DFA_FILE_NAME respectively. -+ The remaining attributes can be output to ATTR_FILE_NAME. */ - -+ write_header (); - for (i = 0; i < MAX_ATTRS_INDEX; i++) - for (attr = attrs[i]; attr; attr = attr->next) - { -+ if (dfa_file_name -+ && !strcmp ("*internal_dfa_insn_code", attr->name)) -+ switch_stdout (dfa_file_name); -+ - if (! attr->is_special && ! attr->is_const) - write_attr_get (attr); -+ -+ if (attr_file_name -+ && !strcmp ("*internal_dfa_insn_code", attr->name)) -+ switch_stdout (attr_file_name); - } - - /* Write out delay eligibility information, if DEFINE_DELAY present. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 18:24:15 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 16:24:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4399] csw/mgar/pkg/bind2nsd/trunk Message-ID: Revision: 4399 http://gar.svn.sourceforge.net/gar/?rev=4399&view=rev Author: idogan23 Date: 2009-04-18 16:24:14 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: set ARCHALL to 1 Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/bind2nsd/trunk/checksums Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 15:34:16 UTC (rev 4398) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:14 UTC (rev 4399) @@ -30,6 +30,8 @@ CATALOGNAME = bind2nsd SPKG_DESC = scripts to translate DNS information in BIND format to NSD format +ARCHALL = 1 + CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = Added: csw/mgar/pkg/bind2nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/checksums (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/checksums 2009-04-18 16:24:14 UTC (rev 4399) @@ -0,0 +1,3 @@ +e10f1d313e9e8c3e7cc54eb9419813a8 download/Config.py.diff +dc9af6382fa609b5d5d3a8ee666f0c4c download/bind2nsd-0.7.2.tar.gz +5fb22ed4998cab39a9d5fc99891f1a5d download/setup.py.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 18:24:52 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 16:24:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4400] csw/mgar/pkg/bind2nsd/trunk/Makefile Message-ID: Revision: 4400 http://gar.svn.sourceforge.net/gar/?rev=4400&view=rev Author: idogan23 Date: 2009-04-18 16:24:52 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: set a dependency on CSWpydes Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:14 UTC (rev 4399) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:52 UTC (rev 4400) @@ -26,7 +26,7 @@ # UPSTREAM_MASTER_SITES = PACKAGES = CSWbind2nsd -REQUIRED_PKGS = CSWpython +REQUIRED_PKGS = CSWpython CSWpydes CATALOGNAME = bind2nsd SPKG_DESC = scripts to translate DNS information in BIND format to NSD format This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 18:52:23 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 16:52:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4401] csw/mgar/pkg/bind2nsd/trunk/Makefile Message-ID: Revision: 4401 http://gar.svn.sourceforge.net/gar/?rev=4401&view=rev Author: idogan23 Date: 2009-04-18 16:52:23 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: change shebang to /opt/csw/bin/python Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:52 UTC (rev 4400) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:52:23 UTC (rev 4401) @@ -40,4 +40,10 @@ INSTALL_ARGS += --root=$(DESTDIR) INSTALL_ARGS += --prefix=$(prefix) +post-configure-modulated: + @echo " ==> Fixing Shebang" + @cd $(WORKSRC) + @perl -pi -e 's/\/usr\/bin\/env\ python/\/opt\/csw\/bin\/python/g' `find . -name '*.py'` + @$(MAKECOOKIE) + include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 19:17:56 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 17:17:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4402] csw/mgar/pkg/pixman/trunk Message-ID: Revision: 4402 http://gar.svn.sourceforge.net/gar/?rev=4402&view=rev Author: wbonnet Date: 2009-04-18 17:17:55 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Upgrade to 0.15.2 Add 64 bits support Modified Paths: -------------- csw/mgar/pkg/pixman/trunk/Makefile csw/mgar/pkg/pixman/trunk/checksums Modified: csw/mgar/pkg/pixman/trunk/Makefile =================================================================== --- csw/mgar/pkg/pixman/trunk/Makefile 2009-04-18 16:52:23 UTC (rev 4401) +++ csw/mgar/pkg/pixman/trunk/Makefile 2009-04-18 17:17:55 UTC (rev 4402) @@ -1,5 +1,5 @@ GARNAME = pixman -GARVERSION = 0.14.0 +GARVERSION = 0.15.2 CATEGORIES = lib DESCRIPTION = The pixel-manipulation library for X and cairo @@ -20,6 +20,8 @@ #REQUIRED_PKGS_CSWpixman = CSWlibx11 +BUILD64 = 1 + CFLAGS += -xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION CXXFLAGS += -xlibmil -xlibmopt -features=tmplife -norunpath LDFLAGS += -L/opt/csw/lib -R/opt/csw/lib Modified: csw/mgar/pkg/pixman/trunk/checksums =================================================================== --- csw/mgar/pkg/pixman/trunk/checksums 2009-04-18 16:52:23 UTC (rev 4401) +++ csw/mgar/pkg/pixman/trunk/checksums 2009-04-18 17:17:55 UTC (rev 4402) @@ -1,4 +1,3 @@ -da330524bbd975271974378b1c5e7b5d download/pixman-0.14.0.tar.gz 09e58b9e029eb63c896ad2ff70fc7915 download/CSWpixman.gspec 89d81c718f669974964dd9c62217c191 download/license.txt -770ffe9900749190af335cbe2e897232 download/CSWpixmandevel.gspec +ac7d687548f02b384d0cab1021d91ce5 download/pixman-0.15.2.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 19:38:45 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 17:38:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4403] csw/mgar/pkg/bind2nsd/trunk Message-ID: Revision: 4403 http://gar.svn.sourceforge.net/gar/?rev=4403&view=rev Author: idogan23 Date: 2009-04-18 17:38:44 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: patches to supress warnings about the deprecated popen2 module Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile csw/mgar/pkg/bind2nsd/trunk/checksums Added Paths: ----------- csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 17:17:55 UTC (rev 4402) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 17:38:44 UTC (rev 4403) @@ -12,11 +12,12 @@ MASTER_SITES = http://bind2nsd.sourceforge.net/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += setup.py.diff -DISTFILES += Config.py.diff PATCHFILES = setup.py.diff PATCHFILES += Config.py.diff +PATCHFILES += Utils.py.diff +PATCHFILES += nsd-sync.diff +PATCHFILES += s64-sync.diff # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/bind2nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/checksums 2009-04-18 17:17:55 UTC (rev 4402) +++ csw/mgar/pkg/bind2nsd/trunk/checksums 2009-04-18 17:38:44 UTC (rev 4403) @@ -1,3 +1,6 @@ e10f1d313e9e8c3e7cc54eb9419813a8 download/Config.py.diff +a7a1f92612ca18cd6b6fefca830e88fa download/Utils.py.diff dc9af6382fa609b5d5d3a8ee666f0c4c download/bind2nsd-0.7.2.tar.gz +c6f85a06db20f215325568745af56fd1 download/nsd-sync.diff +6f98e9122403d06ecfb1ca07681b3bea download/s64-sync.diff 5fb22ed4998cab39a9d5fc99891f1a5d download/setup.py.diff Added: csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff 2009-04-18 17:38:44 UTC (rev 4403) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Utils.py bind2nsd-0.7.2/bind2nsd/Utils.py +--- bind2nsd-0.7.2.orig/bind2nsd/Utils.py 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Utils.py 2009-04-18 18:54:31.424687047 +0200 +@@ -25,7 +25,7 @@ + # + # + +-import popen2 ++import subprocess + import sys + + VERBOSE = False Added: csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff 2009-04-18 17:38:44 UTC (rev 4403) @@ -0,0 +1,100 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Config.py bind2nsd-0.7.2/bind2nsd/Config.py +--- bind2nsd-0.7.2.orig/bind2nsd/Config.py 2009-04-18 19:25:48.872147165 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Config.py 2008-06-27 02:22:28.000000000 +0200 +@@ -53,7 +53,7 @@ + self.fname = '' + self.config = \ + { 'acl_list' : 'acl_list', +- 'bind2nsd' : '/opt/csw/bin/bind2nsd', ++ 'bind2nsd' : '/usr/bin/bind2nsd', + 'database' : '"nsd.db"', + 'DEBUG' : False, + 'DEMO-MODE' : False, +@@ -70,28 +70,28 @@ + 'masters_for_slaves' : '127.0.0.1', + 'named-checkconf' : '/usr/sbin/named-checkconf', + 'named-checkzone' : '/usr/sbin/named-checkzone', +- 'named_root' : '/etc', ++ 'named_root' : '/etc/bind9', + 'named_conf' : 'named.conf', + 'named_watchlist' : '/etc/named.conf', +- 'nsd-checkconf' : '/opt/csw/sbin/nsd-checkconf', ++ 'nsd-checkconf' : '/usr/sbin/nsd-checkconf', + 'nsd_conf' : 'nsd.conf', +- 'nsd_conf_dir' : '/etc/opt/csw/nsd/', ++ 'nsd_conf_dir' : '/etc/nsd/', + 'nsd_preamble' : 'nsd.conf-preamble', +- 'password_file' : '/etc/opt/csw/bind2nsd/passwd', +- 'pidfile' : '"/var/run/nsd.pid"', ++ 'password_file' : '/etc/bind2nsd/passwd', ++ 'pidfile' : '"nsd.pid"', + 'port' : '53', +- 'rebuild_cmd' : '/opt/csw/sbin/nsdc rebuild', +- 'restart_cmd' : '/opt/csw/sbin/nsdc restart', ++ 'rebuild_cmd' : '/etc/init.d/nsdc rebuild', ++ 'restart_cmd' : '/etc/init.d/nsdc restart', + 'sleep_time' : '5', +- 'start_cmd' : '/opt/csw/sbin/nsdc start', ++ 'start_cmd' : '/etc/init.d/nsdc start', + 'statistics' : '3600', +- 'stop_cmd' : '/opt/csw/sbin/nsdc stop', ++ 'stop_cmd' : '/etc/init.d/nsdc stop', + 'syspw' : 'iforgot', + 'tmpdir' : '/tmp/secure64/', # must have trailing '/' + 'username' : 'nsd', + 'version' : '0.7.2', + 'xfrd-reload-timeout' : '10', +- 'zonec_cmd' : '/opt/csw/sbin/zonec', ++ 'zonec_cmd' : '/etc/init.d/zonec', + } + + self.init() +@@ -110,8 +110,8 @@ + if os.path.exists(fname): + self.fname = fname + else: +- if os.path.exists('/etc/opt/csw/bind2nsd/bind2nsd.conf'): +- self.fname = '/etc/opt/csw/bind2nsd/bind2nsd.conf' ++ if os.path.exists('/etc/bind2nsd/bind2nsd.conf'): ++ self.fname = '/etc/bind2nsd/bind2nsd.conf' + else: + print '? hrm. no config file found -- did you _mean_ that?' + +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Utils.py bind2nsd-0.7.2/bind2nsd/Utils.py +--- bind2nsd-0.7.2.orig/bind2nsd/Utils.py 2009-04-18 19:25:49.078055018 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Utils.py 2008-06-27 02:22:28.000000000 +0200 +@@ -25,7 +25,7 @@ + # + # + +-import subprocess ++import popen2 + import sys + + VERBOSE = False +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/scripts/nsd-sync bind2nsd-0.7.2/scripts/nsd-sync +--- bind2nsd-0.7.2.orig/scripts/nsd-sync 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/scripts/nsd-sync 2009-04-18 19:25:22.718953474 +0200 +@@ -29,7 +29,7 @@ + import getopt + import os + import os.path +-import popen2 ++import subprocess + import re + import sys + import time +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/setup.py bind2nsd-0.7.2/setup.py +--- bind2nsd-0.7.2.orig/setup.py 2009-04-18 19:25:48.666639442 +0200 ++++ bind2nsd-0.7.2/setup.py 2008-06-27 02:22:28.000000000 +0200 +@@ -37,8 +37,8 @@ + packages = [ 'bind2nsd' ], + scripts = [ 'scripts/bind2nsd', 'scripts/s64-sync', 'scripts/nsd-sync', + 'scripts/s64-mkpw', 'scripts/bind2nsd-slave', ], +- data_files = [ ('/opt/csw/share/doc/bind2nsd', ['./README', './TODO']), +- ('/etc/opt/csw/bind2nsd', ['etc/bind2nsd.conf']), ++ data_files = [ ('/usr/share/doc/bind2nsd', ['./README', './TODO']), ++ ('/etc/bind2nsd', ['etc/bind2nsd.conf']), + ] + ) + Added: csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff 2009-04-18 17:38:44 UTC (rev 4403) @@ -0,0 +1,24 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/scripts/nsd-sync bind2nsd-0.7.2/scripts/nsd-sync +--- bind2nsd-0.7.2.orig/scripts/nsd-sync 2009-04-18 19:30:56.806373967 +0200 ++++ bind2nsd-0.7.2/scripts/nsd-sync 2008-06-27 02:22:28.000000000 +0200 +@@ -29,7 +29,7 @@ + import getopt + import os + import os.path +-import subprocess ++import popen2 + import re + import sys + import time +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/scripts/s64-sync bind2nsd-0.7.2/scripts/s64-sync +--- bind2nsd-0.7.2.orig/scripts/s64-sync 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/scripts/s64-sync 2009-04-18 19:30:30.873594761 +0200 +@@ -29,7 +29,7 @@ + import getopt + import os + import os.path +-import popen2 ++import subprocess + import re + import sys + import time This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 19:53:08 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 17:53:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4404] csw/mgar/pkg/php5/trunk/extensions/php5_recode/ README Message-ID: Revision: 4404 http://gar.svn.sourceforge.net/gar/?rev=4404&view=rev Author: valholla Date: 2009-04-18 17:53:08 +0000 (Sat, 18 Apr 2009) Log Message: ----------- commit changes Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_recode/README Added: csw/mgar/pkg/php5/trunk/extensions/php5_recode/README =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/README (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/README 2009-04-18 17:53:08 UTC (rev 4404) @@ -0,0 +1,2 @@ +recode can not be configured with imap and mysql extensions +compile and enable this module seperately This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 21:12:09 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 19:12:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4405] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4405 http://gar.svn.sourceforge.net/gar/?rev=4405&view=rev Author: valholla Date: 2009-04-18 19:12:08 +0000 (Sat, 18 Apr 2009) Log Message: ----------- adding files Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff Added: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff 2009-04-18 19:12:08 UTC (rev 4405) @@ -0,0 +1,13 @@ +--- php-5.2.6/ext/pdo_pgsql/config.m4.orig 2009-02-19 15:57:33.757262166 -0600 ++++ php-5.2.6/ext/pdo_pgsql/config.m4 2009-02-19 15:58:15.092308743 -0600 +@@ -13,8 +13,8 @@ + + AC_MSG_CHECKING(for pg_config) + for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do +- if test -x $i/pg_config; then +- PG_CONFIG="$i/pg_config" ++ if test -x $i/pg_config32; then ++ PG_CONFIG="$i/pg_config32" + break; + fi + done Added: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff 2009-04-18 19:12:08 UTC (rev 4405) @@ -0,0 +1,13 @@ +--- php-5.2.6/ext/pgsql/config.m4.orig 2009-02-25 11:46:48.919725515 -0600 ++++ php-5.2.6/ext/pgsql/config.m4 2009-02-25 11:48:01.054898559 -0600 +@@ -11,8 +11,8 @@ + + AC_MSG_CHECKING(for pg_config) + for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do +- if test -x $i/pg_config; then +- PG_CONFIG="$i/pg_config" ++ if test -x $i/pg_config32; then ++ PG_CONFIG="$i/pg_config32" + break; + fi + done This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 22:39:03 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 20:39:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4406] csw/mgar/pkg/x11/xrender/trunk/Makefile Message-ID: Revision: 4406 http://gar.svn.sourceforge.net/gar/?rev=4406&view=rev Author: wbonnet Date: 2009-04-18 20:39:03 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Add 64bits support Modified Paths: -------------- csw/mgar/pkg/x11/xrender/trunk/Makefile Modified: csw/mgar/pkg/x11/xrender/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-18 19:12:08 UTC (rev 4405) +++ csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-18 20:39:03 UTC (rev 4406) @@ -28,6 +28,8 @@ REQUIRED_PKGS_CSWrenderdev = CSWlibxrender REQUIRED_PKGS_CSWlibxrender = CSWlibx11 +BUILD64 = 1 + post-extract: ( cd $(WORKROOTDIR)/build-$(firstword $(MODULATIONS)) ; \ mv libXrender-$(GARVERSION) $(DISTNAME) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 23:28:20 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:28:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4407] csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Message-ID: Revision: 4407 http://gar.svn.sourceforge.net/gar/?rev=4407&view=rev Author: wbonnet Date: 2009-04-18 21:28:19 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 20:39:03 UTC (rev 4406) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 21:28:19 UTC (rev 4407) @@ -31,7 +31,7 @@ @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License-devel.txt -EXTRA_PKG_CONFIG_DIRS += /opt/csw/X11/pkgconfig -PKG_CONFIG_PATH += /opt/csw/X11/pkgconfig +PKG_CONFIG_PATH += /opt/csw/X11/lib/pkgconfig include gar/category.mk + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 23:33:34 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:33:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4408] csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Message-ID: Revision: 4408 http://gar.svn.sourceforge.net/gar/?rev=4408&view=rev Author: valholla Date: 2009-04-18 21:33:34 +0000 (Sat, 18 Apr 2009) Log Message: ----------- commit changes Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-18 21:28:19 UTC (rev 4407) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-18 21:33:34 UTC (rev 4408) @@ -30,7 +30,6 @@ post-merge-modulated: $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ $(PKGROOT)/opt/csw/gcc4/lib/ ) - $(_DBG)( gfind $(PKGROOT) -type f -name "*.*~" -exec grm -f {} \; ) $(_DBG)$(MAKECOOKIE) test-skip: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 23:52:55 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:52:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4409] csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Message-ID: Revision: 4409 http://gar.svn.sourceforge.net/gar/?rev=4409&view=rev Author: wbonnet Date: 2009-04-18 21:52:55 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Update Makefile Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 21:33:34 UTC (rev 4408) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 21:52:55 UTC (rev 4409) @@ -24,6 +24,8 @@ PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/lib/pkgconfig/.* PKGFILES_CSWlibxdmcpdevel += $(prefix)/share/doc/$(GARNAME)/License-devel.txt +BUILD64 = 1 + CONFIGURE_ARGS = $(DIRPATHS) pre-install: @@ -31,7 +33,5 @@ @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License-devel.txt -PKG_CONFIG_PATH += /opt/csw/X11/lib/pkgconfig - include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 23:54:12 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:54:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4410] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4410 http://gar.svn.sourceforge.net/gar/?rev=4410&view=rev Author: wbonnet Date: 2009-04-18 21:54:12 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Replace use of PKG_CONFIG_PATH by EXTRA_PKGCONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-18 21:52:55 UTC (rev 4409) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-18 21:54:12 UTC (rev 4410) @@ -23,9 +23,12 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +EXTRA_PKGCONFIG_PATH = /opt/csw/X11/lib/pkgconfig +EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig +EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +export PKG_CONFIG_PATH + # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sun Apr 19 10:37:44 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sun, 19 Apr 2009 08:37:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4411] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4411 http://gar.svn.sourceforge.net/gar/?rev=4411&view=rev Author: wbonnet Date: 2009-04-19 08:37:44 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Switch back to PKG_CONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-18 21:54:12 UTC (rev 4410) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 08:37:44 UTC (rev 4411) @@ -23,9 +23,9 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -EXTRA_PKGCONFIG_PATH = /opt/csw/X11/lib/pkgconfig -EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig -EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +PKG_CONFIG_PATH = /opt/csw/X11/lib/pkgconfig +PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig +PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig export PKG_CONFIG_PATH This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sun Apr 19 11:24:38 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sun, 19 Apr 2009 09:24:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4412] csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Message-ID: Revision: 4412 http://gar.svn.sourceforge.net/gar/?rev=4412&view=rev Author: wbonnet Date: 2009-04-19 09:24:38 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Update pkgconfigpath Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-19 08:37:44 UTC (rev 4411) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-19 09:24:38 UTC (rev 4412) @@ -35,3 +35,4 @@ include gar/category.mk + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:01:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:01:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4413] csw/mgar/gar/v2 Message-ID: Revision: 4413 http://gar.svn.sourceforge.net/gar/?rev=4413&view=rev Author: dmichelsen Date: 2009-04-19 20:01:09 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Added _CATEGORY_PKG_CONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 09:24:38 UTC (rev 4412) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:01:09 UTC (rev 4413) @@ -23,12 +23,8 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -PKG_CONFIG_PATH = /opt/csw/X11/lib/pkgconfig -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +_CATEGORY_PKG_CONFIG_PATH = $(libdir)/X11/pkgconfig -export PKG_CONFIG_PATH - # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-19 09:24:38 UTC (rev 4412) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-19 20:01:09 UTC (rev 4413) @@ -494,7 +494,7 @@ # This is for foo-config chaos PKG_CONFIG_DIRS ?= $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) -PKG_CONFIG_PATH ?= $(call MAKEPATH,$(foreach D,$(PKG_CONFIG_DIRS),$(abspath $D/$(MM_LIBDIR)/pkgconfig)) $(EXTRA_PKGCONFIG_PATH)) +PKG_CONFIG_PATH ?= $(call MAKEPATH,$(foreach D,$(PKG_CONFIG_DIRS),$(abspath $D/$(MM_LIBDIR)/pkgconfig)) $(_CATEGORY_PKG_CONFIG_PATH) $(EXTRA_PKG_CONFIG_PATH)) # # Mirror Sites This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:24:10 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:24:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4414] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4414 http://gar.svn.sourceforge.net/gar/?rev=4414&view=rev Author: dmichelsen Date: 2009-04-19 20:24:10 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Fix x11 category PKG_CONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:01:09 UTC (rev 4413) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:24:10 UTC (rev 4414) @@ -23,7 +23,7 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -_CATEGORY_PKG_CONFIG_PATH = $(libdir)/X11/pkgconfig +_CATEGORY_PKG_CONFIG_PATH = $(abspath $(libdir_install)/X11/$(MM_LIBDIR)/pkgconfig) # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:42:04 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:42:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4415] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4415 http://gar.svn.sourceforge.net/gar/?rev=4415&view=rev Author: dmichelsen Date: 2009-04-19 20:42:04 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Undo un-export of PKG_CONFIG_PATH from r2471 Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-19 20:24:10 UTC (rev 4414) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-19 20:42:04 UTC (rev 4415) @@ -588,8 +588,7 @@ INSTALL_SCRIPTS ?= $(WORKSRC)/Makefile # Global environment -#export PATH PKG_CONFIG_PATH -export PATH +export PATH PKG_CONFIG_PATH # prepend the local file listing FILE_SITES = $(foreach DIR,$(FILEDIR) $(GARCHIVEPATH),file://$(DIR)/) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:43:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:43:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4416] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4416 http://gar.svn.sourceforge.net/gar/?rev=4416&view=rev Author: dmichelsen Date: 2009-04-19 20:43:06 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Fix pkgconfig again in category x11 Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:42:04 UTC (rev 4415) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:43:06 UTC (rev 4416) @@ -23,7 +23,7 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -_CATEGORY_PKG_CONFIG_PATH = $(abspath $(libdir_install)/X11/$(MM_LIBDIR)/pkgconfig) +_CATEGORY_PKG_CONFIG_PATH = $(abspath $(prefix)/X11/lib/$(MM_LIBDIR)/pkgconfig) # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sun Apr 19 22:44:06 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:44:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4417] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4417 http://gar.svn.sourceforge.net/gar/?rev=4417&view=rev Author: idogan23 Date: 2009-04-19 20:44:05 +0000 (Sun, 19 Apr 2009) Log Message: ----------- nsd: certain directories hanlded by the ugfiles class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-19 20:43:06 UTC (rev 4416) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-19 20:44:05 UTC (rev 4417) @@ -19,8 +19,8 @@ DISTFILES += cswusergroup DISTFILES += cswnsd -SPKG_CLASSES = none cswusergroup cswcpsampleconf cswinitsmf -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' +SPKG_CLASSES = none cswusergroup ugfiles cswcpsampleconf cswinitsmf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/CSWnsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$2 = "ugfiles" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' REQUIRED_PKGS = CSWcswclassutils @@ -40,6 +40,7 @@ @ginstall -d $(DESTDIR)/etc/opt/csw/init.d @ginstall -m 755 $(FILEDIR)/cswnsd $(DESTDIR)/etc/opt/csw/init.d/cswnsd @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW - @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup + @ginstall -d $(DESTDIR)/etc/opt/csw/pkg/CSWnsd + @ginstall -m 644 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/pkg/CSWnsd/cswusergroup include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 20 11:31:44 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 20 Apr 2009 09:31:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4418] csw/mgar/gar/v2/gar.pkg.mk Message-ID: Revision: 4418 http://gar.svn.sourceforge.net/gar/?rev=4418&view=rev Author: dmichelsen Date: 2009-04-20 09:31:44 +0000 (Mon, 20 Apr 2009) Log Message: ----------- mGAR v2: Add PRESERVECONF for CSWcswclassutils Modified Paths: -------------- csw/mgar/gar/v2/gar.pkg.mk Modified: csw/mgar/gar/v2/gar.pkg.mk =================================================================== --- csw/mgar/gar/v2/gar.pkg.mk 2009-04-19 20:44:05 UTC (rev 4417) +++ csw/mgar/gar/v2/gar.pkg.mk 2009-04-20 09:31:44 UTC (rev 4418) @@ -114,6 +114,15 @@ SPKG_PKGFILE ?= %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg +# Handle cswclassutils +# - prepend cswpreserveconf if it is not already in SPKG_CLASSES +SPKG_CLASSES := $(if $(PRESERVECONF),$(if $(filter cswpreserveconf,$(SPKG_CLASSES)),,cswpreserveconf)) $(SPKG_CLASSES) +# - set class for all config files +ifneq ($(PRESERVECONF),) +_CSWCLASS_FILTER = | perl -ane '$(foreach CONF,$(PRESERVECONF),$$F[1] = "cswpreserveconf" if( $$F[2] =~ m(^$(CONF)$$) );)print join(" ", at F),"\n";' +_EXTRA_GAR_PKGS += CSWcswclassutils +endif + PKGGET_DESTDIR ?= DEPMAKER_EXTRA_ARGS = --noscript --nodep SUNW @@ -249,9 +258,9 @@ ) \ <$(PROTOTYPE); \ if [ -n "$(EXTRA_PKGFILES_$*)" ]; then echo "$(EXTRA_PKGFILES_$*)"; fi \ - ) $(_PROTOTYPE_FILTER_$*) >$@; \ + ) $(_CSWCLASS_FILTER) $(_PROTOTYPE_FILTER_$*) >$@; \ else \ - cat $(PROTOTYPE) $(_PROTOTYPE_FILTER_$*) >$@; \ + cat $(PROTOTYPE) $(_CSWCLASS_FILTER) $(_PROTOTYPE_FILTER_$*) >$@; \ fi $(WORKDIR)/%.prototype-$(GARCH): | $(WORKDIR)/%.prototype @@ -278,7 +287,7 @@ ($(foreach PKG,$(INCOMPATIBLE_PKGS_$*) $(INCOMPATIBLE_PKGS),\ echo "I $(PKG)";\ )\ - $(foreach PKG,$(_EXTRA_GAR_PKGS) $(REQUIRED_PKGS_$*) $(REQUIRED_PKGS),\ + $(foreach PKG,$(sort $(_EXTRA_GAR_PKGS)) $(REQUIRED_PKGS_$*) $(REQUIRED_PKGS),\ $(if $(SPKG_DESC_$(PKG)), \ echo "P $(PKG) $(call catalogname,$(PKG)) - $(SPKG_DESC_$(PKG))";, \ echo "$(shell (/usr/bin/pkginfo $(PKG) || echo "P $(PKG) - ") | awk '{ $$1 = "P"; print } ')"; \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 11:57:45 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 09:57:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4419] csw/mgar/pkg/clamav/trunk Message-ID: Revision: 4419 http://gar.svn.sourceforge.net/gar/?rev=4419&view=rev Author: bonivart Date: 2009-04-20 09:57:44 +0000 (Mon, 20 Apr 2009) Log Message: ----------- clamav: update to 0.95.1 Modified Paths: -------------- csw/mgar/pkg/clamav/trunk/Makefile csw/mgar/pkg/clamav/trunk/checksums csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW Modified: csw/mgar/pkg/clamav/trunk/Makefile =================================================================== --- csw/mgar/pkg/clamav/trunk/Makefile 2009-04-20 09:31:44 UTC (rev 4418) +++ csw/mgar/pkg/clamav/trunk/Makefile 2009-04-20 09:57:44 UTC (rev 4419) @@ -1,5 +1,5 @@ GARNAME = clamav -GARVERSION = 0.95 +GARVERSION = 0.95.1 #DISTNAME = $(GARNAME)-devel-latest CATEGORIES = apps Modified: csw/mgar/pkg/clamav/trunk/checksums =================================================================== --- csw/mgar/pkg/clamav/trunk/checksums 2009-04-20 09:31:44 UTC (rev 4418) +++ csw/mgar/pkg/clamav/trunk/checksums 2009-04-20 09:57:44 UTC (rev 4419) @@ -1 +1 @@ -98590386ba9a69039580b1bf48ca038b download/clamav-0.95.tar.gz +c802d4b372e455849cfcb0d776fc72d8 download/clamav-0.95.1.tar.gz Modified: csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW =================================================================== --- csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW 2009-04-20 09:31:44 UTC (rev 4418) +++ csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW 2009-04-20 09:57:44 UTC (rev 4419) @@ -1,3 +1,6 @@ +# 2009-04-20 +Version 0.95.1 released. + # 2009-03-25 Version 0.95 released. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 12:33:47 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 10:33:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4420] csw/mgar/pkg/lzop/trunk/Makefile Message-ID: Revision: 4420 http://gar.svn.sourceforge.net/gar/?rev=4420&view=rev Author: bonivart Date: 2009-04-20 10:33:47 +0000 (Mon, 20 Apr 2009) Log Message: ----------- lzop: remove ISALIST Modified Paths: -------------- csw/mgar/pkg/lzop/trunk/Makefile Modified: csw/mgar/pkg/lzop/trunk/Makefile =================================================================== --- csw/mgar/pkg/lzop/trunk/Makefile 2009-04-20 09:57:44 UTC (rev 4419) +++ csw/mgar/pkg/lzop/trunk/Makefile 2009-04-20 10:33:47 UTC (rev 4420) @@ -30,6 +30,8 @@ CONFIGURE_ARGS = $(DIRPATHS) +NOISALIST = 1 + include gar/category.mk SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(RELEASE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 12:47:47 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 10:47:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4421] csw/mgar/pkg/tnef/trunk/Makefile Message-ID: Revision: 4421 http://gar.svn.sourceforge.net/gar/?rev=4421&view=rev Author: bonivart Date: 2009-04-20 10:47:47 +0000 (Mon, 20 Apr 2009) Log Message: ----------- tnef: remove ISALIST Modified Paths: -------------- csw/mgar/pkg/tnef/trunk/Makefile Modified: csw/mgar/pkg/tnef/trunk/Makefile =================================================================== --- csw/mgar/pkg/tnef/trunk/Makefile 2009-04-20 10:33:47 UTC (rev 4420) +++ csw/mgar/pkg/tnef/trunk/Makefile 2009-04-20 10:47:47 UTC (rev 4421) @@ -21,6 +21,8 @@ CONFIGURE_ARGS = $(DIRPATHS) +NOISALIST = 1 + TEST_TARGET = check INSTALL_SCRIPTS = custom This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 15:34:07 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 13:34:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4422] csw/mgar/pkg/spamassassin/trunk Message-ID: Revision: 4422 http://gar.svn.sourceforge.net/gar/?rev=4422&view=rev Author: bonivart Date: 2009-04-20 13:34:07 +0000 (Mon, 20 Apr 2009) Log Message: ----------- spamassassin: move to mgar v2, fix minor issues Modified Paths: -------------- csw/mgar/pkg/spamassassin/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup Property Changed: ---------------- csw/mgar/pkg/spamassassin/trunk/ Property changes on: csw/mgar/pkg/spamassassin/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/spamassassin/trunk/Makefile =================================================================== --- csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 10:47:47 UTC (rev 4421) +++ csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 13:34:07 UTC (rev 4422) @@ -12,16 +12,29 @@ MASTER_SITES = http://apache.jumper.nu/spamassassin/source/ DISTFILES = $(SPKG_NAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWspamassassin,checkinstall depend postinstall) +#DISTFILES += $(call admfiles,CSWspamassassin,checkinstall depend postinstall) +LICENSE = $(WORKDIR)/$(SPKG_NAME)-$(GARVERSION)/LICENSE + +REQUIRED_PKGS = CSWosslrt CSWperl CSWpmarchivetar CSWpmdbi CSWpmdigestsha1 CSWpmiosocketinet6 CSWpmiosocketssl CSWpmiozlib CSWpmipcountry CSWpmldap CSWpmlibwww CSWpmmaildkim CSWpmmailspf CSWpmmailtools CSWpmmimebase64 CSWpmnetdns CSWpmuri CSWpmhtmlparser CSWzlib CSWcswclassutils + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(SPKG_NAME)-(\d+(?:\.\d+)*).tar.gz +SPKG_CLASSES_CSWspamassassin = none cswusergroup cswcpsampleconf cswinitsmf + CONFIGURE_SCRIPTS = custom BUILD_SCRIPTS = custom TEST_SCRIPTS = custom INSTALL_SCRIPTS = custom +PROTOTYPE_FILTER = awk ' \ + $$$$3 ~ /\/opt\/csw\/etc\/spamassassin\/.+\.pre\.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \ + $$$$3 ~ /\/opt\/csw\/etc\/spamassassin\/local\.cf\.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \ + $$$$3 ~ /\/opt\/csw\/etc\/CSWspamassassin\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } \ + $$$$3 ~ /\/init.d\/cswspamd$$$$/ { $$$$2 = "cswinitsmf" } \ + { print }' + include gar/category.mk WORKSRC = $(WORKDIR)/$(SPKG_NAME)-$(GARVERSION) @@ -50,15 +63,19 @@ @rm -rf $(DESTDIR) @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) @ginstall -d $(DESTDIR)/var/opt/csw/$(GARNAME) + @ginstall -d $(DESTDIR)$(sysconfdir)/CSWspamassassin + @ginstall -d $(DESTDIR)/etc/opt/csw/init.d + @ginstall -m 755 $(FILEDIR)/CSWspamassassin.cswspamd $(DESTDIR)/etc/opt/csw/init.d/cswspamd + @ginstall -m 644 $(FILEDIR)/CSWspamassassin.cswusergroup $(DESTDIR)$(sysconfdir)/CSWspamassassin/cswusergroup @cp $(FILEDIR)/CSWspamassassin.README.CSW $(DESTDIR)$(docdir)/$(GARNAME)/README.CSW @cp $(FILEDIR)/CSWspamassassin.README.spamd $(DESTDIR)$(docdir)/$(GARNAME)/README.spamd - @cp $(FILEDIR)/CSWspamassassin.cswspamd $(DESTDIR)$(docdir)/$(GARNAME)/cswspamd - @cp $(FILEDIR)/CSWspamassassin.spamd.xml.CSW $(DESTDIR)$(docdir)/$(GARNAME)/spamd.xml.CSW - @cp $(FILEDIR)/CSWspamassassin.svc-spamd.CSW $(DESTDIR)$(docdir)/$(GARNAME)/svc-spamd.CSW +# @cp $(FILEDIR)/CSWspamassassin.cswspamd $(DESTDIR)$(docdir)/$(GARNAME)/cswspamd +# @cp $(FILEDIR)/CSWspamassassin.spamd.xml.CSW $(DESTDIR)$(docdir)/$(GARNAME)/spamd.xml.CSW +# @cp $(FILEDIR)/CSWspamassassin.svc-spamd.CSW $(DESTDIR)$(docdir)/$(GARNAME)/svc-spamd.CSW @( cd $(WORKSRC) ; \ gmake install ) @( cd $(WORKSRC) ; \ - cp -r C* INSTALL LICENSE NOTICE README TRADEMARK U* ldap/ sql/ procmailrc.example sample-* $(DESTDIR)$(docdir)/$(GARNAME)/ ) + cp -r C* INSTALL NOTICE README TRADEMARK U* ldap/ sql/ procmailrc.example sample-* $(DESTDIR)$(docdir)/$(GARNAME)/ ) @( cd $(DESTDIR)/opt/csw/etc/spamassassin ; \ mv local.cf local.cf.CSW ; \ mv init.pre init.pre.CSW ; \ Added: csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup =================================================================== --- csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup (rev 0) +++ csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup 2009-04-20 13:34:07 UTC (rev 4422) @@ -0,0 +1 @@ +spamd:spamd:SpamAssassin::/bin/false:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 16:20:59 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 14:20:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4423] csw/mgar/pkg/spamassassin/trunk/Makefile Message-ID: Revision: 4423 http://gar.svn.sourceforge.net/gar/?rev=4423&view=rev Author: bonivart Date: 2009-04-20 14:20:59 +0000 (Mon, 20 Apr 2009) Log Message: ----------- spamassassin: fix spamc xarch=v8 Modified Paths: -------------- csw/mgar/pkg/spamassassin/trunk/Makefile Modified: csw/mgar/pkg/spamassassin/trunk/Makefile =================================================================== --- csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 13:34:07 UTC (rev 4422) +++ csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 14:20:59 UTC (rev 4423) @@ -46,6 +46,14 @@ perl Makefile.PL INSTALLDIRS=vendor DESTDIR=$(DESTDIR) CONFDIR=/opt/csw/etc/spamassassin LOCALSTATEDIR=/var/opt/csw/spamassassin CONTACT_ADDRESS=postmaster ) @$(MAKECOOKIE) +pre-build-modulated: + @echo " ==> Pre-build $(GARNAME) (custom)" + @( cd $(WORKSRC)/spamc ; \ + pwd ; \ + sed 's/CFLAGS = /CFLAGS = -xarch=v8 /' Makefile.in > Makefile.tmp ; \ + cp Makefile.tmp Makefile.in ) + @$(MAKECOOKIE) + build-custom: @echo " ==> Building $(GARNAME) (custom)" @( cd $(WORKSRC) ; \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 16:53:52 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 14:53:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4424] csw/mgar/pkg/spamassassin/trunk/Makefile Message-ID: Revision: 4424 http://gar.svn.sourceforge.net/gar/?rev=4424&view=rev Author: bonivart Date: 2009-04-20 14:53:52 +0000 (Mon, 20 Apr 2009) Log Message: ----------- spamassassin: cleanup Modified Paths: -------------- csw/mgar/pkg/spamassassin/trunk/Makefile Modified: csw/mgar/pkg/spamassassin/trunk/Makefile =================================================================== --- csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 14:20:59 UTC (rev 4423) +++ csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 14:53:52 UTC (rev 4424) @@ -49,7 +49,6 @@ pre-build-modulated: @echo " ==> Pre-build $(GARNAME) (custom)" @( cd $(WORKSRC)/spamc ; \ - pwd ; \ sed 's/CFLAGS = /CFLAGS = -xarch=v8 /' Makefile.in > Makefile.tmp ; \ cp Makefile.tmp Makefile.in ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 20 20:13:09 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 20 Apr 2009 18:13:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4425] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4425 http://gar.svn.sourceforge.net/gar/?rev=4425&view=rev Author: valholla Date: 2009-04-20 18:13:08 +0000 (Mon, 20 Apr 2009) Log Message: ----------- fix pkgdesc for pdo* and readline depend Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdo CATALOGNAME_CSWphp5pdo = php5_pdo -SPKG_DESC_CSWphp5pdo = pdo Extention for PHP5 +SPKG_DESC_CSWphp5pdo = PHP Data Object Abstraction Base Extention for PHP5 REQUIRED_PKGS_CSWphp5pdo = CSWphp5 PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdomysql CATALOGNAME_CSWphp5pdomysql = php5_pdomysql -SPKG_DESC_CSWphp5pdomysql = pdomysql Extention for PHP5 +SPKG_DESC_CSWphp5pdomysql = MySQL PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib CSWphp5pdo CONFIGURE_ARGS += --with-pdo-mysql=shared,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdoodbc CATALOGNAME_CSWphp5pdoodbc = php5_pdoodbc -SPKG_DESC_CSWphp5pdoodbc = pdoodbc Extention for PHP5 +SPKG_DESC_CSWphp5pdoodbc = ODBC PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc CSWphp5pdo CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdopgsql CATALOGNAME_CSWphp5pdopgsql = php5_pdopgsql -SPKG_DESC_CSWphp5pdopgsql = pdopgsql Extention for PHP5 +SPKG_DESC_CSWphp5pdopgsql = PgSQL PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq CSWphp5pdo PATCHFILES += pdopgsql.diff Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdosqlite CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite -SPKG_DESC_CSWphp5pdosqlite = pdosqlite Extention for PHP5 +SPKG_DESC_CSWphp5pdoSqlite = Sqlite PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5readline = php5_readline SPKG_DESC_CSWphp5readline = readline Extention for PHP5 -REQUIRED_PKGS_CSWphp5readline = CSWphp5 +REQUIRED_PKGS_CSWphp5readline = CSWphp5 CSWreadline CONFIGURE_ARGS += --with-libedit=no CONFIGURE_ARGS += --with-readline=shared,/opt/csw This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 20 23:22:07 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 20 Apr 2009 21:22:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4426] csw/mgar/pkg/php5/trunk/extensions/php5_readline/ Makefile Message-ID: Revision: 4426 http://gar.svn.sourceforge.net/gar/?rev=4426&view=rev Author: valholla Date: 2009-04-20 21:22:07 +0000 (Mon, 20 Apr 2009) Log Message: ----------- curses depend Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 18:13:08 UTC (rev 4425) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 21:22:07 UTC (rev 4426) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5readline = php5_readline SPKG_DESC_CSWphp5readline = readline Extention for PHP5 -REQUIRED_PKGS_CSWphp5readline = CSWphp5 CSWreadline +REQUIRED_PKGS_CSWphp5readline = CSWphp5 CSWreadline CSWncurses CONFIGURE_ARGS += --with-libedit=no CONFIGURE_ARGS += --with-readline=shared,/opt/csw This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 03:43:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 01:43:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4427] csw/mgar/pkg/php5/trunk/extensions/php5_pdo Message-ID: Revision: 4427 http://gar.svn.sourceforge.net/gar/?rev=4427&view=rev Author: valholla Date: 2009-04-21 01:43:05 +0000 (Tue, 21 Apr 2009) Log Message: ----------- more descritptive description for php5_pdo* packages Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdo CATALOGNAME_CSWphp5pdo = php5_pdo -SPKG_DESC_CSWphp5pdo = PHP Data Object Abstraction Base Extention for PHP5 +SPKG_DESC_CSWphp5pdo = A database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdo = CSWphp5 PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdomysql CATALOGNAME_CSWphp5pdomysql = php5_pdomysql -SPKG_DESC_CSWphp5pdomysql = MySQL PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdomysql = A MySQL specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib CSWphp5pdo CONFIGURE_ARGS += --with-pdo-mysql=shared,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdoodbc CATALOGNAME_CSWphp5pdoodbc = php5_pdoodbc -SPKG_DESC_CSWphp5pdoodbc = ODBC PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdoodbc = An ODBC specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc CSWphp5pdo CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdopgsql CATALOGNAME_CSWphp5pdopgsql = php5_pdopgsql -SPKG_DESC_CSWphp5pdopgsql = PgSQL PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdopgsql = A PgSQL specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq CSWphp5pdo PATCHFILES += pdopgsql.diff Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdosqlite CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite -SPKG_DESC_CSWphp5pdoSqlite = Sqlite PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdoSqlite = A Sqlite specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 21 13:46:00 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 21 Apr 2009 11:46:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4428] csw/mgar/pkg/clamav/trunk/Makefile Message-ID: Revision: 4428 http://gar.svn.sourceforge.net/gar/?rev=4428&view=rev Author: bonivart Date: 2009-04-21 11:46:00 +0000 (Tue, 21 Apr 2009) Log Message: ----------- clamav: added libtoolrt as dep Modified Paths: -------------- csw/mgar/pkg/clamav/trunk/Makefile Modified: csw/mgar/pkg/clamav/trunk/Makefile =================================================================== --- csw/mgar/pkg/clamav/trunk/Makefile 2009-04-21 01:43:05 UTC (rev 4427) +++ csw/mgar/pkg/clamav/trunk/Makefile 2009-04-21 11:46:00 UTC (rev 4428) @@ -24,7 +24,7 @@ CATALOGNAME_CSWlibclamav = libclamav SPKG_DESC_CSWlibclamav = $(DESCRIPTION) Library -REQUIRED_PKGS_CSWclamav = CSWlibclamav CSWzlib CSWbzip2 CSWiconv CSWcswclassutils CSWncurses +REQUIRED_PKGS_CSWclamav = CSWlibclamav CSWzlib CSWbzip2 CSWiconv CSWcswclassutils CSWncurses CSWlibtoolrt REQUIRED_PKGS_CSWlibclamav = CSWzlib CSWbzip2 CSWiconv # We define upstream file regex so we can be notifed of new upstream software release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 17:46:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 15:46:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4429] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4429 http://gar.svn.sourceforge.net/gar/?rev=4429&view=rev Author: valholla Date: 2009-04-21 15:46:20 +0000 (Tue, 21 Apr 2009) Log Message: ----------- force remove of ~ backup files Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_files.mk csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_files.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-21 11:46:00 UTC (rev 4428) +++ csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-21 15:46:20 UTC (rev 4429) @@ -86,7 +86,6 @@ PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.*a PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* -EXTRA_PKGFILES_EXCLUDED_CSWgcc4objc = /opt/csw/gcc4/lib/gcc/.*/(\d+(?:\.\d+)*)/include ####### RunTime Packages ## gcc4adart Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-21 11:46:00 UTC (rev 4428) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-21 15:46:20 UTC (rev 4429) @@ -30,6 +30,7 @@ post-merge-modulated: $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ $(PKGROOT)/opt/csw/gcc4/lib/ ) + $(_DBG)( gfind $(PKGROOT) -name \*~ -exec grm -f {} \; ) $(_DBG)$(MAKECOOKIE) test-skip: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 21 18:26:56 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 21 Apr 2009 16:26:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4430] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4430 http://gar.svn.sourceforge.net/gar/?rev=4430&view=rev Author: bonivart Date: 2009-04-21 16:26:56 +0000 (Tue, 21 Apr 2009) Log Message: ----------- cswclassutils: fix bug 3632, 3633, 3634 Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-21 15:46:20 UTC (rev 4429) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-21 16:26:56 UTC (rev 4430) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.5 +GARVERSION = 1.6 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-21 15:46:20 UTC (rev 4429) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-21 16:26:56 UTC (rev 4430) @@ -7,10 +7,28 @@ # # 2008-04-21 First release # 2009-03-28 Added support for refresh +# 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), + Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc +SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" + +# retrieve the previous state of a service identified by the given FRMI +load_smf_service_state () +{ + SMF_STATE="disabled" + + if [ -f "$SMF_STATE_FILE" ]; then + set -- `/usr/bin/awk " \\\$1 == \"$1\" { print \\\$2 } " "$SMF_STATE_FILE"` + if [ "$1" = "enabled" ]; then + SMF_STATE="enabled" + fi + fi +} + # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -34,6 +52,19 @@ echo PACKAGE: $PKGINST SMF: $smf fi +# Determine if service should be started or not +daemon=yes + +if [ "$autoenable_daemons" = "no" ]; then + daemon=no +fi + +if [ "$autoenable_$service" = "no" ]; then + daemon=no +elif [ "$autoenable_$service" = "yes" ]; then + daemon=yes +fi + # Copy files, set up SMF echo "Installing class ..." @@ -176,74 +207,66 @@ /usr/bin/ln -s $dest /etc/init.d/$service /usr/sbin/installf -c cswinitsmf $PKGINST /etc/init.d/$service=$dest s - # Create rc-symlinks - RC_KNUM= - if [ "`grep '^#RC_KNUM' $dest`" ]; then - RC_KNUM=`grep '^#RC_KNUM' $dest | awk '{print $2}'` + # Create rc-symlinks if enabled + if [ "$daemon" = "yes" ]; then + RC_KNUM= + if [ "`grep '^#RC_KNUM' $dest`" ]; then + RC_KNUM=`grep '^#RC_KNUM' $dest | awk '{print $2}'` + fi + RC_SNUM= + if [ "`grep '^#RC_SNUM' $dest`" ]; then + RC_SNUM=`grep '^#RC_SNUM' $dest | awk '{print $2}'` + fi + RC_KLEV= + if [ "`grep '^#RC_KLEV' $dest`" ]; then + RC_KLEV=`grep '^#RC_KLEV' $dest | awk '{print $2}'` + RC_KLEV=`echo $RC_KLEV | sed 's/,/ /g'` + fi + RC_SLEV= + if [ "`grep '^#RC_SLEV' $dest`" ]; then + RC_SLEV=`grep '^#RC_SLEV' $dest | awk '{print $2}'` + RC_SLEV=`echo $RC_SLEV | sed 's/,/ /g'` + fi + if [ ! "$RC_KNUM" ]; then + RC_KNUM=20 + fi + if [ ! "$RC_SNUM" ]; then + RC_SNUM=80 + fi + if [ ! "$RC_KLEV" ]; then + RC_KLEV="0 1 2 S" + fi + if [ ! "$RC_SLEV" ]; then + RC_SLEV=3 + fi + if [ "$DEBUG" ]; then + echo RC_KNUM: $RC_KNUM + echo RC_SNUM: $RC_SNUM + echo RC_KLEV: $RC_KLEV + echo RC_SLEV: $RC_SLEV + fi + for i in $RC_KLEV; do + echo /etc/rc$i.d/K$RC_KNUM$service + /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/K$RC_KNUM$service=/etc/init.d/$service s + /bin/ln -s /etc/init.d/$service /etc/rc$i.d/K$RC_KNUM$service + done + for i in $RC_SLEV; do + echo /etc/rc$i.d/S$RC_SNUM$service + /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/S$RC_SNUM$service=/etc/init.d/$service s + /bin/ln -s /etc/init.d/$service /etc/rc$i.d/S$RC_SNUM$service + done fi - RC_SNUM= - if [ "`grep '^#RC_SNUM' $dest`" ]; then - RC_SNUM=`grep '^#RC_SNUM' $dest | awk '{print $2}'` - fi - RC_KLEV= - if [ "`grep '^#RC_KLEV' $dest`" ]; then - RC_KLEV=`grep '^#RC_KLEV' $dest | awk '{print $2}'` - RC_KLEV=`echo $RC_KLEV | sed 's/,/ /g'` - fi - RC_SLEV= - if [ "`grep '^#RC_SLEV' $dest`" ]; then - RC_SLEV=`grep '^#RC_SLEV' $dest | awk '{print $2}'` - RC_SLEV=`echo $RC_SLEV | sed 's/,/ /g'` - fi - if [ ! "$RC_KNUM" ]; then - RC_KNUM=20 - fi - if [ ! "$RC_SNUM" ]; then - RC_SNUM=80 - fi - if [ ! "$RC_KLEV" ]; then - RC_KLEV="0 1 2 S" - fi - if [ ! "$RC_SLEV" ]; then - RC_SLEV=3 - fi - if [ "$DEBUG" ]; then - echo RC_KNUM: $RC_KNUM - echo RC_SNUM: $RC_SNUM - echo RC_KLEV: $RC_KLEV - echo RC_SLEV: $RC_SLEV - fi - for i in $RC_KLEV; do - echo /etc/rc$i.d/K$RC_KNUM$service - /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/K$RC_KNUM$service=/etc/init.d/$service s - /bin/ln -s /etc/init.d/$service /etc/rc$i.d/K$RC_KNUM$service - done - for i in $RC_SLEV; do - echo /etc/rc$i.d/S$RC_SNUM$service - /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/S$RC_SNUM$service=/etc/init.d/$service s - /bin/ln -s /etc/init.d/$service /etc/rc$i.d/S$RC_SNUM$service - done fi done -# Determine if service should be started or not -daemon=yes - -if [ "$autoenable_daemons" = "no" ]; then - daemon=no -fi - -if [ "$autoenable_$service" = "no" ]; then - daemon=no -elif [ "$autoenable_$service" = "yes" ]; then - daemon=yes -fi - # Start service if [ "$daemon" = "yes" ]; then echo Starting $PKGINST ... if [ "$smf" = "yes" ]; then - /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 + load_smf_service_state "$FMRI/$service" + if [ "$SMF_STATE" = "enabled" ]; then + /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 + fi else # fix permissions temporarily since 644 is used until verification /usr/bin/chmod 744 /etc/init.d/$service @@ -251,6 +274,9 @@ fi fi +# we delete the smf state file as we don't need it anymore +rm -f "$SMF_STATE_FILE" + /usr/sbin/installf -f $PKGINST exit 0 Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-21 15:46:20 UTC (rev 4429) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-21 16:26:56 UTC (rev 4430) @@ -8,9 +8,35 @@ # 2008-04-21 First release # 2008-11-23 Fixed grep bug for FMRI # 2009-01-07 Fixed bug with multiple services per package +# 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), + Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable +# The following file is used to save the state of smf service upon +# package removal +# This allows to restore the service state across package upgrades. +SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" + +# The smf state file shouldn't be there at this time but we +# delete it to be sure +rm -f "$SMF_STATE_FILE" + +# save the current service state for the given frmi +save_smf_state () +{ + SMF_STATE=`/usr/sbin/svccfg -s "$1:default" listprop general/enabled | /usr/bin/awk '{ print $3 }'` + if [ "$SMF_STATE" != "true" ]; then + SMF_STATE="disabled" + else + SMF_STATE="enabled" + fi + [ -d "$SMF_STATE_DIR" ] || mkdir -p "$SMF_STATE_DIR" + echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" +} + + # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -41,8 +67,8 @@ for i in `echo $FMRI | tr '\n' ' '` do if [ "$smf" = "yes" ]; then - /usr/sbin/svcadm disable svc:/$i - sleep 1 + save_smf_state + /usr/sbin/svcadm -s disable svc:/$i # Unregister with SMF echo Unregister svc:/${i}:default with SMF ... /usr/sbin/svccfg delete -f svc:/${i}:default This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 18:36:14 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 16:36:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4431] csw/mgar/pkg/gcc4/trunk/ Message-ID: Revision: 4431 http://gar.svn.sourceforge.net/gar/?rev=4431&view=rev Author: valholla Date: 2009-04-21 16:36:14 +0000 (Tue, 21 Apr 2009) Log Message: ----------- add work cookies and download to ignore Property Changed: ---------------- csw/mgar/pkg/gcc4/trunk/ Property changes on: csw/mgar/pkg/gcc4/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 21 18:44:49 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 21 Apr 2009 16:44:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4432] csw/mgar/pkg/cswclassutils/trunk/files/ Message-ID: Revision: 4432 http://gar.svn.sourceforge.net/gar/?rev=4432&view=rev Author: bonivart Date: 2009-04-21 16:44:49 +0000 (Tue, 21 Apr 2009) Log Message: ----------- cswclassutils: set svn:ignore Property Changed: ---------------- csw/mgar/pkg/cswclassutils/trunk/files/ Property changes on: csw/mgar/pkg/cswclassutils/trunk/files ___________________________________________________________________ Added: svn:ignore + tmp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 19:56:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 17:56:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4433] csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/ Makefile Message-ID: Revision: 4433 http://gar.svn.sourceforge.net/gar/?rev=4433&view=rev Author: valholla Date: 2009-04-21 17:56:57 +0000 (Tue, 21 Apr 2009) Log Message: ----------- fix typo in description assignment Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-21 16:44:49 UTC (rev 4432) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-21 17:56:57 UTC (rev 4433) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdosqlite CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite -SPKG_DESC_CSWphp5pdoSqlite = A Sqlite specific database access abstraction module for PHP applications +SPKG_DESC_CSWphp5pdosqlite = A Sqlite specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 19:59:49 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 17:59:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4434] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4434 http://gar.svn.sourceforge.net/gar/?rev=4434&view=rev Author: valholla Date: 2009-04-21 17:59:49 +0000 (Tue, 21 Apr 2009) Log Message: ----------- remove duplicate dependencies Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-21 17:56:57 UTC (rev 4433) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-21 17:59:49 UTC (rev 4434) @@ -61,10 +61,10 @@ ## Define Dependencies COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr CSWggettextrt -REQUIRED_PKGS_CSWgcc4adart = CSWgcc4corert CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4adart = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core CSWgcc4corert REQUIRED_PKGS_CSWgcc4ada += CSWgcc4adart $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4corert = $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert CSWbinutils $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core CSWgcc4corert This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 20:35:54 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 18:35:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4435] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4435 http://gar.svn.sourceforge.net/gar/?rev=4435&view=rev Author: valholla Date: 2009-04-21 18:35:54 +0000 (Tue, 21 Apr 2009) Log Message: ----------- package tweak Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-21 17:59:49 UTC (rev 4434) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-21 18:35:54 UTC (rev 4435) @@ -31,8 +31,6 @@ REQUIRED_PKGS_CSWsudo-common = CSWggettextrt DISTFILES += CSWsudo-common.postinstall -DISTFILES += CSWsudo.postinstall -DISTFILES += CSWsudo.postremove CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam @@ -45,11 +43,10 @@ include gar/category.mk -PKGFILES_CSWsudo = .*$(bindir)/sudo.minimal +PKGFILES_CSWsudo = .*$(bindir)/sudo.* post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; gmv sudo sudo.minimal ) - @( cd $(PKGROOT)$(bindir) ; grm sudoedit ) + @( cd $(PKGROOT)$(bindir) ; gln -f sudo sudo.minimal ) @( cd $(PKGROOT)$(sysconfdir) ; gmv sudoers sudoers.CSW ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-21 17:59:49 UTC (rev 4434) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-21 18:35:54 UTC (rev 4435) @@ -1,24 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -## First check to see if sudo.ldap is installed -## If it is make sure the liks are in place -## and permissions are set accordingly -if [ -f ${BINDIR}/sudo.ldap ]; then - chmod 4755 ${BINDIR}/sudo.ldap - if [ ! -f ${BINDIR}/sudo ]; then - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo - fi - if [ ! -f ${BINDIR}/sudoedit ]; then - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit - fi -else - rm -f ${BINDIR}/sudo - rm -f ${BINDIR}/sudoedit - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-21 17:59:49 UTC (rev 4434) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-21 18:35:54 UTC (rev 4435) @@ -1,15 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -rm -f ${BINDIR}/sudo -rm -f ${BINDIR}/sudoedit - -if [ -f ${BINDIR}/sudo.ldap ]; then - chmod 4755 ${BINDIR}/sudo.ldap - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit -fi - -exit 0 - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 20:40:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 18:40:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4436] csw/mgar/pkg/sudo_ldap/trunk Message-ID: Revision: 4436 http://gar.svn.sourceforge.net/gar/?rev=4436&view=rev Author: valholla Date: 2009-04-21 18:40:11 +0000 (Tue, 21 Apr 2009) Log Message: ----------- package tweak Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-21 18:35:54 UTC (rev 4435) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-21 18:40:11 UTC (rev 4436) @@ -12,8 +12,6 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += CSWsudoldap.postinstall -DISTFILES += CSWsudoldap.postremove PATCHFILES = install.diff # We define upstream file regex so we can be notifed of new Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall 2009-04-21 18:35:54 UTC (rev 4435) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall 2009-04-21 18:40:11 UTC (rev 4436) @@ -1,11 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -rm -f ${BINDIR}/sudo -rm -f ${BINDIR}/sudoedit -ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo -ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-21 18:35:54 UTC (rev 4435) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-21 18:40:11 UTC (rev 4436) @@ -1,14 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -rm -f ${BINDIR}/sudo -rm -f ${BINDIR}/sudoedit - -if [ -f ${BINDIR}/sudo.minimal ]; then - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit -fi - -exit 0 - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 22 09:59:44 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 22 Apr 2009 07:59:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4437] csw/mgar/pkg/nsd/trunk Message-ID: Revision: 4437 http://gar.svn.sourceforge.net/gar/?rev=4437&view=rev Author: idogan23 Date: 2009-04-22 07:59:44 +0000 (Wed, 22 Apr 2009) Log Message: ----------- nsd: switched to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-21 18:40:11 UTC (rev 4436) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-22 07:59:44 UTC (rev 4437) @@ -14,19 +14,21 @@ # uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES UPSTREAM_MASTER_SITES = http://www.nlnetlabs.nl/downloads/nsd/ +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +PACKAGES = CSWnsd +REQUIRED_PKGS = CSWcswclassutils CSWosslrt +CATALOGNAME = nsd +SPKG_DESC = An authoritative only non-recursive name server + DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWnsd,) DISTFILES += cswusergroup DISTFILES += cswnsd SPKG_CLASSES = none cswusergroup ugfiles cswcpsampleconf cswinitsmf PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/CSWnsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$2 = "ugfiles" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' -REQUIRED_PKGS = CSWcswclassutils - -# We define upstream file regex so we can be notifed of new upstream software release -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid Deleted: csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec =================================================================== --- csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec 2009-04-21 18:40:11 UTC (rev 4436) +++ csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec 2009-04-22 07:59:44 UTC (rev 4437) @@ -1,4 +0,0 @@ -%var bitname nsd -%var pkgname CSWnsd -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/LICENSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 22 10:09:54 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 22 Apr 2009 08:09:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4438] csw/mgar/pkg/geolitedb/trunk Message-ID: Revision: 4438 http://gar.svn.sourceforge.net/gar/?rev=4438&view=rev Author: bonivart Date: 2009-04-22 08:09:54 +0000 (Wed, 22 Apr 2009) Log Message: ----------- geolitedb: update to april db Modified Paths: -------------- csw/mgar/pkg/geolitedb/trunk/Makefile csw/mgar/pkg/geolitedb/trunk/checksums Added Paths: ----------- csw/mgar/pkg/geolitedb/trunk/files/COPYING Removed Paths: ------------- csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec Modified: csw/mgar/pkg/geolitedb/trunk/Makefile =================================================================== --- csw/mgar/pkg/geolitedb/trunk/Makefile 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/Makefile 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,13 +1,15 @@ GARNAME = geolitedb -GARVERSION = 090102 +GARVERSION = 090422 CATEGORIES = net DESCRIPTION = geolite country database MASTER_SITES = http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/ DISTFILES = GeoIP.dat.gz -DISTFILES += $(call admfiles,CSWgeolitedb) +DISTFILES += COPYING +ARCHALL = 1 + CONFIGURE_SCRIPTS = BUILD_SCRIPTS = TEST_SCRIPTS = @@ -16,12 +18,11 @@ include gar/category.mk WORKSRC = $(WORKDIR) -SPKG_SOURCEURL = http://www.maxmind.com/app/geolitecountry/ +SPKG_SOURCEURL = http://www.maxmind.com/app/geolitecountry install-custom: @echo " ==> Installing $(GARNAME)" @ginstall -d $(DESTDIR)/opt/csw/share/GeoIP @ginstall -d $(DESTDIR)/opt/csw/share/doc/geolitedb @cp -r $(WORKSRC)/GeoIP.dat $(DESTDIR)/opt/csw/share/GeoIP/ - @cp -r $(FILEDIR)/CSWgeolitedb.copyright $(DESTDIR)/opt/csw/share/doc/geolitedb/LICENSE @$(MAKECOOKIE) Modified: csw/mgar/pkg/geolitedb/trunk/checksums =================================================================== --- csw/mgar/pkg/geolitedb/trunk/checksums 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/checksums 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,2 +1,2 @@ -2a4efeae0f1326a2095aefe4d8428efd download/GeoIP.dat.gz -9b11bd2d3e31bab9229c369e6f9c8bb7 download/CSWgeolitedb.gspec +cd8d7820bebbb6f274fa426c12485f9e download/GeoIP.dat.gz +ed834df1fb6cb5056f5310b98fc71811 download/COPYING Added: csw/mgar/pkg/geolitedb/trunk/files/COPYING =================================================================== --- csw/mgar/pkg/geolitedb/trunk/files/COPYING (rev 0) +++ csw/mgar/pkg/geolitedb/trunk/files/COPYING 2009-04-22 08:09:54 UTC (rev 4438) @@ -0,0 +1,39 @@ +There are two licenses, one for the C library software, and one for +the database. + +SOFTWARE LICENSE (C library) + +The GeoIP C Library is licensed under the LGPL. For details see +the COPYING file. + +OPEN DATA LICENSE (GeoLite Country and GeoLite City databases) + +Copyright (c) 2008 MaxMind, Inc. All Rights Reserved. + +All advertising materials and documentation mentioning features or use of +this database must display the following acknowledgment: +"This product includes GeoLite data created by MaxMind, available from +http://maxmind.com/" + +Redistribution and use with or without modification, are permitted provided +that the following conditions are met: +1. Redistributions must retain the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other +materials provided with the distribution. +2. All advertising materials and documentation mentioning features or use of +this database must display the following acknowledgement: +"This product includes GeoLite data created by MaxMind, available from +http://maxmind.com/" +3. "MaxMind" may not be used to endorse or promote products derived from this +database without specific prior written permission. + +THIS DATABASE IS PROVIDED BY MAXMIND.COM ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MAXMIND.COM BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Deleted: csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright =================================================================== --- csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,39 +0,0 @@ -There are two licenses, one for the C library software, and one for -the database. - -SOFTWARE LICENSE (C library) - -The GeoIP C Library is licensed under the LGPL. For details see -the COPYING file. - -OPEN DATA LICENSE (GeoLite Country and GeoLite City databases) - -Copyright (c) 2008 MaxMind, Inc. All Rights Reserved. - -All advertising materials and documentation mentioning features or use of -this database must display the following acknowledgment: -"This product includes GeoLite data created by MaxMind, available from -http://maxmind.com/" - -Redistribution and use with or without modification, are permitted provided -that the following conditions are met: -1. Redistributions must retain the above copyright notice, this list of -conditions and the following disclaimer in the documentation and/or other -materials provided with the distribution. -2. All advertising materials and documentation mentioning features or use of -this database must display the following acknowledgement: -"This product includes GeoLite data created by MaxMind, available from -http://maxmind.com/" -3. "MaxMind" may not be used to endorse or promote products derived from this -database without specific prior written permission. - -THIS DATABASE IS PROVIDED BY MAXMIND.COM ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MAXMIND.COM BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Deleted: csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec =================================================================== --- csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,8 +0,0 @@ -%var bitname geolitedb -%var pkgname CSWgeolitedb -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/geolitedb/LICENSE for license information. - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 22 15:34:01 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 22 Apr 2009 13:34:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4439] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4439 http://gar.svn.sourceforge.net/gar/?rev=4439&view=rev Author: bonivart Date: 2009-04-22 13:34:00 +0000 (Wed, 22 Apr 2009) Log Message: ----------- cswclassutils: minor fixes Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-22 13:34:00 UTC (rev 4439) @@ -29,6 +29,6 @@ @ginstall -d $(DESTDIR)/var/opt/csw/svc/method @cp $(FILEDIR)/CSW$(GARNAME).csw.smf.sample $(DESTDIR)/etc/opt/csw/init.d/csw.smf.sample @cp $(FILEDIR)/CSW$(GARNAME).README.CSW $(DESTDIR)$(docdir)/$(GARNAME)/README.CSW - @cp $(FILEDIR)/CSW$(GARNAME).copyright $(DESTDIR)$(docdir)/$(GARNAME)/LICENSE + @cp $(FILEDIR)/CSW$(GARNAME).copyright $(DESTDIR)$(docdir)/$(GARNAME)/license @$(foreach CAS,$(CASLIST),cp $(FILEDIR)/CSW$(GARNAME).i.$(CAS) $(DESTDIR)/usr/sadm/install/scripts/i.$(CAS);cp $(FILEDIR)/CSW$(GARNAME).r.$(CAS) $(DESTDIR)/usr/sadm/install/scripts/r.$(CAS);) @$(MAKECOOKIE) Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec 2009-04-22 13:34:00 UTC (rev 4439) @@ -7,5 +7,5 @@ %depend %copyright -Please see /opt/csw/share/doc/cswclassutils/LICENSE for license information. +Please see /opt/csw/share/doc/cswclassutils/license for license information. Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-22 13:34:00 UTC (rev 4439) @@ -8,7 +8,7 @@ # 2008-04-21 First release # 2009-03-28 Added support for refresh # 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), - Persistent state across upgrades (Bug ID 0003634) +# Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype 2009-04-22 13:34:00 UTC (rev 4439) @@ -19,4 +19,4 @@ d none /opt/csw/share/doc 0755 root bin d none /opt/csw/share/doc/cswclassutils 0755 root bin f none /opt/csw/share/doc/cswclassutils/README.CSW 0444 root bin -f none /opt/csw/share/doc/cswclassutils/LICENSE 0444 root bin +f none /opt/csw/share/doc/cswclassutils/license 0444 root bin Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-22 13:34:00 UTC (rev 4439) @@ -9,7 +9,7 @@ # 2008-11-23 Fixed grep bug for FMRI # 2009-01-07 Fixed bug with multiple services per package # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), - Persistent state across upgrades (Bug ID 0003634) +# Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 22 15:35:54 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 22 Apr 2009 13:35:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4440] csw/mgar/pkg/cswclassutils/trunk/checksums Message-ID: Revision: 4440 http://gar.svn.sourceforge.net/gar/?rev=4440&view=rev Author: bonivart Date: 2009-04-22 13:35:53 +0000 (Wed, 22 Apr 2009) Log Message: ----------- cswclassutils: checksum Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/checksums Modified: csw/mgar/pkg/cswclassutils/trunk/checksums =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/checksums 2009-04-22 13:34:00 UTC (rev 4439) +++ csw/mgar/pkg/cswclassutils/trunk/checksums 2009-04-22 13:35:53 UTC (rev 4440) @@ -1,2 +1,2 @@ -15e48f60e16862b94755b3205b666ab8 download/CSWcswclassutils.gspec -4527cc9b2dc1458845b55edff5b381bb download/CSWcswclassutils.prototype +38e0bf6e204e003254ed246df2b4e1f9 download/CSWcswclassutils.gspec +2779acb0e9549f5e3de16759f59d2e53 download/CSWcswclassutils.prototype This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 23 01:47:54 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 22 Apr 2009 23:47:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4441] csw/mgar/pkg/docbook-style-xsl/trunk/files/ CSWdocbookxsl.depend Message-ID: Revision: 4441 http://gar.svn.sourceforge.net/gar/?rev=4441&view=rev Author: bdwalton Date: 2009-04-22 23:47:54 +0000 (Wed, 22 Apr 2009) Log Message: ----------- remove old depend file (was unused) Removed Paths: ------------- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend Deleted: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend 2009-04-22 13:35:53 UTC (rev 4440) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend 2009-04-22 23:47:54 UTC (rev 4441) @@ -1,6 +0,0 @@ -P CSWcommon common - common files and dirs for CSW packages -P CSWsgmlcommon sgmlcommon - A collection of entities and DTDs -P CSWxmlcommon xmlcommon - A collection of entities and DTDs -P CSWlibxml2 libxml2 - A library providing XML and HTML support -P CSWdocbookdtds docbookdtds - SGML and XML document type definitions for DocBook. - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 23 02:17:10 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 23 Apr 2009 00:17:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4442] csw/mgar/gar/v2/gar.lib.mk Message-ID: Revision: 4442 http://gar.svn.sourceforge.net/gar/?rev=4442&view=rev Author: bdwalton Date: 2009-04-23 00:17:10 +0000 (Thu, 23 Apr 2009) Log Message: ----------- When dynamic adm scripts are used, and the script is generated on a gmake run where the initial target was greater than extract, nested gmake calls were used. This saw the gmake[$nestlevel]: $path lines inserted in the script output files. The recursive gmake call now passes --no-print-directory explicitly to prevent this. Modified Paths: -------------- csw/mgar/gar/v2/gar.lib.mk Modified: csw/mgar/gar/v2/gar.lib.mk =================================================================== --- csw/mgar/gar/v2/gar.lib.mk 2009-04-22 23:47:54 UTC (rev 4441) +++ csw/mgar/gar/v2/gar.lib.mk 2009-04-23 00:17:10 UTC (rev 4442) @@ -86,7 +86,7 @@ $($(subst .,_,$*)) dynscr//%: - $(MAKE) -n _$@ > $(PARTIALDIR)/$* + $(MAKE) --no-print-directory -n _$@ > $(PARTIALDIR)/$* # download an http URL (colons omitted) http//%: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 10:07:46 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 08:07:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4443] csw/mgar/pkg/zsh/trunk/Makefile Message-ID: Revision: 4443 http://gar.svn.sourceforge.net/gar/?rev=4443&view=rev Author: dmichelsen Date: 2009-04-23 08:07:45 +0000 (Thu, 23 Apr 2009) Log Message: ----------- zsh: Fix CPPFLAGS Modified Paths: -------------- csw/mgar/pkg/zsh/trunk/Makefile Modified: csw/mgar/pkg/zsh/trunk/Makefile =================================================================== --- csw/mgar/pkg/zsh/trunk/Makefile 2009-04-23 00:17:10 UTC (rev 4442) +++ csw/mgar/pkg/zsh/trunk/Makefile 2009-04-23 08:07:45 UTC (rev 4443) @@ -31,4 +31,4 @@ # Use term.h from ncurses or we get compile errors # http://www.zsh.org/mla/workers/2007/msg01236.html -CFLAGS := -I$(includedir)/ncurses $(CFLAGS) +CPPFLAGS := -I$(includedir)/ncursesw $(CPPFLAGS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 23 10:49:15 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 23 Apr 2009 08:49:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4444] csw/mgar/pkg/amavisd-new/trunk Message-ID: Revision: 4444 http://gar.svn.sourceforge.net/gar/?rev=4444&view=rev Author: idogan23 Date: 2009-04-23 08:49:15 +0000 (Thu, 23 Apr 2009) Log Message: ----------- amavisd_new: update to 2.6.3 Modified Paths: -------------- csw/mgar/pkg/amavisd-new/trunk/Makefile csw/mgar/pkg/amavisd-new/trunk/checksums Modified: csw/mgar/pkg/amavisd-new/trunk/Makefile =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/Makefile 2009-04-23 08:07:45 UTC (rev 4443) +++ csw/mgar/pkg/amavisd-new/trunk/Makefile 2009-04-23 08:49:15 UTC (rev 4444) @@ -1,5 +1,5 @@ GARNAME = amavisd-new -GARVERSION = 2.6.2 +GARVERSION = 2.6.3 CATEGORIES = server DESCRIPTION = Interface between MTA and content checkers Modified: csw/mgar/pkg/amavisd-new/trunk/checksums =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-23 08:07:45 UTC (rev 4443) +++ csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-23 08:49:15 UTC (rev 4444) @@ -1,4 +1,4 @@ -0b3b0ef8771af8e4a950e7381d42adbd download/amavisd-new-2.6.2.tar.gz +02b0bd38b40258841c60479603dc6842 download/amavisd-new-2.6.3.tar.gz 979fd28f16513f660912311c3566786d download/CSWamavisdnew.gspec 1a54bc6b9d92afadc704c394cb93fa00 download/CSWamavisdnew.depend 65f66fb3036b7949057733aa99cff724 download/CSWamavisdnew.postinstall This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 23 12:03:59 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 23 Apr 2009 10:03:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4445] csw/mgar/pkg Message-ID: Revision: 4445 http://gar.svn.sourceforge.net/gar/?rev=4445&view=rev Author: idogan23 Date: 2009-04-23 10:03:59 +0000 (Thu, 23 Apr 2009) Log Message: ----------- pyzor: initial commit Added Paths: ----------- csw/mgar/pkg/pyzor/ csw/mgar/pkg/pyzor/branches/ csw/mgar/pkg/pyzor/tags/ csw/mgar/pkg/pyzor/trunk/ csw/mgar/pkg/pyzor/trunk/Makefile csw/mgar/pkg/pyzor/trunk/checksums csw/mgar/pkg/pyzor/trunk/files/ Property changes on: csw/mgar/pkg/pyzor/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/pyzor/trunk/Makefile =================================================================== --- csw/mgar/pkg/pyzor/trunk/Makefile (rev 0) +++ csw/mgar/pkg/pyzor/trunk/Makefile 2009-04-23 10:03:59 UTC (rev 4445) @@ -0,0 +1,36 @@ +GARNAME = pyzor +GARVERSION = 0.4.0 +CATEGORIES = utils + +DESCRIPTION = A collaborative, networked system to detect and block spam +define BLURB + Pyzor is a collaborative, networked system to detect and block spam using + identifying digests of messages. +endef + +MASTER_SITES = http://www.pyzor.org/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +# UPSTREAM_MASTER_SITES = + +PACKAGES = CSWpyzor +REQUIRED_PKGS = CSWpython +CATALOGNAME = pyzor +SPKG_DESC = A collaborative, networked system to detect and block spam + +ARCHALL = 1 + +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = $(WORKSRC)/setup.py +TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/setup.py + +INSTALL_ARGS += --root=$(DESTDIR) +INSTALL_ARGS += --prefix=$(prefix) + +include gar/category.mk Added: csw/mgar/pkg/pyzor/trunk/checksums =================================================================== --- csw/mgar/pkg/pyzor/trunk/checksums (rev 0) +++ csw/mgar/pkg/pyzor/trunk/checksums 2009-04-23 10:03:59 UTC (rev 4445) @@ -0,0 +1 @@ +ee7afe4cc9d419bce5f29250a01c4374 download/pyzor-0.4.0.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 13:30:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 11:30:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4446] csw/mgar/pkg/pkgconfig/trunk Message-ID: Revision: 4446 http://gar.svn.sourceforge.net/gar/?rev=4446&view=rev Author: dmichelsen Date: 2009-04-23 11:30:21 +0000 (Thu, 23 Apr 2009) Log Message: ----------- pkgconfig: Remove macro on manpage that breaks nroff. This fixes again #1747 Modified Paths: -------------- csw/mgar/pkg/pkgconfig/trunk/Makefile csw/mgar/pkg/pkgconfig/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch Modified: csw/mgar/pkg/pkgconfig/trunk/Makefile =================================================================== --- csw/mgar/pkg/pkgconfig/trunk/Makefile 2009-04-23 10:03:59 UTC (rev 4445) +++ csw/mgar/pkg/pkgconfig/trunk/Makefile 2009-04-23 11:30:21 UTC (rev 4446) @@ -23,7 +23,8 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -PATCHFILES = gsed-check.patch +PATCHFILES = gsed-check.patch +PATCHFILES += manpage-macro.patch REQUIRED_PKGS = CSWggettextrt CSWglib2 Modified: csw/mgar/pkg/pkgconfig/trunk/checksums =================================================================== --- csw/mgar/pkg/pkgconfig/trunk/checksums 2009-04-23 10:03:59 UTC (rev 4445) +++ csw/mgar/pkg/pkgconfig/trunk/checksums 2009-04-23 11:30:21 UTC (rev 4446) @@ -1,3 +1,4 @@ -d922a88782b64441d06547632fd85744 download/pkg-config-0.23.tar.gz 64d266fb8acf7df52088b9796f928b60 download/fixme.sh 8d47301467b9f5932f56562585ebc068 download/gsed-check.patch +73a8bc0d5ab5236dcb183460bc0311e4 download/manpage-macro.patch +d922a88782b64441d06547632fd85744 download/pkg-config-0.23.tar.gz Added: csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch =================================================================== --- csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch (rev 0) +++ csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch 2009-04-23 11:30:21 UTC (rev 4446) @@ -0,0 +1,29 @@ +diff -Naur pkg-config-0.23.orig/pkg-config.1 pkg-config-0.23.patched/pkg-config.1 +--- pkg-config-0.23.orig/pkg-config.1 2008-01-16 22:26:50.000000000 +0100 ++++ pkg-config-0.23.patched/pkg-config.1 2009-04-23 13:25:15.372832618 +0200 +@@ -3,25 +3,6 @@ + .\" (C) Red Hat, Inc. based on gnome-config man page (C) Miguel de Icaza (miguel at gnu.org) + .\" + . +-.\" Macros to disable groff line adjustment warnings that we can't easily +-.\" fix in the text. +-.ie \n(.g \{\ +-. de DW +-. nr .oldwarn \n[.warn] +-. warn 0 +-. . +-. de EW +-. warn \n[.oldwarn] +-. . +-.\} +-.el \ +-.\{ \ +-. de DW +-. . +-. de EW +-. . +-.\} +-. + .TH pkg-config 1 + .SH NAME + pkg-config \- Return metainformation about installed libraries This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 23 16:10:50 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 23 Apr 2009 14:10:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4447] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4447 http://gar.svn.sourceforge.net/gar/?rev=4447&view=rev Author: bonivart Date: 2009-04-23 14:10:50 +0000 (Thu, 23 Apr 2009) Log Message: ----------- cswclassutils: fix bugs in cswinitsmf Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 11:30:21 UTC (rev 4446) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 14:10:50 UTC (rev 4447) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.6 +GARVERSION = 1.7 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 11:30:21 UTC (rev 4446) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 14:10:50 UTC (rev 4447) @@ -9,6 +9,7 @@ # 2009-03-28 Added support for refresh # 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), # Persistent state across upgrades (Bug ID 0003634) +# 2009-04-22 Fix bug when starting packages with multiple services (Ihsan Dogan) DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc @@ -52,19 +53,6 @@ echo PACKAGE: $PKGINST SMF: $smf fi -# Determine if service should be started or not -daemon=yes - -if [ "$autoenable_daemons" = "no" ]; then - daemon=no -fi - -if [ "$autoenable_$service" = "no" ]; then - daemon=no -elif [ "$autoenable_$service" = "yes" ]; then - daemon=yes -fi - # Copy files, set up SMF echo "Installing class ..." @@ -74,6 +62,18 @@ echo SRC: $src DEST: $dest fi service="`basename $dest`" + + # Determine if service should be started or not + daemon=yes + if [ "$autoenable_daemons" = "no" ]; then + daemon=no + fi + if [ "$autoenable_$service" = "no" ]; then + daemon=no + elif [ "$autoenable_$service" = "yes" ]; then + daemon=yes + fi + if [ "$smf" = "yes" ]; then # Copy the service script /usr/bin/cp $src $dest || exit 2 @@ -197,6 +197,15 @@ /usr/sbin/svccfg import $SVCDIR/manifest/$FMRI/$service.xml > /dev/null 2>&1 /usr/sbin/svcadm disable svc:/$FMRI/$service > /dev/null 2>&1 echo $PKGINST is using Service Management Facility. The FMRI is svc:/$FMRI/$service:default + + # Start service + if [ "$daemon" = "yes" ]; then + load_smf_service_state "$FMRI/$service" + if [ "$SMF_STATE" = "enabled" ]; then + echo Enabling svc:/$FMRI/$service ... + /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 + fi + fi else # Copy the service script echo $dest @@ -255,25 +264,16 @@ /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/S$RC_SNUM$service=/etc/init.d/$service s /bin/ln -s /etc/init.d/$service /etc/rc$i.d/S$RC_SNUM$service done + + # Start service + echo Starting $service ... + # fix permissions temporarily since 644 is used until verification + /usr/bin/chmod 744 /etc/init.d/$service + /etc/init.d/$service start > /dev/null 2>&1 fi fi done -# Start service -if [ "$daemon" = "yes" ]; then - echo Starting $PKGINST ... - if [ "$smf" = "yes" ]; then - load_smf_service_state "$FMRI/$service" - if [ "$SMF_STATE" = "enabled" ]; then - /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 - fi - else - # fix permissions temporarily since 644 is used until verification - /usr/bin/chmod 744 /etc/init.d/$service - /etc/init.d/$service start > /dev/null 2>&1 - fi -fi - # we delete the smf state file as we don't need it anymore rm -f "$SMF_STATE_FILE" Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 11:30:21 UTC (rev 4446) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 14:10:50 UTC (rev 4447) @@ -10,6 +10,7 @@ # 2009-01-07 Fixed bug with multiple services per package # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), # Persistent state across upgrades (Bug ID 0003634) +# 2009-04-22 Fixed bug when stopping non-SMF services DEBUG= # clear to disable debug, set to anything to enable @@ -36,7 +37,6 @@ echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" } - # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -61,21 +61,26 @@ fi # Stop service -echo Stopping $PKGINST ... -# Find out FMRI complete with service name -FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'` -for i in `echo $FMRI | tr '\n' ' '` -do - if [ "$smf" = "yes" ]; then +if [ "$smf" = "yes" ]; then + # Find out FMRI complete with service name + FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'` + for i in `echo $FMRI | tr '\n' ' '` + do save_smf_state + echo "Disabling svc:/$i ..." /usr/sbin/svcadm -s disable svc:/$i # Unregister with SMF echo Unregister svc:/${i}:default with SMF ... /usr/sbin/svccfg delete -f svc:/${i}:default - else - /etc/init.d/`basename $i` stop > /dev/null 2>&1 - fi -done + done +else + RC=`cat /var/sadm/install/contents | grep "s cswinitsmf" | grep ${PKGINST}$ | awk -F'=' '{print $1}'` + for i in `echo $RC | tr '\n' ' '` + do + echo Stopping $i ... + "$i" stop > /dev/null 2>&1 + done +fi # Remove files in class cswinitsmf echo "Removing class ..." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 23 17:34:14 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 23 Apr 2009 15:34:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4448] csw/mgar/pkg/pyzor/trunk Message-ID: Revision: 4448 http://gar.svn.sourceforge.net/gar/?rev=4448&view=rev Author: idogan23 Date: 2009-04-23 15:34:14 +0000 (Thu, 23 Apr 2009) Log Message: ----------- pyzor: added patches to address several issues Modified Paths: -------------- csw/mgar/pkg/pyzor/trunk/Makefile csw/mgar/pkg/pyzor/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pyzor/trunk/files/client.py.diff csw/mgar/pkg/pyzor/trunk/files/pyzor.diff csw/mgar/pkg/pyzor/trunk/files/pyzord.diff Modified: csw/mgar/pkg/pyzor/trunk/Makefile =================================================================== --- csw/mgar/pkg/pyzor/trunk/Makefile 2009-04-23 14:10:50 UTC (rev 4447) +++ csw/mgar/pkg/pyzor/trunk/Makefile 2009-04-23 15:34:14 UTC (rev 4448) @@ -11,6 +11,10 @@ MASTER_SITES = http://www.pyzor.org/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 +PATCHFILES = client.py.diff +PATCHFILES += pyzor.diff +PATCHFILES += pyzord.diff + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/pyzor/trunk/checksums =================================================================== --- csw/mgar/pkg/pyzor/trunk/checksums 2009-04-23 14:10:50 UTC (rev 4447) +++ csw/mgar/pkg/pyzor/trunk/checksums 2009-04-23 15:34:14 UTC (rev 4448) @@ -1 +1,4 @@ +d933f0cc0013222f457cbe91ac400c75 download/client.py.diff ee7afe4cc9d419bce5f29250a01c4374 download/pyzor-0.4.0.tar.bz2 +7cf7db0609c5fcbca08e93d4521a964c download/pyzor.diff +b9d3960264af0633c8f784c36577920b download/pyzord.diff Added: csw/mgar/pkg/pyzor/trunk/files/client.py.diff =================================================================== --- csw/mgar/pkg/pyzor/trunk/files/client.py.diff (rev 0) +++ csw/mgar/pkg/pyzor/trunk/files/client.py.diff 2009-04-23 15:34:14 UTC (rev 4448) @@ -0,0 +1,490 @@ +diff --speed-large-files --minimal -Nru pyzor-0.4.0.orig/lib/pyzor/client.py pyzor-0.4.0/lib/pyzor/client.py +--- pyzor-0.4.0.orig/lib/pyzor/client.py 2002-09-08 22:37:15.000000000 +0200 ++++ pyzor-0.4.0/lib/pyzor/client.py 2009-04-23 16:48:08.485649396 +0200 +@@ -8,11 +8,21 @@ + import getopt + import tempfile + import mimetools ++import multifile + import sha + + import pyzor + from pyzor import * + ++import warnings ++ ++def fxn(): ++ warnings.warn("deprecated", DeprecationWarning) ++ ++with warnings.catch_warnings(): ++ warnings.simplefilter("ignore") ++ fxn() ++ + __author__ = pyzor.__author__ + __version__ = pyzor.__version__ + __revision__ = "$Id: client.py,v 1.41 2002/09/08 20:37:15 ftobin Exp $" +@@ -58,11 +68,6 @@ + self.send(msg, address) + return self.read_response(msg.get_thread()) + +- def shutdown(self, address): +- msg = ShutdownRequest() +- self.send(msg, address) +- return self.read_response(msg.get_thread()) +- + def build_socket(self): + self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + +@@ -132,39 +137,50 @@ + + def run(self): + debug = 0 +- (options, args) = getopt.getopt(sys.argv[1:], 'dh:', ['homedir=']) +- if len(args) < 1: +- self.usage() +- + specified_homedir = None ++ options = None ++ log = None ++ ++ try: ++ (options, args) = getopt.getopt(sys.argv[1:], 'd', ['homedir=', 'log']) ++ except getopt.GetoptError: ++ self.usage() ++ ++ if len(args) < 1: ++ self.usage() + + for (o, v) in options: + if o == '-d': + debug = 1 +- elif o == '-h': +- self.usage() + elif o == '--homedir': + specified_homedir = v ++ elif o == '--log': ++ log = 1 + + self.output = Output(debug=debug) +- + homedir = pyzor.get_homedir(specified_homedir) +- ++ ++ if log: ++ sys.stderr = open(homedir + "/pyzor.log", 'a') ++ sys.stderr.write("\npyzor[" + repr (os.getpid()) + "]:\n") ++ + config = pyzor.Config(homedir) + config.add_section('client') + +- defaults = {'ServersFile': 'servers', ++ defaults = {'ServersFile': 'servers', + 'DiscoverServersURL': ServerList.inform_url, +- 'AccountsFile' : 'accounts', ++ 'AccountsFile': 'accounts', ++ 'Timeout': str(Client.timeout), + } + + for k, v in defaults.items(): + config.set('client', k, v) +- ++ + config.read(os.path.join(homedir, 'config')) + + servers_fn = config.get_filename('client', 'ServersFile') +- ++ Client.timeout = config.getint('client', 'Timeout') ++ + if not os.path.exists(homedir): + os.mkdir(homedir) + +@@ -197,10 +213,13 @@ + def usage(self, s=None): + if s is not None: + sys.stderr.write("%s\n" % s) +- sys.stderr.write("""usage: %s [-d] [--homedir dir] command [cmd_opts] ++ sys.stderr.write(""" ++usage: %s [-d] [--homedir dir] command [cmd_opts] + command is one of: check, report, discover, ping, digest, predigest, +- genkey, shutdown ++ genkey ++ + Data is read on standard input (stdin). ++ + """ + % sys.argv[0]) + sys.exit(2) +@@ -208,9 +227,9 @@ + + + def ping(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ getopt.getopt(args[1:], '') ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + + runner = ClientRunner(self.client.ping) +@@ -221,30 +240,23 @@ + return runner.all_ok + + +- def shutdown(self, args): +- (opts, args2) = getopt.getopt(args[1:], '') +- +- if len(args2) > 1: ++ def info(self, args): ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + +- runner = ClientRunner(self.client.shutdown) +- +- for arg in args2: +- server = Address.from_str(arg) +- runner.run(server, (server,)) +- +- return runner.all_ok +- ++ do_mbox = 'msg' + +- def info(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: +- self.usage("%s does not take any non-option arguments" % args[0]) ++ for (o, v) in options: ++ if o == '--mbox': ++ do_mbox = 'mbox' + + runner = InfoClientRunner(self.client.info) + +- for digest in FileDigester(sys.stdin, self.digest_spec): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + for server in self.servers: + response = runner.run(server, (digest, server)) + +@@ -252,34 +264,45 @@ + + + def check(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + ++ do_mbox = 'msg' ++ ++ for (o, v) in options: ++ if o == '--mbox': ++ do_mbox = 'mbox' ++ + runner = CheckClientRunner(self.client.check) + +- for digest in FileDigester(sys.stdin, self.digest_spec): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + for server in self.servers: +- response = runner.run(server, (digest, server)) ++ runner.run(server, (digest, server)) + + return (runner.found_hit and not runner.whitelisted) + + + def report(self, args): +- (options, args2) = getopt.getopt(args[1:], '', ['mbox']) +- do_mbox = False +- +- if len(args2) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + ++ do_mbox = 'msg' ++ + for (o, v) in options: + if o == '--mbox': +- do_mbox = True ++ do_mbox = 'mbox' + + all_ok = True + +- for digest in FileDigester(sys.stdin, self.digest_spec, do_mbox): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + if not self.send_digest(digest, self.digest_spec, + self.client.report): + all_ok = False +@@ -302,20 +325,22 @@ + + + def whitelist(self, args): +- (options, args2) = getopt.getopt(args[1:], '', ['mbox']) +- +- if len(args2) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + +- do_mbox = False ++ do_mbox = 'msg' + + for (o, v) in options: + if o == '--mbox': +- do_mbox = True ++ do_mbox = 'mbox' + + all_ok = True + +- for digest in FileDigester(sys.stdin, self.digest_spec, do_mbox): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + if not self.send_digest(digest, self.digest_spec, + self.client.whitelist): + all_ok = False +@@ -324,32 +349,34 @@ + + + def digest(self, args): +- (options, args2) = getopt.getopt(args[1:], '', ['mbox']) +- +- if len(args2) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + +- +- do_mbox = False ++ do_mbox = 'msg' + + for (o, v) in options: + if o == '--mbox': +- do_mbox = True ++ do_mbox = 'mbox' + +- for digest in FileDigester(sys.stdin, self.digest_spec, do_mbox): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + sys.stdout.write("%s\n" % digest) + + return True + + + def print_digested(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ getopt.getopt(args[1:], '') ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + ++ do_mbox = 'msg' + def loop(): +- for digest in FileDigester(sys.stdin, self.digest_spec): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): + pass + + modglobal_apply(globals(), {'DataDigester': PrintingDataDigester}, +@@ -358,9 +385,9 @@ + return True + + def genkey(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ getopt.getopt(args[1:], '') ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + + import getpass +@@ -414,7 +441,6 @@ + 'report': report, + 'ping' : ping, + 'genkey': genkey, +- 'shutdown': shutdown, + 'info': info, + 'whitelist': whitelist, + 'digest': digest, +@@ -466,7 +492,7 @@ + + (fp, offsets) = self.get_line_offsets(fp) + +- # did we get an empty file? ++ # did we get an empty (parsed output)file? + if len(offsets) == 0: + return + +@@ -608,30 +634,36 @@ + + + +-class FileDigester(BasicIterator): +- __slots__ = ['digester'] +- +- def __init__(self, fp, spec, mbox=False): +- self.digester = iter(get_file_digester(fp, spec, mbox)) +- self.output = pyzor.Output() +- +- def next(self): +- digest = self.digester.next() +- self.output.debug("calculated digest: %s" % digest) +- return digest +- +- +- +-def get_file_digester(fp, spec, mbox, seekable=False): ++def get_input_handler(fp, spec, style='msg', seekable=False): + """Return an object that can be iterated over + to get all the digests from fp according to spec. + mbox is a boolean""" +- if mbox: ++ if style == 'msg': ++ return filter(lambda x: x is not None, ++ (DataDigester(rfc822BodyCleaner(fp), ++ spec, seekable).get_digest(),) ++ ) ++ ++ elif style =='mbox': + return MailboxDigester(fp, spec) + +- return (DataDigester(rfc822BodyCleaner(fp), +- spec, seekable).get_digest(),) ++ elif style == 'digests': ++ return JustDigestsIterator(fp) ++ ++ raise ValueError, "unknown input style" ++ ++ ++class JustDigestsIterator(BasicIterator): ++ __slots__ = ['fp'] ++ ++ def __init__(self, fp): ++ self.fp = fp + ++ def next(self): ++ l = fp.readline() ++ if not l: ++ raise StopIteration ++ return l.rstrip() + + + class MailboxDigester(BasicIterator): +@@ -645,7 +677,12 @@ + self.seekable = seekable + + def next(self): +- next_msg = self.mbox.next() ++ try: ++ next_msg = self.mbox.next() ++ except IOError: ++ print "Error: Please feed mailbox files in on stdin, i.e." ++ print " pyzor digest --mbox < my_mbox_file" ++ next_msg = None + if next_msg is None: + raise StopIteration + return DataDigester(next_msg, self.digest_spec, +@@ -662,39 +699,69 @@ + self.multifile = None + self.curfile = None + ++ # Check if we got a mail or not. Set type to binary if there is no 'From:' header and ++ # type text/plain with encoding 7bit. 7bit is passed trough anyway so nobody cares. ++ if (not msg.has_key("From") and self.type == 'text' and msg.subtype == 'plain' and msg.getencoding() == '7bit'): ++ self.type = 'binary'; ++ ++ if self.type is '': ++ self.type = 'text'; ++ + if self.type == 'text': + encoding = msg.getencoding() +- if encoding == '7bit': +- self.curfile = msg.fp +- else: +- self.curfile = tempfile.TemporaryFile() +- mimetools.decode(msg.fp, self.curfile, encoding) +- self.curfile.seek(0) +- ++ self.curfile = msg.fp ++ if encoding != '7bit': ++ # fix bad encoding name ++ if encoding == '8bits': ++ encoding = '8bit' ++ try: ++ newcurfile = tempfile.TemporaryFile() ++ mimetools.decode(msg.fp, newcurfile, encoding) ++ newcurfile.seek(0) ++ self.curfile = newcurfile ++ except: ++ # ignore encoding on errors, pass msg as is ++ pass ++ + elif self.type == 'multipart': + import multifile + self.multifile = multifile.MultiFile(msg.fp, seekable=False) + self.multifile.push(msg.getparam('boundary')) +- self.multifile.next() +- self.curfile = self.__class__(self.multifile) +- ++ try: ++ self.multifile.next() ++ self.curfile = self.__class__(self.multifile) ++ except: ++ # ++ # Catch multipart decoding errors ++ # ++ fp.seek(0) ++ self.curfile = fp ++ self.type = 'binary' + + if self.type == 'text' or self.type == 'multipart': + assert self.curfile is not None ++ elif self.type == 'binary': ++ try: ++ fp.seek(0) ++ except: ++ pass ++ self.curfile = fp + else: + assert self.curfile is None + + + def readline(self): + l = '' +- if self.type in ('text', 'multipart'): +- l = self.curfile.readline() +- +- if self.type == 'multipart' and not l and self.multifile.next(): +- self.curfile = self.__class__(self.multifile) +- # recursion. Could get messy if +- # we get a bunch of empty multifile parts +- l = self.readline() ++ try: ++ if self.type in ('text', 'multipart', 'binary'): ++ l = self.curfile.readline() ++ if self.type == 'multipart' and not l and self.multifile.next(): ++ self.curfile = self.__class__(self.multifile) ++ # recursion. Could get messy if ++ # we get a bunch of empty multifile parts ++ l = self.readline() ++ except (TypeError, multifile.Error): ++ pass + return l + + Added: csw/mgar/pkg/pyzor/trunk/files/pyzor.diff =================================================================== --- csw/mgar/pkg/pyzor/trunk/files/pyzor.diff (rev 0) +++ csw/mgar/pkg/pyzor/trunk/files/pyzor.diff 2009-04-23 15:34:14 UTC (rev 4448) @@ -0,0 +1,9 @@ +diff --speed-large-files --minimal -Nru pyzor-0.4.0.orig/scripts/pyzor pyzor-0.4.0/scripts/pyzor +--- pyzor-0.4.0.orig/scripts/pyzor 2002-06-09 01:24:20.000000000 +0200 ++++ pyzor-0.4.0/scripts/pyzor 2009-04-23 17:24:58.103657953 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2 ++#!/usr/bin/python2 -Wignore::DeprecationWarning + + import pyzor.client + pyzor.client.run() Added: csw/mgar/pkg/pyzor/trunk/files/pyzord.diff =================================================================== --- csw/mgar/pkg/pyzor/trunk/files/pyzord.diff (rev 0) +++ csw/mgar/pkg/pyzor/trunk/files/pyzord.diff 2009-04-23 15:34:14 UTC (rev 4448) @@ -0,0 +1,9 @@ +diff --speed-large-files --minimal -Nru pyzor-0.4.0.orig/scripts/pyzord pyzor-0.4.0/scripts/pyzord +--- pyzor-0.4.0.orig/scripts/pyzord 2002-09-08 05:33:44.000000000 +0200 ++++ pyzor-0.4.0/scripts/pyzord 2009-04-23 17:30:57.922301138 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2 ++#!/usr/bin/python2 -Wignore::DeprecationWarning + + import os + import os.path This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 23 18:19:07 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 23 Apr 2009 16:19:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4449] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4449 http://gar.svn.sourceforge.net/gar/?rev=4449&view=rev Author: bonivart Date: 2009-04-23 16:19:06 +0000 (Thu, 23 Apr 2009) Log Message: ----------- cswclassutils: add Id tags Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 16:19:06 UTC (rev 4449) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.7 +GARVERSION = 1.8 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW 2009-04-23 16:19:06 UTC (rev 4449) @@ -36,3 +36,6 @@ the home directories to be created and/or removed during install/remove. Read more on the wiki: http://wiki.opencsw.org/cswclassutils-package. + +-- +$Id$ Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # Sample init script # +# $Id$ +# # Original concept by Philip Brown # Written by Peter Bonivart # Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # i.cswinitsmf - Class action script for CSW SMF support # +# $Id$ +# # Original concept by Philip Brown # Written by Peter Bonivart # Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # i.cswusergroup - Class action script for creating users and groups # +# $Id$ +# # Written by Peter Bonivart # # 2009-02-10 First release Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # r.cswinitsmf - Class action script for CSW SMF support # +# $Id$ +# # Original concept by Philip Brown # Written by Peter Bonivart # @@ -10,7 +12,7 @@ # 2009-01-07 Fixed bug with multiple services per package # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), # Persistent state across upgrades (Bug ID 0003634) -# 2009-04-22 Fixed bug when stopping non-SMF services +# 2009-04-23 Fixed bug when stopping non-SMF services DEBUG= # clear to disable debug, set to anything to enable @@ -74,7 +76,7 @@ /usr/sbin/svccfg delete -f svc:/${i}:default done else - RC=`cat /var/sadm/install/contents | grep "s cswinitsmf" | grep ${PKGINST}$ | awk -F'=' '{print $1}'` + RC=`cat /var/sadm/install/contents | grep "^/etc/init.d" | grep "s cswinitsmf" | grep ${PKGINST}$ | awk -F'=' '{print $1}'` for i in `echo $RC | tr '\n' ' '` do echo Stopping $i ... Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # r.cswusergroup - Class action script for removing users and groups # +# $Id$ +# # Written by Peter Bonivart # # 2009-02-10 First release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 23 18:28:16 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 23 Apr 2009 16:28:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4450] csw/mgar/pkg/cswclassutils/trunk/files Message-ID: Revision: 4450 http://gar.svn.sourceforge.net/gar/?rev=4450&view=rev Author: bonivart Date: 2009-04-23 16:28:16 +0000 (Thu, 23 Apr 2009) Log Message: ----------- cswclassutils: set keyword prop Property Changed: ---------------- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 22:36:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 20:36:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4451] csw/mgar/pkg Message-ID: Revision: 4451 http://gar.svn.sourceforge.net/gar/?rev=4451&view=rev Author: dmichelsen Date: 2009-04-23 20:36:05 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Initial checkin Added Paths: ----------- csw/mgar/pkg/rcs/ csw/mgar/pkg/rcs/branches/ csw/mgar/pkg/rcs/tags/ csw/mgar/pkg/rcs/trunk/ csw/mgar/pkg/rcs/trunk/Makefile csw/mgar/pkg/rcs/trunk/checksums csw/mgar/pkg/rcs/trunk/files/ Property changes on: csw/mgar/pkg/rcs/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile (rev 0) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 20:36:05 UTC (rev 4451) @@ -0,0 +1,17 @@ +GARNAME = rcs +GARVERSION = 5.7 +CATEGORIES = apps + +DESCRIPTION = GNU Revision Control System +define BLURB +endef + +MASTER_SITES = http://www.cs.purdue.edu/homes/trinkle/RCS/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.Z + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +CONFIGURE_ARGS = --prefix=$(prefix) + +include gar/category.mk Added: csw/mgar/pkg/rcs/trunk/checksums =================================================================== --- csw/mgar/pkg/rcs/trunk/checksums (rev 0) +++ csw/mgar/pkg/rcs/trunk/checksums 2009-04-23 20:36:05 UTC (rev 4451) @@ -0,0 +1 @@ +423282f0edb353296d9f3498ab683abf /root/mgar/pkg/rcs/trunk/work-i386/download/rcs-5.7.tar.Z This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 23:07:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:07:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4452] csw/mgar/pkg/rcs/trunk Message-ID: Revision: 4452 http://gar.svn.sourceforge.net/gar/?rev=4452&view=rev Author: dmichelsen Date: 2009-04-23 21:07:31 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Minor fixes Modified Paths: -------------- csw/mgar/pkg/rcs/trunk/Makefile csw/mgar/pkg/rcs/trunk/checksums Modified: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 20:36:05 UTC (rev 4451) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:07:31 UTC (rev 4452) @@ -12,6 +12,13 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +man1dir = $(mandir)/man1 +man5dir = $(mandir)/man5 + CONFIGURE_ARGS = --prefix=$(prefix) +TEST_TARGET = + +INSTALL_OVERRIDE_DIRS = prefix man1dir man5dir + include gar/category.mk Modified: csw/mgar/pkg/rcs/trunk/checksums =================================================================== --- csw/mgar/pkg/rcs/trunk/checksums 2009-04-23 20:36:05 UTC (rev 4451) +++ csw/mgar/pkg/rcs/trunk/checksums 2009-04-23 21:07:31 UTC (rev 4452) @@ -1 +1 @@ -423282f0edb353296d9f3498ab683abf /root/mgar/pkg/rcs/trunk/work-i386/download/rcs-5.7.tar.Z +423282f0edb353296d9f3498ab683abf download/rcs-5.7.tar.Z This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 23:11:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:11:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4453] csw/mgar/pkg/rcs/trunk/Makefile Message-ID: Revision: 4453 http://gar.svn.sourceforge.net/gar/?rev=4453&view=rev Author: dmichelsen Date: 2009-04-23 21:11:01 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Skip runpath Modified Paths: -------------- csw/mgar/pkg/rcs/trunk/Makefile Modified: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:07:31 UTC (rev 4452) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:11:01 UTC (rev 4453) @@ -15,9 +15,10 @@ man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 +NORUNPATH = 1 CONFIGURE_ARGS = --prefix=$(prefix) -TEST_TARGET = +TEST_TARGET = check INSTALL_OVERRIDE_DIRS = prefix man1dir man5dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 23:18:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:18:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4454] csw/mgar/pkg/rcs/trunk/Makefile Message-ID: Revision: 4454 http://gar.svn.sourceforge.net/gar/?rev=4454&view=rev Author: dmichelsen Date: 2009-04-23 21:18:09 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Fix test target Modified Paths: -------------- csw/mgar/pkg/rcs/trunk/Makefile Modified: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:11:01 UTC (rev 4453) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:18:09 UTC (rev 4454) @@ -18,7 +18,7 @@ NORUNPATH = 1 CONFIGURE_ARGS = --prefix=$(prefix) -TEST_TARGET = check +TEST_TARGET = INSTALL_OVERRIDE_DIRS = prefix man1dir man5dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 23 23:19:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:19:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4455] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4455 http://gar.svn.sourceforge.net/gar/?rev=4455&view=rev Author: valholla Date: 2009-04-23 21:19:20 +0000 (Thu, 23 Apr 2009) Log Message: ----------- checkin for php5_apache2 Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.preremove csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.space csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/httpd-php5.conf.CSW Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend 2009-04-23 21:19:20 UTC (rev 4455) @@ -0,0 +1,9 @@ +P CSWap2prefork ap2_prefork - Apache 2.2 prefork MPM +P CSWbdb44 berkeleydb44 - embedded database libraries and utilities +P CSWiconv libiconv - GNU iconv library +P CSWkrb5lib krb5_lib - MIT Kerberos 5 core libraries +P CSWlibmm libmm - Shared Memory Allocation abstraction library +P CSWlibxml2 libxml2 - XML Parser Library +P CSWosslrt openssl_rt - Openssl runtime libraries +P CSWphp5 php5 - PHP Hypertext Processor 5 +P CSWzlib zlib - Zlib Data Compression Library Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall 2009-04-23 21:19:20 UTC (rev 4455) @@ -0,0 +1,50 @@ +#!/bin/sh + +CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw +AP2_PREFIX=$CSW_PREFIX/apache2 +AP2_BINDIR=$AP2_PREFIX/sbin +AP2_LIBEXEC=$AP2_PREFIX/libexec +AP2_CONFDIR=$AP2_PREFIX/etc +AP2_EXTRADIR=$AP2_CONFDIR/extra +AP2_CONFIG=$AP2_CONFDIR/httpd.conf + +# Enable the PHP module +PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'} +chroot $PKG_INSTALL_ROOT \ + $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -a -n php5 libphp5.so + +# Configure mod_php5 in httpd.conf +if [ -n "`egrep 'IfModule (mod_php|php_module)' $AP2_CONFIG`" ] +then + echo "Existing mod_php5 configuration detected" +elif [ -n "`egrep '#Include etc/extra/httpd-php5.conf' $AP2_CONFIG`" ]; then + echo "Re-enabling existing config" + perl -i -plne 's,^#(Include etc/extra/httpd-php5.conf),$1,' $AP2_CONFIG +else + echo "Adding Include for extra/http-php5.conf to httpd.conf" + cat << END >> $AP2_CONFIG + +Include etc/extra/httpd-php5.conf +END +fi + +# Copy templates +for file in $AP2_EXTRADIR/httpd-php5.conf +do + if [ ! -f $file ]; then + echo "Creating $file" + cp $file.CSW $file + else + echo "Preserving existing $file" + fi +done + +# Finito +cat < + + AddType application/x-httpd-php .php + AddType application/x-httpd-php-source .phps + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 23 23:51:13 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:51:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4456] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4456 http://gar.svn.sourceforge.net/gar/?rev=4456&view=rev Author: valholla Date: 2009-04-23 21:51:13 +0000 (Thu, 23 Apr 2009) Log Message: ----------- commit php5_apache Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/ csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.preremove csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.space Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:51:13 UTC (rev 4456) @@ -0,0 +1,14 @@ +PHP5EXT_NAME = ap2_modphp5 + +PACKAGES += CSWap2modphp5 + +CATALOGNAME_CSWap2modphp5 = ap2_modphp5 +SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 1.3.x Module +REQUIRED_PKGS_CSWap2modphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib + + +CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs + +PKGFILES_CSWap2modphp5 = .*/csw/apache/.* + Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall 2009-04-23 21:51:13 UTC (rev 4456) @@ -0,0 +1,41 @@ +#!/bin/sh + +CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw +AP_PREFIX=$CSW_PREFIX/apache +AP_BINDIR=$AP_PREFIX/bin +AP_LIBEXEC=$AP_PREFIX/libexec +AP_CONFDIR=$AP_PREFIX/conf +AP_CONFIG=$AP_CONFDIR/httpd.conf + +# Enable the PHP module +PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'} +chroot $PKG_INSTALL_ROOT \ + $AP_BINDIR/apxs -S LIBEXECDIR=$AP_LIBEXEC -e -a -n php5 libphp5.so + +# Add a configuration sample +if [ -z "`grep 'IfModule mod_php5.c' $AP_CONFIG`" ]; then + cp $AP_CONFIG $AP_CONFIG.pre-PHP5 + + echo "Adding libphp5 configuration to $AP_CONFIG..." + cat <> $AP_CONFIG + +# Added by $PKGINST + + + AddType application/x-httpd-php .php + AddType application/x-httpd-php-source .phps + + +CONFIG + +fi + +# Finito +cat < Revision: 4457 http://gar.svn.sourceforge.net/gar/?rev=4457&view=rev Author: valholla Date: 2009-04-23 21:54:16 +0000 (Thu, 23 Apr 2009) Log Message: ----------- fix package name for mod_php5 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:51:13 UTC (rev 4456) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:54:16 UTC (rev 4457) @@ -1,14 +1,14 @@ -PHP5EXT_NAME = ap2_modphp5 +PHP5EXT_NAME = mod_php5 -PACKAGES += CSWap2modphp5 +PACKAGES += CSWmodphp5 -CATALOGNAME_CSWap2modphp5 = ap2_modphp5 -SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 1.3.x Module -REQUIRED_PKGS_CSWap2modphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib -REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +CATALOGNAME_CSWmodphp5 = mod_php5 +SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module +REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs -PKGFILES_CSWap2modphp5 = .*/csw/apache/.* +PKGFILES_CSWmodphp5 = .*/csw/apache/.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 00:17:30 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 22:17:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4458] csw/mgar/pkg/php5/trunk/extensions/php5_apache/ Makefile Message-ID: Revision: 4458 http://gar.svn.sourceforge.net/gar/?rev=4458&view=rev Author: valholla Date: 2009-04-23 22:17:30 +0000 (Thu, 23 Apr 2009) Log Message: ----------- can't compile apache 1 and 2 modules together ;( Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:54:16 UTC (rev 4457) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 22:17:30 UTC (rev 4458) @@ -1,14 +1,13 @@ PHP5EXT_NAME = mod_php5 -PACKAGES += CSWmodphp5 +#PACKAGES += CSWmodphp5 CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +#DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space +#CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs +#PKGFILES_CSWmodphp5 = .*/csw/apache/.* -CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs - -PKGFILES_CSWmodphp5 = .*/csw/apache/.* - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 00:18:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 22:18:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4459] csw/mgar/pkg/php5/trunk/checksums Message-ID: Revision: 4459 http://gar.svn.sourceforge.net/gar/?rev=4459&view=rev Author: valholla Date: 2009-04-23 22:18:12 +0000 (Thu, 23 Apr 2009) Log Message: ----------- can't compile apache 1 and 2 modules together ;( Modified Paths: -------------- csw/mgar/pkg/php5/trunk/checksums Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-23 22:17:30 UTC (rev 4458) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-23 22:18:12 UTC (rev 4459) @@ -1,13 +1,18 @@ -280d6cda7f72a4fc6de42fda21ac2db7 download/php-5.2.9.tar.bz2 -160963de6006c558963e5bc37584bf15 download/php.ini.CSW -90ae3cef3692d7e566c47d89fe39c43d download/phpext -d4c93751890b989c5a7b04acb5845fd9 download/pear.conf.CSW +77076f9a0bab2777c15b84c4c0bd7ba4 download/CSWap2modphp5.depend +632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall +e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove +0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space +8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall +89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh de56d3571f4484284d106af158bffc38 download/CSWphp5_ext_enable.sh -89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh -8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall +ab08e2ba62667bf13fa236099e433e84 download/configure.diff 41ec540885de7c34625768aa1fb9682b download/fixme.sh -ab08e2ba62667bf13fa236099e433e84 download/configure.diff -a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff +a71677d80f5cfd1aeb03547dfdeb705a download/httpd-php5.conf.CSW 2206431e47c2075c0b9c4a12de5cf791 download/odbc.diff 230126f76ee6400ccf225bb6a8243532 download/pdopgsql.diff +d4c93751890b989c5a7b04acb5845fd9 download/pear.conf.CSW 13db46097c9686302bebf160e2d26ed2 download/pgsql.diff +280d6cda7f72a4fc6de42fda21ac2db7 download/php-5.2.9.tar.bz2 +a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff +160963de6006c558963e5bc37584bf15 download/php.ini.CSW +90ae3cef3692d7e566c47d89fe39c43d download/phpext This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:13:14 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:13:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4460] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4460 http://gar.svn.sourceforge.net/gar/?rev=4460&view=rev Author: valholla Date: 2009-04-24 02:13:14 +0000 (Fri, 24 Apr 2009) Log Message: ----------- mod_php added to extensions to build with base php Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/checksums csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-23 22:18:12 UTC (rev 4459) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 02:13:14 UTC (rev 4460) @@ -88,6 +88,10 @@ # SAPI Specific Rules STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec +# Rebuild Configure Args to build mod_php5 +NEW_CONFIGURE_ARGS = $(shell echo $(CONFIGURE_ARGS) |sed -e 's/apxs2/apxs/' \ + -e 's/apache2\/sbin\/apxs/apache\/bin\/apxs/') + # Copy over template config files and utility scripts post-install-modulated: @@ -103,6 +107,12 @@ $(DESTDIR)$(prefix)/php5/etc @(grm -fr $(DESTDIR)/.[a-z]*) @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) + @( echo " ==> Now Building mod_php5 <==" ) + @( if [ -f $(WORKSRC)/Makefile ]; then \ + $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi) + cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) + @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) + @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-23 22:18:12 UTC (rev 4459) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-24 02:13:14 UTC (rev 4460) @@ -2,6 +2,9 @@ 632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove 0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space +5f0046fe1b3f8e2228fdb165bdbbe73a download/CSWmodphp5.postinstall +2e5dbed2c9dd5e24c331753984946822 download/CSWmodphp5.preremove +0dd379f20ceb32fc77bb3a9bf045097f download/CSWmodphp5.space 8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall 89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh de56d3571f4484284d106af158bffc38 download/CSWphp5_ext_enable.sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 22:18:12 UTC (rev 4459) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-24 02:13:14 UTC (rev 4460) @@ -1,13 +1,13 @@ PHP5EXT_NAME = mod_php5 -#PACKAGES += CSWmodphp5 +PACKAGES += CSWmodphp5 CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib -#DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space -#CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs -#PKGFILES_CSWmodphp5 = .*/csw/apache/.* +DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space +PKGFILES_CSWmodphp5 = .*/csw/apache/.* + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:35:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:35:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4461] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4461 http://gar.svn.sourceforge.net/gar/?rev=4461&view=rev Author: valholla Date: 2009-04-24 02:35:22 +0000 (Fri, 24 Apr 2009) Log Message: ----------- trim mod_php* to only needed files Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 02:13:14 UTC (rev 4460) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 02:35:22 UTC (rev 4461) @@ -113,6 +113,8 @@ cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) + @( gfind $(DESTDIR)$(prefix)/apache* + -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) @$(MAKECOOKIE) post-configure-modulated: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:39:08 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:39:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4462] csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ Makefile Message-ID: Revision: 4462 http://gar.svn.sourceforge.net/gar/?rev=4462&view=rev Author: valholla Date: 2009-04-24 02:39:08 +0000 (Fri, 24 Apr 2009) Log Message: ----------- checkin missed file Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 02:39:08 UTC (rev 4462) @@ -0,0 +1,16 @@ +PHP5EXT_NAME = ap2_modphp5 + +PACKAGES += CSWap2modphp5 + +CATALOGNAME_CSWap2modphp5 = ap2_modphp5 +SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 2.2.x Module +REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib + +DISTFILES += CSWap2modphp5.depend CSWap2modphp5.preremove httpd-php5.conf.CSW +DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space + +CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs + +PKGFILES_CSWap2modphp5 = .*/csw/apache2/.* + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:56:01 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:56:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4463] csw/mgar/pkg/php5/trunk/extensions/php5_apache Message-ID: Revision: 4463 http://gar.svn.sourceforge.net/gar/?rev=4463&view=rev Author: valholla Date: 2009-04-24 02:56:00 +0000 (Fri, 24 Apr 2009) Log Message: ----------- Missing Dependency for the modphps Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-24 02:39:08 UTC (rev 4462) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-24 02:56:00 UTC (rev 4463) @@ -4,7 +4,7 @@ CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module -REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib CSWexpat REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 02:39:08 UTC (rev 4462) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 02:56:00 UTC (rev 4463) @@ -4,8 +4,9 @@ CATALOGNAME_CSWap2modphp5 = ap2_modphp5 SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 2.2.x Module -REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv CSWkrb5lib -REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv +REQUIRED_PKGS_CSWap2modphp5 += CSWkrb5lib CSWexpat CSWlibmm +REQUIRED_PKGS_CSWap2modphp5 += CSWlibxml2 CSWosslrt CSWphp5 CSWzlib DISTFILES += CSWap2modphp5.depend CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 05:08:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 03:08:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4464] csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ files/CSWap2modphp5.depend Message-ID: Revision: 4464 http://gar.svn.sourceforge.net/gar/?rev=4464&view=rev Author: valholla Date: 2009-04-24 03:08:50 +0000 (Fri, 24 Apr 2009) Log Message: ----------- make depend dynamic for php5_apache2 Removed Paths: ------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend Deleted: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend 2009-04-24 02:56:00 UTC (rev 4463) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend 2009-04-24 03:08:50 UTC (rev 4464) @@ -1,9 +0,0 @@ -P CSWap2prefork ap2_prefork - Apache 2.2 prefork MPM -P CSWbdb44 berkeleydb44 - embedded database libraries and utilities -P CSWiconv libiconv - GNU iconv library -P CSWkrb5lib krb5_lib - MIT Kerberos 5 core libraries -P CSWlibmm libmm - Shared Memory Allocation abstraction library -P CSWlibxml2 libxml2 - XML Parser Library -P CSWosslrt openssl_rt - Openssl runtime libraries -P CSWphp5 php5 - PHP Hypertext Processor 5 -P CSWzlib zlib - Zlib Data Compression Library This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 05:11:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 03:11:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4465] csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ Makefile Message-ID: Revision: 4465 http://gar.svn.sourceforge.net/gar/?rev=4465&view=rev Author: valholla Date: 2009-04-24 03:11:57 +0000 (Fri, 24 Apr 2009) Log Message: ----------- make depend dynamic for php5_apache2 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 03:08:50 UTC (rev 4464) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 03:11:57 UTC (rev 4465) @@ -8,7 +8,7 @@ REQUIRED_PKGS_CSWap2modphp5 += CSWkrb5lib CSWexpat CSWlibmm REQUIRED_PKGS_CSWap2modphp5 += CSWlibxml2 CSWosslrt CSWphp5 CSWzlib -DISTFILES += CSWap2modphp5.depend CSWap2modphp5.preremove httpd-php5.conf.CSW +DISTFILES += CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 06:11:04 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 04:11:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4466] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4466 http://gar.svn.sourceforge.net/gar/?rev=4466&view=rev Author: valholla Date: 2009-04-24 04:11:04 +0000 (Fri, 24 Apr 2009) Log Message: ----------- typo in post-install modulated Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 03:11:57 UTC (rev 4465) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 04:11:04 UTC (rev 4466) @@ -113,7 +113,7 @@ cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) - @( gfind $(DESTDIR)$(prefix)/apache* + @( gfind $(DESTDIR)$(prefix)/apache* \ -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From a_o_m at users.sourceforge.net Fri Apr 24 13:59:04 2009 From: a_o_m at users.sourceforge.net (a_o_m at users.sourceforge.net) Date: Fri, 24 Apr 2009 11:59:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4467] csw/mgar/pkg/fontconfig/trunk Message-ID: Revision: 4467 http://gar.svn.sourceforge.net/gar/?rev=4467&view=rev Author: a_o_m Date: 2009-04-24 11:59:04 +0000 (Fri, 24 Apr 2009) Log Message: ----------- fontconfig: added csw prefix to fonts.cache files again Modified Paths: -------------- csw/mgar/pkg/fontconfig/trunk/Makefile csw/mgar/pkg/fontconfig/trunk/checksums Added Paths: ----------- csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff Modified: csw/mgar/pkg/fontconfig/trunk/Makefile =================================================================== --- csw/mgar/pkg/fontconfig/trunk/Makefile 2009-04-24 04:11:04 UTC (rev 4466) +++ csw/mgar/pkg/fontconfig/trunk/Makefile 2009-04-24 11:59:04 UTC (rev 4467) @@ -12,7 +12,6 @@ MASTER_SITES = http://www.fontconfig.org/release/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -#DISTFILES += $(call admfiles,postinstall) DISTFILES += CSWfconfig.postinstall DISTFILES += CSWfconfig.checkinstall @@ -27,10 +26,11 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-default-fonts=/usr/openwin/lib/X11/fonts -CONFIGURE_ARGS += --with-add-fonts=/usr/openwin/lib/locale,/usr/share/fonts +CONFIGURE_ARGS += --with-add-fonts=/usr/openwin/lib/locale,/usr/share/fonts,/opt/csw/share/fonts CONFIGURE_ARGS += --with-cache-dir=/var/opt/csw/cache/fontconfig CONFIGURE_ARGS += --with-confdir=/opt/csw/etc/fontconfig +PATCHFILES = fontconfig.h.diff pre-package: @rm -f $(DESTDIR)$(libdir)/libfontconfig.la* @rm -f $(DESTDIR)/opt/csw/etc/fonts/fonts.conf.bak Modified: csw/mgar/pkg/fontconfig/trunk/checksums =================================================================== --- csw/mgar/pkg/fontconfig/trunk/checksums 2009-04-24 04:11:04 UTC (rev 4466) +++ csw/mgar/pkg/fontconfig/trunk/checksums 2009-04-24 11:59:04 UTC (rev 4467) @@ -1,3 +1,4 @@ +21481d18c2100203177ccab5b51e50d7 download/CSWfconfig.checkinstall +5a5b382b4a5e579cfc869bcffd7c034e download/CSWfconfig.postinstall ab54ec1d4ddd836313fdbc0cd5299d6d download/fontconfig-2.6.0.tar.gz -5a5b382b4a5e579cfc869bcffd7c034e download/CSWfconfig.postinstall -21481d18c2100203177ccab5b51e50d7 download/CSWfconfig.checkinstall +0fb83ca9bf9a7b99ab7601347e8c855d download/fontconfig.h.diff Added: csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff =================================================================== --- csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff (rev 0) +++ csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff 2009-04-24 11:59:04 UTC (rev 4467) @@ -0,0 +1,15 @@ +--- fontconfig-2.6.0/fontconfig/fontconfig.h_orig 2008-06-01 04:24:34.000000000 +0200 ++++ fontconfig-2.6.0/fontconfig/fontconfig.h 2009-04-24 12:14:14.404366000 +0200 +@@ -113,9 +113,9 @@ + #define FC_DECORATIVE "decorative" /* Bool - true if style is a decorative variant */ + #define FC_LCD_FILTER "lcdfilter" /* Int */ + +-#define FC_CACHE_SUFFIX ".cache-"FC_CACHE_VERSION +-#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION +-#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION ++#define FC_CACHE_SUFFIX ".cache-csw-"FC_CACHE_VERSION ++#define FC_DIR_CACHE_FILE "fonts.cache-csw-"FC_CACHE_VERSION ++#define FC_USER_CACHE_FILE ".fonts.cache-csw-"FC_CACHE_VERSION + + /* Adjust outline rasterizer */ + #define FC_CHAR_WIDTH "charwidth" /* Int */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Fri Apr 24 19:25:44 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Fri, 24 Apr 2009 17:25:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4468] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4468 http://gar.svn.sourceforge.net/gar/?rev=4468&view=rev Author: bonivart Date: 2009-04-24 17:25:44 +0000 (Fri, 24 Apr 2009) Log Message: ----------- cswclassutils: disable persistent state code Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-24 11:59:04 UTC (rev 4467) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-24 17:25:44 UTC (rev 4468) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.8 +GARVERSION = 1.9 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-24 11:59:04 UTC (rev 4467) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-24 17:25:44 UTC (rev 4468) @@ -12,26 +12,28 @@ # 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), # Persistent state across upgrades (Bug ID 0003634) # 2009-04-22 Fix bug when starting packages with multiple services (Ihsan Dogan) +# 2009-04-24 Temporarily disabled the "persistent state" code until it can be used +# per service, not just per package DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc -SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" -SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" +#SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +#SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" # retrieve the previous state of a service identified by the given FRMI -load_smf_service_state () -{ - SMF_STATE="disabled" +#load_smf_service_state () +#{ +# SMF_STATE="disabled" +# +# if [ -f "$SMF_STATE_FILE" ]; then +# set -- `/usr/bin/awk " \\\$1 == \"$1\" { print \\\$2 } " "$SMF_STATE_FILE"` +# if [ "$1" = "enabled" ]; then +# SMF_STATE="enabled" +# fi +# fi +#} - if [ -f "$SMF_STATE_FILE" ]; then - set -- `/usr/bin/awk " \\\$1 == \"$1\" { print \\\$2 } " "$SMF_STATE_FILE"` - if [ "$1" = "enabled" ]; then - SMF_STATE="enabled" - fi - fi -} - # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -202,11 +204,11 @@ # Start service if [ "$daemon" = "yes" ]; then - load_smf_service_state "$FMRI/$service" - if [ "$SMF_STATE" = "enabled" ]; then +# load_smf_service_state "$FMRI/$service" +# if [ "$SMF_STATE" = "enabled" ]; then echo Enabling svc:/$FMRI/$service ... /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 - fi +# fi fi else # Copy the service script @@ -277,7 +279,7 @@ done # we delete the smf state file as we don't need it anymore -rm -f "$SMF_STATE_FILE" +#rm -f "$SMF_STATE_FILE" /usr/sbin/installf -f $PKGINST Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-24 11:59:04 UTC (rev 4467) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-24 17:25:44 UTC (rev 4468) @@ -13,31 +13,33 @@ # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), # Persistent state across upgrades (Bug ID 0003634) # 2009-04-23 Fixed bug when stopping non-SMF services +# 2009-04-24 Temporarily disabled the "persistent state" code until it can be used +# per service, not just per package DEBUG= # clear to disable debug, set to anything to enable # The following file is used to save the state of smf service upon # package removal # This allows to restore the service state across package upgrades. -SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" -SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" +#SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +#SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" # The smf state file shouldn't be there at this time but we # delete it to be sure -rm -f "$SMF_STATE_FILE" +#rm -f "$SMF_STATE_FILE" # save the current service state for the given frmi -save_smf_state () -{ - SMF_STATE=`/usr/sbin/svccfg -s "$1:default" listprop general/enabled | /usr/bin/awk '{ print $3 }'` - if [ "$SMF_STATE" != "true" ]; then - SMF_STATE="disabled" - else - SMF_STATE="enabled" - fi - [ -d "$SMF_STATE_DIR" ] || mkdir -p "$SMF_STATE_DIR" - echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" -} +#save_smf_state () +#{ +# SMF_STATE=`/usr/sbin/svccfg -s "$1:default" listprop general/enabled | /usr/bin/awk '{ print $3 }'` +# if [ "$SMF_STATE" != "true" ]; then +# SMF_STATE="disabled" +# else +# SMF_STATE="enabled" +# fi +# [ -d "$SMF_STATE_DIR" ] || mkdir -p "$SMF_STATE_DIR" +# echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" +#} # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then @@ -68,9 +70,9 @@ FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'` for i in `echo $FMRI | tr '\n' ' '` do - save_smf_state +# save_smf_state "$i" echo "Disabling svc:/$i ..." - /usr/sbin/svcadm -s disable svc:/$i + /usr/sbin/svcadm disable -s svc:/$i # Unregister with SMF echo Unregister svc:/${i}:default with SMF ... /usr/sbin/svccfg delete -f svc:/${i}:default This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 05:22:15 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 03:22:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4469] csw/mgar/pkg/subversion/trunk Message-ID: Revision: 4469 http://gar.svn.sourceforge.net/gar/?rev=4469&view=rev Author: valholla Date: 2009-04-26 03:22:15 +0000 (Sun, 26 Apr 2009) Log Message: ----------- compiling update to version 1.6.1 Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile csw/mgar/pkg/subversion/trunk/checksums Added Paths: ----------- csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff Removed Paths: ------------- csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:22:15 UTC (rev 4469) @@ -86,20 +86,22 @@ SVNLIB = $(prefix)/lib/svn NOISALIST = 1 -LDFLAGS = +LDFLAGS = -R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/apache2/lib +LDFLAGS += -L/opt/csw/apache2/lib -L$(SVNLIB) -lintl -liconv +export LDFLAGS + CONFIGURE_ARGS = $(DIRPATHS) --libdir=$(SVNLIB) --libexecdir=$(SVNLIB) -CONFIGURE_ARGS += --with-gnu-ld=yes +CONFIGURE_ARGS += --disable-mod-activation +CONFIGURE_ARGS += --disable-static +CONFIGURE_ARGS += --enable-javahl CONFIGURE_ARGS += --with-apr=$(prefix)/apache2/bin/apr-config CONFIGURE_ARGS += --with-apr-util=$(prefix)/apache2/bin/apu-config CONFIGURE_ARGS += --with-apxs=$(prefix)/apache2/sbin/apxs -CONFIGURE_ARGS += --disable-mod-activation CONFIGURE_ARGS += --with-jdk=$(JDK) -CONFIGURE_ARGS += --enable-javahl -CONFIGURE_ARGS += --with-neon=$(prefix) -CONFIGURE_ARGS += --with-zlib=$(prefix) +#CONFIGURE_ARGS += --with-neon=$(prefix) CONFIGURE_ARGS += --with-sasl=$(prefix) CONFIGURE_ARGS += --with-ssl=$(prefix) -CONFIGURE_ARGS += --disable-static +CONFIGURE_ARGS += --with-zlib=$(prefix) TEST_TARGET = check # Tests take *forever* @@ -108,12 +110,10 @@ test-skip: @$(DONADA) -# Add libintl when linking -EXTRA_LINKER_FLAGS += -lintl -liconv - include gar/category.mk -BINDING_LANGS = java perl python ruby +#BINDING_LANGS = java perl python ruby +BINDING_LANGS = ruby perl python java BINDING_TARGETS = $(foreach LANG,$(BINDING_LANGS),svn-$(LANG)) PI_DEPENDS = $(BINDING_TARGETS) @@ -124,11 +124,25 @@ $(DONADA) post-configure-modulated: - @(echo "~~~ Fixing Libtool ~~~") + @echo "~~~ Fixing Libtool ~~~" @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) - @(gcp $(WORKSRC)/Makefile $(WORKSRC)/Makefile.gcc) - @(gcp $(WORKSRC)/libtool $(WORKSRC)/libtool.gcc) - @(gpatch -d $(WORKSRC) -p0 -F2 < $(DOWNLOADDIR)/$(GARCH)-gcc.diff) + @gcp $(WORKSRC)/Makefile $(WORKSRC)/Makefile.gcc + @gcp $(WORKSRC)/libtool $(WORKSRC)/libtool.gcc + @perl -i -pe 's/-mt\|*//' $(WORKSRC)/*.gcc + @perl -i -pe 's|-xO3|-pipe -O2|' $(WORKSRC)/*.gcc + @perl -i -pe 's|/opt/studio/SOS11/SUNWspro/bin/cc|/opt/csw/gcc4/bin/gcc|' \ + $(WORKSRC)/*.gcc + @perl -i -pe 's|/opt/studio/SOS11/SUNWspro/bin/CC|/opt/csw/gcc4/bin/g++|' \ + $(WORKSRC)/*.gcc + @perl -i -pe 's|libtool|libtool.gcc|' $(WORKSRC)/Makefile.gcc + @perl -i -pe 's|KPIC|fPIC|' $(WORKSRC)/libtool.gcc + @perl -i -pe 's|postdeps=.*|postdeps=""|' $(WORKSRC)/libtool.gcc + + @( if [ "`uname -p`" = "sparc" ]; then \ + perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ + else \ + perl -i -pe 's|-xarch=i386|-mcpu=i386|' $(WORKSRC)/*.gcc; \ + fi ) $(DONADA) fix-install: @@ -167,7 +181,7 @@ svn-ruby: @echo " ==> Building Ruby bindings" @touch $(WORKSRC)/subversion/bindings/swig/ruby/*.c - @$(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) swig-rb + $(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) swig-rb #@$(TEST_ENV) gmake -f Makefile.gcc -C $(WORKSRC) check-swig-rb @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-swig-rb $(DONADA) Modified: csw/mgar/pkg/subversion/trunk/checksums =================================================================== --- csw/mgar/pkg/subversion/trunk/checksums 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/checksums 2009-04-26 03:22:15 UTC (rev 4469) @@ -1,11 +1,11 @@ -3d1dabbbcacf262e3e0baa3de79220d7 download/subversion-1.5.6.tar.bz2 -395ec6d1bfe07efadc1c0aa8816673fa download/CSWsvn.checkinstall 1e19681e6d988d35cfc6d708883ab7aa download/CSWap2svn.postinstall 586b9c9924c1547d44451a84d2aca702 download/CSWap2svn.preremove +395ec6d1bfe07efadc1c0aa8816673fa download/CSWsvn.checkinstall +41ec540885de7c34625768aa1fb9682b download/fixme.sh f107831ad0c702ff32e51df6a207237b download/httpd-svn.conf.CSW -1b532d3055708a97771f5cd959983628 download/svn_access.conf.CSW -41ec540885de7c34625768aa1fb9682b download/fixme.sh -91d4c5a963192f113602b1bd1917d0cb download/sparc-gcc.diff 6caa3c518b84c2b3f6a33b61d1b022e3 download/i386-gcc.diff f0aa58c145ae99f8e4d72499ab826169 download/javahl_headers_for_nested_classes.diff +91d4c5a963192f113602b1bd1917d0cb download/sparc-gcc.diff +95708b96b920faeffca017f43ec96777 download/subversion-1.6.1.tar.bz2 f7d05c59656dcf01fb844295c9912f78 download/subversion156.diff +1b532d3055708a97771f5cd959983628 download/svn_access.conf.CSW Added: csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff (rev 0) +++ csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff 2009-04-26 03:22:15 UTC (rev 4469) @@ -0,0 +1,43 @@ +--- subversion-1.6.1/Makefile.in.o 2009-04-19 14:13:16.639723533 -0500 ++++ subversion-1.6.1/Makefile.in 2009-04-19 14:14:27.736377714 -0500 +@@ -38,8 +38,8 @@ + SCHEMA_DIR = subversion/svn/schema + + NEON_LIBS = @NEON_LIBS@ +-SVN_APR_LIBS = @SVN_APR_LIBS@ +-SVN_APRUTIL_LIBS = @SVN_APRUTIL_LIBS@ ++SVN_APR_LIBS = -L/opt/csw/lib -L/opt/csw/apache2/lib -lintl -liconv @SVN_APR_LIBS@ ++SVN_APRUTIL_LIBS = -L/opt/csw/lib -L/opt/csw/apache2/lib @SVN_APRUTIL_LIBS@ + SVN_APR_MEMCACHE_LIBS = @SVN_APR_MEMCACHE_LIBS@ + SVN_DB_LIBS = @SVN_DB_LIBS@ + SVN_GNOME_KEYRING_LIBS = @SVN_GNOME_KEYRING_LIBS@ +@@ -49,7 +49,7 @@ + SVN_SQLITE_LIBS = @SVN_SQLITE_LIBS@ + SVN_ZLIB_LIBS = @SVN_ZLIB_LIBS@ + +-LIBS = @LIBS@ ++LIBS = -L/opt/csw/lib -L/opt/csw/apache2/lib -lintl -liconv -lsocket -lz @LIBS@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -76,15 +76,15 @@ + swig_rb_libdir = @libdir@ + + ### these possibly need further discussion +-swig_pydir = @libdir@/svn-python/libsvn +-swig_pydir_extra = @libdir@/svn-python/svn +-swig_pldir = @libdir@/svn-perl ++swig_pydir = @prefix@/lib/python/site-packages/libsvn ++swig_pydir_extra = @prefix@/lib/python/site-packages/svn ++#swig_pldir = @libdir@/svn-perl + swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext + contribdir = @bindir@/svn-contrib + toolsdir = @bindir@/svn-tools + +-javahl_javadir = @libdir@/svn-javahl +-javahl_javahdir = @libdir@/svn-javahl/include ++javahl_javadir = @libdir@ ++javahl_javahdir = @libdir@/include + javahl_libdir = @libdir@ + javahl_test_rootdir=$(abs_builddir)/subversion/bindings/javahl/test-work + Deleted: csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff 2009-04-26 03:22:15 UTC (rev 4469) @@ -1,172 +0,0 @@ ---- libtool.gcc.o 2009-03-11 21:48:23.343791369 -0500 -+++ libtool.gcc 2009-03-11 21:48:50.846784450 -0500 -@@ -82,13 +82,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -m32 -march=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/cc" -+CC="/opt/csw/gcc3/bin/gcc" - - # Is the compiler the GNU C compiler? - with_gcc= -@@ -143,7 +143,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -1989,7 +1989,7 @@ - continue - ;; - -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" -@@ -2003,7 +2003,7 @@ - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler -- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -+ # -march=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC -@@ -2012,7 +2012,7 @@ - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files -- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -64|-mips[0-9]|-r[0-9][0-9]*|-march=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need -@@ -2484,7 +2484,7 @@ - lib= - found=no - case $deplib in -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" -@@ -7318,13 +7318,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -m32 -march=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/CC" -+CC="/opt/csw/gcc3/bin/g++" - - # Is the compiler the GNU C compiler? - with_gcc=no -@@ -7379,7 +7379,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -7475,7 +7475,7 @@ - - # Dependencies to place after the objects being linked to create a - # shared library. --postdeps="-library=Cstd -library=Crun" -+postdeps="" - - # The library search path used internally by the compiler when linking - # a shared library. -@@ -7624,10 +7624,10 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -m32 -march=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. - CC="f77" -@@ -7685,7 +7685,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC" -+pic_flag=" -fPIC" - pic_mode=default - - # What is the maximum length of a command? ---- Makefile.gcc.o 2009-03-11 21:48:17.524971502 -0500 -+++ Makefile.gcc 2009-03-11 21:49:06.704433498 -0500 -@@ -89,12 +89,12 @@ - PACKAGE_NAME=subversion - PACKAGE_VERSION=1.5.6 - --CC = /opt/studio/SOS11/SUNWspro/bin/cc --CXX = /opt/studio/SOS11/SUNWspro/bin/CC -+CC = /opt/csw/gcc3/bin/gc -+CXX = /opt/csw/gcc3/bin/g++ - EXEEXT = - - SHELL = /bin/bash --LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-i386/subversion-1.5.6/libtool -+LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-i386/subversion-1.5.6/libtool.gcc - LTFLAGS = --tag=CC --silent - LTCXXFLAGS = --tag=CXX --silent - LT_LDFLAGS = -@@ -113,10 +113,10 @@ - - SWIG = none - SWIG_PY_INCLUDES = $(SWIG_INCLUDES) -I/opt/csw/include/python2.6 -I$(SWIG_SRC_DIR)/python/libsvn_swig_py --SWIG_PY_COMPILE = /opt/studio/SOS11/SUNWspro/bin/cc -DNDEBUG -O -Kpic --SWIG_PY_LINK = /opt/studio/SOS11/SUNWspro/bin/cc -G -+SWIG_PY_COMPILE = /opt/csw/gcc3/bin/gc -DNDEBUG -O -fpic -+SWIG_PY_LINK = /opt/csw/gcc3/bin/gc -G - SWIG_PY_LIBS = --SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -xO3 -xtarget=generic -xarch=generic -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE -+SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -O2 -pipe -m32 -xtarget=generic -march=generic -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE - SWIG_RB_INCLUDES = $(SWIG_INCLUDES) -I. -I/opt/csw/lib/ruby/1.8/i386-solaris2.8 -I$(SWIG_SRC_DIR)/ruby/libsvn_swig_ruby - SWIG_RB_COMPILE = /opt/csw/gcc4/bin/gcc -mtune=i686 -O2 -pipe -m32 -march=i386 -I/opt/csw/include -fPIC - SWIG_RB_LINK = /opt/csw/gcc4/bin/gcc -shared -shrext .so -@@ -142,14 +142,14 @@ - MKDIR = /opt/csw/bin/ginstall -c -d - - # The EXTRA_ parameters can be used to pass extra flags at 'make' time. --CFLAGS = -xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) --CXXFLAGS = -xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) -+CFLAGS = -O2 -pipe -m32 -march=i386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) -+CXXFLAGS = -O2 -pipe -m32 -march=i386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) - ### A few of the CFLAGS (e.g. -Wmissing-prototypes, -Wstrict-prototypes, - ### -Wmissing-declarations) are not valid for C++, and should be somehow - ### suppressed (but they may come from httpd or APR). - CPPFLAGS = -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -I/opt/csw/bdb44/include -I/opt/csw/include -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE $(EXTRA_CPPFLAGS) --LDFLAGS = -xarch=386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) --SWIG_LDFLAGS = -xarch=386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) -+LDFLAGS = -march=i386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) -+SWIG_LDFLAGS = -march=i386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) - - COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) - COMPILE_CXX = $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) Deleted: csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff 2009-04-26 03:22:15 UTC (rev 4469) @@ -1,172 +0,0 @@ ---- libtool.gcc.o 2009-03-11 21:45:55.799166272 -0500 -+++ libtool.gcc 2009-03-11 21:46:43.392646721 -0500 -@@ -82,13 +82,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/cc" -+CC="/opt/csw/gcc3/bin/gcc" - - # Is the compiler the GNU C compiler? - with_gcc= -@@ -143,7 +143,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -1989,7 +1989,7 @@ - continue - ;; - -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" -@@ -2003,7 +2003,7 @@ - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler -- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -+ # -mcpu=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC -@@ -2012,7 +2012,7 @@ - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files -- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -64|-mips[0-9]|-r[0-9][0-9]*|-mcpu=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need -@@ -2484,7 +2484,7 @@ - lib= - found=no - case $deplib in -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" -@@ -7318,13 +7318,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/CC" -+CC="/opt/csw/gcc3/bin/gcc" - - # Is the compiler the GNU C compiler? - with_gcc=no -@@ -7379,7 +7379,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -7475,7 +7475,7 @@ - - # Dependencies to place after the objects being linked to create a - # shared library. --postdeps="-library=Cstd -library=Crun" -+postdeps="" - - # The library search path used internally by the compiler when linking - # a shared library. -@@ -7624,10 +7624,10 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. - CC="f77" -@@ -7685,7 +7685,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC" -+pic_flag=" -fPIC" - pic_mode=default - - # What is the maximum length of a command? ---- Makefile.gcc.o 2009-03-11 21:45:44.001600884 -0500 -+++ Makefile.gcc 2009-03-11 21:46:14.602732752 -0500 -@@ -89,12 +89,12 @@ - PACKAGE_NAME=subversion - PACKAGE_VERSION=1.5.6 - --CC = /opt/studio/SOS11/SUNWspro/bin/cc --CXX = /opt/studio/SOS11/SUNWspro/bin/CC -+CC = /opt/csw/gcc3/bin/gcc -+CXX = /opt/csw/gcc3/bin/g++ - EXEEXT = - - SHELL = /bin/bash --LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-sparcv8/subversion-1.5.6/libtool -+LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-sparcv8/subversion-1.5.6/libtool.gcc - LTFLAGS = --tag=CC --silent - LTCXXFLAGS = --tag=CXX --silent - LT_LDFLAGS = -@@ -113,10 +113,10 @@ - - SWIG = none - SWIG_PY_INCLUDES = $(SWIG_INCLUDES) -I/opt/csw/include/python2.6 -I$(SWIG_SRC_DIR)/python/libsvn_swig_py --SWIG_PY_COMPILE = /opt/studio/SOS11/SUNWspro/bin/cc -DNDEBUG -O -xO3 -xarch=v8 --SWIG_PY_LINK = /opt/studio/SOS11/SUNWspro/bin/cc -G -+SWIG_PY_COMPILE = /opt/csw/gcc3/bin/gcc -DNDEBUG -O -O2 -pipe -mcpu=v8 -+SWIG_PY_LINK = /opt/csw/gcc3/bin/gcc -G - SWIG_PY_LIBS = --SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE -+SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -O2 -pipe -xtarget=ultra -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE - SWIG_RB_INCLUDES = $(SWIG_INCLUDES) -I. -I/opt/csw/lib/ruby/1.8/sparc-solaris2.8 -I$(SWIG_SRC_DIR)/ruby/libsvn_swig_ruby - SWIG_RB_COMPILE = /opt/csw/gcc4/bin/gcc -O2 -pipe -mcpu=v8 -I/opt/csw/include -fPIC - SWIG_RB_LINK = /opt/csw/gcc4/bin/gcc -shared -shrext .so -@@ -142,14 +142,14 @@ - MKDIR = /opt/csw/bin/ginstall -c -d - - # The EXTRA_ parameters can be used to pass extra flags at 'make' time. --CFLAGS = -xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) --CXXFLAGS = -xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) -+CFLAGS = -O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) -+CXXFLAGS = -O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) - ### A few of the CFLAGS (e.g. -Wmissing-prototypes, -Wstrict-prototypes, - ### -Wmissing-declarations) are not valid for C++, and should be somehow - ### suppressed (but they may come from httpd or APR). - CPPFLAGS = -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -I/opt/csw/bdb44/include -I/opt/csw/include -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE $(EXTRA_CPPFLAGS) --LDFLAGS = -xarch=v8 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) --SWIG_LDFLAGS = -xarch=v8 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) -+LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) -+SWIG_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) - - COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) - COMPILE_CXX = $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 05:39:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 03:39:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4470] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4470 http://gar.svn.sourceforge.net/gar/?rev=4470&view=rev Author: valholla Date: 2009-04-26 03:39:05 +0000 (Sun, 26 Apr 2009) Log Message: ----------- cleanup Makefile Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:22:15 UTC (rev 4469) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:39:05 UTC (rev 4470) @@ -17,7 +17,8 @@ DISTFILES = $(GARNAME)-$(DISTVERSION).tar.bz2 -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 EXTRA_LIB = $(prefix)/bdb44/lib $(SVNLIB) @@ -112,8 +113,7 @@ include gar/category.mk -#BINDING_LANGS = java perl python ruby -BINDING_LANGS = ruby perl python java +BINDING_LANGS = java perl python ruby BINDING_TARGETS = $(foreach LANG,$(BINDING_LANGS),svn-$(LANG)) PI_DEPENDS = $(BINDING_TARGETS) @@ -126,6 +126,7 @@ post-configure-modulated: @echo "~~~ Fixing Libtool ~~~" @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @echo "~~~ Creating GCC Makefile and libtool for javahl and ruby ~~~" @gcp $(WORKSRC)/Makefile $(WORKSRC)/Makefile.gcc @gcp $(WORKSRC)/libtool $(WORKSRC)/libtool.gcc @perl -i -pe 's/-mt\|*//' $(WORKSRC)/*.gcc @@ -137,7 +138,6 @@ @perl -i -pe 's|libtool|libtool.gcc|' $(WORKSRC)/Makefile.gcc @perl -i -pe 's|KPIC|fPIC|' $(WORKSRC)/libtool.gcc @perl -i -pe 's|postdeps=.*|postdeps=""|' $(WORKSRC)/libtool.gcc - @( if [ "`uname -p`" = "sparc" ]; then \ perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ else \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 05:52:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 03:52:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4471] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4471 http://gar.svn.sourceforge.net/gar/?rev=4471&view=rev Author: valholla Date: 2009-04-26 03:52:06 +0000 (Sun, 26 Apr 2009) Log Message: ----------- cleanup Makefile Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:39:05 UTC (rev 4470) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:52:06 UTC (rev 4471) @@ -70,8 +70,6 @@ DISTFILES += CSWap2svn.postinstall CSWap2svn.preremove DISTFILES += httpd-svn.conf.CSW svn_access.conf.CSW DISTFILES += fixme.sh -DISTFILES += sparc-gcc.diff -DISTFILES += i386-gcc.diff # Fix: Add java headers for nested classes # https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-June/004633.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:03:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:03:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4472] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4472 http://gar.svn.sourceforge.net/gar/?rev=4472&view=rev Author: valholla Date: 2009-04-26 05:03:21 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Update Dependencies Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:52:06 UTC (rev 4471) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:03:21 UTC (rev 4472) @@ -1,5 +1,4 @@ -GARNAME = subversion -DISTVERSION = 1.6.1 +GARNAME = subversion DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils @@ -35,25 +34,31 @@ CATALOGNAME_CSWsvn = subversion REQUIRED_PKGS_CSWsvn = CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt REQUIRED_PKGS_CSWsvn += CSWiconv CSWkrb5lib CSWlibnet CSWneon CSWoldaprt -REQUIRED_PKGS_CSWsvn += CSWosslrt CSWsasl CSWsqlite3 CSWzlib +REQUIRED_PKGS_CSWsvn += CSWosslrt CSWsasl CSWzlib CSWsqlite3rt SPKG_DESC_CSWsvn-devel = Subversion Development Support CATALOGNAME_CSWsvn-devel = subversion_devel REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 CATALOGNAME_CSWap2svn = ap2svn -REQUIRED_PKGS_CSWap2svn = CSWsvn +REQUIRED_PKGS_CSWap2svn = CSWsvn CSWgettextrt SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn -REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt +REQUIRED_PKGS_CSWjavasvn += CSWbdb44 CSWexpat CSWggettextrt CSWiconv +REQUIRED_PKGS_CSWjavasvn += CSWneon CSWoldaprt SPKG_DESC_CSWpmsvn = Subversion Perl Language Binding CATALOGNAME_CSWpmsvn = pmsvn -REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl +REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl CSWapache2rt CSWbdb44 CSWexpat +REQUIRED_PKGS_CSWpmsvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWpysvn = Subversion Python Language Binding CATALOGNAME_CSWpysvn = pysvn -REQUIRED_PKGS_CSWpysvn = CSWsvn CSWpython +REQUIRED_PKGS_CSWpysvn = CSWsvn CSWpython CSWapache2rt CSWbdb44 CSWexpat +REQUIRED_PKGS_CSWpysvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWrbsvn = Subversion Ruby Language Binding CATALOGNAME_CSWrbsvn = rbsvn -REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWrbsvn += CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt +REQUIRED_PKGS_CSWrbsvn += CSWiconv PKGFILES_CSWsvn-devel = $(PKGFILES_DEVEL) PKGFILES_CSWap2svn = $(prefix)/apache2.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:05:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:05:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4473] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4473 http://gar.svn.sourceforge.net/gar/?rev=4473&view=rev Author: valholla Date: 2009-04-26 05:05:12 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:03:21 UTC (rev 4472) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:12 UTC (rev 4473) @@ -1,4 +1,5 @@ -GARNAME = subversion DISTVERSION = 1.6.1 +GARNAME = subversion +DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:05:41 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:05:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4474] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4474 http://gar.svn.sourceforge.net/gar/?rev=4474&view=rev Author: valholla Date: 2009-04-26 05:05:41 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:12 UTC (rev 4473) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:41 UTC (rev 4474) @@ -1,4 +1,4 @@ -GARNAME = subversion +GARNAME = subversion DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:07:40 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:07:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4475] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4475 http://gar.svn.sourceforge.net/gar/?rev=4475&view=rev Author: valholla Date: 2009-04-26 05:07:40 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:41 UTC (rev 4474) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:07:40 UTC (rev 4475) @@ -41,7 +41,7 @@ REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 CATALOGNAME_CSWap2svn = ap2svn -REQUIRED_PKGS_CSWap2svn = CSWsvn CSWgettextrt +REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:08:55 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:08:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4476] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4476 http://gar.svn.sourceforge.net/gar/?rev=4476&view=rev Author: valholla Date: 2009-04-26 05:08:55 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Update Dependencies Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:07:40 UTC (rev 4475) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:08:55 UTC (rev 4476) @@ -41,7 +41,7 @@ REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 CATALOGNAME_CSWap2svn = ap2svn -REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt +REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt CSWiconv SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:13:51 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:13:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4477] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4477 http://gar.svn.sourceforge.net/gar/?rev=4477&view=rev Author: valholla Date: 2009-04-26 05:13:51 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix depend Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:08:55 UTC (rev 4476) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:13:51 UTC (rev 4477) @@ -59,7 +59,7 @@ CATALOGNAME_CSWrbsvn = rbsvn REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert REQUIRED_PKGS_CSWrbsvn += CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt -REQUIRED_PKGS_CSWrbsvn += CSWiconv +REQUIRED_PKGS_CSWrbsvn += CSWiconv CSWoldaprt PKGFILES_CSWsvn-devel = $(PKGFILES_DEVEL) PKGFILES_CSWap2svn = $(prefix)/apache2.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:38:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:38:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4478] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4478 http://gar.svn.sourceforge.net/gar/?rev=4478&view=rev Author: valholla Date: 2009-04-26 05:38:22 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix x86 flags Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:13:51 UTC (rev 4477) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:38:22 UTC (rev 4478) @@ -145,7 +145,7 @@ @( if [ "`uname -p`" = "sparc" ]; then \ perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ else \ - perl -i -pe 's|-xarch=i386|-mcpu=i386|' $(WORKSRC)/*.gcc; \ + perl -i -pe 's|-xarch=386|-m32 -march=i386|' $(WORKSRC)/*.gcc; \ fi ) $(DONADA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From j_arndt at users.sourceforge.net Sun Apr 26 10:16:50 2009 From: j_arndt at users.sourceforge.net (j_arndt at users.sourceforge.net) Date: Sun, 26 Apr 2009 08:16:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4479] csw/mgar/pkg/nagios_plugins/trunk Message-ID: Revision: 4479 http://gar.svn.sourceforge.net/gar/?rev=4479&view=rev Author: j_arndt Date: 2009-04-26 08:16:50 +0000 (Sun, 26 Apr 2009) Log Message: ----------- nagios_plugins: fix for #3494, added patch for check_procs Modified Paths: -------------- csw/mgar/pkg/nagios_plugins/trunk/Makefile csw/mgar/pkg/nagios_plugins/trunk/checksums Added Paths: ----------- csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff Modified: csw/mgar/pkg/nagios_plugins/trunk/Makefile =================================================================== --- csw/mgar/pkg/nagios_plugins/trunk/Makefile 2009-04-26 05:38:22 UTC (rev 4478) +++ csw/mgar/pkg/nagios_plugins/trunk/Makefile 2009-04-26 08:16:50 UTC (rev 4479) @@ -11,10 +11,14 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnagiosp,prototype ) +PATCHFILES += check_procs.c.diff + REQUIRED_PKGS_CSWnagiosp = CSWggettextrt CSWiconv CSWlibnet CSWlibpq REQUIRED_PKGS_CSWnagiosp += CSWmysql5rt CSWoldaprt CSWosslrt CSWsasl REQUIRED_PKGS_CSWnagiosp += CSWzlib CSWperl +NOISALIST = 1 + CFLAGS += -I /opt/csw/postgresql/include/ CONFIGURE_ARGS = $(DIRPATHS) Modified: csw/mgar/pkg/nagios_plugins/trunk/checksums =================================================================== --- csw/mgar/pkg/nagios_plugins/trunk/checksums 2009-04-26 05:38:22 UTC (rev 4478) +++ csw/mgar/pkg/nagios_plugins/trunk/checksums 2009-04-26 08:16:50 UTC (rev 4479) @@ -1,3 +1,4 @@ be6cc7699fff3ee29d1fd4d562377386 download/nagios-plugins-1.4.13.tar.gz 61f490e92b603ac8628fb0c6cebb39ce download/CSWnagiosp.gspec 65bdf1c84228ccd98397837636004761 download/CSWnagiosp.prototype +4e1d82a9b3b21ade03ad39652352857e download/check_procs.c.diff Added: csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff =================================================================== --- csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff (rev 0) +++ csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff 2009-04-26 08:16:50 UTC (rev 4479) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru nagios-plugins-1.4.13.orig/plugins/check_procs.c nagios-plugins-1.4.13/plugins/check_procs.c +--- nagios-plugins-1.4.13.orig/plugins/check_procs.c 2008-07-08 11:31:04.000000000 +0200 ++++ nagios-plugins-1.4.13/plugins/check_procs.c 2009-03-26 20:30:33.322034506 +0100 +@@ -194,7 +194,7 @@ + strip (procargs); + + /* Some ps return full pathname for command. This removes path */ +- strcpy(procprog, base_name(procprog)); ++ /* strcpy(procprog, base_name(procprog)); */ + + /* we need to convert the elapsed time to seconds */ + procseconds = convert_to_seconds(procetime); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 02:26:42 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 00:26:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4480] csw/mgar/pkg Message-ID: Revision: 4480 http://gar.svn.sourceforge.net/gar/?rev=4480&view=rev Author: valholla Date: 2009-04-27 00:26:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/squirrelmail/ csw/mgar/pkg/squirrelmail/Makefile csw/mgar/pkg/squirrelmail/branches/ csw/mgar/pkg/squirrelmail/tags/ csw/mgar/pkg/squirrelmail/trunk/ csw/mgar/pkg/squirrelmail/trunk/Makefile csw/mgar/pkg/squirrelmail/trunk/checksums csw/mgar/pkg/squirrelmail/trunk/files/ Added: csw/mgar/pkg/squirrelmail/Makefile =================================================================== --- csw/mgar/pkg/squirrelmail/Makefile (rev 0) +++ csw/mgar/pkg/squirrelmail/Makefile 2009-04-27 00:26:42 UTC (rev 4480) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/squirrelmail/trunk/Makefile =================================================================== --- csw/mgar/pkg/squirrelmail/trunk/Makefile (rev 0) +++ csw/mgar/pkg/squirrelmail/trunk/Makefile 2009-04-27 00:26:42 UTC (rev 4480) @@ -0,0 +1,32 @@ +GARNAME = squirrelmail +GARVERSION = 1.4.17 +CATEGORIES = apps + +DESCRIPTION = A standards-based webmail package written in PHP. +define BLURB + SquirrelMail is a standards-based webmail package written in PHP. + It includes built-in pure PHP support for the IMAP and SMTP protocols, + and all pages render in pure HTML 4.0 (with no JavaScript required) + for maximum compatibility across browsers. It has very few requirements + and is very easy to configure and install. SquirrelMail has all the + functionality you would want from an email client, including strong + MIME support, address books, and folder manipulation. +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 + +PACKAGES = CSWsquirrelmail +CATALOGNAME_CSWsquirrelmail = squirrelmail +SPKG_DESC_CSWsquirrelmail = $(DESCRIPTION) + +REQUIRED_PKGS_CSWsquirrelmail = CSWimaprt + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +CONFIGURE_ARGS = $(DIRPATHS) + + +include gar/category.mk Added: csw/mgar/pkg/squirrelmail/trunk/checksums =================================================================== --- csw/mgar/pkg/squirrelmail/trunk/checksums (rev 0) +++ csw/mgar/pkg/squirrelmail/trunk/checksums 2009-04-27 00:26:42 UTC (rev 4480) @@ -0,0 +1 @@ +6ff0df8ae0e7f13418ed37ea1c93f6f3 download/squirrelmail-1.4.17.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 02:27:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 00:27:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4481] csw/mgar/pkg/squirrelmail/trunk/ Message-ID: Revision: 4481 http://gar.svn.sourceforge.net/gar/?rev=4481&view=rev Author: valholla Date: 2009-04-27 00:27:27 +0000 (Mon, 27 Apr 2009) Log Message: ----------- propset externals garv2 Property Changed: ---------------- csw/mgar/pkg/squirrelmail/trunk/ Property changes on: csw/mgar/pkg/squirrelmail/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 04:44:14 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 02:44:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4482] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4482 http://gar.svn.sourceforge.net/gar/?rev=4482&view=rev Author: valholla Date: 2009-04-27 02:44:14 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fix javahl compile Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-27 00:27:27 UTC (rev 4481) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-27 02:44:14 UTC (rev 4482) @@ -145,7 +145,7 @@ @( if [ "`uname -p`" = "sparc" ]; then \ perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ else \ - perl -i -pe 's|-xarch=386|-m32 -march=i386|' $(WORKSRC)/*.gcc; \ + perl -i -pe 's|-xarch=386|-march=i386|' $(WORKSRC)/*.gcc; \ fi ) $(DONADA) @@ -190,13 +190,11 @@ @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-swig-rb $(DONADA) -## The test can only be run "after" you have it installed. svn-java: @echo " ==> Building Java bindings" @touch $(WORKSRC)/subversion/bindings/javahl/native/*.c - @$(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) javahl - #@$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) check-javahl - @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-javahl + $(BUILD_ENV) gmake -C $(WORKSRC) javahl; + $(INSTALL_ENV) gmake -C $(WORKSRC) install-javahl; $(DONADA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4483] csw/mgar/pkg Message-ID: Revision: 4483 http://gar.svn.sourceforge.net/gar/?rev=4483&view=rev Author: dmichelsen Date: 2009-04-27 12:36:01 +0000 (Mon, 27 Apr 2009) Log Message: ----------- S10gnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/S10gnome/ csw/mgar/pkg/S10gnome/trunk/ csw/mgar/pkg/S10gnome/trunk/legacy/ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/S10gnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/S10gnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/S10gnome/trunk/legacy/sources/ csw/mgar/pkg/S10gnome/trunk/legacy/specs/ csw/mgar/pkg/S10gnome/trunk/legacy/specs/Makefile csw/mgar/pkg/S10gnome/trunk/legacy/specs/S10gnome Added: csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:36:01 UTC (rev 4483) @@ -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/S10gnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/human.pl 2009-04-27 12:36:01 UTC (rev 4483) @@ -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 () { + 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 + +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 + +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/S10gnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:36:01 UTC (rev 4483) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/S10gnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/specs/Makefile 2009-04-27 12:36:01 UTC (rev 4483) @@ -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/S10gnome/trunk/legacy/specs/S10gnome =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/specs/S10gnome (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/specs/S10gnome 2009-04-27 12:36:01 UTC (rev 4483) @@ -0,0 +1,206 @@ +# vim: ft=perl +# $Id: S10gnome,v 1.3 2004/12/07 18:53:55 simigern Exp $ + +$progname = 'gnome'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnome.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-dtlogin-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ( { + pkgname => "gnomedtlogin", + filename => "gnome_dtlogin", + name => "gnome_dtlogin - GNOME 2 dtlogin integration", + filelist => [qw('etc/dt/appconfig' + 'etc/dt/config/Xinitrc.CSWgnome' + 'etc/dt/config/Xsession.CSWgnome' + 'etc/dt/config/Xsession2.CSWgnome' + 'etc/dt/config/C/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar_EG.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de_AT.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_GB.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_IE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he_IL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.PCK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.eucJP/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.ISO8859-11/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.TIS620/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.GBK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_HK.BIG5HK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.BIG5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.UTF-8/Xresources.d/Xresources.CSWgnome')] + + }); + +push @csw_ignore, 'etc/dt'; +push @csw_ignore, 'etc/dt/appconfig'; +push @csw_ignore, 'etc/dt/appconfig/icons'; +push @csw_ignore, 'etc/dt/appconfig/icons/C'; +push @csw_ignore, 'etc/dt/config'; + +push @csw_dirs, 'etc/dt/config/C'; +push @csw_dirs, 'etc/dt/config/ar'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/de'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/de.UTF-8'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8'; +push @csw_dirs, 'etc/dt/config/es'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/es.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/he'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/it'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/it.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP'; +push @csw_dirs, 'etc/dt/config/ko'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8'; +push @csw_dirs, 'etc/dt/config/pt_BR'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8'; +push @csw_dirs, 'etc/dt/config/sv'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8'; +push @csw_dirs, 'etc/dt/config/th_TH'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh'; +push @csw_dirs, 'etc/dt/config/zh.GBK'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK'; +push @csw_dirs, 'etc/dt/config/zh_TW'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8'; + +push @csw_dirs, 'etc/dt/config/C/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.GBK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8/Xresources.d'; + +#'CSWgnomemedia', + +$copyright = "${progname}-dtlogin-${version}/COPYING"; + +$arch="all"; +$osversion="5.10"; + +$build = <<"EOF"; +cd ${progname}-dtlogin-${version} +mkdir -p ${buildroot} +gcp -vax * ${buildroot}/ +cat >COPYING <<__EOF__ +See dependancies for license-informations +__EOF__ +perl -p -i -e 's/\\+kb //;' etc/dt/config/C/Xresources.d/Xresources.CSWgnome +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:18 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4484] csw/mgar/pkg Message-ID: 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 () { + 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 + +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 + +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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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 + #include + #include +-#include ++//#include + #include + #include + #include +@@ -38,6 +38,91 @@ + #include "anjuta.h" + + #define FILE_BUFFER_SIZE 1024 ++#define __MAX_BAUD B460800 ++ ++/* Forkpty */ ++#include ++#include ++#include ++#include ++ ++/* 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; nbnb_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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:34 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4485] csw/mgar/pkg Message-ID: Revision: 4485 http://gar.svn.sourceforge.net/gar/?rev=4485&view=rev Author: dmichelsen Date: 2009-04-27 12:36:34 +0000 (Mon, 27 Apr 2009) Log Message: ----------- atspi: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/atspi/ csw/mgar/pkg/atspi/trunk/ csw/mgar/pkg/atspi/trunk/legacy/ csw/mgar/pkg/atspi/trunk/legacy/scripts/ csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/atspi/trunk/legacy/scripts/human.pl csw/mgar/pkg/atspi/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/atspi/trunk/legacy/sources/ csw/mgar/pkg/atspi/trunk/legacy/specs/ csw/mgar/pkg/atspi/trunk/legacy/specs/Makefile csw/mgar/pkg/atspi/trunk/legacy/specs/atspi Added: csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:36:34 UTC (rev 4485) @@ -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/atspi/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/scripts/human.pl 2009-04-27 12:36:34 UTC (rev 4485) @@ -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 () { + 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 + +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 + +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/atspi/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:36:34 UTC (rev 4485) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/atspi/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/specs/Makefile 2009-04-27 12:36:34 UTC (rev 4485) @@ -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/atspi/trunk/legacy/specs/atspi =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/specs/atspi (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/specs/atspi 2009-04-27 12:36:34 UTC (rev 4485) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: atspi,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'at-spi'; +$version = '1.6.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/at-spi packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "atspi", + filename => "atspi", + name => "atspi - An Assistive Technology Service Provider Interface", + 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 -I/usr/openwin/include" +export CPPFLAGS='-I/opt/csw/include -I/usr/openwin/include' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib -L/usr/openwin/lib -R/usr/openwin/lib' +cd ${progname}-${version} +./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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4486] csw/mgar/pkg Message-ID: Revision: 4486 http://gar.svn.sourceforge.net/gar/?rev=4486&view=rev Author: dmichelsen Date: 2009-04-27 12:36:49 +0000 (Mon, 27 Apr 2009) Log Message: ----------- bass: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/bass/ csw/mgar/pkg/bass/trunk/ csw/mgar/pkg/bass/trunk/legacy/ csw/mgar/pkg/bass/trunk/legacy/scripts/ csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/bass/trunk/legacy/scripts/human.pl csw/mgar/pkg/bass/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/bass/trunk/legacy/sources/ csw/mgar/pkg/bass/trunk/legacy/specs/ csw/mgar/pkg/bass/trunk/legacy/specs/Makefile csw/mgar/pkg/bass/trunk/legacy/specs/bass Added: csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:36:49 UTC (rev 4486) @@ -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/bass/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/scripts/human.pl 2009-04-27 12:36:49 UTC (rev 4486) @@ -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 () { + 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 + +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 + +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/bass/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:36:49 UTC (rev 4486) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/bass/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/specs/Makefile 2009-04-27 12:36:49 UTC (rev 4486) @@ -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/bass/trunk/legacy/specs/bass =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/specs/bass (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/specs/bass 2009-04-27 12:36:49 UTC (rev 4486) @@ -0,0 +1,85 @@ +# vim: ft=perl +# $Id: bass,v 1.2 2005/01/09 14:42:06 simigern Exp $ + +$progname = 'bass'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.revolution.co.uk/ packaged for CSW by Michael Gernoth'; + + at sources = (); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Beneath a Steel Sky, a science fiction adventure game", + dependencies => ['CSWcommon','CSWscummvm'], + filelist => [qw(opt)] + }); + +$arch="all"; +$osversion="5.8"; + +$copyright = "sky-cd/COPYING"; + +$build = <<"EOF"; +unzip ${RealBin}/../sources/BASS-CD.zip +cd sky-cd +cat >COPYING <<__EOF__ +Preamble: + Basically, give this game away, share it with your friends. Don't remove this +Readme, or pretend you wrote it. You can include it in a software collection, +like a linux distribution or coverdisk (which may be sold), but using it in +things like commercial adventure game collections without asking is just playing +dirty. This preamble is not legally binding, but is to clarify the intent of the +following license. + +License: + 1) You may distribute this game for free on any medium, provided this readme +and all associated copyright notices and disclaimers are left intact. + + 2) You may charge a reasonable copying fee for this archive, and may distribute +it in aggregate as part of a larger & possibly commercial software distribution +(such as a Linux distribution or magazine coverdisk). You must provide proper +attribution and ensure this readme and all associated copyright notices, and +disclaimers are left intact. + + 3) You may not charge a fee for the game itself. This includes reselling the +game as an individual item. + +4) All game content is (C) Revolution Software Ltd. The ScummVM engine is (C) +The ScummVM Team (www.scummvm.org) + +5) THE GAMEDATA IN THIS ARCHIVE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING AND NOT LIMITED TO ANY IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. +__EOF__ +mkdir -p ${buildroot}/opt/csw/share/bass ${buildroot}/opt/csw/share/doc/bass ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/share/applications +cp sky.dnr sky.dsk ${buildroot}/opt/csw/share/bass/ +cp readme.txt ${buildroot}/opt/csw/share/doc/bass/ +chmod 644 ${buildroot}/opt/csw/share/bass/* ${buildroot}/opt/csw/share/doc/bass/* +cat >${buildroot}/opt/csw/bin/bass <<__EOF__ +#!/bin/sh + +exec /opt/csw/bin/scummvm -p /opt/csw/share/bass "\\\$@" sky +__EOF__ +chmod 755 ${buildroot}/opt/csw/bin/bass + +cat >${buildroot}/opt/csw/share/applications/bass.desktop <<__EOF__ +[Desktop Entry] +Encoding=UTF-8 +Name=Beneath a Steel Sky +Comment=A science fiction adventure game +Exec=bass +Icon=scummvm.xpm +Terminal=false +Type=Application +Categories=Application;Game;AdventureGame; +StartupNotify=false +__EOF__ + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4487] csw/mgar/pkg Message-ID: Revision: 4487 http://gar.svn.sourceforge.net/gar/?rev=4487&view=rev Author: dmichelsen Date: 2009-04-27 12:37:05 +0000 (Mon, 27 Apr 2009) Log Message: ----------- bluefish: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/bluefish/ csw/mgar/pkg/bluefish/trunk/ csw/mgar/pkg/bluefish/trunk/legacy/ csw/mgar/pkg/bluefish/trunk/legacy/scripts/ csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/bluefish/trunk/legacy/scripts/human.pl csw/mgar/pkg/bluefish/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/bluefish/trunk/legacy/sources/ csw/mgar/pkg/bluefish/trunk/legacy/sources/bluefish.solaris.patch csw/mgar/pkg/bluefish/trunk/legacy/specs/ csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile csw/mgar/pkg/bluefish/trunk/legacy/specs/bluefish Added: csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:05 UTC (rev 4487) @@ -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/bluefish/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/scripts/human.pl 2009-04-27 12:37:05 UTC (rev 4487) @@ -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 () { + 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 + +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 + +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/bluefish/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:05 UTC (rev 4487) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/bluefish/trunk/legacy/sources/bluefish.solaris.patch =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/sources/bluefish.solaris.patch (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/sources/bluefish.solaris.patch 2009-04-27 12:37:05 UTC (rev 4487) @@ -0,0 +1,21 @@ +--- src/document.c.orig 2005-01-16 15:10:55.279769000 -0500 ++++ src/document.c 2005-01-16 15:12:02.019827000 -0500 +@@ -23,7 +23,6 @@ + /* this is needed for Solaris to comply with the latest POSIX standard + * regarding the ctime_r() function + * the problem is that it generates a compiler warning on Linux, lstat() undefined.. */ +-#define _POSIX_C_SOURCE 200312L + + #include + #include /* for the keyboard event codes */ +--- src/highlight.c.orig 2005-01-16 15:23:01.659817000 -0500 ++++ src/highlight.c 2005-01-16 15:25:16.529749000 -0500 +@@ -154,7 +154,7 @@ + /*********************************/ + /* debugging */ + /*********************************/ +-#ifdef DEBUG ++#if 1 + + static void print_meta_for_pattern(Tpattern *pat) { + GList *tmplist = g_list_first(highlight.all_highlight_patterns); Added: csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile 2009-04-27 12:37:05 UTC (rev 4487) @@ -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/bluefish/trunk/legacy/specs/bluefish =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/specs/bluefish (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/specs/bluefish 2009-04-27 12:37:05 UTC (rev 4487) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: bluefish,v 1.4 2005/01/16 20:40:33 simigern Exp $ + +$progname = 'bluefish'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://bluefish.openoffice.nl/ packaged for CSW by Michael Gernoth'; + + at patches = (['bluefish.solaris.patch', "${progname}-${version}", '-p0']); + + at sources = ("${progname}-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A GTK-based Web development editor", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall' + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin:${builddir}/${progname}-${version}" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8 -D_POSIX_PTHREAD_SEMANTICS' +else + export CFLAGS='-fast -xarch=386 -D_POSIX_PTHREAD_SEMANTICS' +fi +cd ${progname}-${version} +ln -s /opt/csw/bin/gmsgfmt msgfmt +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --disable-update-databases +gmake || exit 1 +gmake prefix=${buildroot}/opt/csw pixmapsdir=${buildroot}/opt/csw/share/pixmaps iconpath=${buildroot}/opt/csw/share/pixmaps FDMENU=${buildroot}/opt/csw/share/applications FDMIME=${buildroot}/opt/csw/share/mime GMIMEINFO=${buildroot}/opt/csw/share/mime-info GAPPREG=${buildroot}/opt/csw/share/application-registry ICONPATH=${buildroot}/opt/csw/share/pixmaps install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4488] csw/mgar/pkg Message-ID: Revision: 4488 http://gar.svn.sourceforge.net/gar/?rev=4488&view=rev Author: dmichelsen Date: 2009-04-27 12:37:20 +0000 (Mon, 27 Apr 2009) Log Message: ----------- boxbackup: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/boxbackup/ csw/mgar/pkg/boxbackup/trunk/ csw/mgar/pkg/boxbackup/trunk/legacy/ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/boxbackup/trunk/legacy/scripts/human.pl csw/mgar/pkg/boxbackup/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/boxbackup/trunk/legacy/sources/ csw/mgar/pkg/boxbackup/trunk/legacy/sources/boxbackup-locale.diff csw/mgar/pkg/boxbackup/trunk/legacy/specs/ csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile csw/mgar/pkg/boxbackup/trunk/legacy/specs/boxbackup Added: csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:20 UTC (rev 4488) @@ -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/boxbackup/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/human.pl 2009-04-27 12:37:20 UTC (rev 4488) @@ -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 () { + 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 + +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 + +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/boxbackup/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:20 UTC (rev 4488) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/boxbackup/trunk/legacy/sources/boxbackup-locale.diff =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/sources/boxbackup-locale.diff (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/sources/boxbackup-locale.diff 2009-04-27 12:37:20 UTC (rev 4488) @@ -0,0 +1,10 @@ +--- bin/bbackupquery/bbackupquery.cpp.orig Fri Apr 11 16:43:34 2008 ++++ bin/bbackupquery/bbackupquery.cpp Fri Apr 11 16:43:53 2008 +@@ -54,6 +54,7 @@ + + #include + #include ++#include + + #ifdef HAVE_SYS_TYPES_H + #include Added: csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile 2009-04-27 12:37:20 UTC (rev 4488) @@ -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/boxbackup/trunk/legacy/specs/boxbackup =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/specs/boxbackup (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/specs/boxbackup 2009-04-27 12:37:20 UTC (rev 4488) @@ -0,0 +1,51 @@ +# vim: ft=perl +# $Id: boxbackup,v 1.3 2008-04-11 14:58:08 simigern Exp $ + +$progname = 'boxbackup'; +$version = '0.11rc2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.boxbackup.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tgz"); + + at patches = (['boxbackup-locale.diff', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An open source, completely automatic on-line backup system for UNIX", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/LICENSE.txt"; + +$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/bdb43/include -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/bdb43/include -I/opt/csw/include' +export LD_OPTIONS='-R/opt/csw/bdb43/lib -L/opt/csw/bdb43/lib -R/opt/csw/lib -L/opt/csw/lib' +export CXXFLAGS="\$CFLAGS \$LD_OPTIONS" +export LIBS='-ldb -lnsl -lsocket' +export LD_RUN_PATH='/opt/csw/bdb43/lib:/opt/csw/lib' +export LC_ALL=C +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-bdb-headers=/opt/csw/bdb43/include --with-bdb-lib=/opt/csw/bdb43/lib --enable-gnu-readline +gmake || exit 1 +export PATH="`pwd`:\${PATH}" +ln -s /opt/csw/bin/ginstall install +mkdir -p ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/lib/svc/{manifest,method} +gmake DESTDIR=${buildroot} install-backup-client +gmake DESTDIR=${buildroot} install-backup-server +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:36 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4489] csw/mgar/pkg Message-ID: Revision: 4489 http://gar.svn.sourceforge.net/gar/?rev=4489&view=rev Author: dmichelsen Date: 2009-04-27 12:37:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- control-center: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/control-center/ csw/mgar/pkg/control-center/trunk/ csw/mgar/pkg/control-center/trunk/legacy/ csw/mgar/pkg/control-center/trunk/legacy/scripts/ csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/control-center/trunk/legacy/scripts/human.pl csw/mgar/pkg/control-center/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/control-center/trunk/legacy/sources/ csw/mgar/pkg/control-center/trunk/legacy/sources/control-center.quiet.patch csw/mgar/pkg/control-center/trunk/legacy/specs/ csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile csw/mgar/pkg/control-center/trunk/legacy/specs/control-center Added: csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:36 UTC (rev 4489) @@ -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/control-center/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/scripts/human.pl 2009-04-27 12:37:36 UTC (rev 4489) @@ -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 () { + 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 + +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 + +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/control-center/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:36 UTC (rev 4489) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/control-center/trunk/legacy/sources/control-center.quiet.patch =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/sources/control-center.quiet.patch (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/sources/control-center.quiet.patch 2009-04-27 12:37:36 UTC (rev 4489) @@ -0,0 +1,10 @@ +--- gnome-settings-daemon/gnome-settings-keyboard-xkb.c.orig 2004-04-10 11:16:52.339997000 -0400 ++++ gnome-settings-daemon/gnome-settings-keyboard-xkb.c 2004-04-10 11:17:04.819995000 -0400 +@@ -51,6 +51,7 @@ + static void + activation_error (void) + { ++ return; + char *vendor = ServerVendor (GDK_DISPLAY ()); + int release = VendorRelease (GDK_DISPLAY ()); + gboolean badXFree430Release = (!strcmp (vendor, Added: csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile 2009-04-27 12:37:36 UTC (rev 4489) @@ -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/control-center/trunk/legacy/specs/control-center =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/specs/control-center (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/specs/control-center 2009-04-27 12:37:36 UTC (rev 4489) @@ -0,0 +1,66 @@ +# vim: ft=perl +# $Id: control-center,v 1.12 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'control-center'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['control-center.quiet.patch', "${progname}-${version}", '-p0'], + ['xkbrules.h.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "controlcenter", + filename => "control_center", + name => "control_center - The GNOME Control Center for GNOME 2", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-lfontconfig -L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +sed -e 's|-Wall -Werror||' libkbdraw/Makefile.in >libkbdraw/Makefile.innew +mv libkbdraw/Makefile.innew libkbdraw/Makefile.in + +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,window-manager-settings/*.la,gnome-vfs-2.0/modules/*.la,bonobo/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4490] csw/mgar/pkg Message-ID: Revision: 4490 http://gar.svn.sourceforge.net/gar/?rev=4490&view=rev Author: dmichelsen Date: 2009-04-27 12:37:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- desktop-file-utils: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/desktop-file-utils/ csw/mgar/pkg/desktop-file-utils/trunk/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/human.pl csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/desktop-file-utils Added: csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:51 UTC (rev 4490) @@ -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/desktop-file-utils/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/human.pl 2009-04-27 12:37:51 UTC (rev 4490) @@ -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 () { + 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 + +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 + +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/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:51 UTC (rev 4490) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall 2009-04-27 12:37:51 UTC (rev 4490) @@ -0,0 +1,11 @@ +#!/bin/sh + +echo 'CSW update-desktop-database running...' + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +chroot "${PKG_ROOT_DIR}" /opt/csw/bin/update-desktop-database /opt/csw/share/applications + +/bin/true Added: csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile 2009-04-27 12:37:51 UTC (rev 4490) @@ -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/desktop-file-utils/trunk/legacy/specs/desktop-file-utils =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/desktop-file-utils (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/desktop-file-utils 2009-04-27 12:37:51 UTC (rev 4490) @@ -0,0 +1,44 @@ +# vim: ft=perl +# $Id: desktop-file-utils,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'desktop-file-utils'; +$version = '0.10'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/wiki/Software_2fdesktop_2dfile_2dutils packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "dtopfutils", + filename => "desktopfileutils", + name => "desktopfileutils - utilities for working with desktop entries and .menu files", + dependencies => ['CSWcommon'], + postinstall => 'desktop-file-utils.postinstall', + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +mkdir -p ${buildroot}/opt/csw/share/applications +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4491] csw/mgar/pkg/diffstat/trunk Message-ID: Revision: 4491 http://gar.svn.sourceforge.net/gar/?rev=4491&view=rev Author: dmichelsen Date: 2009-04-27 12:38:06 +0000 (Mon, 27 Apr 2009) Log Message: ----------- diffstat: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/diffstat/trunk/legacy/ csw/mgar/pkg/diffstat/trunk/legacy/scripts/ csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/diffstat/trunk/legacy/scripts/human.pl csw/mgar/pkg/diffstat/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/diffstat/trunk/legacy/sources/ csw/mgar/pkg/diffstat/trunk/legacy/specs/ csw/mgar/pkg/diffstat/trunk/legacy/specs/Makefile csw/mgar/pkg/diffstat/trunk/legacy/specs/diffstat Added: csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:06 UTC (rev 4491) @@ -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/diffstat/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/scripts/human.pl 2009-04-27 12:38:06 UTC (rev 4491) @@ -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 () { + 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 + +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 + +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/diffstat/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:06 UTC (rev 4491) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/diffstat/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/specs/Makefile 2009-04-27 12:38:06 UTC (rev 4491) @@ -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/diffstat/trunk/legacy/specs/diffstat =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/specs/diffstat (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/specs/diffstat 2009-04-27 12:38:06 UTC (rev 4491) @@ -0,0 +1,41 @@ +# vim: ft=perl +# $Id: diffstat,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'diffstat'; +$version = '1.34'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://invisible-island.net/diffstat/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}.tar.gz"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A utility which provides statistics based on the output of diff", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake || exit 1 +gmake DESTDIR=${buildroot} install +head -20 diffstat.c >COPYING +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4492] csw/mgar/pkg Message-ID: Revision: 4492 http://gar.svn.sourceforge.net/gar/?rev=4492&view=rev Author: dmichelsen Date: 2009-04-27 12:38:21 +0000 (Mon, 27 Apr 2009) Log Message: ----------- enigma: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/enigma/ csw/mgar/pkg/enigma/trunk/ csw/mgar/pkg/enigma/trunk/legacy/ csw/mgar/pkg/enigma/trunk/legacy/scripts/ csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/enigma/trunk/legacy/scripts/human.pl csw/mgar/pkg/enigma/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/enigma/trunk/legacy/sources/ csw/mgar/pkg/enigma/trunk/legacy/specs/ csw/mgar/pkg/enigma/trunk/legacy/specs/Makefile csw/mgar/pkg/enigma/trunk/legacy/specs/enigma Added: csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:21 UTC (rev 4492) @@ -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/enigma/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/scripts/human.pl 2009-04-27 12:38:21 UTC (rev 4492) @@ -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 () { + 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 + +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 + +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/enigma/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:21 UTC (rev 4492) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/enigma/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/specs/Makefile 2009-04-27 12:38:21 UTC (rev 4492) @@ -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/enigma/trunk/legacy/specs/enigma =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/specs/enigma (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/specs/enigma 2009-04-27 12:38:21 UTC (rev 4492) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: enigma,v 1.1 2004/08/06 22:43:40 simigern Exp $ + +$progname = 'enigma'; +$version = '0.81'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.nongnu.org/enigma/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - a puzzle game inspired by Oxyd", + 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 +# #I got bad code with tla... +# #export CFLAGS='-fast -xarch=386' +# export CFLAGS='' +#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' +export CC=gcc +export CXX=g++ +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake prefix=/opt/build/michael/${progname}-${version}-buildroot/opt/csw mandir=/opt/build/michael/${progname}-${version}-buildroot/opt/csw/share/man install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4493] csw/mgar/pkg Message-ID: Revision: 4493 http://gar.svn.sourceforge.net/gar/?rev=4493&view=rev Author: dmichelsen Date: 2009-04-27 12:38:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- eog: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/eog/ csw/mgar/pkg/eog/trunk/ csw/mgar/pkg/eog/trunk/legacy/ csw/mgar/pkg/eog/trunk/legacy/scripts/ csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/eog/trunk/legacy/scripts/human.pl csw/mgar/pkg/eog/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/eog/trunk/legacy/sources/ csw/mgar/pkg/eog/trunk/legacy/specs/ csw/mgar/pkg/eog/trunk/legacy/specs/Makefile csw/mgar/pkg/eog/trunk/legacy/specs/eog Added: csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:36 UTC (rev 4493) @@ -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/eog/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/scripts/human.pl 2009-04-27 12:38:36 UTC (rev 4493) @@ -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 () { + 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 + +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 + +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/eog/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:36 UTC (rev 4493) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/eog/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/specs/Makefile 2009-04-27 12:38:36 UTC (rev 4493) @@ -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/eog/trunk/legacy/specs/eog =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/specs/eog (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/specs/eog 2009-04-27 12:38:36 UTC (rev 4493) @@ -0,0 +1,52 @@ +# vim: ft=perl +# $Id: eog,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'eog'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/eog/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Eye Of Gnome image viewer", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-ljpeg -L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +##Stop nautilus crashing... +#rm ${buildroot}/opt/csw/lib/bonobo/servers/GNOME_EOG_Collection.server + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4494] csw/mgar/pkg Message-ID: Revision: 4494 http://gar.svn.sourceforge.net/gar/?rev=4494&view=rev Author: dmichelsen Date: 2009-04-27 12:38:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- epiphany: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/epiphany/ csw/mgar/pkg/epiphany/trunk/ csw/mgar/pkg/epiphany/trunk/legacy/ csw/mgar/pkg/epiphany/trunk/legacy/scripts/ csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/epiphany/trunk/legacy/scripts/human.pl csw/mgar/pkg/epiphany/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/epiphany/trunk/legacy/sources/ csw/mgar/pkg/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch csw/mgar/pkg/epiphany/trunk/legacy/specs/ csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile csw/mgar/pkg/epiphany/trunk/legacy/specs/epiphany Added: csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:53 UTC (rev 4494) @@ -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/epiphany/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/scripts/human.pl 2009-04-27 12:38:53 UTC (rev 4494) @@ -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 () { + 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 + +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 + +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/epiphany/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:53 UTC (rev 4494) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch 2009-04-27 12:38:53 UTC (rev 4494) @@ -0,0 +1,240 @@ +--- lib/ephy-debug.h.orig 2004-12-08 07:40:23.066402000 -0500 ++++ lib/ephy-debug.h 2004-12-08 07:41:05.026335000 -0500 +@@ -35,12 +35,12 @@ + #endif + + #ifdef DISABLE_LOGGING +-#define LOG(msg, args...) ++#define LOG(msg, ...) + #else +-#define LOG(msg, args...) \ ++#define LOG(msg, ...) \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "[ %s ] " msg, \ +- __FILE__ , ## args); ++ __FILE__ , __VA_ARGS__); + #endif + + #ifdef DISABLE_PROFILING +--- lib/ephy-file-helpers.c.orig 2004-12-08 07:45:24.576366000 -0500 ++++ lib/ephy-file-helpers.c 2004-12-08 07:53:12.186326000 -0500 +@@ -18,6 +18,10 @@ + * $Id: ephy-file-helpers.c,v 1.20.4.1 2004/10/02 14:23:18 chpe Exp $ + */ + ++#ifndef HAVE_MKDTEMP ++#include "mkdtemp.c" ++#endif ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -52,11 +56,7 @@ + "-XXXXXX", NULL); + full_name = g_build_filename (g_get_tmp_dir (), partial_name, + NULL); +-#ifdef HAVE_MKDTEMP + tmp_dir = mkdtemp (full_name); +-#else +-#error no mkdtemp implementation +-#endif + g_free (partial_name); + + if (tmp_dir == NULL) +--- /dev/null 2004-12-08 07:55:48.000000000 -0500 ++++ lib/mkdtemp.c 2004-12-08 07:53:36.776335000 -0500 +@@ -0,0 +1,194 @@ ++/* Copyright (C) 1999, 2001-2002 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public License as ++ published by the Free Software Foundation; either version 2 of the ++ License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with the GNU C Library; see the file COPYING.LIB. If not, ++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ ++ ++/* Extracted from misc/mkdtemp.c and sysdeps/posix/tempname.c. */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#include ++#ifndef __set_errno ++# define __set_errno(Val) errno = (Val) ++#endif ++ ++#include ++#include ++#include ++ ++#include ++#ifndef TMP_MAX ++# define TMP_MAX 238328 ++#endif ++ ++#if HAVE_STDINT_H_WITH_UINTMAX || _LIBC ++# include ++#endif ++ ++#if HAVE_INTTYPES_H_WITH_UINTMAX || _LIBC ++# include ++#endif ++ ++#if HAVE_UNISTD_H || _LIBC ++# include ++#endif ++ ++#if HAVE_GETTIMEOFDAY || _LIBC ++# if HAVE_SYS_TIME_H || _LIBC ++# include ++# endif ++#else ++# if HAVE_TIME_H || _LIBC ++# include ++# endif ++#endif ++ ++#include ++#if STAT_MACROS_BROKEN ++# undef S_ISDIR ++#endif ++#if !defined S_ISDIR && defined S_IFDIR ++# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) ++#endif ++#if !S_IRUSR && S_IREAD ++# define S_IRUSR S_IREAD ++#endif ++#if !S_IRUSR ++# define S_IRUSR 00400 ++#endif ++#if !S_IWUSR && S_IWRITE ++# define S_IWUSR S_IWRITE ++#endif ++#if !S_IWUSR ++# define S_IWUSR 00200 ++#endif ++#if !S_IXUSR && S_IEXEC ++# define S_IXUSR S_IEXEC ++#endif ++#if !S_IXUSR ++# define S_IXUSR 00100 ++#endif ++ ++#if !_LIBC ++# define __getpid getpid ++# define __gettimeofday gettimeofday ++# define __mkdir mkdir ++#endif ++ ++/* Use the widest available unsigned type if uint64_t is not ++ available. The algorithm below extracts a number less than 62**6 ++ (approximately 2**35.725) from uint64_t, so ancient hosts where ++ uintmax_t is only 32 bits lose about 3.725 bits of randomness, ++ which is better than not having mkstemp at all. */ ++#if !defined UINT64_MAX && !defined uint64_t ++# define uint64_t uintmax_t ++#endif ++ ++/* These are the characters used in temporary filenames. */ ++static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; ++ ++/* Generate a temporary file name based on TMPL. TMPL must match the ++ rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed ++ does not exist at the time of the call to __gen_tempname. TMPL is ++ overwritten with the result. ++ ++ KIND is: ++ __GT_DIR: create a directory, which will be mode 0700. ++ ++ We use a clever algorithm to get hard-to-predict names. */ ++static int gen_tempname (char* tmpl) ++{ ++ int len; ++ char *XXXXXX; ++ static uint64_t value; ++ uint64_t random_time_bits; ++ int count, fd = -1; ++ int save_errno = errno; ++ ++ len = strlen (tmpl); ++ if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX")) ++ { ++ __set_errno (EINVAL); ++ return -1; ++ } ++ ++ /* This is where the Xs start. */ ++ XXXXXX = &tmpl[len - 6]; ++ ++ /* Get some more or less random data. */ ++#ifdef RANDOM_BITS ++ RANDOM_BITS (random_time_bits); ++#else ++# if HAVE_GETTIMEOFDAY || _LIBC ++ { ++ struct timeval tv; ++ __gettimeofday (&tv, NULL); ++ random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; ++ } ++# else ++ random_time_bits = time (NULL); ++# endif ++#endif ++ value += random_time_bits ^ __getpid (); ++ ++ for (count = 0; count < TMP_MAX; value += 7777, ++count) ++ { ++ uint64_t v = value; ++ ++ /* Fill in the random bits. */ ++ XXXXXX[0] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[1] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[2] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[3] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[4] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[5] = letters[v % 62]; ++ ++ fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); ++ ++ if (fd >= 0) ++ { ++ __set_errno (save_errno); ++ return fd; ++ } ++ else if (errno != EEXIST) ++ return -1; ++ } ++ ++ /* We got out of the loop because we ran out of combinations to try. */ ++ __set_errno (EEXIST); ++ return -1; ++} ++ ++/* Generate a unique temporary directory from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ The directory is created, mode 700, and its name is returned. ++ (This function comes from OpenBSD.) */ ++char * ++mkdtemp (char *template) ++{ ++ if (gen_tempname (template)) ++ return NULL; ++ else ++ return template; ++} Added: csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile 2009-04-27 12:38:53 UTC (rev 4494) @@ -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/epiphany/trunk/legacy/specs/epiphany =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/specs/epiphany (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/specs/epiphany 2009-04-27 12:38:53 UTC (rev 4494) @@ -0,0 +1,73 @@ +# vim: ft=perl +# $Id: epiphany,v 1.8 2005/03/27 11:23:55 simigern Exp $ + +$progname = 'epiphany'; +$version = '1.4.8'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/epiphany/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['epiphany.nongccglibc.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The web browser for the GNOME Desktop", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/mozilla -L/opt/csw/lib/mozilla -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/mozilla -L/opt/csw/lib/mozilla -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +mkdir -p ${buildroot}/opt/csw/libexec +mv ${buildroot}/opt/csw/bin/epiphany ${buildroot}/opt/csw/libexec/epiphany +cat >${buildroot}/opt/csw/bin/epiphany <<__EOF__ +#!/bin/sh + +LD_LIBRARY_PATH=/opt/csw/lib/mozilla +export LD_LIBRARY_PATH +exec /opt/csw/libexec/epiphany "\\\$@" +__EOF__ +chmod 755 ${buildroot}/opt/csw/bin/epiphany + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +rm -rf ${buildroot}/opt/csw/var/scrollkeeper + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:39:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:39:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4495] csw/mgar/pkg Message-ID: Revision: 4495 http://gar.svn.sourceforge.net/gar/?rev=4495&view=rev Author: dmichelsen Date: 2009-04-27 12:39:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- evolution: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/evolution/ csw/mgar/pkg/evolution/trunk/ csw/mgar/pkg/evolution/trunk/legacy/ csw/mgar/pkg/evolution/trunk/legacy/scripts/ csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/evolution/trunk/legacy/scripts/human.pl csw/mgar/pkg/evolution/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/evolution/trunk/legacy/sources/ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-146-configure.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch csw/mgar/pkg/evolution/trunk/legacy/specs/ csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile csw/mgar/pkg/evolution/trunk/legacy/specs/evolution Added: csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:39:15 UTC (rev 4495) @@ -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/evolution/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/scripts/human.pl 2009-04-27 12:39:15 UTC (rev 4495) @@ -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 () { + 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 + +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 + +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/evolution/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:39:15 UTC (rev 4495) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/evolution/trunk/legacy/sources/evolution-146-configure.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-146-configure.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-146-configure.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,20 @@ +--- configure.orig 2004-03-14 03:52:15.406174060 +0100 ++++ configure 2004-03-14 03:52:36.489888010 +0100 +@@ -11734,7 +11734,7 @@ + ac_cv_db3_ldadd="" + + for name in db db3 db-3.1; do +- LIBS="$LIBS_save $with_db3_libs/lib${name}.a -pthread" ++ LIBS="$LIBS_save $with_db3_libs/lib${name}.a" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ +@@ -11803,7 +11803,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- LIBS="$DB3_LDADD $LIBS -pthread" ++ LIBS="$DB3_LDADD $LIBS" + if test "$cross_compiling" = yes; then + ac_cv_db3_lib_version_match=yes + else Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- camel/providers/pop3/camel-pop3-store.c.orig 2004-03-07 13:34:04.219075000 +0100 ++++ camel/providers/pop3/camel-pop3-store.c 2004-03-07 13:34:53.471146000 +0100 +@@ -530,7 +530,7 @@ + _("Unable to connect to POP server %s.\n" + "Error sending password: %s"), + CAMEL_SERVICE (store)->url->host, +- store->engine->line ? store->engine->line : _("Unknown error")); ++ store->engine->line ? (char*)store->engine->line : _("Unknown error")); + + camel_pop3_engine_command_free(store->engine, pcp); + Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,121 @@ +--- evolution-data-server-1.0.0/addressbook/libebook/e-book.c.orig 2004-09-27 05:56:55.328187000 -0400 ++++ evolution-data-server-1.0.0/addressbook/libebook/e-book.c 2004-09-27 05:57:35.848160000 -0400 +@@ -32,16 +32,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_BOOK_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libecal/e-cal.c.orig 2004-09-27 06:02:06.222945000 -0400 ++++ evolution-data-server-1.0.0/calendar/libecal/e-cal.c 2004-09-27 06:02:24.362926000 -0400 +@@ -126,16 +126,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_CALENDAR_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c.orig 2004-09-27 06:04:14.912978000 -0400 ++++ evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c 2004-09-27 06:04:43.372917000 -0400 +@@ -732,7 +732,7 @@ + g_return_if_fail (E_IS_CAL_BACKEND (backend)); + + g_assert (CLASS (backend)->get_object_list != NULL); +- return (* CLASS (backend)->get_object_list) (backend, cal, sexp); ++ (* CLASS (backend)->get_object_list) (backend, cal, sexp); + } + + /** +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c.orig 2004-09-27 06:06:28.492978000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c 2004-09-27 06:08:50.382913000 -0400 +@@ -30,6 +30,7 @@ + + /* Private part of the CalBackendFileEvents structure */ + struct _ECalBackendFileEventsPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c.orig 2004-09-27 06:09:35.912969000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c 2004-09-27 06:10:30.842913000 -0400 +@@ -26,6 +26,7 @@ + + /* Private part of the ECalBackendFileTodos structure */ + struct _ECalBackendFileTodosPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c.orig 2004-09-27 06:13:25.892943000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 2004-09-27 06:16:19.392917000 -0400 +@@ -599,7 +599,7 @@ + alarm = e_cal_component_alarm_new (); + e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY); + trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START; +- trigger.u.rel_duration = (struct icaldurationtype) icaldurationtype_from_int (alarm_duration); ++ trigger.u.rel_duration = icaldurationtype_from_int (alarm_duration); + e_cal_component_alarm_set_trigger (alarm, trigger); + e_cal_component_add_alarm (comp, alarm); + } +--- evolution-data-server-1.2.1/camel/camel-store.c.orig 2005-03-26 10:49:03.576595000 -0500 ++++ evolution-data-server-1.2.1/camel/camel-store.c 2005-03-26 10:51:01.386522000 -0500 +@@ -1257,7 +1257,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->subscribe) +- return iface->subscribe(store, folder_name, ex); ++ { ++ iface->subscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented subscribe method on a store"); + } +@@ -1267,7 +1270,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->unsubscribe) +- return iface->unsubscribe(store, folder_name, ex); ++ { ++ iface->unsubscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented unsubscribe method on a store"); + } +--- evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c.orig 2005-03-26 10:58:48.536596000 -0500 ++++ evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c 2005-03-26 10:59:39.186518000 -0500 +@@ -27,7 +27,7 @@ + EWeatherSourceClass *class; + g_return_if_fail (source != NULL); + class = (EWeatherSourceClass*) G_OBJECT_GET_CLASS (source); +- return class->parse (source, done, data); ++ class->parse (source, done, data); + } + + static void Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- my-evolution/e-summary-rdf.c.orig 2004-03-07 18:20:05.055034000 +0100 ++++ my-evolution/e-summary-rdf.c 2004-03-07 18:20:26.230345000 +0100 +@@ -194,7 +194,7 @@ + charset = NULL; + } else { + /* bad/missing encoding, fallback to latin1 (locale?) */ +- charset = r->cache->encoding ? r->cache->encoding : "iso-8859-1"; ++ charset = r->cache->encoding ? (char*)r->cache->encoding : "iso-8859-1"; + } + + /* FIXME: Need arrows */ Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- mail/mail-callbacks.h.orig 2004-03-07 18:27:27.905455000 +0100 ++++ mail/mail-callbacks.h 2004-03-07 18:28:55.986146000 +0100 +@@ -129,7 +129,7 @@ + void composer_send_cb (EMsgComposer *composer, gpointer data); + void composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer data); + +-void forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean inline); ++void forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean); + + /* CamelStore callbacks */ + void folder_created (CamelStore *store, const char *prefix, CamelFolderInfo *fi); Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,52 @@ +--- smime/lib/e-cert-db.c.orig 2004-09-27 10:58:59.686195000 -0400 ++++ smime/lib/e-cert-db.c 2004-09-27 10:59:15.146208000 -0400 +@@ -102,6 +102,7 @@ + static guint e_cert_db_signals[LAST_SIGNAL]; + + struct _ECertDBPrivate { ++ unsigned char very_secret; + }; + + #define PARENT_TYPE G_TYPE_OBJECT +--- calendar/gui/e-cal-model-calendar.c.orig 2004-09-27 11:09:01.060427000 -0400 ++++ calendar/gui/e-cal-model-calendar.c 2004-09-27 11:09:14.030440000 -0400 +@@ -28,6 +28,7 @@ + #include "misc.h" + + struct _ECalModelCalendarPrivate { ++ unsigned char very_secret; + }; + + static void ecmc_class_init (ECalModelCalendarClass *klass); +--- calendar/gui/e-cal-model-tasks.c.orig 2004-09-27 11:10:06.350500000 -0400 ++++ calendar/gui/e-cal-model-tasks.c 2004-09-27 11:10:20.470442000 -0400 +@@ -31,6 +31,7 @@ + #include "misc.h" + + struct _ECalModelTasksPrivate { ++ unsigned char very_secret; + }; + + static void ecmt_class_init (ECalModelTasksClass *klass); +--- composer/e-msg-composer-select-file.h.orig 2005-03-26 19:49:35.143777000 -0500 ++++ composer/e-msg-composer-select-file.h 2005-03-26 19:50:07.083699000 -0500 +@@ -28,7 +28,7 @@ + struct _EMsgComposer; + + typedef void (*EMsgComposerSelectFileFunc)(struct _EMsgComposer *composer, const char *filename); +-typedef void (*EMsgComposerSelectAttachFunc)(struct _EMsgComposer *composer, GSList *names, int inline); ++typedef void (*EMsgComposerSelectAttachFunc)(struct _EMsgComposer *composer, GSList *names, int iinline); + + void e_msg_composer_select_file(struct _EMsgComposer *composer, GtkWidget **w, EMsgComposerSelectFileFunc func, const char *title, int save); + void e_msg_composer_select_file_attachments(struct _EMsgComposer *composer, GtkWidget **, EMsgComposerSelectAttachFunc func); +--- plugins/calendar-weather/calendar-weather.c.orig 2005-03-26 20:01:03.561198000 -0500 ++++ plugins/calendar-weather/calendar-weather.c 2005-03-26 20:01:37.321123000 -0500 +@@ -107,7 +107,7 @@ + g_object_unref (weather); + + e_source_list_sync (source_list, NULL); +- return 0; ++ return; + } + + static void Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,27 @@ +--- plugins/subject-thread/org-gnome-subject-thread.eplug.in.orig 2005-04-13 12:44:34.065699000 -0400 ++++ plugins/subject-thread/org-gnome-subject-thread.eplug.in 2005-04-13 12:44:39.635639000 -0400 +@@ -11,4 +11,4 @@ + + + +- +\ No newline at end of file ++ +--- plugins/save-calendar/org-gnome-save-calendar.eplug.in.orig 2005-04-13 12:42:26.555716000 -0400 ++++ plugins/save-calendar/org-gnome-save-calendar.eplug.in 2005-04-13 12:42:38.335820000 -0400 +@@ -15,4 +15,4 @@ + + + +- +\ No newline at end of file ++ +--- plugins/select-one-source/org-gnome-select-one-source.eplug.in.orig 2005-04-13 12:43:42.515715000 -0400 ++++ plugins/select-one-source/org-gnome-select-one-source.eplug.in 2005-04-13 12:43:50.255638000 -0400 +@@ -15,4 +15,4 @@ + + + +- +\ No newline at end of file ++ Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- mail/em-junk-filter.c.orig 2004-10-09 19:31:04.369997000 -0400 ++++ mail/em-junk-filter.c 2004-10-09 19:31:52.620013000 -0400 +@@ -295,7 +295,7 @@ + i = 0; + argv [i++] = "/bin/sh"; + argv [i++] = "-c"; +- argv [i++] = "ps ax|grep -v grep|grep -E 'spamd.*(\\-L|\\-\\-local)'|grep -E -v '\\ \\-p\\ |\\ \\-\\-port\\ '"; ++ argv [i++] = "/usr/bin/ps -ef|/usr/xpg4/bin/grep -v grep|/usr/xpg4/bin/grep -E 'spamd.*(\\-L|\\-\\-local)'|/usr/xpg4/bin/grep -E -v '\\ \\-p\\ |\\ \\-\\-port\\ '"; + argv[i] = NULL; + + if (pipe_to_sa (NULL, NULL, argv) != 0) { Added: csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile 2009-04-27 12:39:15 UTC (rev 4495) @@ -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/evolution/trunk/legacy/specs/evolution =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/specs/evolution (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/specs/evolution 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,77 @@ +# vim: ft=perl +# $Id: evolution,v 1.38 2005/04/13 16:48:28 simigern Exp $ + +$progname = 'evolution'; +$version = '2.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnome.org/projects/evolution/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = ( ['evolution-nongcc-fixes.patch', "${progname}-${version}", '-p0'], + ['evolution-psfix.patch', "${progname}-${version}", '-p0'], + ['evolution-plugin-list.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME mail client and PIM", + dependencies => ['CSWcommon','CSWgnomespell','CSWgnomeicontheme'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$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 -I${buildroot}/opt/csw/include" +export CPPFLAGS="-I/opt/csw/include -I${buildroot}/opt/csw/include" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/evolution/nss/lib -L/opt/csw/lib/evolution/nss/lib' +export LDFLAGS="\$LD_OPTIONS" +cd ${builddir} +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig:${buildroot}/opt/csw/lib/pkgconfig +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +sed -e 's| audio-inline | |g' configure | sed -e 's| new-mail-notify||g' >configure.new +mv configure.new configure +chmod 755 configure +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-krb5=/opt/csw --enable-nss=yes --with-openldap=/opt/csw --enable-ipv6=yes --without-broken-spool --enable-nntp=yes --with-nspr-includes=/opt/csw/lib/evolution/nss/include --with-nspr-libs=/opt/csw/lib/evolution/nss/lib --with-nss-includes=/opt/csw/lib/evolution/nss/lib/include --with-nss-libs=/opt/csw/lib/evolution/nss/lib --enable-pilot-conduits=yes + +touch help/C/evolution-2.0.xml +touch help/C/evolution-2.0-C.omf +touch help/C/evolution-2.0-C.omf.out + +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + + + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +rm ${buildroot}/opt/csw/bin/evolution-2.2 +ln -s ../libexec/evolution-2.2 ${buildroot}/opt/csw/bin/evolution-2.2 +ln -s ../libexec/evolution-2.2 ${buildroot}/opt/csw/bin/evolution-nognome +ln -s evolution-2.2 ${buildroot}/opt/csw/bin/evolution + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/evolution/*/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:39:30 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:39:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4496] csw/mgar/pkg Message-ID: Revision: 4496 http://gar.svn.sourceforge.net/gar/?rev=4496&view=rev Author: dmichelsen Date: 2009-04-27 12:39:30 +0000 (Mon, 27 Apr 2009) Log Message: ----------- evolution-ds: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/evolution-ds/ csw/mgar/pkg/evolution-ds/trunk/ csw/mgar/pkg/evolution-ds/trunk/legacy/ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/human.pl csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/evolution-ds/trunk/legacy/sources/ csw/mgar/pkg/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch csw/mgar/pkg/evolution-ds/trunk/legacy/specs/ csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile csw/mgar/pkg/evolution-ds/trunk/legacy/specs/evolution-ds Added: csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:39:30 UTC (rev 4496) @@ -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/evolution-ds/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/human.pl 2009-04-27 12:39:30 UTC (rev 4496) @@ -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 () { + 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 + +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 + +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/evolution-ds/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:39:30 UTC (rev 4496) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch 2009-04-27 12:39:30 UTC (rev 4496) @@ -0,0 +1,121 @@ +--- evolution-data-server-1.0.0/addressbook/libebook/e-book.c.orig 2004-09-27 05:56:55.328187000 -0400 ++++ evolution-data-server-1.0.0/addressbook/libebook/e-book.c 2004-09-27 05:57:35.848160000 -0400 +@@ -32,16 +32,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_BOOK_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libecal/e-cal.c.orig 2004-09-27 06:02:06.222945000 -0400 ++++ evolution-data-server-1.0.0/calendar/libecal/e-cal.c 2004-09-27 06:02:24.362926000 -0400 +@@ -126,16 +126,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_CALENDAR_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c.orig 2004-09-27 06:04:14.912978000 -0400 ++++ evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c 2004-09-27 06:04:43.372917000 -0400 +@@ -732,7 +732,7 @@ + g_return_if_fail (E_IS_CAL_BACKEND (backend)); + + g_assert (CLASS (backend)->get_object_list != NULL); +- return (* CLASS (backend)->get_object_list) (backend, cal, sexp); ++ (* CLASS (backend)->get_object_list) (backend, cal, sexp); + } + + /** +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c.orig 2004-09-27 06:06:28.492978000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c 2004-09-27 06:08:50.382913000 -0400 +@@ -30,6 +30,7 @@ + + /* Private part of the CalBackendFileEvents structure */ + struct _ECalBackendFileEventsPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c.orig 2004-09-27 06:09:35.912969000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c 2004-09-27 06:10:30.842913000 -0400 +@@ -26,6 +26,7 @@ + + /* Private part of the ECalBackendFileTodos structure */ + struct _ECalBackendFileTodosPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c.orig 2004-09-27 06:13:25.892943000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 2004-09-27 06:16:19.392917000 -0400 +@@ -599,7 +599,7 @@ + alarm = e_cal_component_alarm_new (); + e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY); + trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START; +- trigger.u.rel_duration = (struct icaldurationtype) icaldurationtype_from_int (alarm_duration); ++ trigger.u.rel_duration = icaldurationtype_from_int (alarm_duration); + e_cal_component_alarm_set_trigger (alarm, trigger); + e_cal_component_add_alarm (comp, alarm); + } +--- evolution-data-server-1.2.1/camel/camel-store.c.orig 2005-03-26 10:49:03.576595000 -0500 ++++ evolution-data-server-1.2.1/camel/camel-store.c 2005-03-26 10:51:01.386522000 -0500 +@@ -1257,7 +1257,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->subscribe) +- return iface->subscribe(store, folder_name, ex); ++ { ++ iface->subscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented subscribe method on a store"); + } +@@ -1267,7 +1270,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->unsubscribe) +- return iface->unsubscribe(store, folder_name, ex); ++ { ++ iface->unsubscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented unsubscribe method on a store"); + } +--- evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c.orig 2005-03-26 10:58:48.536596000 -0500 ++++ evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c 2005-03-26 10:59:39.186518000 -0500 +@@ -27,7 +27,7 @@ + EWeatherSourceClass *class; + g_return_if_fail (source != NULL); + class = (EWeatherSourceClass*) G_OBJECT_GET_CLASS (source); +- return class->parse (source, done, data); ++ class->parse (source, done, data); + } + + static void Added: csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile 2009-04-27 12:39:30 UTC (rev 4496) @@ -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/evolution-ds/trunk/legacy/specs/evolution-ds =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/specs/evolution-ds (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/specs/evolution-ds 2009-04-27 12:39:30 UTC (rev 4496) @@ -0,0 +1,78 @@ +# vim: ft=perl +# $Id: evolution-ds,v 1.12 2005/04/13 15:12:50 simigern Exp $ + +$progname = 'evolution-data-server'; +$version = '1.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/gnome/sources/evolution-data-server/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","nss-3.9.2.tar.gz"); + + at patches = (['evolution-ds-nongcc-fixes.patch', "${progname}-${version}", '-p1'], + ['nss-makefile.patch','nss-3.9.2','-p1']); + + at packages = ({ + pkgname => "evolution-ds", + filename => "evolution_ds", + name => "evolution_ds - evolution database backend server", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$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 -I${buildroot}/opt/csw/include" +export CPPFLAGS="-I/opt/csw/include -I${buildroot}/opt/csw/include" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/evolution/nss/lib -L/opt/csw/lib/evolution/nss/lib' +export LDFLAGS="\$LD_OPTIONS" +export LD_RUN_PATH="/opt/csw/lib/evolution/nss/lib" + +export BUILD_OPT=1 +cd ${builddir}/nss-3.9.2/mozilla/security/nss +gmake nss_build_all +export NSS_OBJ_DIR="`ls -d ${builddir}/nss-3.9.2/mozilla/dist/*OPT.OBJ`" +mkdir -p ${buildroot}/opt/csw/lib/evolution/nss/lib +mkdir -p ${buildroot}/opt/csw/lib/evolution/nss/include +cd \$NSS_OBJ_DIR/lib +cp *.so ${buildroot}/opt/csw/lib/evolution/nss/lib/ +cd \$NSS_OBJ_DIR/include +cp -r * ${buildroot}/opt/csw/lib/evolution/nss/include/ +cd ${builddir}/nss-3.9.2/mozilla/dist/public/nss +cp -r * ${buildroot}/opt/csw/lib/evolution/nss/include/ +unset LD_RUN_PATH + +cd ${builddir} +#Now evo-ds +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +cd ${builddir} +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-krb5=/opt/csw --enable-nss=yes --with-openldap=/opt/csw --enable-ipv6=yes --without-broken-spool --enable-nntp=yes --with-nspr-includes=${buildroot}/opt/csw/lib/evolution/nss/include --with-nspr-libs=${buildroot}/opt/csw/lib/evolution/nss/lib --with-nss-includes=${builddir}/opt/csw/lib/evolution/nss/include --with-nss-libs=${buildroot}/opt/csw/lib/evolution/nss/lib +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:39:45 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:39:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4497] csw/mgar/pkg Message-ID: Revision: 4497 http://gar.svn.sourceforge.net/gar/?rev=4497&view=rev Author: dmichelsen Date: 2009-04-27 12:39:45 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fedora-ds: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/fedora-ds/ csw/mgar/pkg/fedora-ds/trunk/ csw/mgar/pkg/fedora-ds/trunk/legacy/ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/human.pl csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/fedora-ds/trunk/legacy/sources/ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/Makefile csw/mgar/pkg/fedora-ds/trunk/legacy/specs/fedora-ds Added: csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:39:45 UTC (rev 4497) @@ -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/fedora-ds/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/human.pl 2009-04-27 12:39:45 UTC (rev 4497) @@ -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 () { + 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 + +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 + +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/fedora-ds/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:39:45 UTC (rev 4497) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/fedora-ds/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/Makefile 2009-04-27 12:39:45 UTC (rev 4497) @@ -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/fedora-ds/trunk/legacy/specs/fedora-ds =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/specs/fedora-ds (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/fedora-ds 2009-04-27 12:39:45 UTC (rev 4497) @@ -0,0 +1,244 @@ +# vim: ft=perl +# $Id: fedora-ds,v 1.11 2005/06/16 22:39:39 simigern Exp $ + +$progname = 'fedora-ds'; +$version = '7.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://directory.fedora.redhat.com/ packaged for CSW by Michael Gernoth'; + + at sources = ("fedora-ds/${progname}-${version}.tar.gz", "fedora-ds/mozilla-fds.tar.bz2", "fedora-ds/cyrus-sasl-2.1.20.tar.gz", "fedora-ds/icu-2.4.tgz", "fedora-ds/net-snmp-5.2.1.tar.gz", "fedora-ds/db-4.2.52.NC.tar.gz", "fedora-ds/fedora-ds-doc-${version}.tar.bz2" ); + + at patches = (['fedora-ds/patch.4.2.52.1', "db-4.2.52.NC", '-p0'], + ['fedora-ds/patch.4.2.52.2', "db-4.2.52.NC", '-p0'], + ['fedora-ds/patch.4.2.52.3', "db-4.2.52.NC", '-p0'], + ['fedora-ds/patch.4.2.52.4', "db-4.2.52.NC", '-p0'], + ['nss-makefile.patch','mozilla-fds','-p2'], + ['fedora-ds/fedora-ds-nongcc.patch', '', '-p0']); + + at packages = ({ + pkgname => "fedora-ds", + filename => "fedora_ds", + name => "fedora_ds - Fedora/Netscape LDAP Directory Server", + dependencies => ['CSWcommon','CSWperl'], + filelist => [qw(opt etc)], + postinstall => "fedora-ds/fedora-ds.postinstall" + }); + +$copyright = "${progname}-${version}/LICENSE"; + +$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' +set -e + +#First mozilla... +cd ${builddir}/mozilla-fds +cd security/nss +gmake BUILD_OPT=1 nss_build_all + +cd ${builddir}/mozilla-fds +cd security/svrcore +gmake BUILD_OPT=1 + +OLDCPPFLAGS="\$CPPFLAGS" +export CPPFLAGS="-I../../../ldap/include \$CPPFLAGS" +export LDFLAGS='-liconv' +cd ${builddir}/mozilla-fds +cd directory/c-sdk +/opt/csw/bin/gsed -i -e 's|-Qoption cg ||' configure +./configure --with-nss --enable-optimize +gmake BUILDCLU=1 HAVE_SVRCORE=1 BUILD_OPT=1 +export CPPFLAGS="\$OLDCPPFLAGS" +unset LDFLAGS + +#Cyrus sasl +cd ${builddir}/cyrus-sasl-2.1.20 +CC=cc CFLAGS="-xO2" ./configure --enable-gssapi --enable-static --without-des --without-openssl +gmake + +#icu +cd ${builddir}/icu +export ICU_BUILD_PATH=`pwd` +cd source +./runConfigureICU SOLARISCC --enable-rpath --disable-ustdio --prefix=\$ICU_BUILD_PATH/built --disable-64bit-libs +gmake all install + +#netsnmp +cd ${builddir}/net-snmp-5.2.1 +export NET_SNMP_BUILD_PATH=`pwd` +/opt/csw/bin/gyes ''|CC=cc CFLAGS="-xO2" ./configure --with-default-snmp-version=3 --with-sys-contact="" --with-sys-location="" --with-logfile="" --with-persistent-directory=/var/net-snmp --prefix="\$NET_SNMP_BUILD_PATH/built" --disable-applications --disable-manuals --disable-scripts --disable-mibs +gmake +gmake install + +#bdb +cd ${builddir}/db-4.2.52.NC +mkdir built +cd built +CC=cc ../dist/configure --enable-dynamic --disable-debug +gmake LIBDB_ARGS="libdb.a" all +rm db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify +gmake LDFLAGS="-static \$LDFLAGS" libdb.a all + +#and finally... +cd ${builddir} +ln -s mozilla-fds mozilla +cd ${builddir}/${progname}-${version} +gmake USE_PERL_FROM_PATH=1 BUILD_DEBUG=optimize + +cd ${builddir}/${progname}-${version}/built/release/slapd/SOLARIS* +mkdir -p ${buildroot}/opt/csw/fedora-ds +cp -r * ${buildroot}/opt/csw/fedora-ds/ + +mkdir -p ${buildroot}/etc/{init.d,rc{0,1,2,3,S}.d} +cp ${RealBin}/../sources/fedora-ds/fedora-ds.init ${buildroot}/etc/init.d/cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc3.d/S89cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc0.d/K03cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc1.d/K03cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc2.d/K03cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rcS.d/K03cswfedora-ds + +mkdir -p ${buildroot}/opt/csw/fedora-ds/etc +cat >${buildroot}/opt/csw/fedora-ds/etc/startup.CSW <<__EOF__ +#run/stop fedora-ds with the init-script +START_FDS="yes" + +#automatically start all existing instances? +SCAN_INSTANCES="yes" + +#when SCAN_INSTANCES is no, which instances should be +#started? +INSTANCES="host" +__EOF__ + +cat >${buildroot}/opt/csw/fedora-ds/etc/fedora-ds-csw-install-sample.inf <<__EOF__ +[General] +FullMachineName = host.domain.tld +SuiteSpotUserID = nobody +ServerRoot = /opt/csw/fedora-ds +[slapd] +ServerPort = 389 +ServerIdentifier = host +Suffix = dc=host,dc=domain,dc=tld +RootDN = cn=Directory Manager +RootDNPwd = secret +__EOF__ + +cat >${buildroot}/opt/csw/fedora-ds/bin/ds_newinst.pl <<__EOF__ +#!/bin/sh + +exec /opt/csw/bin/perl /opt/csw/fedora-ds/bin/slapd/admin/bin/ds_newinst.pl "$@" +__EOF__ +chmod 755 ${buildroot}/opt/csw/fedora-ds/bin/ds_newinst.pl + +cat >${buildroot}/opt/csw/fedora-ds/README.CSW <<__EOF__ +Quick-Start +----------- + +To create a new LDAP-server instance do the following: +1. Create an install.inf file for your new server + (See /opt/csw/fedora-ds/etc/fedora-ds-csw-install-sample.inf for an example) +2. Run /opt/csw/fedora-ds/bin/ds_newinst.pl /path/to/install.inf + This creates the instance in /opt/csw/fedora-ds/slapd-[hostname] and starts + the server. +3. Run /opt/csw/fedora-ds/shared/bin/ldapsearch -s base -b "" "objectclass=*" + to see if your new server is working +4. Edit /opt/csw/fedora-ds/etc/startup to set the desired behaviour on system + startup and manually running /etc/init.d/cswfedora-ds. + + +Description of install.inf +-------------------------- +1. General Section + ++-------------------------+-----------+----------------------------------+------------------------------+ +| Name | Required? | Description | Example | ++-------------------------+-----------+----------------------------------+------------------------------+ +| SuiteSpotUserID | required | the Unix user that the Directory | ldap or nobody | +| | | Server will run as | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| FullMachineName | required | the fully qualified host and | oak.devel.example.com | +| | | domain name | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ServerRoot | required | the base directory where the | /opt/csw/fedora-ds | +| | | runtime files are installed | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ConfigDirectoryAdminID | optional | user ID for console login | admin | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ConfigDirectoryAdminPwd | optional | password for | password | +| | | ConfigDirectoryAdminID | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ConfigDirectoryLdapURL | optional | LDAP URL for the Configuration | | +| | | Directory. | ldap://host.domain.tld:port/ | +| | | the suffix is required and will | o=NetscapeRoot | +| | | usually be o=NetscapeRoot | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| AdminDomain | optional | the administrative domain this | devel.example.com | +| | | instance will belong to | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| UserDirectoryLdapURL | optional | the user/group directory used by | ldap://host.domain.tld:port/ | +| | | the Console | dc=devel,dc=example,dc=com | ++-------------------------+-----------+----------------------------------+------------------------------+ + + +2. slapd Section + ++-------------------------+-----------+----------------------------------+------------------------------+ +| Name | Required? | Description | Example | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ServerPort | required | the port number the server will | 389 | +| | | listen to | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ServerIdentifier | required | the base name of the directory | oak | +| | | that contains the instance | | +| | | of this server - will have | | +| | | "slapd-" added to it | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| Suffix | required | the primary suffix for this | dc=devel,dc=example,dc=com | +| | | server (more can be added later) | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| RootDN | required | the DN for the Directory | cn=Directory Manager | +| | | Administrator | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| RootDNPwd | required | the password for the RootDN | itsasecret | ++-------------------------+-----------+----------------------------------+------------------------------+ +| InstallLdifFile | optional | use this LDIF file to initialize | /full/path/to/Example.ldif | +| | | the database the suffix must be | | +| | | specified in the Suffix directive| | ++-------------------------+-----------+----------------------------------+------------------------------+ +| SlapdConfigForMC | optional | if true (1), configure this new | 1 | +| | | DS instance as a Configuration | | +| | | Directory Server | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| UseExistingMC | optional | if true (1), register this DS | 1 | +| | | with the Configuration DS | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| UseExistingUG | optional | if true (1), do not configure | 1 | +| | | this DS as a user/group | | +| | | directory but use the one speci- | | +| | | fied by UserDirectoryLdapURL | | ++-------------------------+-----------+----------------------------------+------------------------------+ + + +More Documentation +------------------ + +See /opt/csw/share/doc/fedora-ds/ +__EOF__ + +#Documentation +mkdir -p ${buildroot}/opt/csw/share/doc/fedora-ds/ +cp ${builddir}/fedora-ds-doc-${version}/* ${buildroot}/opt/csw/share/doc/fedora-ds/ + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4498] csw/mgar/pkg Message-ID: Revision: 4498 http://gar.svn.sourceforge.net/gar/?rev=4498&view=rev Author: dmichelsen Date: 2009-04-27 12:40:00 +0000 (Mon, 27 Apr 2009) Log Message: ----------- ficy: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/ficy/ csw/mgar/pkg/ficy/trunk/ csw/mgar/pkg/ficy/trunk/legacy/ csw/mgar/pkg/ficy/trunk/legacy/scripts/ csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/ficy/trunk/legacy/scripts/human.pl csw/mgar/pkg/ficy/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/ficy/trunk/legacy/sources/ csw/mgar/pkg/ficy/trunk/legacy/specs/ csw/mgar/pkg/ficy/trunk/legacy/specs/Makefile csw/mgar/pkg/ficy/trunk/legacy/specs/ficy Added: csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:00 UTC (rev 4498) @@ -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/ficy/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/scripts/human.pl 2009-04-27 12:40:00 UTC (rev 4498) @@ -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 () { + 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 + +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 + +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/ficy/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:00 UTC (rev 4498) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/ficy/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/specs/Makefile 2009-04-27 12:40:00 UTC (rev 4498) @@ -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/ficy/trunk/legacy/specs/ficy =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/specs/ficy (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/specs/ficy 2009-04-27 12:40:00 UTC (rev 4498) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: ficy,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'fIcy'; +$version = '1.0.4'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ficy.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-1_0_4.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "ficy", + filename => "ficy", + name => "ficy - an icecast/shoutcast stream grabber", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-1_0_4/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 LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -lnsl -lsocket -lresolv' +cd ${progname}-1_0_4 +gmake || exit 1 +mkdir -p ${buildroot}/opt/csw/bin +cp fIcy ${buildroot}/opt/csw/bin/ +mkdir -p ${buildroot}/opt/csw/share/doc/ficy +cp AUTHORS NEWS README TODO ${buildroot}/opt/csw/share/doc/ficy/ +./ohg ${buildroot}/opt/csw/share/doc/ficy/README.html +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:36 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4500] csw/mgar/pkg Message-ID: Revision: 4500 http://gar.svn.sourceforge.net/gar/?rev=4500&view=rev Author: dmichelsen Date: 2009-04-27 12:40:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fotaq: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/fotaq/ csw/mgar/pkg/fotaq/trunk/ csw/mgar/pkg/fotaq/trunk/legacy/ csw/mgar/pkg/fotaq/trunk/legacy/scripts/ csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/fotaq/trunk/legacy/scripts/human.pl csw/mgar/pkg/fotaq/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/fotaq/trunk/legacy/sources/ csw/mgar/pkg/fotaq/trunk/legacy/specs/ csw/mgar/pkg/fotaq/trunk/legacy/specs/Makefile csw/mgar/pkg/fotaq/trunk/legacy/specs/fotaq Added: csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:36 UTC (rev 4500) @@ -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/fotaq/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/scripts/human.pl 2009-04-27 12:40:36 UTC (rev 4500) @@ -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 () { + 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 + +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 + +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/fotaq/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:36 UTC (rev 4500) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/fotaq/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/specs/Makefile 2009-04-27 12:40:36 UTC (rev 4500) @@ -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/fotaq/trunk/legacy/specs/fotaq =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/specs/fotaq (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/specs/fotaq 2009-04-27 12:40:36 UTC (rev 4500) @@ -0,0 +1,92 @@ +# vim: ft=perl +# $Id: fotaq,v 1.2 2005/01/09 14:42:06 simigern Exp $ + +$progname = 'fotaq'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.scummvm.org/ packaged for CSW by Michael Gernoth'; + + at sources = (); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Flight of the Amazon Queen, a fantasy adventure game", + dependencies => ['CSWcommon','CSWscummvm'], + filelist => [qw(opt)] + }); + +$arch="all"; +$osversion="5.8"; + +$copyright = "FOTAQ_Talkie/COPYING"; + +$build = <<"EOF"; +unzip ${RealBin}/../sources/FOTAQ_Talkie.zip +cd FOTAQ_Talkie +cat >COPYING <<__EOF__ +Preamble: + Basically, give this game away, share it with your friends. Don't remove this +Readme, or pretend that you wrote it. You can include it in a software +collection, like a Linux distribution or coverdisk (which may be sold), but +using it in things like commercial adventure game collections without asking is +just playing dirty. You can modify the gamedata for such purposes as compressing +audio. This preamble is not legally binding, but is to clarify the intent of +the following licence. + +Licence: + 1) You may distribute this game for free on any medium, provided this Readme +and all associated copyright notices and disclaimers are left intact. + + 2) You may charge a reasonable copying fee for this archive, and may +distribute it in aggregate as part of a larger and possibly commercial software +distribution (such as a Linux distribution or magazine coverdisk). You must +provide proper attribution and ensure that this Readme and all associated +copyright notices and disclaimers are left intact. + + 3) You may not charge a fee for the game itself. This includes reselling the +game as an individual item. + + 4) You may modify the game as you wish. You may also distribute modified +versions under the terms set forth in this licence, but with the additional +requirement that the work is marked with a prominent notice which states that +it is a modified version. + + 5) All game content is (C) John Passfield and Steven Stamatiadis. + The ScummVM engine is (C) The ScummVM Team (www.scummvm.org). + + 6) THE GAME DATA IN THIS ARCHIVE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING AND NOT LIMITED TO ANY IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +__EOF__ +mkdir -p ${buildroot}/opt/csw/share/fotaq ${buildroot}/opt/csw/share/doc/fotaq ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/share/applications +cp queen.1c ${buildroot}/opt/csw/share/fotaq/ +cp readme.txt ${buildroot}/opt/csw/share/doc/fotaq/ +chmod 644 ${buildroot}/opt/csw/share/fotaq/* ${buildroot}/opt/csw/share/doc/fotaq/* + +cat >${buildroot}/opt/csw/bin/fotaq <<__EOF__ +#!/bin/sh + +exec /opt/csw/bin/scummvm -p /opt/csw/share/fotaq "\\\$@" queen +__EOF__ +chmod 755 ${buildroot}/opt/csw/bin/fotaq + +cat >${buildroot}/opt/csw/share/applications/fotaq.desktop <<__EOF__ +[Desktop Entry] +Encoding=UTF-8 +Name=Flight of the Amazon Queen +Comment=A fantasy adventure game +Exec=fotaq +Icon=scummvm.xpm +Terminal=false +Type=Application +Categories=Application;Game;AdventureGame; +StartupNotify=false +__EOF__ + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4501] csw/mgar/pkg Message-ID: Revision: 4501 http://gar.svn.sourceforge.net/gar/?rev=4501&view=rev Author: dmichelsen Date: 2009-04-27 12:40:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gail: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gail/ csw/mgar/pkg/gail/trunk/ csw/mgar/pkg/gail/trunk/legacy/ csw/mgar/pkg/gail/trunk/legacy/scripts/ csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gail/trunk/legacy/scripts/human.pl csw/mgar/pkg/gail/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gail/trunk/legacy/sources/ csw/mgar/pkg/gail/trunk/legacy/specs/ csw/mgar/pkg/gail/trunk/legacy/specs/Makefile csw/mgar/pkg/gail/trunk/legacy/specs/gail Added: csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:51 UTC (rev 4501) @@ -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/gail/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/scripts/human.pl 2009-04-27 12:40:51 UTC (rev 4501) @@ -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 () { + 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 + +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 + +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/gail/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:51 UTC (rev 4501) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gail/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/specs/Makefile 2009-04-27 12:40:51 UTC (rev 4501) @@ -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/gail/trunk/legacy/specs/gail =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/specs/gail (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/specs/gail 2009-04-27 12:40:51 UTC (rev 4501) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: gail,v 1.7 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gail'; +$version = '1.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gail/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Accessibility support for GTK+ and libgnomecanvas", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +touch docs/reference/libgail-util/html/index.sgml +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gtk-2.0/modules/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4502] csw/mgar/pkg Message-ID: Revision: 4502 http://gar.svn.sourceforge.net/gar/?rev=4502&view=rev Author: dmichelsen Date: 2009-04-27 12:41:07 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gal: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gal/ csw/mgar/pkg/gal/trunk/ csw/mgar/pkg/gal/trunk/legacy/ csw/mgar/pkg/gal/trunk/legacy/scripts/ csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gal/trunk/legacy/scripts/human.pl csw/mgar/pkg/gal/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gal/trunk/legacy/sources/ csw/mgar/pkg/gal/trunk/legacy/specs/ csw/mgar/pkg/gal/trunk/legacy/specs/Makefile csw/mgar/pkg/gal/trunk/legacy/specs/gal Added: csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:07 UTC (rev 4502) @@ -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/gal/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/scripts/human.pl 2009-04-27 12:41:07 UTC (rev 4502) @@ -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 () { + 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 + +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 + +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/gal/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:07 UTC (rev 4502) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gal/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/specs/Makefile 2009-04-27 12:41:07 UTC (rev 4502) @@ -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/gal/trunk/legacy/specs/gal =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/specs/gal (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/specs/gal 2009-04-27 12:41:07 UTC (rev 4502) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: gal,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gal'; +$version = '1.99.11'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gal/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME Application Libs", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:20 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4499] csw/mgar/pkg Message-ID: Revision: 4499 http://gar.svn.sourceforge.net/gar/?rev=4499&view=rev Author: dmichelsen Date: 2009-04-27 12:40:20 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fortune: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/fortune/ csw/mgar/pkg/fortune/trunk/ csw/mgar/pkg/fortune/trunk/legacy/ csw/mgar/pkg/fortune/trunk/legacy/scripts/ csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/fortune/trunk/legacy/scripts/human.pl csw/mgar/pkg/fortune/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/fortune/trunk/legacy/sources/ csw/mgar/pkg/fortune/trunk/legacy/sources/fortune-datfiles.patch csw/mgar/pkg/fortune/trunk/legacy/specs/ csw/mgar/pkg/fortune/trunk/legacy/specs/Makefile csw/mgar/pkg/fortune/trunk/legacy/specs/fortune Added: csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:20 UTC (rev 4499) @@ -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/fortune/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/scripts/human.pl 2009-04-27 12:40:20 UTC (rev 4499) @@ -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 () { + 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 + +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 + +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/fortune/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:20 UTC (rev 4499) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/fortune/trunk/legacy/sources/fortune-datfiles.patch =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/sources/fortune-datfiles.patch (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/sources/fortune-datfiles.patch 2009-04-27 12:40:20 UTC (rev 4499) @@ -0,0 +1,23594 @@ +diff -Nru datfiles.orig/Makefile datfiles/Makefile +--- datfiles.orig/Makefile 1997-08-28 18:38:25.000000000 +0200 ++++ datfiles/Makefile 2004-08-07 23:32:30.000000000 +0200 +@@ -3,7 +3,8 @@ + food fortunes goedel humorists kids law linuxcookie literature \ + love magic medicine men-women miscellaneous news people pets \ + platitudes politics riddles science songs-poems sports \ +- startrek translate-me wisdom work zippy ++ startrek translate-me wisdom work linux perl knghtbrd \ ++ paradoxum zippy debian + + STRFILE=../util/strfile + +diff -Nru datfiles.orig/art datfiles/art +--- datfiles.orig/art 1995-10-21 04:31:41.000000000 +0100 ++++ datfiles/art 2004-08-07 23:32:32.000000000 +0200 +@@ -6,16 +6,16 @@ + The Bionic Dog gets a hormonal short-circuit and violates the + Mann Act with an interstate Greyhound bus. + % +-A "critic" is a man who creates nothing and thereby feels qualified to judge +-the work of creative men. There is logic in this; he is unbiased -- he hates +-all creative people equally. ++A "critic" is a man who creates nothing and thereby feels qualified to ++judge the work of creative men. There is logic in this; he is unbiased ++-- he hates all creative people equally. + % + A celebrity is a person who is known for his well-knownness. + % +- A circus foreman was making the rounds inspecting the big top when +-a scrawny little man entered the tent and walked up to him. "Are you the +-foreman around here?" he asked timidly. "I'd like to join your circus; I +-have what I think is a pretty good act." ++ A circus foreman was making the rounds inspecting the big top ++when a scrawny little man entered the tent and walked up to him. "Are ++you the foreman around here?" he asked timidly. "I'd like to join your ++circus; I have what I think is a pretty good act." + The foreman nodded assent, whereupon the little man hurried over to + the main pole and rapidly climbed up to the very tip-top of the big top. + Drawing a deep breath, he hurled himself off into the air and began flapping +@@ -73,7 +73,7 @@ + A poet who reads his verse in public may have other nasty habits. + % + A rose is a rose is a rose. Just ask Jean Marsh, known to millions of +-PBS viewers in the '70s as Rose, the maid on the BBC export "Upstairs, ++PBS viewers in the '70s as Rose, the maid on the LWT export "Upstairs, + Downstairs." Though Marsh has since gone on to other projects, ... it's + with Rose she's forever identified. So much so that she even likes to + joke about having one named after her, a distinction not without its +@@ -463,7 +463,7 @@ + -- John Mason Brown, drama critic + % + He was a fiddler, and consequently a rogue. +- -- Jonathon Swift ++ -- Jonathan Swift + % + "Hello," he lied. + -- Don Carpenter, quoting a Hollywood agent +@@ -1078,8 +1078,8 @@ + themselves that they have a better idea. + -- John Ciardi + % +-Mos Eisley Spaceport; you'll not find a more wretched collection of +-villainy and disreputable types... ++Mos Eisley Spaceport; you will never find a more wretched hive of scum ++and villainy... + -- Obi-wan Kenobi, "Star Wars" + % + Mr. Rockford, this is the Thomas Crown School of Dance and Contemporary +@@ -2194,9 +2194,6 @@ + % + Writing free verse is like playing tennis with the net down. + % +-X-rated movies are all alike ... the only thing they leave to the +-imagination is the plot. +-% + Yeah, that's me, Tracer Bullet. I've got eight slugs in me. One's lead, + the rest bourbon. The drink packs a wallop, and I pack a revolver. I'm + a private eye. +@@ -2240,3 +2237,8 @@ + Zero Mostel: That's it baby! When you got it, flaunt it! Flaunt it! + -- Mel Brooks, "The Producers" + % ++Naked children have never played in _o_u_r fountains, and I.M. Pei will ++never be happy on Route 66. ++ -- "Learning from Las Vegas", Robert Venturi, Denise Scott ++ Brown, and Steven Izenour ++% +diff -Nru datfiles.orig/computers datfiles/computers +--- datfiles.orig/computers 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/computers 2004-08-07 23:32:31.000000000 +0200 +@@ -75,7 +75,7 @@ + % + A computer salesman visits a company president for the purpose of selling + the president one of the latest talking computers. +-Salesman: "This machine knows everything. I can ask it any quesstion ++Salesman: "This machine knows everything. I can ask it any question + and it'll give the correct answer. Computer, what is the + speed of light?" + Computer: 186,282 miles per second. +@@ -574,7 +574,7 @@ + This is believed to speed up execution by as much as a factor of 1.01 or + 3.50 depending on whether you believe our friendly marketing representatives. + This code was written by a new programmer here (we snatched him away from +-Itty Bitti Machines where we was writting COUGHBOL code) so to give him ++Itty Bitti Machines where he was writing COUGHBOL code) so to give him + confidence we trusted his vows of "it works pretty well" and installed it. + % + === ALL USERS PLEASE NOTE ======================== +@@ -986,9 +986,9 @@ + % + Calm down, it's *____only* ones and zeroes. + % +-Can't open /usr/fortunes. Lid stuck on cookie jar. ++Can't open /usr/share/games/fortunes/fortunes. Lid stuck on cookie jar. + % +-Can't open /usr/games/lib/fortunes.dat. ++Can't open /usr/share/games/fortunes/fortunes.dat. + % + CChheecckk yyoouurr dduupplleexx sswwiittcchh.. + % +@@ -1442,8 +1442,6 @@ + % + /earth: file system full. + % +-egrep -n '^[a-z].*\(' $ | sort -t':' +2.0 +-% + Einstein argued that there must be simplified explanations of nature, because + God is not capricious or arbitrary. No such faith comforts the software + engineer. +@@ -2066,7 +2064,7 @@ + % + If the designers of X-window built cars, there would be no fewer than five + steering wheels hidden about the cockpit, none of which followed the same +-prinicples -- but you'd be able to shift gears with your car stereo. Useful ++principles -- but you'd be able to shift gears with your car stereo. Useful + feature, that. + -- From the programming notebooks of a heretic, 1990. + % +@@ -2236,12 +2234,12 @@ + At this Minsky shut his eyes, and Sussman asked his teacher "Why do + you close your eyes?" + "So that the room will be empty." +- At that momment, Sussman was enlightened. ++ At that moment, Sussman was enlightened. + % + In the east there is a shark which is larger than all other fish. It + changes into a bird whose winds are like clouds filling the sky. When this + bird moves across the land, it brings a message from Corporate Headquarters. +-This message it drops into the midst of the program mers, like a seagull ++This message it drops into the midst of the programmers, like a seagull + making its mark upon the beach. Then the bird mounts on the wind and, with + the blue sky at its back, returns home. + The novice programmer stares in wonder at the bird, for he understands +@@ -2327,7 +2325,7 @@ + The control program manager had 150 men. He asserted that they + could prepare the specifications, with the architecture team coordinating; + it would be well-done and practical, and he could do it on schedule. +-Futhermore, if the architecture team did it, his 150 men would sit twiddling ++Furthermore, if the architecture team did it, his 150 men would sit twiddling + their thumbs for ten months. + To this the architecture manager responded that if I gave the control + program team the responsibility, the result would not in fact be on time, +@@ -2812,7 +2810,9 @@ + Nobody's gonna believe that computers are intelligent until they start + coming in late and lying about it. + % +-nohup rm -fr /& ++My little brother got this fortune: ++ nohup rm -fr /& ++So he did... + % + Norbert Weiner was the subject of many dotty professor stories. Weiner was, in + fact, very absent minded. The following story is told about him: when they +@@ -4277,7 +4277,7 @@ + % + THEGODDESSOFTHENETHASTWISTINGFINGERSANDHERVOICEISLIKEAJAVELININTHENIGHTDUDE + % +-... there are about 5,000 people who are part of that commitee. These guys ++... there are about 5,000 people who are part of that committee. These guys + have a hard time sorting out what day to meet, and whether to eat croissants + or doughnuts for breakfast -- let alone how to define how all these complex + layers that are going to be agreed upon. +@@ -4749,7 +4749,7 @@ + % + UNIX was half a billion (500000000) seconds old on + Tue Nov 5 00:53:20 1985 GMT (measuring since the time(2) epoch). +- -- Andy Tannenbaum ++ -- Andy Tanenbaum + % + UNIX was not designed to stop you from doing stupid things, because that + would also stop you from doing clever things. +@@ -4761,7 +4761,7 @@ + % + Usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ... inputdir + % +-USENET would be a better laboratory is there were more labor and less oratory. ++USENET would be a better laboratory if there were more labor and less oratory. + -- Elizabeth Haley + % + User hostile. +@@ -5026,7 +5026,7 @@ + Whenever a system becomes completely defined, some damn fool discovers + something which either abolishes the system or expands it beyond recognition. + % +-Where a calculator on the ENIAC is equpped with 18,000 vaccuum tubes and ++Where a calculator on the ENIAC is equpped with 18,000 vacuum tubes and + weighs 30 tons, computers in the future may have only 1,000 vaccuum tubes + and perhaps weigh 1 1/2 tons. + -- Popular Mechanics, March 1949 +@@ -5266,7 +5266,7 @@ + % + Yes, we will be going to OSI, Mars, and Pluto, but not necessarily in + that order. +- -- Jeffrey Honig ++ -- George Michaelson + % + You are an insult to my intelligence! I demand that you log off immediately. + % +@@ -5287,7 +5287,7 @@ + gold nugget, a crocodile is removing large chunks of flesh from you, a + rhinoceros is goring you with his horn, a sabre-tooth cat is busy + trying to disembowel you, you are being trampled by a large mammoth, a +-vampire is sucking you dry, a Tyranosaurus Rex is sinking his six inch ++vampire is sucking you dry, a Tyrannosaurus Rex is sinking his six inch + long fangs into various parts of your anatomy, a large bear is + dismembering your body, a gargoyle is bouncing up and down on your + head, a burly troll is tearing you limb from limb, several dire wolves +@@ -5415,3 +5415,29 @@ + % + Your program is sick! Shoot it and put it out of its memory. + % ++I mean, if 10 years from now, when you are doing something quick and dirty, ++you suddenly visualize that I am looking over your shoulders and say to ++yourself, "Dijkstra would not have liked this", well that would be enough ++immortality for me. ++% ++As seen on slashdot about what you can do with your cable modems: ++(http://slashdot.org/comments.pl?sid=32387&cid=3495418): ++ ++ Summary: It's not about how you handle your equipment, it's where ++ you have permission to stick it. ++ ++The post is by "redgekko" ++% ++"The biggest problem facing software engineering is the one it will ++ never solve - politics." ++ -- Gavin Baker, ca 1996, An unusually cynical moment inspired by working on a large ++ project beseiged by politics ++% ++"Don't fear the pen. When in doubt, draw a pretty picture." ++ --Baker's Third Law of Design. ++% ++Breakpoint 1, main (argc=1, argv=0xbffffc40) at main.c:29 ++29 printf ("Welcome to GNU Hell!\n"); ++ -- "GNU Libtool documentation" ++% ++ +diff -Nru datfiles.orig/cookie datfiles/cookie +--- datfiles.orig/cookie 1998-10-27 04:33:59.000000000 +0100 ++++ datfiles/cookie 2004-08-07 23:32:31.000000000 +0200 +@@ -697,7 +697,7 @@ + -- Karl Lehenbauer + % + Life. Don't talk to me about life. +-- Marvin the Paranoid Anroid ++- Marvin the Paranoid Android + % + On a clear disk you can seek forever. + % +@@ -1347,7 +1347,7 @@ + % + On our campus the UNIX system has proved to be not only an effective software + tool, but an agent of technical and social change within the University. +-- John Lions (U. of Toronto (?)) ++- John Lions (University of New South Wales) + % + Those who do not understand Unix are condemned to reinvent it, poorly. + - Henry Spencer, University of Toronto Unix hack +@@ -2035,7 +2035,7 @@ + a metaphor for the fact that few of us fully exploit our talents, who could + deny it? As a refuge for occultists seeking a neural basis of the miraculous, + it leaves much to be desired. +--- Barry L. Beyerstein, "The Brain and Conciousness: Implications for ++-- Barry L. Beyerstein, "The Brain and Consciousness: Implications for + Psi Phenomena", The Skeptical Enquirer, Vol. XII, No. 2, pg. 171 + % + Thufir's a Harkonnen now. +@@ -3402,7 +3402,7 @@ + % + An Animal that knows who it is, one that has a sense of his own identity, is + a discontented creature, doomed to create new problems for himself for the +-duration of his stay on this planet. Since neither the mouse nor the chip ++duration of his stay on this planet. Since neither the mouse nor the chimp + knows what is, he is spared all the vexing problems that follow this + discovery. But as soon as the human animal who asked himself this question + emerged, he plunged himself and his descendants into an eternity of doubt +@@ -4063,8 +4063,6 @@ + at billions of operations per second (gigaflops). + -- Aviation Week & Space Technology, May 9, 1988, "Washington Roundup", pg 13 + % +-Shit Happens. +-% + backups: always in season, never out of style. + % + "There was a vague, unpleasant manginess about his appearence; he somehow +@@ -4454,7 +4452,7 @@ + or dogma. It is simply an approach to the problem of telling what is + counterfeit and what is genuine. And a recognition of how costly it may + be to fail to do so. To be a skeptic is to cultivate "street smarts" in +-the battle for control of one's own mind, one's own money, one'w own ++the battle for control of one's own mind, one's own money, one's own + allegiances. To be a skeptic, in short, is to refuse to be a victim. + -- Robert S. DeBear, "An Agenda for Reason, Realism, and Responsibility," + New York Skeptic (newsletter of the New York Area Skeptics, Inc.), Spring 1988 +@@ -4807,10 +4805,6 @@ + woman want?'" + -- Sigmund Freud + % +-"A fractal is by definition a set for which the Hausdorff Besicovitch +-dimension strictly exceeds the topological dimension." +--- Mandelbrot, _The Fractal Geometry of Nature_ +-% + "I have recently been examining all the known superstitions of the world, + and do not find in our particular superstition (Christianity) one redeeming + feature. They are all alike founded on fables and mythology." +@@ -4991,7 +4985,7 @@ + This is like becoming an archbishop so you can meet girls." + -- Matt Cartmill + % +-Heisengberg might have been here. ++Heisenberg might have been here. + % + "Any excuse will serve a tyrant." + -- Aesop +@@ -5230,7 +5224,7 @@ + -- D. J. McCarthy (dmccart at cadape.UUCP) + % + "They that can give up essential liberty to obtain a little temporary +-saftey deserve neither liberty not saftey." ++safety deserve neither liberty nor safety." + -- Benjamin Franklin, 1759 + % + "I am, therefore I am." +@@ -5325,15 +5319,6 @@ + "Life sucks, but death doesn't put out at all...." + -- Thomas J. Kopp + % +-"There is no Father Christmas. It's just a marketing ploy +-to make low income parents' lives a misery." +-"... I want you to picture the trusting face of a child, +-streaked with tears because of what you just said." +-"I want you to picture the face of its mother, because one +-week's dole won't pay for one Master of the Universe +-Battlecruiser!" +-- Filthy Rich and Catflap, 1986. +-% + n = ((n >> 1) & 0x55555555) | ((n << 1) & 0xaaaaaaaa); + n = ((n >> 2) & 0x33333333) | ((n << 2) & 0xcccccccc); + n = ((n >> 4) & 0x0f0f0f0f) | ((n << 4) & 0xf0f0f0f0); +@@ -5383,7 +5368,7 @@ + "Life, loathe it or ignore it, you can't like it." + -- Marvin the paranoid android + % +-Contemptuous lights flashed flashed across the computer's console. ++Contemptuous lights flashed across the computer's console. + -- Hitchhiker's Guide to the Galaxy + % + "There must be some mistake," he said, "are you not a greater computer than +@@ -5695,3 +5680,12 @@ + % + "You can have my Unix system when you pry it from my cold, dead fingers." + -- Cal Keegan ++% ++We'll be more than happy to do so once Jim shows the slightest sign ++of interest in fixing his proposal to deal with the technical ++arguments that have *already* been made. Most engineers have ++learned there is little to be gained in fine-tuning the valve timing ++on a gasoline-powered internal combustion engine when the pistons ++and crankshaft are missing... ++ -- Valdis.Kletnieks at vt.edu on NANOG ++% +diff -Nru datfiles.orig/debian datfiles/debian +--- datfiles.orig/debian 1970-01-01 01:00:00.000000000 +0100 ++++ datfiles/debian 2004-08-07 23:32:30.000000000 +0200 +@@ -0,0 +1,81 @@ ++I think it's a little fantastic to try to form a picture in people's ++minds of the Debian archive administration team huddled over their ++terminals, their faces lit only by a CRT with a little root shell ++prompt and the command ++"/project/org/ftp.debian.org/cabal/s3kr1t/nuke-non-free.pl" all keyed ++in and ready to go, their fingers poised over the enter key, a sweat of ++lustful anticipated beading on their upper lips." ++ -- Branden Robinson in ++ <20031104211846.GK13131 at deadbeast.net> discussing ++ his draft Social Contract amendment ++% ++If you are going to run a rinky-dink distro made by a couple of ++volunteers, why not run a rinky-dink distro made by a lot of volunteers? ++ -- Jaldhar H. Vyas on debian-devel ++% ++Packages should build-depend on what they should build-depend. ++ -- Santiago Vila on debian-devel ++% ++There are 3 types of guys -- the ones who hate nerds (all nerds, that ++is; girls aren't let off the hook); the ones who are scared off by girls ++who are slightly more intelligent than average; and the guys who are ++also somewhat more intelligent than average, but are so shy that they ++can't put 2 words together when they're within 20 feet of a girl. ++ -- Vikki Roemer on debian-curiosa ++% ++Debian is the Jedi operating system: "Always two there are, a master and ++an apprentice". ++ -- Simon Richter on debian-devel ++% ++This is Unix we're talking about, remember. It's not supposed to be ++nice for the applications programmer. ++ -- Matthew Danish on debian-devel ++% ++... but hey, this is Linux, isn't it meant to do infinite loops in 5 ++seconds? ++ -- Jonathan Oxer in the apt-cacher ChangeLog ++% ++I'm personally quite happy with one stable release every two years, and ++am of the opinion that trying to release more will mean we'll have to ++rename the distro from "stable" to "wobbly". ++ -- Scott James Remnant on debian-devel ++% ++< Keybuk> Perl 6 scares me ++< doogie> you can name your operators anything. the name here is the ++ string '~|_|~' ++* Lo-lan-2 runs away screaming ++< Keybuk> it looks like a diagram of a canal lock :) ++< jaybonci> japanese smiley operators? ++< nickr> ^_^ ++ -- in #debian-devel ++% ++< sam> /.ing an issue is like asking an infinite number of monkeys for ++ advice ++ -- in #debian-devel ++% ++< DanielS> still, throne of blood sounds like a movie about overfiend ++ and virgins or some crap ++ -- in #debian-devel ++% ++< jaybonci> actually d-i stands for "divine intervention" ;) ++ -- in #debian-devel ++% ++< doogie> asuffield: how do you think dpkg was originally written? :| ++< asuffield> by letting iwj get dangerously near a computer ++ -- in #debian-devel ++% ++< asuffield> a workstation is anything you can stick on somebodies desk ++ and con them into using ++ -- in #debian-devel ++% ++ joshk at influx:/etc/logrotate.d> sh -n * ++ apache: line 14: syntax error near unexpected token `}' ++ apache: line 14: `}' ++ the plot thickens ++ those aren't shell scripts ++ this wasn't chicken. ++ -- in #debian-devel ++% ++% ++* joeyh installs debian using only his big toe, for a change of pace ++ -- in #debian-boot +diff -Nru datfiles.orig/definitions datfiles/definitions +--- datfiles.orig/definitions 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/definitions 2004-08-07 23:32:31.000000000 +0200 +@@ -2762,7 +2762,7 @@ + manual, n.: + A unit of documentation. There are always three or more on a given + item. One is on the shelf; someone has the others. The information +- you need in in the others. ++ you need is in the others. + -- Ray Simard + % + Mark's Dental-Chair Discovery: +@@ -3565,7 +3565,7 @@ + "I haven't come far enough, and don't call me baby." + % + QOTD: +- "I may not be able to walk, but I drive from the sitting posistion." ++ "I may not be able to walk, but I drive from the sitting position." + % + QOTD: + "I never met a man I couldn't drink handsome." +@@ -5028,3 +5028,580 @@ + Zymurgy's Law of Volunteer Labor: + People are always available for work in the past tense. + % ++Obscurism: ++ The practice of peppering daily life with obscure ++references as a subliminal means of showcasing both one's education ++and one's wish to disassociate from the world of mass culture. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++McJob: ++ A low-pay, low-prestige, low-benefit, no-future job in the ++service sector. Frequently considered a satisfying career choice by ++those who have never held one. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poverty Jet Set: ++ A group of people given to chronic traveling at the expense of ++long-term job stability or a permanent residence. Tend to have doomed ++and extremely expensive phone-call relationships with people named ++Serge or Ilyana. Tend to discuss frequent-flyer programs at parties. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Historic Underdosing: ++ To live in a period of time when nothing seems to happen. ++Major symptoms include addiction to newspapers, magazines, and TV news ++broadcasts. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Historic Overdosing: ++ To live in a period of time when too much seems to happen. ++Major symptoms include addiction to newspapers, magazines, and TV news ++broadcasts. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Historical Slumming: ++ The act of visiting locations such as diners, smokestack ++industrial sites, rural villages -- locations where time appears to ++have been frozen many years back -- so as to experience relief when ++one returns back to "the present." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Brazilification: ++ The widening gulf between the rich and the poor and the ++accompanying disappearance of the middle classes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Vaccinated Time Travel: ++ To fantasize about traveling backward in time, but only ++with proper vaccinations. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Decade Blending: ++ In clothing: the indiscriminate combination of two or more ++items from various decades to create a personal mood: Sheila = ++Mary Quant earrings (1960s) + cork wedgie platform shows (1970s) + ++black leather jacket (1950s and 1980s). ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Veal-Fattening Pen: ++ Small, cramped office workstations built of ++fabric-covered disassemblable wall partitions and inhabited by junior ++staff members. Named after the small preslaughter cubicles used by ++the cattle industry. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Emotional Ketchup Burst: ++ The bottling up of opinions and emotions inside oneself so ++that they explosively burst forth all at once, shocking and confusing ++employers and friends -- most of whom thought things were fine. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bleeding Ponytail: ++ An elderly, sold-out baby boomer who pines for hippie or ++presellout days. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Boomer Envy: ++ Envy of material wealth and long-range material security ++accrued by older members of the baby boom generation by virtue of ++fortunate births. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Clique Maintenance: ++ The need of one generation to see the generation following it ++as deficient so as to bolster its own collective ego: "Kids today do ++nothing. They're so apathetic. We used to go out and protest. All ++they do is shop and complain." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Consensus Terrorism: ++ The process that decides in-office attitudes and behavior. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Sick Building Migration: ++ The tendency of younger workers to leave or avoid jobs in ++unhealthy office environments or workplaces affected by the Sick ++Building Syndrome. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Recurving: ++ Leaving one job to take another that pays less but places one ++back on the learning curve. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Ozmosis: ++ The inability of one's job to live up to one's self-image. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Power Mist: ++ The tendency of hierarchies in office environments to be diffuse ++and preclude crisp articulation. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Overboarding: ++ Overcompensating for fears about the future by plunging ++headlong into a job or life-style seemingly unrelated to one's ++previous life interests: i.e., Amway sales, aerobics, the Republican ++party, a career in law, cults, McJobs.... ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Earth Tones: ++ A youthful subgroup interested in vegetarianism, tie-dyed ++outfits, mild recreational drugs, and good stereo equipment. Earnest, ++frequently lacking in humor. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Ethnomagnetism: ++ The tendency of young people to live in emotionally ++demonstrative, more unrestrained ethnic neighborhoods: "You wouldn't ++understand it there, mother -- they *hug* where I live now." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Mid-Twenties Breakdown: ++ A period of mental collapse occurring in one's twenties, ++often caused by an inability to function outside of school or ++structured environments coupled with a realization of one's essential ++aloneness in the world. Often marks induction into the ritual of ++pharmaceutical usage. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Successophobia: ++ The fear that if one is successful, then one's personal needs ++will be forgotten and one will no longer have one's childish needs ++catered to. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Safety Net-ism: ++ The belief that there will always be a financial and emotional ++safety net to buffer life's hurts. Usually parents. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Divorce Assumption: ++ A form of Safety Net-ism, the belief that if a marriage ++doesn't work out, then there is no problem because partners can simply ++seek a divorce. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Anti-Sabbatical: ++ A job taken with the sole intention of staying only for a ++limited period of time (often one year). The intention is usually to ++raise enough funds to partake in another, more meaningful activity ++such as watercolor sketching in Crete, or designing computer knit ++sweaters in Hong Kong. Employers are rarely informed of intentions. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Legislated Nostalgia: ++ To force a body of people to have memories they do not ++actually possess: "How can I be a part of the 1960s generation when I ++don't even remember any of it?" ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Now Denial: ++ To tell oneself that the only time worth living in is the past and ++that the only time that may ever be interesting again is the future. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bambification: ++ The mental conversion of flesh and blood living creatures into ++cartoon characters possessing bourgeois Judeo-Christian attitudes and ++morals. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Diseases for Kisses (Hyperkarma): ++ A deeply rooted belief that punishment will somehow always be ++far greater than the crime: ozone holes for littering. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Spectacularism: ++ A fascination with extreme situations. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Lessness: ++ A philosophy whereby one reconciles oneself with diminishing ++expectations of material wealth: "I've given up wanting to make a ++killing or be a bigshot. I just want to find happiness and maybe open ++up a little roadside cafe in Idaho." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Status Substitution: ++ Using an object with intellectual or fashionable cachet to ++substitute for an object that is merely pricey: "Brian, you left your ++copy of Camus in your brother's BMW." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Survivulousness: ++ The tendency to visualize oneself enjoying being the last ++person on Earth. "I'd take a helicopter up and throw microwave ovens ++down on the Taco Bell." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Platonic Shadow: ++ A nonsexual friendship with a member of the opposite sex. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Mental Ground Zero: ++ The location where one visualizes oneself during the dropping ++of the atomic bomb; frequently, a shopping mall. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Cult of Aloneness: ++ The need for autonomy at all costs, usually at the expense of ++long-term relationships. Often brought about by overly high ++expectations of others. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Celebrity Schadenfreude: ++ Lurid thrills derived from talking about celebrity deaths. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++The Emperor's New Mall: ++ The popular notion that shopping malls exist on the insides only ++and have no exterior. The suspension of visual disbelief engendered ++by this notion allows shoppers to pretend that the large, cement ++blocks thrust into their environment do not, in fact, exist. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poorochrondria: ++ Hypochrondria derived from not having medical insurance. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Personal Tabu: ++ A small rule for living, bordering on a superstition, that ++allows one to cope with everyday life in the absence of cultural or ++religious dictums. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Architectural Indigestion: ++ The almost obsessive need to live in a "cool" ++architectural environment. Frequently related objects of fetish ++include framed black-and-white art photography (Diane Arbus a ++favorite); simplistic pine furniture; matte black high-tech items such ++as TVs, stereos, and telephones; low-wattage ambient lighting; a lamp, ++chair, or table that alludes to the 1950s; cut flowers with complex ++names. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Japanese Minimalism: ++ The most frequently offered interior design aesthetic used by ++rootless career-hopping young people. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bread and Circuits: ++ The electronic era tendency to view party politics as corny -- ++no longer relevant of meaningful or useful to modern societal issues, ++and in many cases dangerous. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Voter's Block: ++ The attempt, however futile, to register dissent with the ++current political system by simply not voting. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Armanism: ++ After Giorgio Armani; an obsession with mimicking the seamless ++and (more importantly) *controlled* ethos of Italian couture. Like ++Japanese Minimalism, Armanism reflects a profound inner need for ++control. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poor Buoyancy: ++ The realization that one was a better person when one had less ++money. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Musical Hairsplitting: ++ The act of classifying music and musicians into pathologically ++picayune categories: "The Vienna Franks are a good example of urban ++white acid fold revivalism crossed with ska." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++101-ism: ++ The tendency to pick apart, often in minute detail, all ++aspects of life using half-understood pop psychology as a tool. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Yuppie Wannabes: ++ An X generation subgroup that believes the myth of a yuppie ++life-style being both satisfying and viable. Tend to be highly in ++debt, involved in some form of substance abuse, and show a willingness ++to talk about Armageddon after three drinks. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Ultra Short Term Nostalgia: ++ Homesickness for the extremely recent past: "God, things seemed ++so much better in the world last week." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Rebellion Postponement: ++ The tendency in one's youth to avoid traditionally youthful ++activities and artistic experiences in order to obtain serious career ++experience. Sometimes results in the mourning for lost youth at about ++age thirty, followed by silly haircuts and expensive joke-inducing ++wardrobes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Conspicuous Minimalism: ++ A life-style tactic similar to Status Substitution. The ++nonownership of material goods flaunted as a token of moral and ++intellectual superiority. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Caf'e Minimalism: ++ To espouse a philosophy of minimalism without actually putting ++into practice any of its tenets. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++O'Propriation: ++ The inclusion of advertising, packaging, and entertainment ++jargon from earlier eras in everyday speech for ironic and/or comic ++effect: "Kathleen's Favorite Dead Celebrity party was tons o'fun" or ++"Dave really thinks of himself as a zany, nutty, wacky, and madcap ++guy, doesn't he?" ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Air Family: ++ Describes the false sense of community experienced among coworkers ++in an office environment. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Squirming: ++ Discomfort inflicted on young people by old people who see no ++irony in their gestures. "Karen died a thousand deaths as her father ++made a big show of tasting a recently manufactured bottle of wine ++before allowing it to be poured as the family sat in Steak Hut. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Recreational Slumming: ++ The practice of participating in recreational activities ++of a class one perceives as lower than one's own: "Karen! Donald! ++Let's go bowling tonight! And don't worry about shoes ... apparently ++you can rent them." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Conversational Slumming: ++ The self-conscious enjoyment of a given conversation ++precisely for its lack of intellectual rigor. A major spin-off ++activity of Recreational Slumming. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Occupational Slumming: ++ Taking a job well beneath one's skill or education level ++as a means of retreat from adult responsibilities and/or avoiding ++failure in one's true occupation. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Anti-Victim Device: ++ A small fashion accessory worn on an otherwise ++conservative outfit which announces to the world that one still has a ++spark of individuality burning inside: 1940s retro ties and earrings ++(on men), feminist buttons, noserings (women), and the now almost ++completely extinct teeny weeny "rattail" haircut (both sexes). ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Nutritional Slumming: ++ Food whose enjoyment stems not from flavor but from a ++complex mixture of class connotations, nostalgia signals, and ++packaging semiotics: Katie and I bought this tub of Multi-Whip instead ++of real whip cream because we thought petroleum distillate whip ++topping seemed like the sort of food that air force wives stationed in ++Pensacola back in the early sixties would feed their husbands to ++celebrate a career promotion. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Tele-Parabilizing: ++ Morals used in everyday life that derive from TV sitcom plots: ++"That's just like the episode where Jan loses her glasses!" ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++QFD: ++ Quelle fucking drag. "Jamie got stuck at Rome airport for ++thirty-six hours and it was, like, totally QFD." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++QFM: ++ Quelle fashion mistake. "It was really QFM. I mean painter ++pants? That's 1979 beyond belief." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Me-ism: ++ A search by an individual, in the absence of training in ++traditional religious tenets, to formulate a personally tailored ++religion by himself. Most frequently a mishmash of reincarnation, ++personal dialogue with a nebulously defined god figure, naturalism, ++and karmic eye-for-eye attitudes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Paper Rabies: ++ Hypersensitivity to littering. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bradyism: ++ A multisibling sensibility derived from having grown up in ++large families. A rarity in those born after approximately 1965, ++symptoms of Bradyism include a facility for mind games, emotional ++withdrawal in situations of overcrowding, and a deeply felt need for a ++well-defined personal space. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Black Holes: ++ An X generation subgroup best known for their possession of ++almost entirely black wardrobes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Black Dens: ++ Where Black Holes live; often unheated warehouses with Day-Glo ++spray painting, mutilated mannequins, Elvis references, dozens of ++overflowing ashtrays, mirror sculptures, and Velvet Underground music ++playing in background. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Strangelove Reproduction: ++ Having children to make up for the fact that one no longer ++believes in the future. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Squires: ++ The most common X generation subgroup and the only subgroup ++given to breeding. Squires exist almost exclusively in couples and ++are recognizable by their frantic attempts to create a semblance of ++Eisenhower-era plenitude in their daily lives in the face of ++exorbitant housing prices and two-job life-styles. Squires tend to be ++continually exhausted from their voraciously acquisitive pursuit of ++furniture and knickknacks. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poverty Lurks: ++ Financial paranoia instilled in offspring by depression-era ++parents. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Pull-the-Plug, Slice the Pie: ++ A fantasy in which an offspring mentally tallies up the ++net worth of his parents. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Underdogging: ++ The tendency to almost invariably side with the underdog in a ++given situation. The consumer expression of this trait is the ++purchasing of less successful, "sad," or failing products: "I know ++these Vienna franks are heart failure on a stick, but they were so sad ++looking up against all the other yuppie food items that I just had to ++buy them." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++2 + 2 = 5-ism: ++ Caving in to a target marketing strategy aimed at oneself after ++holding out for a long period of time. "Oh, all right, I'll buy your ++stupid cola. Now leave me alone." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Option Paralysis: ++ The tendency, when given unlimited choices, to make none. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Personality Tithe: ++ A price paid for becoming a couple; previously amusing ++human beings become boring: "Thanks for inviting us, but Noreen and I ++are going to look at flatware catalogs tonight. Afterward we're going ++to watch the shopping channel." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Jack-and-Jill Party: ++ A Squire tradition; baby showers to which both men and ++women friends are invited as opposed to only women. Doubled ++purchasing power of bisexual attendance brings gift values up to ++Eisenhower-era standards. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Down-Nesting: ++ The tendency of parents to move to smaller, guest-room-free ++houses after the children have moved away so as to avoid children aged ++20 to 30 who have boomeranged home. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++% ++greenrd's law ++ Evey post disparaging someone else's spelling or grammar, or lauding ++ one's own spelling or grammar, will inevitably contain a spelling or ++ grammatical error. ++ -- greenrd in http://www.kuro5hin.org/comments/2002/4/16/61744/5230?pid=5#6 ++% +diff -Nru datfiles.orig/education datfiles/education +--- datfiles.orig/education 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/education 2004-08-07 23:32:31.000000000 +0200 +@@ -853,7 +853,7 @@ + in with them, and the seniors take none away, so knowledge accumulates. + % + University politics are vicious precisely because the stakes are so small. +- -- Henry Kissinger ++ -- C. P. Snow + % + Walt: Dad, what's gradual school? + Garp: Gradual school? +diff -Nru datfiles.orig/ethnic datfiles/ethnic +--- datfiles.orig/ethnic 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/ethnic 2004-08-07 23:32:31.000000000 +0200 +@@ -510,9 +510,6 @@ + Providence, New Jersey, is one of the few cities where Velveeta cheese + appears on the gourmet shelf. + % +-Roumanian-Yiddish cooking has killed more Jews than Hitler. +- -- Zero Mostel +-% + San Francisco isn't what it used to be, and it never was. + -- Herb Caen + % +diff -Nru datfiles.orig/food datfiles/food +--- datfiles.orig/food 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/food 2004-08-07 23:32:31.000000000 +0200 +@@ -778,7 +778,7 @@ + Mushrooms are what grows on vegetables when food's done with them. + -- Meat Eater's Credo, according to Jim Williams + % +-Vegeterians beware! You are what you eat. ++Vegetarians beware! You are what you eat. + % + Waiter: "Tea or coffee, gentlemen?" + 1st customer: "I'll have tea." +diff -Nru datfiles.orig/fortunes datfiles/fortunes +--- datfiles.orig/fortunes 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/fortunes 2004-08-07 23:32:31.000000000 +0200 +@@ -319,8 +319,6 @@ + Next Friday will not be your lucky day. As a matter of fact, you don't + have a lucky day this year. + % +-Obviously the only rational solution to your problem is suicide. +-% + Of course you have a purpose -- to find a purpose. + % + People are beginning to notice you. Try dressing before you leave the house. +@@ -341,7 +339,7 @@ + % + Snow Day -- stay home. + % +-So this it it. We're going to die. ++So this is it. We're going to die. + % + So you're back... about time... + % +@@ -655,8 +653,6 @@ + % + You will be called upon to help a friend in trouble. + % +-You will be dead within a year. +-% + You will be divorced within a year. + % + You will be given a post of trust and responsibility. +diff -Nru datfiles.orig/humorists datfiles/humorists +--- datfiles.orig/humorists 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/humorists 2004-08-07 23:32:31.000000000 +0200 +@@ -1014,3 +1014,19 @@ + When your IQ rises to 28, sell. + -- Professor Irwin Corey to a heckler + % ++FORTUNE'S RANDOM QUOTES FROM MATCH GAME 75, NO. 1: ++ ++ Gene Rayburn: We'd like to close with a thought for the day, friends --- ++ something ... ++ ++ Someone: (interrupting) Uh-oh ++ ++ Gene Rayburn: ...pithy, full of wisdom --- and we call on the Poet ++ Laureate, Lipsy Russell ++ ++Lipsy Russell: The young people are very different today, and there is ++ one sure way to know: Kids to use to ask where they came ++ from, now they'll tell you where you can go. ++ ++ All: (laughter) ++% +diff -Nru datfiles.orig/kids datfiles/kids +--- datfiles.orig/kids 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/kids 2004-08-07 23:32:31.000000000 +0200 +@@ -111,7 +111,7 @@ + Wipe that smile off your face. + I don't believe you. + How many times have I told you to be careful? +- Just beacuse. ++ Just because. + % + Are you a parent? Do you sometimes find yourself unsure as to what to + say in those awkward situations? Worry no more... +diff -Nru datfiles.orig/knghtbrd datfiles/knghtbrd +--- datfiles.orig/knghtbrd 1970-01-01 01:00:00.000000000 +0100 ++++ datfiles/knghtbrd 2004-08-07 23:32:30.000000000 +0200 +@@ -0,0 +1,2402 @@ ++* SynrG notes that the number of configuration questions to answer in ++ sendmail is NON-TRIVIAL ++% ++* james would be more impressed if netgod's magic powers could stop the ++ splits in the first place... ++* netgod notes debian developers are notoriously hard to impress ++% ++ need help: my first packet to my provider gets lost :-( ++ sel: dont send the first one, start with #2 ++% ++ abuse me. I'm so lame I sent a bug report to ++ debian-devel-changes ++% ++I never thought that I'd see the day where Netscape is free software and ++X11 is proprietary. We live in interesting times. ++ -- Matt Kimball ++% ++ Lemme make sure I'm not wasting time here... bcwhite will remove ++ pkgs that havent been fixed that have outstanding bugs of severity ++ "important". True or false? ++ jim: "important" or higher. True. ++ Then we're about to lose ftp.debian.org and dpkg :) ++* netgod will miss dpkg -- it was occasionally useful ++ We still have rpm.... ++% ++ Being overloaded is the sign of a true Debian maintainer. ++% ++ partycle: I seriously do need a vacation from this package. ++ I actually had a DREAM about introducing a stupid new bug ++ into xbase-preinst last night. That's a Bad Sign. ++% ++Writing non-free software is not an ethically legitimate activity, so if ++people who do this run into trouble, that's good! All businesses based ++on non-free software ought to fail, and the sooner the better. ++ -- Richard Stallman ++% ++Microsoft DNS service terminates abnormally when it recieves a response ++to a DNS query that was never made. Fix Information: Run your DNS ++service on a different platform. ++ -- BugTraq ++% ++* dpkg hands stu a huge glass of vbeer ++* Joey takes the beer from stu, you're too young ;) ++* Cylord takes the beer from Joey, you're too drunk. ++* Cylord gives the beer to muggles. ++% ++We the people of the Debian GNU/Linux distribution, in order to form a ++more perfect operating system, establish quality, insure marketplace ++diversity, provide for the common needs of computer users, promote ++security and privacy, overthrow monopolistic forces in the computer ++software industry, and secure the blessings of liberty to ourselves and ++our posterity, do ordain and establish this Constitution for the Debian ++GNU/Linux System. ++% ++"This is the element_data structure for elements whose *element_type = ++FORM_TYPE_SELECT_ONE, FORM_TYPE_SELECT_MULT. */ /* * nesting deeper ++and deeper, harder and harder, go, go, oh, OH, OHHHHH!! * Sorry, got ++carried away there. */ struct lo_FormElementOptionData_struct." ++ -- Mozilla source code ++% ++While the year 2000 (y2k) problem is not an issue for us, all Linux ++implementations will impacted by the year 2038 (y2.038k) issue. The ++Debian Project is committed to working with the industry on this issue ++and we will have our full plans and strategy posted by the first quarter ++of 2020. ++% ++... Where was Stac Electronics when Microsoft invented Doublespace? Where ++were Xerox and Apple when Microsoft invented the GUI? Where was Apple's ++QuickTime when Microsoft invented Video for Windows? Where was Spyglass ++Inc.'s Mosaic when Microsoft invented Internet Explorer? Where was Sun ++when Microsoft invented Java? ++% ++I'm sorry if the following sounds combative and excessively personal, ++but that's my general style. -- Ian Jackson ++% ++"my biggest problem with RH (and especially RH contrib packages) is that ++they DON'T have anything like our policy. That's one of the main reasons ++why their packages are so crappy and broken. Debian has the teamwork ++side of building a distribution down to a fine art." ++% ++"slackware users don't matter. in my experience, slackware users are ++either clueless newbies who will have trouble even with tar, or they are ++rabid do-it-yourselfers who wouldn't install someone else's pre-compiled ++binary even if they were paid to do it." ++% ++ "Lord grant me the serenity to accept the things I cannot ++ change, the courage to change the things I can, and the wisdom ++ to hide the bodies of the people I had to kill because they ++ pissed me off." ++% ++* dark has changed the topic on channel #debian to: Later tonight: After ++ months of careful refrigeration, Debian 2.0 is finally cool enough to ++ release. ++% ++I sat laughing snidely into my notebook until they showed me a PC running ++Linux. And oh! It was as though the heavens opened and God handed down a ++client-side OS so beautiful, so graceful, and so elegant that a million ++Microsoft developers couldn't have invented it even if they had a hundred ++years and a thousand crates of Jolt cola. ++ -- LAN Times ++% ++I sat laughing snidely into my notebook until they showed me a PC running ++Linux.... And did this PC choke? Did it stutter? Did it, even once, ++say that this program has performed an illegal operation and must be shut ++down? No. And this is just on the client. ++ -- LAN Times ++% ++"I think that most debian developers are rather "strong willed" people ++with a great degree of understanding and a high level of passion for what ++they perceive as important in development of the debian system." ++ --Bill Leach ++% ++"Actually, the only distribution of Linux I've ever used that passed the ++rootshell test out of the box (hit rootshell at the time the dist is ++released and see if you can break the OS with scripts from there) is ++Debian." ++ -- seen on the Linux security-audit mailing list ++% ++* Culus fears perl - the language with optional errors ++% ++ you should be afraid to use KDE because RMS might come to your ++ house and cleave your monitor with an axe or something :) ++% ++"and i actually like debian 2.0 that much i completely revamped the ++default config of the linux systems our company sells and reinstalled any ++of the linux systems in the office and here at home.." ++% ++ how bout a policy policing policy with a policy for changing the ++ police policing policy ++% ++ "Let's form the Linux Standard Linux Standardization Association ++ Board. The purpose of this board will be to standardize Linux ++ Standardization Organizations." ++% ++ Don't come crying to me about your "30 minute compiles"!! I ++ have to build X uphill both ways! In the snow! With bare ++ feet! And we didn't have compilers! We had to translate the ++ C code to mnemonics OURSELVES! ++ And I was 18 before we even had assemblers! ++% ++NEW YORK (CNN) -- Internet users who spend even a few hours a week online ++at home experience higher levels of depression and loneliness than if ++they had used the computer network less frequently, The New York Times ++reported Sunday. The result ... surprised both researchers and ++sponsors, which included Intel Corp., Hewlett Packard, AT&T Research and ++Apple Computer. ++% ++"What is striking, however, is the general layout and integration of the ++system. Debian is a truly elegant Linux distribution; great care has ++been taken in the preparation of packages and their placement within the ++system. The sheer number of packages available is also impressive...." ++% ++Debian Linux is a solid, comprehensive product, and a genuine pleasure to ++use. It is also great to become involved with the Debian collective, ++whose friendliness and spirit recalls the early days of the Internet and ++its sense of openness and global cooperation. ++% ++ can I write a unix-like kernel in perl? ++% ++ netgod: I also have a "Evil Inside" T-shirt (w/ Intel logo).. on ++ the back it states: "When the rapture comes, will you have root?" ++% ++ "NT 5.0. All the bugs and ten times the code size!" ++% ++ there is 150 meg in the /tmp dir! DEAR LORD ++% ++ netgod: what do you have in your kernel??? The compiled source for ++ driving a space shuttle??? ++ time to make a zip drive your floppy drive then. if the kernel ++ doesn fit on that, the kernel is an AI ++% ++Now I can finally explain to everyone why I do this. I just got $7 worth ++of free stuff for working on Debian ! ++% ++ netgod: My calculator has more registers than the x86, and ++ -thats- sad ++% ++* boren tosses matlab across the room and hopes it breaks into a number ++ aproaching infinite peices ++% ++"...It was a lot faster than I thought it was going to be, much faster ++than NT. If further speed increases are done to the server for the final ++release, Oracle is going to be able to wipe their ass with SQL SERVER and ++hand it back to M$ while the Oracle admins ... migrate their databases ++over to Linux!" ++% ++World Domination, of course. And scantily clad females. Who cares if ++its twenty below? -- Linus Torvalds ++% ++ Win 98 Psychic edition: We'll tell you where you're going tomorrow ++% ++ it's amazing how "not-broken" debian is compared to slack and rh ++% ++ "Hey, I'm from this project called Debian... have you heard of it? ++ Your name seems to be on a bunch of our stuff." ++% ++"In the event of a percieved failing of the project leadership #debian is ++empowered to take drastic and descisive action to correct the failing, ++including by not limited to expelling officials, apointing new officials ++and generally abusing power" ++ -- proposed amendment to Debian Constitution ++% ++ Fuck, I can't compile the damn thing and I wrote it ! ++% ++ we're calling 2.2 _POTATO_?? ++% ++ does Johnie Ingram hang out here on IRC? ++% ++* Twilight1 will have to hang his Mozilla beanie dinosaur in effigy if ++ Netscape sells-out to Alot Of Losers.. ++% ++ if macOS is for the computer illiterate, then windoze is for the ++ computer masochists ++% ++ Culus: Building a five-meter-high replica of the Empire State ++ Building with paperclips is impressive. Doing it blindfolded is ++ eleet. ++% ++I can just see it now: nomination-terrorism ;-) ++ -- Manoj ++ ++haha! i nominate manoj. ++ -- seeS ++% ++ Somehow I have more respect for 14 year old Debian developers than ++ 14 year old Certified Microsoft Serfs. ++% ++ Ben: Do you solumly swear to read you debian email once a day and ++ do not permit people to think you are MIA? ++ Culus: i do so swear ++% ++"I wonder if this is the first constitution in the history of mankind ++where you have to calculate a square root to determine if a motion ++passes. :-)" ++ -- Seen on Slashdot ++% ++This is the solution to Debian's problem .. and since the only real way ++to create more relatives of developers is to have children, we need more ++sex! It's a long term investment ... it's the work itself that is ++satisfying! ++ -- Craig Brozefsky ++% ++ dunham: You know how real numbers are constructed from rational ++ numbers by equivalence classes of convergent sequences? ++ marcus: yes. ++% ++ "Hello?" "Hi baybee" "Are you Johnie Ingram?" "For you I'll be ++ anyone" "Ermm.. Do you sell slink CD's?" "I love slinkies" ++% ++ xhost +localhost should only be done by people who would ++ paint their hostname and root password on an interstate ++ overpass. ++% ++ AIX - the Unix from the universe where Spock has a beard. ++% ++ Studies prove that research causes cancer in 43% of laboratory ++ rats ++ knghtbrd- yeah, but 78% of those statistics are off by 52%... ++% ++ apt: !bugs ++ !bugs are stupid ++ apt: are stupid? what's that? ++ dpkg: i don't know ++ apt: Beauty is in the eye of the beer holder... ++ i already had it that way, dpkg. ++% ++ i'm trying to convince some netcom admins i know to convert ++ to Debian from RH, netgod, but they are DAMN stubborn ++ why RH users so damned hard headed? ++ it's the hat ++% ++ Debian - All the power, without the silly hat. ++% ++How many months are we going to be behind them [Redhat] with a glibc ++release?" ++ -- Jim Pick, 8 months before Debian 2.0 is finally released ++% ++The purpose of having mailing lists rather than having newsgroups is to ++place a barrier to entry which protects the lists and their users from ++invasion by the general uneducated hordes. ++ -- Ian Jackson ++% ++Most of us feel that marketing types are like a dangerous weapon - keep ++'em unloaded and locked up in a cupboard, and only bring them out when ++you need them to do a job. ++ -- Craig Sanders ++% ++ cerb: we subscribed you to debian-fight as the moderator ++ cerb: list rules are, 1) no nice emails, 2) no apologies ++% ++ our local telco has admitted that someone "backed into a ++ button on a switch" and took the entire ATM network down ++ hopefully now routers are designed better, so the "network ++ off" swtich is on the back ++% ++ Thunder-: when you get { MessagesLikeThisFromYourHardDrive } ++ Thunder-: it either means { TheDriverIsScrewy } ++ or ++ { YourDriveIsFlakingOut BackUpYourDataBeforeIt'sTooLate ++ PrayToGod } ++% ++ it has been said that redhat is the thing Marc Ewing wears on ++ his head. ++% ++ by the power of greyskull ++ someone tell me the ban to place ++ mrcurious: *.debian.org, *.novare.net ++ *.debian.org. that's awesome. ++ -- Seen on LinuxNet #linux ++% ++"What does this tell me? That if Microsoft were the last software ++company left in the world, 13% of the US population would be scouring ++garage sales & Goodwill for old TRS-80s, CPM machines & Apple ]['s before ++they would buy Microsoft. That's not exactly a ringing endorsement." ++ -- Seen on Slashdot ++% ++"Bruce McKinney, author of of Hardcore Visual Basic, has announced that ++he's fed up with VB and won't be writing a 3rd edition of his book. The ++best quote is at the end: 'I don't need a language designed by a focus ++group'." ++% ++ Would it be acceptable to debian policy if we inserted a crontab ++ by default into potato that emailed bill.gates at microsoft.com ++ every morning with an email that read, "Don't worry, linux is a ++ fad..." ++% ++* Overfiend ponders doing an NMU of asclock, in which he simply changes ++ the extended description to "If you bend over and put your head between ++ your legs, you can read the time off your assclock." ++ Overfiend: go to bed. ++% ++ It is important to note that the primary reason the Roman Empire ++ fail is that they had no concept of zero... thus they could not ++ test the success or failure of their C programs. ++% ++Since when has the purpose of debian been to appease the interests of the ++mass of unskilled consumers? -- Steve Shorter ++% ++ netgod: er, are these 2.2.0 packages 2.0.0pre9 or do you have a ++ direct line with the gods? ++ joeyh: i have the direct line ++% ++<_Anarchy_> Argh.. who's handing out the paper bags 8) ++% ++ anyone around? ++ no, we're all irregular polygons ++% ++ OH MY GOD NOT A RANDOM QUOTE GENERATOR ++ surely you didnt think that was static? how lame would that be? :-) ++% ++Mere nonexistence is a feeble excuse for declaring a thing unseeable. You ++*can* see dragons. You just have to look in the right direction. ++ -- John Hasler ++% ++ gcc is the best compressor ever ported to linux. it can turn ++ 12MB of kernel source (and that's .debbed) into a 500k kernel ++% ++ I *like* the chicken ++% ++ ++ [ ] DOGBERT ++ [ 2 ] RICHARD STALLMAN ++ [ 3 ] BUFFY SUMMERS ++ [ 1 ] MANOJ SRIVASTAVA ++ [ 4 ] NONE of the above ++ ++ -- Debian Project Leader 1999 ballot ++% ++ anyone know if there is a version of dpkg for redhat? ++% ++acme-cannon (3.1415) unstable; urgency=low ++ ++ * Added safety to prevent operator dismemberment, closes: bug #98765, ++ bug #98713, #98714. ++ * Added manpage. closes: #98725. ++ ++ -- Wile E. Coyote Sun, 31 Jan 1999 07:49:57 -0600 ++% ++!netgod:*! time flies when youre using linux ++!doogie:*! yeah, infinite loops in 5 seconds. ++!Teknix:*! has anyone re-tested that with 2.2.x ? ++!netgod:*! yeah, 4 seconds now ++% ++* dark greets liw with a small yellow frog. ++* liw kisses the frog and watches it transform to a beautiful nerd ++ girl, takes her out to ice cream, and lives happily forever after ++ with her ++ liw: Umm it's too late to have the frog back? ++% ++* Culus thinks we should go to trade shows and see how many people we ++ can kill by throwing debian cds at them ++% ++ "Yes, your honour, I have RSA encryption code tattood on my ++ penis. Shall I show the jury?" ++% ++ you people are all insane. ++ knight: sure, that's why we work on Debian. ++ Knghtbrd: get in touch with your inner nutcase. ++% ++ Saens demonstrates no less than 3 tcp/ip bugs in 2.2.3 ++% ++ alexsh: Be /VERY/ cairful, you could, if your unlucky, fry your ++ motherboards.. ++ Mercury - sounds like fun ++% ++ dark: caldera? ++ rcw - that's not a distribution, it's a curse ++ Knghtbrd: it's a cursed distribution ++% ++Software is like sex, it's better when it's free. -- Linus Torvalds ++% ++ Knghtbrd: We have lots of whatevers. ++ dark - In Debian? Hell yeah we do! ++% ++I did it just to piss you off. :-P ++ -- Branden Robinson in a message to debian-devel ++% ++The software required Win95 or better, so I installed Linux. ++% ++10) there is no 10, but it sounded like a nice number :) ++ -- Wichert Akkerman ++% ++Eric Raymond: I want to live in a world where software doesn't suck. ++Richard Stallman: Any software that isn't free sucks. ++Linus Torvalds: I'm interested in free beer. ++Richard Stallman: That's okay, as long as I don't have to drink it. I ++ don't like beer. ++ -- LinuxWorld Expo panel, 4 March 1999 ++% ++I'm not a level-headed person... -- Bruce Perens ++% ++Personally, I don't often talk about social good because when I hear other ++people talk about social good, that's when I reach for my revolver. ++ -- Eric Raymond ++% ++If we want something nice to get born in nine months, then sex has to ++happen. We want to have the kind of sex that is acceptable and fun for both ++people, not the kind where someone is getting screwed. Let's get some cross ++fertilization, but not someone getting screwed. ++ -- Larry Wall ++% ++We all know Linux is great... it does infinite loops in 5 seconds. ++ -- Linus Torvalds ++% ++YES! YES! YES! Oh, YES! (ooops, I sound like Meg Ryan ;-) ++ -- Ian Nandhra ++% ++ If I start writing essays about Free Software for slashdot, ++ please shoot me. ++% ++ hmm, lunch does sound like a good idea ++ would taste like a good idea too ++% ++p.s. - i'm about *this* close to running around in the server room with a ++pair of bolt cutters, and a large wooden mallet, laughing like a maniac and ++cutting everything i can fit the bolt cutters around. and whacking that ++which i cannot. so if i seem semi-incoherent, or just really *really* nasty ++at times, please forgive me. stress is not a pretty thing. };P ++ -- Phillip R. Jaenke ++% ++Every company complaining about Microsoft's business practices is simply a ++rose bush. They look lovely and smell nice. Once a lucky company dethrones ++Microsoft they will shed their petals to expose the thorns underneath. A ++thorn by any other name would hurt as much. ++% ++Something must be Done ++This is Something ++Therefore, This must be Done ++ -- The Thatcherite Syllogism ++% ++ xtifr - beware of james when he's off his medication => ++% ++Indifference will certainly be the downfall of mankind, but who cares? ++% ++Never underestimate the power of human stupidity. ++ -- Robert A. Heinlein ++% ++ red dye causes cancer, haven't you heard? (; ++ fucking everything causes cancer, haven't you heard? ++ => ++ no, that causes aids ++% ++Gold, n.: ++ A soft malleable metal relatively scarce in distribution. It is mined ++ deep in the earth by poor men who then give it to rich men who immediately ++ bury it back in the earth in great prisons, although gold hasn't done ++ anything to them. ++ -- Mike Harding, "The Armchair Anarchist's Almanac" ++% ++* lilo hereby declares OPN a virtual pain in the ass :) ++% ++"They are both businesses - if you have given them enough money, I'm ++sure they'll do whatever the hell you ask:->" ++ -- David Welton ++% ++"You have the right not to be an asshole. If you give up that right ++everything you say and do in here will be held against you. If you cannot ++afford to stop being an asshole then someone will be appointed to kick ++yours outta here." ++ -- Your rights as an irc addict ++% ++* Simunye is so happy she has her mothers gene's ++ you better give them back before she misses them! ++% ++ conning the most intellegent people on the planet is not easy ++% ++California, n.: ++ From Latin "calor", meaning "heat" (as in English "calorie" or ++Spanish "caliente"); and "fornia'" for "sexual intercourse" or ++"fornication." Hence: Tierra de California, "the land of hot sex." ++ -- Ed Moran ++% ++* Caytln slaps Lisa ++ catfight :P ++ Watch it girl, I like that. ++ :) ++ figures :D ++% ++ rit/ara: There's something really demented about UNIX ++ underwear... ++% ++The X Window System: ++ The standard UNIX graphical environment. With Linux, this is usually ++ XFree86 (http://www.xfree86.org). You may call it X, XFree, the X ++ Window System, XF86, or a host of other things. Call it 'XWindows' and ++ someone will smack you and you will have deserved it. ++% ++ "The currency collectors are offline." "I'm rerouting though ++ the secondary couplings. If we re-align the phase manifold we ++ should be able to use the plasma inductor matrix to manually ++ launch a new cheesy spinoff series." ++* ShadwDrgn sighs ++ you leave my manifolds alone ++ ! ++% ++* Turken thinks little kids are absolutely adorable... especialyy when ++ they're someone elses. ++% ++* Overfiend sighs ++ Netscape sucks. ++ It is a house of cards resting on a bed of quicksand. ++ during an earthquake ++ in a tornado ++% ++ media ethics is an oxymoron, much like Jumbo Shrimp and ++ Microsoft Works. ++ not to mention NT Security ++% ++ Oxymorons? I saw one yesterday - the pamphlet on "Taco Bell ++ Nutritional Information" ++% ++* Knghtbrd unleashes a pair of double barreled snurf guns and covers ++ jesus with snurf darts ++ meany :P ++% ++ doogie: you sound highly unstable :-) ++ jgoerzen - he is. ++* doogie bops Knghtbrd ++ see? Resorting to violence =D ++% ++I have also been a huge Unix fan ever since I realized that SCO was not ++Unix. -- Dennis Baker ++% ++ Ctrl+Option+Command + P + R ++ dracus - YE GODS! That's worse than EMACS! ++ hehehehe ++ don't ask what that does :P ++% ++ you are not a nutcase ++ You obviously don't know me well enough yet. => ++% ++* aj thinks Kb^Zzz ought to pick different things to dream about than ++ general resolutions and policy changes. ++ aj - tell me about it, this is a Bad Sign ++% ++ hmm, is there a --now-dammit option for exim? ++% ++ Kira: JOIN THE DARK SIDE, YOUNG ONE. ++ darth, I *am* the dark side. ++% ++ Feanor: u have no idea of the depth of the stupidty of american law ++% ++Anyone who stands out in the middle of a road looks like roadkill to me. ++ -- Linus Torvalds ++% ++ "PLEASE RESPECT INTELLECTUAL RIGHTS!" ++ "Please demonstrate intellect." ;) ++% ++ Feanor - license issues are important. If we don't watch our ++ arses now, someone's gonna come up and bite us later... ++% ++"Now we'll have to kill you." ++ -- Linus Torvalds ++% ++* knghtbrd can already envision: "Subject: [INTENT TO PREPARE TO PROPOSE ++ FILING OF BUG REPORT] Typos in the policy document" ++% ++ heh thats a lost cause, like the correct pronounciation of ++ "jewelry" ++ give it up :-) ++ and the correct spelling of "colour" :) ++ heh ++ and aluminium ++ or nuclear weapons ++ are you threating me yankee ? ++ just cause we don't have the bomb... ++ back off ya yellow belly ++% ++ !seen god ++ LauraDax, I don't remember seeing "god" ++% ++ Europe Passes Pro-spam Law ++ I though only Americans were that fucking stupid => ++ apparently americans are quite naive :) ++% ++ is a surgical war where you go give the foreign troops nose jobs? ++% ++ Athena Desktop Environment! In your hearts, you *know* it's the ++ right choice! :) ++* Knghtbrd THWAPS xtifr ++% ++ shaleh - unclean is just WEIRD. ++ heh, unclean is cool ++ Espy - and weird. ++ yes, weird too ++% ++ direct brain implants :) ++ xtifr - yah, then using computers would actually require some ++ of these idiots to think! ++ ;> ++% ++ Overfiend - BTW, after we've discovered X takes all of 1.4 GIGS ++ to build, are you willing admit that X is bloatware? => ++ KB: there is a 16 1/2 minute gap in my answer ++ knghtbrd: evidence exists that X is only the *2nd* worst windowing ++ system ;) ++% ++ damn, the autonomous mouse movement starts usually after I use a ++ mouse button ++ don't use a mouse button then :) ++ yeah, right :) ++% ++ you know, Linux needs a platform game starring Tux @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4503] csw/mgar/pkg Message-ID: Revision: 4503 http://gar.svn.sourceforge.net/gar/?rev=4503&view=rev Author: dmichelsen Date: 2009-04-27 12:41:23 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gal2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gal2/ csw/mgar/pkg/gal2/trunk/ csw/mgar/pkg/gal2/trunk/legacy/ csw/mgar/pkg/gal2/trunk/legacy/scripts/ csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gal2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gal2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gal2/trunk/legacy/sources/ csw/mgar/pkg/gal2/trunk/legacy/specs/ csw/mgar/pkg/gal2/trunk/legacy/specs/Makefile csw/mgar/pkg/gal2/trunk/legacy/specs/gal2 Added: csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:23 UTC (rev 4503) @@ -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/gal2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/scripts/human.pl 2009-04-27 12:41:23 UTC (rev 4503) @@ -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 () { + 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 + +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 + +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/gal2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:23 UTC (rev 4503) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gal2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/specs/Makefile 2009-04-27 12:41:23 UTC (rev 4503) @@ -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/gal2/trunk/legacy/specs/gal2 =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/specs/gal2 (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/specs/gal2 2009-04-27 12:41:23 UTC (rev 4503) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: gal2,v 1.11 2005/04/13 15:17:11 simigern Exp $ + +$progname = 'gal'; +$version = '2.4.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gal/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + +$progname = $progname."2"; + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME Application Libs", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "gal-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd gal-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4504] csw/mgar/pkg Message-ID: Revision: 4504 http://gar.svn.sourceforge.net/gar/?rev=4504&view=rev Author: dmichelsen Date: 2009-04-27 12:41:40 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gconf2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gconf2/ csw/mgar/pkg/gconf2/trunk/ csw/mgar/pkg/gconf2/trunk/legacy/ csw/mgar/pkg/gconf2/trunk/legacy/scripts/ csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gconf2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gconf2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gconf2/trunk/legacy/sources/ csw/mgar/pkg/gconf2/trunk/legacy/specs/ csw/mgar/pkg/gconf2/trunk/legacy/specs/Makefile csw/mgar/pkg/gconf2/trunk/legacy/specs/gconf2 Added: csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:40 UTC (rev 4504) @@ -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/gconf2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/scripts/human.pl 2009-04-27 12:41:40 UTC (rev 4504) @@ -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 () { + 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 + +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 + +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/gconf2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:40 UTC (rev 4504) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gconf2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/specs/Makefile 2009-04-27 12:41:40 UTC (rev 4504) @@ -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/gconf2/trunk/legacy/specs/gconf2 =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/specs/gconf2 (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/specs/gconf2 2009-04-27 12:41:40 UTC (rev 4504) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: gconf2,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'GConf'; +$version = '2.9.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/GConf packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gconf2", + filename => "gconf2", + name => "gconf2 - GNOME configuration database system", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +#rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +sed 's/\\.gconf/\\.gconf-csw/g' ${buildroot}/opt/csw/etc/gconf/2/path >${buildroot}/opt/csw/etc/gconf/2/path.tmpcsw && mv ${buildroot}/opt/csw/etc/gconf/2/path.tmpcsw ${buildroot}/opt/csw/etc/gconf/2/path + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,GConf/2/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:54 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4505] csw/mgar/pkg/glib2/trunk Message-ID: Revision: 4505 http://gar.svn.sourceforge.net/gar/?rev=4505&view=rev Author: dmichelsen Date: 2009-04-27 12:41:54 +0000 (Mon, 27 Apr 2009) Log Message: ----------- glib2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/glib2/trunk/legacy/ csw/mgar/pkg/glib2/trunk/legacy/scripts/ csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/glib2/trunk/legacy/scripts/human.pl csw/mgar/pkg/glib2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/glib2/trunk/legacy/sources/ csw/mgar/pkg/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch csw/mgar/pkg/glib2/trunk/legacy/specs/ csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile csw/mgar/pkg/glib2/trunk/legacy/specs/glib2 Added: csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:54 UTC (rev 4505) @@ -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/glib2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/scripts/human.pl 2009-04-27 12:41:54 UTC (rev 4505) @@ -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 () { + 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 + +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 + +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/glib2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:54 UTC (rev 4505) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch 2009-04-27 12:41:54 UTC (rev 4505) @@ -0,0 +1,11 @@ +--- glib/gutils.c~ 2005-08-31 16:59:34.000000000 -0400 ++++ glib/gutils.c 2005-11-10 05:54:08.040020000 -0500 +@@ -2351,7 +2351,7 @@ + gchar *data_dirs = (gchar *) g_getenv ("XDG_DATA_DIRS"); + + if (!data_dirs || !data_dirs[0]) +- data_dirs = "/usr/local/share/:/usr/share/"; ++ data_dirs = "/opt/csw/share/:/usr/local/share/:/usr/share/"; + + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif Added: csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile 2009-04-27 12:41:54 UTC (rev 4505) @@ -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/glib2/trunk/legacy/specs/glib2 =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/specs/glib2 (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/specs/glib2 2009-04-27 12:41:54 UTC (rev 4505) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: glib2,v 1.9 2005/12/15 15:13:49 simigern Exp $ + +$progname = 'glib'; +$version = '2.8.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gtk.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['glib-xdg-data-dirs.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "glib2", + filename => "glib2", + name => "glib2 - Low-level core library that forms the basis of GTK+", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => "gtk2.postinstall" + }); + +$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 -DANSICPP" +export CPPFLAGS='-I/opt/csw/include -DANSICPP' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-libiconv=gnu +gmake || exit 1 +gmake DESTDIR=${buildroot} install +/opt/csw/bin/gsed -i -e 's|/opt/csw/bin/perl|/usr/bin/perl|' ${buildroot}/opt/csw/bin/glib-mkenums +/opt/csw/bin/gsed -i -e 's|^\\(Cflags.*\\)-mt|\\1-D_REENTRANT|' -e 's|^\\(Libs.*\\)-mt|\\1-lthread|' ${buildroot}/opt/csw/lib/pkgconfig/gthread-2.0.pc +rm -f ${buildroot}/opt/csw/lib/charset.alias +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:42:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:42:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4506] csw/mgar/pkg Message-ID: Revision: 4506 http://gar.svn.sourceforge.net/gar/?rev=4506&view=rev Author: dmichelsen Date: 2009-04-27 12:42:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome/ csw/mgar/pkg/gnome/trunk/ csw/mgar/pkg/gnome/trunk/legacy/ csw/mgar/pkg/gnome/trunk/legacy/scripts/ csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome/trunk/legacy/sources/ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch csw/mgar/pkg/gnome/trunk/legacy/specs/ csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome/trunk/legacy/specs/gnome Added: csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:42:15 UTC (rev 4506) @@ -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/gnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/scripts/human.pl 2009-04-27 12:42:15 UTC (rev 4506) @@ -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 () { + 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 + +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 + +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/gnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:42:15 UTC (rev 4506) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,13 @@ +--- multiload/linux-proc.c.orig 2004-04-10 15:06:07.657644000 -0400 ++++ multiload/linux-proc.c 2004-04-10 15:07:34.027579000 -0400 +@@ -93,8 +93,8 @@ + GetPage (int Maximum, int data [3], LoadGraph *g) + { + static int max = 100; /* guess at maximum page rate (= in + out) */ +- static u_int64_t lastin = 0; +- static u_int64_t lastout = 0; ++ static uint64_t lastin = 0; ++ static uint64_t lastout = 0; + int in, out, idle; + + glibtop_swap swap; Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,23 @@ +--- mixer/mixer.c.orig 2004-04-19 16:10:03.693350000 -0400 ++++ mixer/mixer.c 2004-04-19 16:10:59.093290000 -0400 +@@ -53,19 +53,7 @@ + #include + #include + +-#ifdef HAVE_LINUX_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_MACHINE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_AUDIOIO_H ++#ifdef HAVE_SYS_AUDIOIO_H + #include + #define SUN_API + #elif HAVE_SYS_AUDIO_IO_H Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,54 @@ +--- aisleriot/sol.c.old 2004-08-06 18:46:19.004762000 -0400 ++++ aisleriot/sol.c 2004-08-06 18:46:36.464698000 -0400 +@@ -85,6 +85,51 @@ + #define DEFAULT_VARIATION "klondike.scm" + #define GNOME_SESSION_BUG + ++/* 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)); ++} ++ ++ ++ + gchar* game_file_to_name (const gchar* file) + { + char* p, *buf = g_path_get_basename(file); Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,16 @@ +#!/bin/sh +#$Id: gnome-games.preinstall,v 1.1 2004/12/09 10:29:54 simigern Exp $ + +umask 0022 +test -d "${BASEDIR}/opt/csw/var/games" || mkdir -p "${BASEDIR}/opt/csw/var/games" + +for statefile in glines.scores gnibbles.1.0.scores gnibbles.1.1.scores gnibbles.2.0.scores gnibbles.2.1.scores gnibbles.3.0.scores gnibbles.3.1.scores gnibbles.4.0.scores gnibbles.4.1.scores gnobots2.classic_robots-safe.scores gnobots2.classic_robots-super-safe.scores gnobots2.classic_robots.scores gnobots2.nightmare-safe.scores gnobots2.nightmare-super-safe.scores gnobots2.nightmare.scores gnobots2.robots2-safe.scores gnobots2.robots2-super-safe.scores gnobots2.robots2.scores gnobots2.robots2_easy-safe.scores gnobots2.robots2_easy-super-safe.scores gnobots2.robots2_easy.scores gnobots2.robots_with_safe_teleport-safe.scores gnobots2.robots_with_safe_teleport-super-safe.scores gnobots2.robots_with_safe_teleport.scores gnome-stones.scores gnometris.scores gnomine.Custom.scores gnomine.Large.scores gnomine.Medium.scores gnomine.Small.scores gnotravex.2x2.scores gnotravex.3x3.scores gnotravex.4x4.scores gnotravex.5x5.scores gnotravex.6x6.scores gnotski.1.scores gnotski.11.scores gnotski.12.scores gnotski.13.scores gnotski.14.scores gnotski.15.scores gnotski.16.scores gnotski.17.scores gnotski.2.scores gnotski.21.scores gnotski.22.scores gnotski.23.scores gnotski.24.scores gnotski.25.scores gnotski.26.scores gnotski.3.scores gnotski.4.scores gnotski.5.scores gnotski.6.scores gnotski.7.scores gtali.scores mahjongg.bridges.scores mahjongg.cloud.scores mahjongg.confounding.scores mahjongg.difficult.scores mahjongg.dragon.scores mahjongg.easy.scores mahjongg.pyramid.scores mahjongg.tictactoe.scores mahjongg.ziggurat.scores same-gnome.scores; do + if [ ! -f "${BASEDIR}/opt/csw/var/games/${statefile}" ]; then + echo "Creating ${statefile}" + touch "${BASEDIR}/opt/csw/var/games/${statefile}" + chgrp nogroup "${BASEDIR}/opt/csw/var/games/${statefile}" + chmod 664 "${BASEDIR}/opt/csw/var/games/${statefile}" + fi +done + +/bin/true Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,121 @@ +--- ./email/email_conduit.c.orig 2004-12-06 06:52:50.051501000 -0500 ++++ ./email/email_conduit.c 2004-12-06 06:53:02.631439000 -0500 +@@ -25,11 +25,11 @@ + + /*#define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "email: " format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit( guint32 pilotId ) ; +--- ./expense/expense_conduit.c.orig 2004-12-06 06:53:36.991501000 -0500 ++++ ./expense/expense_conduit.c 2004-12-06 06:53:47.191438000 -0500 +@@ -45,11 +45,11 @@ + + /* #define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "expense: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + static void +--- ./mal-conduit/mal/common/AGNet.h.orig 2004-12-06 06:56:06.711501000 -0500 ++++ ./mal-conduit/mal/common/AGNet.h 2004-12-06 06:57:18.031437000 -0500 +@@ -57,7 +57,7 @@ + # include + # include + # include +-# ifdef __sun__ ++# ifdef sun + # include + # include + # else +--- ./mal-conduit/mal/common/AGCollection.c.orig 2004-12-06 06:58:11.351501000 -0500 ++++ ./mal-conduit/mal/common/AGCollection.c 2004-12-06 06:58:46.101436000 -0500 +@@ -21,6 +21,9 @@ + + #include + #include ++#include ++ ++#define AGFreeFunc free + + ExportFunc void AGCollectionCallbacksInit(AGCollectionCallbacks *callbacks, + AGElementType elemType) +--- ./mal-conduit/mal/common/AGBufferedNet.c.orig 2004-12-06 06:59:49.981436000 -0500 ++++ ./mal-conduit/mal/common/AGBufferedNet.c 2004-12-06 07:00:05.956438000 -0500 +@@ -24,12 +24,8 @@ + #include + + +-#ifdef __unix__ +- +- #include ++#include + +-#endif // __unix__ +- + /*************************************************************************************/ + #ifdef __palmos__ + +--- ./mal-conduit/src/mal-conduit.h.orig 2004-12-06 07:00:45.335782000 -0500 ++++ ./mal-conduit/src/mal-conduit.h 2004-12-06 07:00:53.315711000 -0500 +@@ -1,11 +1,11 @@ + /* $Id: mal-conduit.h,v 1.3 2001/08/02 08:47:44 eskil Exp $ */ + + #ifdef MC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "mal-conduit: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + +--- ./memo_file/memo_file_conduit.c.orig 2004-12-06 07:01:16.025782000 -0500 ++++ ./memo_file/memo_file_conduit.c 2004-12-06 07:03:22.345721000 -0500 +@@ -46,11 +46,11 @@ + #define MC_DEBUG + + #ifdef MC_DEBUG +-#define LOG(args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- args) ++ __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit (guint32 pilotId); +--- ./time/time-conduit.c.orig 2004-12-06 07:03:47.005782000 -0500 ++++ ./time/time-conduit.c 2004-12-06 07:05:44.635708000 -0500 +@@ -36,11 +36,11 @@ + #define TC_DEBUG 1 + + #ifdef TC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- "time_file: " format, ##args) ++ "time_file: " __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_load_gpilot_conduit (GPilotPilot *pilot); Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,33 @@ +--- ./email/Makefile.in.orig 2004-12-06 07:14:04.395795000 -0500 ++++ ./email/Makefile.in 2004-12-06 07:14:15.395708000 -0500 +@@ -397,7 +397,7 @@ + && mv sendmail.conduit.tmp sendmail.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./memo_file/Makefile.in.orig 2004-12-06 07:14:58.105705000 -0500 ++++ ./memo_file/Makefile.in 2004-12-06 07:15:07.845718000 -0500 +@@ -394,7 +394,7 @@ + && mv memofile.conduit.tmp memofile.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./time/Makefile.in.orig 2004-12-06 07:15:51.175705000 -0500 ++++ ./time/Makefile.in 2004-12-06 07:15:59.685718000 -0500 +@@ -387,7 +387,7 @@ + && mv time.conduit.tmp time.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,52 @@ +--- terminal-screen.c.ORG Fri Sep 19 17:12:52 2003 ++++ terminal-screen.c Fri Sep 19 19:36:40 2003 +@@ -1459,10 +1459,7 @@ terminal_screen_button_press_event (GtkW + terminal_widget_get_cell_size (term, &char_width, &char_height); + + g_free (screen->priv->matched_string); +- screen->priv->matched_string = +- terminal_widget_check_match (term, +- event->x / char_width, +- event->y / char_height); ++ + dingus_button = ((event->button == 1) || (event->button == 2)); + + if (dingus_button && +@@ -1484,20 +1481,31 @@ terminal_screen_button_press_event (GtkW + } + + if (dingus_button && +- (event->state & GDK_CONTROL_MASK) && +- (screen->priv->matched_string != NULL)) ++ (event->state & GDK_CONTROL_MASK)) + { + gtk_widget_grab_focus (widget); + +- open_url (screen, screen->priv->matched_string); +- g_free (screen->priv->matched_string); +- screen->priv->matched_string = NULL; +- return TRUE; /* don't do anything else such as select with the click */ ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); ++ ++ if (screen->priv->matched_string != NULL) ++ { ++ open_url (screen, screen->priv->matched_string); ++ g_free (screen->priv->matched_string); ++ screen->priv->matched_string = NULL; ++ return TRUE; /* don't do anything else such as select with the click */ ++ } + } + + if ((event->button == 3) && + !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK))) + { ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); + terminal_screen_do_popup (screen, event); + return TRUE; + } Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,33 @@ +--- libgnomevfs/eggdirfuncs.c.orig 2004-12-07 05:20:30.149044000 -0500 ++++ libgnomevfs/eggdirfuncs.c 2004-12-07 05:21:01.238980000 -0500 +@@ -106,7 +106,7 @@ + data_dirs = (gchar *) g_getenv ("XDG_DATA_DIRS"); + + if (!data_dirs || !data_dirs[0]) +- data_dirs = "/usr/local/share/:/usr/share/"; ++ data_dirs = "/opt/csw/share:/usr/local/share/:/usr/share/"; + + data_dir_vector = g_strsplit (data_dirs, ":", 0); + +--- libgnomevfs/gnome-vfs-mime-info.c.orig 2004-12-07 05:20:35.798970000 -0500 ++++ libgnomevfs/gnome-vfs-mime-info.c 2004-12-07 05:21:23.718971000 -0500 +@@ -149,7 +149,7 @@ + + xdg_data_dirs = g_getenv ("XDG_DATA_DIRS"); + if (!xdg_data_dirs) { +- xdg_data_dirs = "/usr/local/share/:/usr/share/"; ++ xdg_data_dirs = "/opt/csw/share:/usr/local/share/:/usr/share/"; + } + + split_data_dirs = g_strsplit (xdg_data_dirs, ":", 0); +--- libgnomevfs/xdgmime.c.orig 2004-12-07 05:20:41.159002000 -0500 ++++ libgnomevfs/xdgmime.c 2004-12-07 05:21:43.358971000 -0500 +@@ -189,7 +189,7 @@ + + xdg_data_dirs = getenv ("XDG_DATA_DIRS"); + if (xdg_data_dirs == NULL) +- xdg_data_dirs = "/usr/local/share/:/usr/share/"; ++ xdg_data_dirs = "/opt/csw/share:/usr/local/share/:/usr/share/"; + + ptr = xdg_data_dirs; + Added: csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile 2009-04-27 12:42:15 UTC (rev 4506) @@ -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/gnome/trunk/legacy/specs/gnome =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/specs/gnome (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/specs/gnome 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,309 @@ +# vim: ft=perl +# $Id: gnome,v 1.30 2006-09-28 18:21:45 simigern Exp $ + +$progname = 'gnome'; +$version = '2.14.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnome.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-dtlogin-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ( { + pkgname => "gnomedtlogin", + filename => "gnome_dtlogin", + name => "gnome_dtlogin - GNOME 2 dtlogin integration", + filelist => [qw('etc/dt/appconfig' + 'etc/dt/config/Xinitrc.CSWgnome' + 'etc/dt/config/Xsession.CSWgnome' + 'etc/dt/config/Xsession2.CSWgnome' + 'etc/dt/config/C/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar_EG.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de_AT.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_GB.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_IE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he_IL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.PCK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.eucJP/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.ISO8859-11/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.TIS620/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.GBK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_HK.BIG5HK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.BIG5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sk_SK.ISO8859-2/Xresources.d/Xresources.CSWgnome')] + + }, + { + pkgname => "gnomemin", + filename => "gnome_minimal", + name => "gnome_minimal - The GNOME 2 Desktop, minimal packages", + dependencies => ['CSWcommon', + 'CSWgnomedtlogin', + 'CSWgnomedesktop', + 'CSWgnomepanel', + 'CSWgnomesession', + 'CSWcontrolcenter', + 'CSWgnomethemes', + 'CSWnautilus', + 'CSWmetacity', + 'CSWgedit', + 'CSWscrollkeeper', + 'CSWgnometerminal', + 'CSWgnomeapplets', + 'CSWgnomeutils', + 'CSWsharedmimeinfo', + 'CSWgtkengines', + 'CSWatspi', + 'CSWgnomemedia', + 'CSWyelp', + 'CSWfam'], + filelist => [qw('opt')], + postinstall => 'gconf-schema-update.postinstall' + }, + { + pkgname => $progname, + filename => $progname, + name => "$progname - The GNOME 2 Desktop", + dependencies => ['CSWcommon', + 'CSWgnomemin', + 'CSWggv', + 'CSWgnomegames', + 'CSWeog', + 'CSWxsave', + 'CSWgpdf', + 'CSWgnome2userdocs', + 'CSWnautiluscdburner', + 'CSWgok', + 'CSWgnomespeech', + 'CSWgnomesysmon', + 'CSWgnopernicus', + 'CSWnautilusview', + 'CSWgimp', + 'CSWgcalctool', + 'CSWgucharmap', + 'CSWgnomemag', + 'CSWgconfeditor', +# 'CSWtotem', + 'CSWrhythmbox', + 'CSWxmms', + 'CSWgnomepilot', + 'CSWepiphany', + 'CSWbugbuddy'], + filelist => [qw('none')], + postinstall => 'gconf-schema-update.postinstall' + }); + +push @csw_ignore, 'etc/dt'; +push @csw_ignore, 'etc/dt/appconfig'; +push @csw_ignore, 'etc/dt/appconfig/icons'; +push @csw_ignore, 'etc/dt/appconfig/icons/C'; +push @csw_ignore, 'etc/dt/config'; + +push @csw_dirs, 'etc/dt/config/C'; +push @csw_dirs, 'etc/dt/config/ar'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/de'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/de.UTF-8'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8'; +push @csw_dirs, 'etc/dt/config/es'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/es.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/he'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/it'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/it.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP'; +push @csw_dirs, 'etc/dt/config/ko'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8'; +push @csw_dirs, 'etc/dt/config/pt_BR'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8'; +push @csw_dirs, 'etc/dt/config/sv'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8'; +push @csw_dirs, 'etc/dt/config/th_TH'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh'; +push @csw_dirs, 'etc/dt/config/zh.GBK'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK'; +push @csw_dirs, 'etc/dt/config/zh_TW'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8'; +push @csw_dirs, 'etc/dt/config/sk_SK.ISO8859-2'; + +push @csw_dirs, 'etc/dt/config/C/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.GBK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sk_SK.ISO8859-2/Xresources.d'; + +#'CSWgnomemedia', + +$copyright = "${progname}-dtlogin-${version}/COPYING"; + +$arch="all"; + +$build = <<"EOF"; +cd ${progname}-dtlogin-${version} +mkdir -p ${buildroot} +gcp -vax * ${buildroot}/ +cat >COPYING <<__EOF__ +See dependancies for license-informations +__EOF__ +mkdir -p ${buildroot}/opt/csw/etc/gconf/schemas +cat >${buildroot}/opt/csw/etc/gconf/schemas/csw.entries <<__EOF__ + + + + /apps/metacity/general/theme + + Crux + + + + /desktop/gnome/interface/gtk_theme + + Crux + + + + /desktop/gnome/interface/icon_theme + + Crux + + + + /schemas/desktop/gnome/file-views/icon_theme + + + gnome + string + + + + crux_teal + + + File Icon Theme + Theme used for displaying file icons + + + + + + +__EOF__ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:42:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:42:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4507] csw/mgar/pkg Message-ID: Revision: 4507 http://gar.svn.sourceforge.net/gar/?rev=4507&view=rev Author: dmichelsen Date: 2009-04-27 12:42:32 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-applets: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-applets/ csw/mgar/pkg/gnome-applets/trunk/ csw/mgar/pkg/gnome-applets/trunk/legacy/ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-applets/trunk/legacy/sources/ csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch csw/mgar/pkg/gnome-applets/trunk/legacy/specs/ csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-applets/trunk/legacy/specs/gnome-applets Added: csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:42:32 UTC (rev 4507) @@ -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/gnome-applets/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/human.pl 2009-04-27 12:42:32 UTC (rev 4507) @@ -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 () { + 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 + +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 + +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/gnome-applets/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:42:32 UTC (rev 4507) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch 2009-04-27 12:42:32 UTC (rev 4507) @@ -0,0 +1,13 @@ +--- multiload/linux-proc.c.orig 2004-04-10 15:06:07.657644000 -0400 ++++ multiload/linux-proc.c 2004-04-10 15:07:34.027579000 -0400 +@@ -93,8 +93,8 @@ + GetPage (int Maximum, int data [3], LoadGraph *g) + { + static int max = 100; /* guess at maximum page rate (= in + out) */ +- static u_int64_t lastin = 0; +- static u_int64_t lastout = 0; ++ static uint64_t lastin = 0; ++ static uint64_t lastout = 0; + int in, out, idle; + + glibtop_swap swap; Added: csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch 2009-04-27 12:42:32 UTC (rev 4507) @@ -0,0 +1,23 @@ +--- mixer/mixer.c.orig 2004-04-19 16:10:03.693350000 -0400 ++++ mixer/mixer.c 2004-04-19 16:10:59.093290000 -0400 +@@ -53,19 +53,7 @@ + #include + #include + +-#ifdef HAVE_LINUX_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_MACHINE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_AUDIOIO_H ++#ifdef HAVE_SYS_AUDIOIO_H + #include + #define SUN_API + #elif HAVE_SYS_AUDIO_IO_H Added: csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile 2009-04-27 12:42:32 UTC (rev 4507) @@ -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/gnome-applets/trunk/legacy/specs/gnome-applets =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/specs/gnome-applets (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/specs/gnome-applets 2009-04-27 12:42:32 UTC (rev 4507) @@ -0,0 +1,71 @@ +# vim: ft=perl +# $Id: gnome-applets,v 1.10 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-applets'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-applets/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gnome-applets-linuxproc.patch', "${progname}-${version}", '-p0'], + ['gnome-applets-mixer.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomeapplets", + filename => "gnome_applets", + name => "gnome_applets - Various applets for GNOME 2 panel", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +#export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' + +mkdir ${builddir}/mypath +ln -s /opt/csw/bin/gsed ${builddir}/mypath/sed + +cd ${progname}-${version} +export PATH="${builddir}/mypath:${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +#Defuck up +sed -e 's|-Wall\$||' multiload/Makefile.in >multiload/Makefile.innew +mv multiload/Makefile.innew multiload/Makefile.in + +mv configure configure.preCSW +gsed -e 's|sys/soundcard\.h|sys/soundcard.hdonotest|g' configure.preCSW >configure +chmod 755 configure +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --disable-gstreamer || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#sed -e 's|<<|<' ${buildroot}/opt/csw/share/gweather/Locations.xml >${buildroot}/opt/csw/share/gweather/Locations.xml.cswtmp +#mv ${buildroot}/opt/csw/share/gweather/Locations.xml.cswtmp ${buildroot}/opt/csw/share/gweather/Locations.xml + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:42:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:42:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4508] csw/mgar/pkg Message-ID: Revision: 4508 http://gar.svn.sourceforge.net/gar/?rev=4508&view=rev Author: dmichelsen Date: 2009-04-27 12:42:49 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-games: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-games/ csw/mgar/pkg/gnome-games/trunk/ csw/mgar/pkg/gnome-games/trunk/legacy/ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-games/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-games/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-games/trunk/legacy/sources/ csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games-sol.patch csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall csw/mgar/pkg/gnome-games/trunk/legacy/specs/ csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-games/trunk/legacy/specs/gnome-games Added: csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:42:49 UTC (rev 4508) @@ -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/gnome-games/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/human.pl 2009-04-27 12:42:49 UTC (rev 4508) @@ -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 () { + 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 + +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 + +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/gnome-games/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:42:49 UTC (rev 4508) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-games/trunk/legacy/sources/gnome-games-sol.patch =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games-sol.patch (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games-sol.patch 2009-04-27 12:42:49 UTC (rev 4508) @@ -0,0 +1,54 @@ +--- aisleriot/sol.c.old 2004-08-06 18:46:19.004762000 -0400 ++++ aisleriot/sol.c 2004-08-06 18:46:36.464698000 -0400 +@@ -85,6 +85,51 @@ + #define DEFAULT_VARIATION "klondike.scm" + #define GNOME_SESSION_BUG + ++/* 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)); ++} ++ ++ ++ + gchar* game_file_to_name (const gchar* file) + { + char* p, *buf = g_path_get_basename(file); Added: csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall 2009-04-27 12:42:49 UTC (rev 4508) @@ -0,0 +1,16 @@ +#!/bin/sh +#$Id: gnome-games.preinstall,v 1.1 2004/12/09 10:29:54 simigern Exp $ + +umask 0022 +test -d "${BASEDIR}/opt/csw/var/games" || mkdir -p "${BASEDIR}/opt/csw/var/games" + +for statefile in glines.scores gnibbles.1.0.scores gnibbles.1.1.scores gnibbles.2.0.scores gnibbles.2.1.scores gnibbles.3.0.scores gnibbles.3.1.scores gnibbles.4.0.scores gnibbles.4.1.scores gnobots2.classic_robots-safe.scores gnobots2.classic_robots-super-safe.scores gnobots2.classic_robots.scores gnobots2.nightmare-safe.scores gnobots2.nightmare-super-safe.scores gnobots2.nightmare.scores gnobots2.robots2-safe.scores gnobots2.robots2-super-safe.scores gnobots2.robots2.scores gnobots2.robots2_easy-safe.scores gnobots2.robots2_easy-super-safe.scores gnobots2.robots2_easy.scores gnobots2.robots_with_safe_teleport-safe.scores gnobots2.robots_with_safe_teleport-super-safe.scores gnobots2.robots_with_safe_teleport.scores gnome-stones.scores gnometris.scores gnomine.Custom.scores gnomine.Large.scores gnomine.Medium.scores gnomine.Small.scores gnotravex.2x2.scores gnotravex.3x3.scores gnotravex.4x4.scores gnotravex.5x5.scores gnotravex.6x6.scores gnotski.1.scores gnotski.11.scores gnotski.12.scores gnotski.13.scores gnotski.14.scores gnotski.15.scores gnotski.16.scores gnotski.17.scores gnotski.2.scores gnotski.21.scores gnotski.22.scores gnotski.23.scores gnotski.24.scores gnotski.25.scores gnotski.26.scores gnotski.3.scores gnotski.4.scores gnotski.5.scores gnotski.6.scores gnotski.7.scores gtali.scores mahjongg.bridges.scores mahjongg.cloud.scores mahjongg.confounding.scores mahjongg.difficult.scores mahjongg.dragon.scores mahjongg.easy.scores mahjongg.pyramid.scores mahjongg.tictactoe.scores mahjongg.ziggurat.scores same-gnome.scores; do + if [ ! -f "${BASEDIR}/opt/csw/var/games/${statefile}" ]; then + echo "Creating ${statefile}" + touch "${BASEDIR}/opt/csw/var/games/${statefile}" + chgrp nogroup "${BASEDIR}/opt/csw/var/games/${statefile}" + chmod 664 "${BASEDIR}/opt/csw/var/games/${statefile}" + fi +done + +/bin/true Added: csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile 2009-04-27 12:42:49 UTC (rev 4508) @@ -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/gnome-games/trunk/legacy/specs/gnome-games =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/specs/gnome-games (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/specs/gnome-games 2009-04-27 12:42:49 UTC (rev 4508) @@ -0,0 +1,82 @@ +# vim: ft=perl +# $Id: gnome-games,v 1.11 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-games'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-games/ packaged for CSW by Michael Gernoth'; + +#$suffix='.01'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['gnome-games-sol.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomegames", + filename => "gnome_games", + name => "gnome_games - Games for GNOME 2", + dependencies => ['CSWcommon','CSWguile'], + filelist => [qw(opt)], + preinstall => 'gnome-games.preinstall', + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$attributes{'/opt/csw/bin/glines'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnibbles'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnobots2'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnome-stones'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnometris'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnomine'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnotravex'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnotski'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gtali'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/mahjongg'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/same-gnome'} = ({user => 'root', group => 'nogroup', perm => '2755'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/ucblib -R/usr/ucblib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/ucblib -R/usr/ucblib' +cd ${progname}-${version} +export PATH="${builddir}/mypath:${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +mkdir -p ${builddir}/mypath +ln -s /opt/csw/bin/ggrep ${builddir}/mypath/grep +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-scores-group=nogroup || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 + +mkdir -p ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +rm ${buildroot}/opt/csw/var/games/* + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gnome-stones/objects/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:04 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4509] csw/mgar/pkg Message-ID: Revision: 4509 http://gar.svn.sourceforge.net/gar/?rev=4509&view=rev Author: dmichelsen Date: 2009-04-27 12:43:03 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-icon-theme: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-icon-theme/ csw/mgar/pkg/gnome-icon-theme/trunk/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-icon-theme/trunk/legacy/sources/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme Added: csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:03 UTC (rev 4509) @@ -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/gnome-icon-theme/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/human.pl 2009-04-27 12:43:03 UTC (rev 4509) @@ -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 () { + 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 + +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 + +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/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:03 UTC (rev 4509) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-icon-theme/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/Makefile 2009-04-27 12:43:03 UTC (rev 4509) @@ -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/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme 2009-04-27 12:43:03 UTC (rev 4509) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: gnome-icon-theme,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-icon-theme'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomeicontheme", + filename => "gnome_icon_theme", + name => "gnome_icon_theme - GNOME icon theme", + dependencies => ['CSWcommon','CSWhicoloricontheme'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$arch="all"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4510] csw/mgar/pkg Message-ID: Revision: 4510 http://gar.svn.sourceforge.net/gar/?rev=4510&view=rev Author: dmichelsen Date: 2009-04-27 12:43:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-keyring: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-keyring/ csw/mgar/pkg/gnome-keyring/trunk/ csw/mgar/pkg/gnome-keyring/trunk/legacy/ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-keyring/trunk/legacy/sources/ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/gnome-keyring Added: csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:19 UTC (rev 4510) @@ -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/gnome-keyring/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/human.pl 2009-04-27 12:43:19 UTC (rev 4510) @@ -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 () { + 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 + +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 + +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/gnome-keyring/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:19 UTC (rev 4510) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-keyring/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/Makefile 2009-04-27 12:43:19 UTC (rev 4510) @@ -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/gnome-keyring/trunk/legacy/specs/gnome-keyring =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/gnome-keyring (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/gnome-keyring 2009-04-27 12:43:19 UTC (rev 4510) @@ -0,0 +1,42 @@ +# vim: ft=perl + +$progname = 'gnomekeyring'; +$version = '0.4.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-keyring/ packaged for CSW by Michael Gernoth'; + + at sources = ("gnome-keyring-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - keep password and other secrets for users", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); +#, exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + +$copyright = "gnome-keyring-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd gnome-keyring-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4511] csw/mgar/pkg Message-ID: Revision: 4511 http://gar.svn.sourceforge.net/gar/?rev=4511&view=rev Author: dmichelsen Date: 2009-04-27 12:43:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-panel: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-panel/ csw/mgar/pkg/gnome-panel/trunk/ csw/mgar/pkg/gnome-panel/trunk/legacy/ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-panel/trunk/legacy/sources/ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-panel/trunk/legacy/specs/gnome-panel Added: csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:35 UTC (rev 4511) @@ -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/gnome-panel/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/human.pl 2009-04-27 12:43:35 UTC (rev 4511) @@ -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 () { + 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 + +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 + +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/gnome-panel/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:35 UTC (rev 4511) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-panel/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/Makefile 2009-04-27 12:43:35 UTC (rev 4511) @@ -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/gnome-panel/trunk/legacy/specs/gnome-panel =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/specs/gnome-panel (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/gnome-panel 2009-04-27 12:43:35 UTC (rev 4511) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: gnome-panel,v 1.8 2005/03/27 12:54:08 simigern Exp $ + +$progname = 'gnome-panel'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-panel/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomepanel", + filename => "gnome_panel", + name => "gnome_panel - Launch and/or dock GNOME 2 applications", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:52 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4512] csw/mgar/pkg Message-ID: Revision: 4512 http://gar.svn.sourceforge.net/gar/?rev=4512&view=rev Author: dmichelsen Date: 2009-04-27 12:43:52 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-pilot: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-pilot/ csw/mgar/pkg/gnome-pilot/trunk/ csw/mgar/pkg/gnome-pilot/trunk/legacy/ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/ csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/ csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/gnome-pilot Added: csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:52 UTC (rev 4512) @@ -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/gnome-pilot/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/human.pl 2009-04-27 12:43:52 UTC (rev 4512) @@ -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 () { + 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 + +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 + +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/gnome-pilot/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:52 UTC (rev 4512) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch 2009-04-27 12:43:52 UTC (rev 4512) @@ -0,0 +1,121 @@ +--- ./email/email_conduit.c.orig 2004-12-06 06:52:50.051501000 -0500 ++++ ./email/email_conduit.c 2004-12-06 06:53:02.631439000 -0500 +@@ -25,11 +25,11 @@ + + /*#define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "email: " format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit( guint32 pilotId ) ; +--- ./expense/expense_conduit.c.orig 2004-12-06 06:53:36.991501000 -0500 ++++ ./expense/expense_conduit.c 2004-12-06 06:53:47.191438000 -0500 +@@ -45,11 +45,11 @@ + + /* #define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "expense: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + static void +--- ./mal-conduit/mal/common/AGNet.h.orig 2004-12-06 06:56:06.711501000 -0500 ++++ ./mal-conduit/mal/common/AGNet.h 2004-12-06 06:57:18.031437000 -0500 +@@ -57,7 +57,7 @@ + # include + # include + # include +-# ifdef __sun__ ++# ifdef sun + # include + # include + # else +--- ./mal-conduit/mal/common/AGCollection.c.orig 2004-12-06 06:58:11.351501000 -0500 ++++ ./mal-conduit/mal/common/AGCollection.c 2004-12-06 06:58:46.101436000 -0500 +@@ -21,6 +21,9 @@ + + #include + #include ++#include ++ ++#define AGFreeFunc free + + ExportFunc void AGCollectionCallbacksInit(AGCollectionCallbacks *callbacks, + AGElementType elemType) +--- ./mal-conduit/mal/common/AGBufferedNet.c.orig 2004-12-06 06:59:49.981436000 -0500 ++++ ./mal-conduit/mal/common/AGBufferedNet.c 2004-12-06 07:00:05.956438000 -0500 +@@ -24,12 +24,8 @@ + #include + + +-#ifdef __unix__ +- +- #include ++#include + +-#endif // __unix__ +- + /*************************************************************************************/ + #ifdef __palmos__ + +--- ./mal-conduit/src/mal-conduit.h.orig 2004-12-06 07:00:45.335782000 -0500 ++++ ./mal-conduit/src/mal-conduit.h 2004-12-06 07:00:53.315711000 -0500 +@@ -1,11 +1,11 @@ + /* $Id: mal-conduit.h,v 1.3 2001/08/02 08:47:44 eskil Exp $ */ + + #ifdef MC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "mal-conduit: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + +--- ./memo_file/memo_file_conduit.c.orig 2004-12-06 07:01:16.025782000 -0500 ++++ ./memo_file/memo_file_conduit.c 2004-12-06 07:03:22.345721000 -0500 +@@ -46,11 +46,11 @@ + #define MC_DEBUG + + #ifdef MC_DEBUG +-#define LOG(args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- args) ++ __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit (guint32 pilotId); +--- ./time/time-conduit.c.orig 2004-12-06 07:03:47.005782000 -0500 ++++ ./time/time-conduit.c 2004-12-06 07:05:44.635708000 -0500 +@@ -36,11 +36,11 @@ + #define TC_DEBUG 1 + + #ifdef TC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- "time_file: " format, ##args) ++ "time_file: " __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_load_gpilot_conduit (GPilotPilot *pilot); Added: csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch 2009-04-27 12:43:52 UTC (rev 4512) @@ -0,0 +1,33 @@ +--- ./email/Makefile.in.orig 2004-12-06 07:14:04.395795000 -0500 ++++ ./email/Makefile.in 2004-12-06 07:14:15.395708000 -0500 +@@ -397,7 +397,7 @@ + && mv sendmail.conduit.tmp sendmail.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./memo_file/Makefile.in.orig 2004-12-06 07:14:58.105705000 -0500 ++++ ./memo_file/Makefile.in 2004-12-06 07:15:07.845718000 -0500 +@@ -394,7 +394,7 @@ + && mv memofile.conduit.tmp memofile.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./time/Makefile.in.orig 2004-12-06 07:15:51.175705000 -0500 ++++ ./time/Makefile.in 2004-12-06 07:15:59.685718000 -0500 +@@ -387,7 +387,7 @@ + && mv time.conduit.tmp time.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. Added: csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile 2009-04-27 12:43:52 UTC (rev 4512) @@ -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/gnome-pilot/trunk/legacy/specs/gnome-pilot =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/gnome-pilot (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/gnome-pilot 2009-04-27 12:43:52 UTC (rev 4512) @@ -0,0 +1,65 @@ +# vim: ft=perl +# $Id: gnome-pilot,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-pilot'; +$version = '2.0.12'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","gnome-pilot-conduits-${version}.tar.bz2"); + + at patches = (['gnome-pilot-conduits-nongcc-fixes.patch', "gnome-pilot-conduits-${version}", '-p0'], + ['gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch',"gnome-pilot-conduits-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomepilot", + filename => "gnome_pilot", + name => "gnome_pilot - The GNOME PalmPilot integration suite", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +cd ${builddir}/gnome-pilot-conduits-${version} +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig:${buildroot}/opt/csw/lib/pkgconfig +export CFLAGS="\$CFLAGS -I${buildroot}/opt/csw/include" +export CPPFLAGS="\$CPPFLAGS -I${buildroot}/opt/csw/include" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gnome-pilot/conduits/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4513] csw/mgar/pkg Message-ID: Revision: 4513 http://gar.svn.sourceforge.net/gar/?rev=4513&view=rev Author: dmichelsen Date: 2009-04-27 12:44:07 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-session: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-session/ csw/mgar/pkg/gnome-session/trunk/ csw/mgar/pkg/gnome-session/trunk/legacy/ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-session/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-session/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-session/trunk/legacy/sources/ csw/mgar/pkg/gnome-session/trunk/legacy/specs/ csw/mgar/pkg/gnome-session/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-session/trunk/legacy/specs/gnome-session Added: csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:07 UTC (rev 4513) @@ -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/gnome-session/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/human.pl 2009-04-27 12:44:07 UTC (rev 4513) @@ -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 () { + 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 + +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 + +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/gnome-session/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:07 UTC (rev 4513) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-session/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/specs/Makefile 2009-04-27 12:44:07 UTC (rev 4513) @@ -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/gnome-session/trunk/legacy/specs/gnome-session =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/specs/gnome-session (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/specs/gnome-session 2009-04-27 12:44:07 UTC (rev 4513) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: gnome-session,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-session'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-session/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomesession", + filename => "gnome_session", + name => "gnome_session - The GNOME 2 Session Manager", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} + +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4514] csw/mgar/pkg Message-ID: Revision: 4514 http://gar.svn.sourceforge.net/gar/?rev=4514&view=rev Author: dmichelsen Date: 2009-04-27 12:44:22 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-skeleton: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-skeleton/ csw/mgar/pkg/gnome-skeleton/trunk/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-skeleton/trunk/legacy/sources/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/gnome-skeleton Added: csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:22 UTC (rev 4514) @@ -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/gnome-skeleton/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/human.pl 2009-04-27 12:44:22 UTC (rev 4514) @@ -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 () { + 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 + +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 + +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/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:22 UTC (rev 4514) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-skeleton/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/Makefile 2009-04-27 12:44:22 UTC (rev 4514) @@ -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/gnome-skeleton/trunk/legacy/specs/gnome-skeleton =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/gnome-skeleton (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/gnome-skeleton 2009-04-27 12:44:22 UTC (rev 4514) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: gnome-skeleton,v 1.6 2004/12/23 14:29:09 simigern Exp $ + +$progname = 'gnome'; +$version = '2.6.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - ", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4515] csw/mgar/pkg Message-ID: Revision: 4515 http://gar.svn.sourceforge.net/gar/?rev=4515&view=rev Author: dmichelsen Date: 2009-04-27 12:44:37 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-spell: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-spell/ csw/mgar/pkg/gnome-spell/trunk/ csw/mgar/pkg/gnome-spell/trunk/legacy/ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-spell/trunk/legacy/sources/ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-spell/trunk/legacy/specs/gnome-spell Added: csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:37 UTC (rev 4515) @@ -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/gnome-spell/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/human.pl 2009-04-27 12:44:37 UTC (rev 4515) @@ -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 () { + 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 + +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 + +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/gnome-spell/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:37 UTC (rev 4515) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-spell/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/Makefile 2009-04-27 12:44:37 UTC (rev 4515) @@ -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/gnome-spell/trunk/legacy/specs/gnome-spell =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/specs/gnome-spell (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/gnome-spell 2009-04-27 12:44:37 UTC (rev 4515) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: gnome-spell,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-spell'; +$version = '1.0.5'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-spell/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomespell", + filename => "gnome_spell", + name => "gnome_spell - GNOME/Bonobo component for spell checking", + dependencies => ['CSWcommon','CSWaspell'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -L${buildroot}/opt/csw/lib' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake clean || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4516] csw/mgar/pkg Message-ID: Revision: 4516 http://gar.svn.sourceforge.net/gar/?rev=4516&view=rev Author: dmichelsen Date: 2009-04-27 12:44:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-terminal: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-terminal/ csw/mgar/pkg/gnome-terminal/trunk/ csw/mgar/pkg/gnome-terminal/trunk/legacy/ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/ csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/ csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/gnome-terminal Added: csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:53 UTC (rev 4516) @@ -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/gnome-terminal/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/human.pl 2009-04-27 12:44:53 UTC (rev 4516) @@ -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 () { + 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 + +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 + +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/gnome-terminal/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:53 UTC (rev 4516) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch 2009-04-27 12:44:53 UTC (rev 4516) @@ -0,0 +1,52 @@ +--- terminal-screen.c.ORG Fri Sep 19 17:12:52 2003 ++++ terminal-screen.c Fri Sep 19 19:36:40 2003 +@@ -1459,10 +1459,7 @@ terminal_screen_button_press_event (GtkW + terminal_widget_get_cell_size (term, &char_width, &char_height); + + g_free (screen->priv->matched_string); +- screen->priv->matched_string = +- terminal_widget_check_match (term, +- event->x / char_width, +- event->y / char_height); ++ + dingus_button = ((event->button == 1) || (event->button == 2)); + + if (dingus_button && +@@ -1484,20 +1481,31 @@ terminal_screen_button_press_event (GtkW + } + + if (dingus_button && +- (event->state & GDK_CONTROL_MASK) && +- (screen->priv->matched_string != NULL)) ++ (event->state & GDK_CONTROL_MASK)) + { + gtk_widget_grab_focus (widget); + +- open_url (screen, screen->priv->matched_string); +- g_free (screen->priv->matched_string); +- screen->priv->matched_string = NULL; +- return TRUE; /* don't do anything else such as select with the click */ ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); ++ ++ if (screen->priv->matched_string != NULL) ++ { ++ open_url (screen, screen->priv->matched_string); ++ g_free (screen->priv->matched_string); ++ screen->priv->matched_string = NULL; ++ return TRUE; /* don't do anything else such as select with the click */ ++ } + } + + if ((event->button == 3) && + !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK))) + { ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); + terminal_screen_do_popup (screen, event); + return TRUE; + } Added: csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile 2009-04-27 12:44:53 UTC (rev 4516) @@ -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/gnome-terminal/trunk/legacy/specs/gnome-terminal =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/gnome-terminal (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/gnome-terminal 2009-04-27 12:44:53 UTC (rev 4516) @@ -0,0 +1,48 @@ +# vim: ft=perl +# $Id: gnome-terminal,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-terminal'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-terminal/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['gnome-terminal-selection.patch', "${progname}-${version}/src", '-p0']); + + at packages = ({ + pkgname => "gnometerminal", + filename => "gnome_terminal", + name => "gnome_terminal - The GNOME 2 terminal emulator application", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4517] csw/mgar/pkg Message-ID: Revision: 4517 http://gar.svn.sourceforge.net/gar/?rev=4517&view=rev Author: dmichelsen Date: 2009-04-27 12:45:08 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-themes: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-themes/ csw/mgar/pkg/gnome-themes/trunk/ csw/mgar/pkg/gnome-themes/trunk/legacy/ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-themes/trunk/legacy/sources/ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-themes/trunk/legacy/specs/gnome-themes Added: csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:08 UTC (rev 4517) @@ -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/gnome-themes/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/human.pl 2009-04-27 12:45:08 UTC (rev 4517) @@ -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 () { + 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 + +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 + +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/gnome-themes/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:08 UTC (rev 4517) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-themes/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/Makefile 2009-04-27 12:45:08 UTC (rev 4517) @@ -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/gnome-themes/trunk/legacy/specs/gnome-themes =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/specs/gnome-themes (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/gnome-themes 2009-04-27 12:45:08 UTC (rev 4517) @@ -0,0 +1,58 @@ +# vim: ft=perl +# $Id: gnome-themes,v 1.7 2005/03/26 13:42:56 simigern Exp $ + +$progname = 'gnome-themes'; +$version = '2.10.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-themes/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomethemes", + filename => "gnome_themes", + name => "gnome_themes - official themes for the GNOME 2 desktop", + dependencies => ['CSWcommon','CSWgnomeicontheme'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/gtk-2.0/2.*/engines/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:28 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4518] csw/mgar/pkg Message-ID: Revision: 4518 http://gar.svn.sourceforge.net/gar/?rev=4518&view=rev Author: dmichelsen Date: 2009-04-27 12:45:28 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-utils: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-utils/ csw/mgar/pkg/gnome-utils/trunk/ csw/mgar/pkg/gnome-utils/trunk/legacy/ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-utils/trunk/legacy/sources/ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-utils/trunk/legacy/specs/gnome-utils Added: csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:28 UTC (rev 4518) @@ -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/gnome-utils/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/human.pl 2009-04-27 12:45:28 UTC (rev 4518) @@ -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 () { + 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 + +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 + +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/gnome-utils/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:28 UTC (rev 4518) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-utils/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/Makefile 2009-04-27 12:45:28 UTC (rev 4518) @@ -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/gnome-utils/trunk/legacy/specs/gnome-utils =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/specs/gnome-utils (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/gnome-utils 2009-04-27 12:45:28 UTC (rev 4518) @@ -0,0 +1,48 @@ +# vim: ft=perl +# $Id: gnome-utils,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-utils'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-utils/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomeutils", + filename => "gnome_utils", + name => "gnome_utils - GNOME 2 desktop utilities", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:43 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4519] csw/mgar/pkg Message-ID: Revision: 4519 http://gar.svn.sourceforge.net/gar/?rev=4519&view=rev Author: dmichelsen Date: 2009-04-27 12:45:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnomedesktop: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnomedesktop/ csw/mgar/pkg/gnomedesktop/trunk/ csw/mgar/pkg/gnomedesktop/trunk/legacy/ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnomedesktop/trunk/legacy/sources/ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/Makefile csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/gnomedesktop Added: csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:42 UTC (rev 4519) @@ -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/gnomedesktop/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/human.pl 2009-04-27 12:45:42 UTC (rev 4519) @@ -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 () { + 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 + +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 + +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/gnomedesktop/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:42 UTC (rev 4519) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnomedesktop/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/Makefile 2009-04-27 12:45:42 UTC (rev 4519) @@ -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/gnomedesktop/trunk/legacy/specs/gnomedesktop =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/gnomedesktop (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/gnomedesktop 2009-04-27 12:45:42 UTC (rev 4519) @@ -0,0 +1,61 @@ +# vim: ft=perl +# $Id: gnomedesktop,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-desktop'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomedesktop", + filename => "gnomedesktop", + name => "gnomedesktop - Additional UI API for GNOME", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-gnome-distributor="Blastwave.org" || exit 1 + +#gnarf, configure creates empty intltool-{extract,merge,update}-files... fix this +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:58 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4520] csw/mgar/pkg Message-ID: Revision: 4520 http://gar.svn.sourceforge.net/gar/?rev=4520&view=rev Author: dmichelsen Date: 2009-04-27 12:45:57 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnomevfs2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnomevfs2/ csw/mgar/pkg/gnomevfs2/trunk/ csw/mgar/pkg/gnomevfs2/trunk/legacy/ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnomevfs2/trunk/legacy/sources/ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/Makefile csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/gnomevfs2 Added: csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:57 UTC (rev 4520) @@ -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/gnomevfs2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/human.pl 2009-04-27 12:45:57 UTC (rev 4520) @@ -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 () { + 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 + +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 + +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/gnomevfs2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:57 UTC (rev 4520) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnomevfs2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/Makefile 2009-04-27 12:45:57 UTC (rev 4520) @@ -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/gnomevfs2/trunk/legacy/specs/gnomevfs2 =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/gnomevfs2 (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/gnomevfs2 2009-04-27 12:45:57 UTC (rev 4520) @@ -0,0 +1,58 @@ +# vim: ft=perl +# $Id: gnomevfs2,v 1.7 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-vfs'; +$version = '2.8.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gnome-vfs-cswpath.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomevfs2", + filename => "gnomevfs2", + name => "gnomevfs2 - GNOME Virtual File System", + dependencies => ['CSWcommon','CSWgnomemime2','CSWdtopfutils'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --enable-ipv6 --with-samba-includes=/opt/csw/include --with-samba-libs=/opt/csw/lib --with-openssl-includes=/opt/csw/include --with-openssl-libs=/opt/csw/lib || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +rmdir ${buildroot}/opt/csw/doc/ + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gnome-vfs-2.0/modules/*.la,bonobo/monikers/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:46:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:46:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4521] csw/mgar/pkg Message-ID: Revision: 4521 http://gar.svn.sourceforge.net/gar/?rev=4521&view=rev Author: dmichelsen Date: 2009-04-27 12:46:13 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gstreamer: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gstreamer/ csw/mgar/pkg/gstreamer/trunk/ csw/mgar/pkg/gstreamer/trunk/legacy/ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gstreamer/trunk/legacy/scripts/human.pl csw/mgar/pkg/gstreamer/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gstreamer/trunk/legacy/sources/ csw/mgar/pkg/gstreamer/trunk/legacy/specs/ csw/mgar/pkg/gstreamer/trunk/legacy/specs/Makefile csw/mgar/pkg/gstreamer/trunk/legacy/specs/gstreamer Added: csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:46:13 UTC (rev 4521) @@ -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/gstreamer/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/human.pl 2009-04-27 12:46:13 UTC (rev 4521) @@ -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 () { + 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 + +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 + +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/gstreamer/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:46:13 UTC (rev 4521) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gstreamer/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/specs/Makefile 2009-04-27 12:46:13 UTC (rev 4521) @@ -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/gstreamer/trunk/legacy/specs/gstreamer =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/specs/gstreamer (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/specs/gstreamer 2009-04-27 12:46:13 UTC (rev 4521) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: gstreamer,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gstreamer'; +$version = '0.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/~gstreamer/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - open source multimedia framework", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:46:29 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:46:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4522] csw/mgar/pkg Message-ID: Revision: 4522 http://gar.svn.sourceforge.net/gar/?rev=4522&view=rev Author: dmichelsen Date: 2009-04-27 12:46:29 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtk-engines: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtk-engines/ csw/mgar/pkg/gtk-engines/trunk/ csw/mgar/pkg/gtk-engines/trunk/legacy/ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtk-engines/trunk/legacy/sources/ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/Makefile csw/mgar/pkg/gtk-engines/trunk/legacy/specs/gtk-engines Added: csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:46:29 UTC (rev 4522) @@ -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/gtk-engines/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/human.pl 2009-04-27 12:46:29 UTC (rev 4522) @@ -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 () { + 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 + +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 + +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/gtk-engines/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:46:29 UTC (rev 4522) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtk-engines/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/Makefile 2009-04-27 12:46:29 UTC (rev 4522) @@ -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/gtk-engines/trunk/legacy/specs/gtk-engines =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/specs/gtk-engines (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/gtk-engines 2009-04-27 12:46:29 UTC (rev 4522) @@ -0,0 +1,49 @@ +# vim: ft=perl +# $Id: gtk-engines,v 1.5 2005/11/10 20:16:52 simigern Exp $ + +$progname = 'gtk-engines'; +$version = '2.6.5'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gtkengines", + filename => "gtk_engines", + name => "gtk_engines - A collection of basic theme engines for GTK+", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install +cd ${buildroot}/opt/csw/lib/gtk-2.0/ +mkdir engines +cd engines +ln -s ../2*/engines/* . || exit 1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:46:44 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:46:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4523] csw/mgar/pkg/gtk2/trunk Message-ID: Revision: 4523 http://gar.svn.sourceforge.net/gar/?rev=4523&view=rev Author: dmichelsen Date: 2009-04-27 12:46:44 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtk2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtk2/trunk/legacy/ csw/mgar/pkg/gtk2/trunk/legacy/scripts/ csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtk2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtk2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtk2/trunk/legacy/sources/ csw/mgar/pkg/gtk2/trunk/legacy/sources/gtk2.postinstall csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch csw/mgar/pkg/gtk2/trunk/legacy/specs/ csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile csw/mgar/pkg/gtk2/trunk/legacy/specs/gtk2 Added: csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:46:44 UTC (rev 4523) @@ -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/gtk2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/scripts/human.pl 2009-04-27 12:46:44 UTC (rev 4523) @@ -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 () { + 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 + +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 + +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/gtk2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:46:44 UTC (rev 4523) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtk2/trunk/legacy/sources/gtk2.postinstall =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/sources/gtk2.postinstall (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/sources/gtk2.postinstall 2009-04-27 12:46:44 UTC (rev 4523) @@ -0,0 +1,12 @@ +#!/bin/sh + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +echo 'Updating gdk-pixbuf.loaders...' +test -x ${PKG_ROOT_DIR}/opt/csw/bin/gdk-pixbuf-query-loaders && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/gdk-pixbuf-query-loaders >/opt/csw/etc/gtk-2.0/gdk-pixbuf.loaders +echo 'Updating gtk.immodules...' +test -x ${PKG_ROOT_DIR}/opt/csw/bin/gtk-query-immodules-2.0 && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/gtk-query-immodules-2.0 >/opt/csw/etc/gtk-2.0/gtk.immodules + +/bin/true Added: csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch 2009-04-27 12:46:44 UTC (rev 4523) @@ -0,0 +1,46 @@ +--- /dev/null 2004-06-25 18:29:26.000000000 +0200 ++++ xinerama.h 2002-04-06 07:55:15.000000000 +0200 +@@ -0,0 +1,43 @@ ++/****************************************************************** ++ ++ Copyright 1990, 1991, by Sun Microsystems, Inc. ++ ++Permission to use, copy, modify, distribute, and sell this software ++and its documentation for any purpose is hereby granted without fee, ++provided that the above copyright notice appear in all copies and ++that both that copyright notice and this permission notice appear ++in supporting documentation, and that the name of Sun Microsystems, Inc. ++not be used in advertising or publicity pertaining to distribution ++of the software without specific, written prior permission. ++Sun Microsystems, Inc. makes no representations about the suitability of ++this software for any purpose. It is provided "as is" without ++express or implied warranty. ++ ++Sun Microsystems Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS ++SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, ++IN NO EVENT SHALL Sun Microsystems, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT ++OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS ++OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE ++OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ++OR PERFORMANCE OF THIS SOFTWARE. ++ ++ Author: John McKernan (jmck at Sun.COM) ++ Sun Microsystems, Inc. ++******************************************************************/ ++ ++/* Xinerama header file */ ++ ++#ifndef _XINERAMA_H_ ++#define _XINERAMA_H_ ++ ++#define MAXFRAMEBUFFERS 16 ++#define XINERAMA_PLACE_TOP 1 ++#define XINERAMA_PLACE_BOTTOM 2 ++#define XINERAMA_PLACE_RIGHT 4 ++#define XINERAMA_PLACE_LEFT 8 ++ ++Bool XineramaGetState(Display*, int); ++Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*); ++Status XineramaGetCenterHint(Display*, int, int*, int*); ++ ++#endif /* _XINERAMA_H_ */ Added: csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile 2009-04-27 12:46:44 UTC (rev 4523) @@ -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/gtk2/trunk/legacy/specs/gtk2 =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/specs/gtk2 (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/specs/gtk2 2009-04-27 12:46:44 UTC (rev 4523) @@ -0,0 +1,50 @@ +# vim: ft=perl +# $Id: gtk2,v 1.9 2005/11/10 20:17:39 simigern Exp $ + +$progname = 'gtk+'; +$version = '2.8.4'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gtk.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['xinerama.h.patch', "${progname}-${version}", '-p0'], + ['gtk-xdg-data-dirs.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gtk2", + filename => "gtk2", + name => "gtk2 - GTK+, The GIMP Toolkit", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => "gtk2.postinstall" + }); + +$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 -DANSICPP -I${builddir}/${progname}-${version}" +export CPPFLAGS='-I/opt/csw/include -DANSICPP -I${builddir}/${progname}-${version}' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version} +mkdir -p X11/extensions +mv xinerama.h X11/extensions/ +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-xinput=yes +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/etc/gtk-2.0 +mkdir -p ${buildroot}/opt/csw/include/X11/extensions +cp X11/extensions/xinerama.h ${buildroot}/opt/csw/include/X11/extensions +chmod 644 ${buildroot}/opt/csw/include/X11/extensions/xinerama.h +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4525] csw/mgar/pkg Message-ID: Revision: 4525 http://gar.svn.sourceforge.net/gar/?rev=4525&view=rev Author: dmichelsen Date: 2009-04-27 12:47:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtkhtml31: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtkhtml31/ csw/mgar/pkg/gtkhtml31/trunk/ csw/mgar/pkg/gtkhtml31/trunk/legacy/ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/ csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/ csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/gtkhtml31 Added: csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:19 UTC (rev 4525) @@ -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/gtkhtml31/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/human.pl 2009-04-27 12:47:19 UTC (rev 4525) @@ -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 () { + 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 + +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 + +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/gtkhtml31/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:19 UTC (rev 4525) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch 2009-04-27 12:47:19 UTC (rev 4525) @@ -0,0 +1,11 @@ +--- src/htmlpainter.c.orig 2004-09-27 06:44:48.732978000 -0400 ++++ src/htmlpainter.c 2004-09-27 06:45:14.132915000 -0400 +@@ -663,7 +663,7 @@ + void + html_painter_set_widget (HTMLPainter *painter, GtkWidget *widget) + { +- return (* HP_CLASS (painter)->set_widget) (painter, widget); ++ (* HP_CLASS (painter)->set_widget) (painter, widget); + } + + HTMLTextPangoInfo * Added: csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile 2009-04-27 12:47:19 UTC (rev 4525) @@ -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/gtkhtml31/trunk/legacy/specs/gtkhtml31 =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/gtkhtml31 (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/gtkhtml31 2009-04-27 12:47:19 UTC (rev 4525) @@ -0,0 +1,59 @@ +# vim: ft=perl +# $Id: gtkhtml31,v 1.11 2005/04/13 15:17:12 simigern Exp $ + +$progname = 'gtkhtml'; +$version = '3.6.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gtkhtml/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gtkhtml32-htmlpainter.patch', "${progname}-${version}", '-p0']); + +$progname=$progname."31"; + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An HTML rendering/editing library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "gtkhtml-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 CPP='/usr/lib/cpp' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +cd gtkhtml-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +#export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gtkhtml/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4526] csw/mgar/pkg Message-ID: Revision: 4526 http://gar.svn.sourceforge.net/gar/?rev=4526&view=rev Author: dmichelsen Date: 2009-04-27 12:47:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- hdf5: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/hdf5/ csw/mgar/pkg/hdf5/trunk/ csw/mgar/pkg/hdf5/trunk/legacy/ csw/mgar/pkg/hdf5/trunk/legacy/scripts/ csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/hdf5/trunk/legacy/scripts/human.pl csw/mgar/pkg/hdf5/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/hdf5/trunk/legacy/sources/ csw/mgar/pkg/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch csw/mgar/pkg/hdf5/trunk/legacy/specs/ csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile csw/mgar/pkg/hdf5/trunk/legacy/specs/hdf5 Added: csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:35 UTC (rev 4526) @@ -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/hdf5/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/scripts/human.pl 2009-04-27 12:47:35 UTC (rev 4526) @@ -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 () { + 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 + +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 + +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/hdf5/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:35 UTC (rev 4526) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch 2009-04-27 12:47:35 UTC (rev 4526) @@ -0,0 +1,11 @@ +--- hdf5-1.6.6/fortran/src/H5f90i.h.orig Sat Dec 29 22:35:57 2007 ++++ hdf5-1.6.6/fortran/src/H5f90i.h Sat Dec 29 22:36:29 2007 +@@ -147,7 +147,7 @@ + #define _fcdtocp(desc) (desc) + #endif /* Cray X1 */ + +-#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) & !defined(__i386) ++#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) + + typedef char *_fcd; + typedef long long haddr_t_f; Added: csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile 2009-04-27 12:47:35 UTC (rev 4526) @@ -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/hdf5/trunk/legacy/specs/hdf5 =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/specs/hdf5 (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/specs/hdf5 2009-04-27 12:47:35 UTC (rev 4526) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: hdf5,v 1.1 2007-12-30 00:05:29 simigern Exp $ + +$progname = 'hdf5'; +$version = '1.6.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://hdf.ncsa.uiuc.edu/products/hdf5/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['hdf5-sun-i386.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - HDF5 (Hierarchical Data Format 5) Software Library and Utilities", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --docdir=/opt/csw/share/doc +gmake || exit 1 +gmake DESTDIR=${buildroot} prefix=${buildroot}/opt/csw/ install +mkdir ${buildroot}/opt/csw/share +mv ${buildroot}/opt/csw/doc ${buildroot}/opt/csw/share/doc +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4524] csw/mgar/pkg Message-ID: Revision: 4524 http://gar.svn.sourceforge.net/gar/?rev=4524&view=rev Author: dmichelsen Date: 2009-04-27 12:47:02 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtkhtml: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtkhtml/ csw/mgar/pkg/gtkhtml/trunk/ csw/mgar/pkg/gtkhtml/trunk/legacy/ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtkhtml/trunk/legacy/sources/ csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-void.patch csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml32-htmlpainter.patch csw/mgar/pkg/gtkhtml/trunk/legacy/sources/orbit-idl-2.fix.patch csw/mgar/pkg/gtkhtml/trunk/legacy/specs/ csw/mgar/pkg/gtkhtml/trunk/legacy/specs/Makefile csw/mgar/pkg/gtkhtml/trunk/legacy/specs/gtkhtml Added: csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:02 UTC (rev 4524) @@ -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/gtkhtml/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/human.pl 2009-04-27 12:47:02 UTC (rev 4524) @@ -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 () { + 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 + +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 + +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/gtkhtml/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:02 UTC (rev 4524) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch 2009-04-27 12:47:02 UTC (rev 4524) @@ -0,0 +1,2334 @@ +diff -urN components/html-editor.old/Editor-common.c components/html-editor/Editor-common.c +--- components/html-editor.old/Editor-common.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor-common.c 2004-03-06 23:22:34.899004000 +0100 +@@ -0,0 +1,307 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#define ORBIT_IDL_C_COMMON ++#define Editor_COMMON ++#include "Editor.h" ++static const CORBA_unsigned_long ORBit_zero_int = 0; ++#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0 == 'E') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_1 == 'd') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_2 == 'i') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_3 == 't') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_4 == 'o') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_5 == 'r') \ ++) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_Listener) ++#define TC_DEF_TC_GNOME_GtkHTML_Editor_Listener 1 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Listener_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_objref, ++ 0, ++ 0, ++ 4, ++ 0, ++ 0 ++ , ++ NULL, ++ CORBA_OBJECT_NIL, ++ "Listener", ++ "IDL:GNOME/GtkHTML/Editor/Listener:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0 == 'E') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_1 == 'd') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_2 == 'i') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_3 == 't') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_4 == 'o') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_5 == 'r') \ ++) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_Engine) ++#define TC_DEF_TC_GNOME_GtkHTML_Editor_Engine 1 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Engine_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_objref, ++ 0, ++ 0, ++ 4, ++ 0, ++ 0 ++ , ++ NULL, ++ CORBA_OBJECT_NIL, ++ "Engine", ++ "IDL:GNOME/GtkHTML/Editor/Engine:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0 == 'E') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_1 == 'd') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_2 == 'i') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_3 == 't') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_4 == 'o') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_5 == 'r') \ ++) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_URLRequestEvent) ++#define TC_DEF_TC_GNOME_GtkHTML_Editor_URLRequestEvent 1 ++static const char *anon_subnames_array6[] = {"url", "stream"}; ++static const CORBA_TypeCode anon_subtypes_array7[] = {(CORBA_TypeCode) & TC_CORBA_string_struct, (CORBA_TypeCode) & TC_Bonobo_Stream_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_struct, ++ 0, ++ 0, ++ 4, ++ 0, ++ 2 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array7, ++ CORBA_OBJECT_NIL, ++ "URLRequestEvent", ++ "IDL:GNOME/GtkHTML/Editor/URLRequestEvent:1.0", ++ (char **) anon_subnames_array6, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#ifndef ORBIT_IDL_C_IMODULE_Editor ++CORBA_unsigned_long GNOME_GtkHTML_Editor_Listener__classid = 0; ++#endif ++#ifndef ORBIT_IDL_C_IMODULE_Editor ++CORBA_unsigned_long GNOME_GtkHTML_Editor_Engine__classid = 0; ++#endif ++/* Interface type data */ ++static ORBit_IArg GNOME_GtkHTML_Editor_Listener_event__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "name"}, ++ {TC_CORBA_any, ORBit_I_ARG_IN, "arg"} ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IMethod GNOME_GtkHTML_Editor_Listener__imethods[] = { ++ { ++ {2, 2, GNOME_GtkHTML_Editor_Listener_event__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_any, "event", 5, ++ 0 ++ } ++}; ++static CORBA_string GNOME_GtkHTML_Editor_Listener__base_itypes[] = { ++ "IDL:Bonobo/Unknown:1.0", ++ "IDL:omg.org/CORBA/Object:1.0" ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IInterface GNOME_GtkHTML_Editor_Listener__iinterface = { ++ TC_GNOME_GtkHTML_Editor_Listener, {1, 1, GNOME_GtkHTML_Editor_Listener__imethods, FALSE}, ++ {2, 2, GNOME_GtkHTML_Editor_Listener__base_itypes, FALSE} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine__set_listener__arginfo[] = { ++ {TC_GNOME_GtkHTML_Editor_Listener, ORBit_I_ARG_IN, "value"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_runCommand__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "command"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_getParagraphData__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_setParagraphData__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "value"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_setObjectDataByType__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "type_name"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "data"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_searchByData__arginfo[] = { ++ {TC_CORBA_long, ORBit_I_ARG_IN | ORBit_I_COMMON_FIXED_SIZE, "level"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "klass"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "value"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_insertHTML__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "html"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_undoBegin__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "undo_name"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "redo_name"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_ignoreWord__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "word"} ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IMethod GNOME_GtkHTML_Editor_Engine__imethods[] = { ++ { ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_GNOME_GtkHTML_Editor_Listener, "_get_listener", 13, ++ 0 ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine__set_listener__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "_set_listener", 13, ++ 0 ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_runCommand__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "runCommand", 10, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_getParagraphData__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_string, "getParagraphData", 16, ++ 0 ++ } ++ ,{ ++ {2, 2, GNOME_GtkHTML_Editor_Engine_setParagraphData__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "setParagraphData", 16, ++ 0 ++ } ++ ,{ ++ {3, 3, GNOME_GtkHTML_Editor_Engine_setObjectDataByType__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "setObjectDataByType", 19, ++ 0 ++ } ++ ,{ ++ {4, 4, GNOME_GtkHTML_Editor_Engine_searchByData__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "searchByData", 12, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "isParagraphEmpty", 16, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "isPreviousParagraphEmpty", 24, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_insertHTML__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "insertHTML", 10, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "freeze", 6, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "thaw", 4, ++ 0 ++ } ++ ,{ ++ {2, 2, GNOME_GtkHTML_Editor_Engine_undoBegin__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "undoBegin", 9, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "undoEnd", 7, ++ 0 ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_ignoreWord__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "ignoreWord", 10, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "dropUndo", 8, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "hasUndo", 7, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++}; ++static CORBA_string GNOME_GtkHTML_Editor_Engine__base_itypes[] = { ++ "IDL:Bonobo/Unknown:1.0", ++ "IDL:omg.org/CORBA/Object:1.0" ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IInterface GNOME_GtkHTML_Editor_Engine__iinterface = { ++ TC_GNOME_GtkHTML_Editor_Engine, {17, 17, GNOME_GtkHTML_Editor_Engine__imethods, FALSE}, ++ {2, 2, GNOME_GtkHTML_Editor_Engine__base_itypes, FALSE} ++}; +diff -urN components/html-editor.old/Editor-skels.c components/html-editor/Editor-skels.c +--- components/html-editor.old/Editor-skels.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor-skels.c 2004-03-06 23:22:34.869434000 +0100 +@@ -0,0 +1,426 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#include "Editor.h" ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event(POA_GNOME_GtkHTML_Editor_Listener * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_any * (*_impl_event) (PortableServer_Servant _servant, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev)) ++{ ++ *(CORBA_any * *) _o_retval = _impl_event(_o_servant, *(const CORBA_char * *) _o_args[0], (const CORBA_any *) _o_args[1], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ GNOME_GtkHTML_Editor_Listener(*_impl__get_listener) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(GNOME_GtkHTML_Editor_Listener *) _o_retval = _impl__get_listener(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl__set_listener) (PortableServer_Servant _servant, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev)) ++{ ++ _impl__set_listener(_o_servant, *(const GNOME_GtkHTML_Editor_Listener *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_runCommand) (PortableServer_Servant _servant, const CORBA_char * command, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_runCommand(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_string(*_impl_getParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, CORBA_Environment * ev)) ++{ ++ *(CORBA_string *) _o_retval = _impl_getParagraphData(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_setParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)) ++{ ++ _impl_setParagraphData(_o_servant, *(const CORBA_char * *) _o_args[0], *(const CORBA_char * *) _o_args[1], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_setObjectDataByType) (PortableServer_Servant _servant, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev)) ++{ ++ _impl_setObjectDataByType(_o_servant, *(const CORBA_char * *) _o_args[0], *(const CORBA_char * *) _o_args[1], *(const CORBA_char * *) _o_args[2], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_searchByData) (PortableServer_Servant _servant, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_searchByData(_o_servant, *(const CORBA_long *) _o_args[0], *(const CORBA_char * *) _o_args[1], *(const CORBA_char * *) _o_args[2], *(const CORBA_char * *) _o_args[3], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_isParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_isParagraphEmpty(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_isPreviousParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_isPreviousParagraphEmpty(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_insertHTML) (PortableServer_Servant _servant, const CORBA_char * html, CORBA_Environment * ev)) ++{ ++ _impl_insertHTML(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_freeze) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_freeze(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++void (*_impl_thaw) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_thaw(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_undoBegin) (PortableServer_Servant _servant, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev)) ++{ ++ _impl_undoBegin(_o_servant, *(const CORBA_char * *) _o_args[0], *(const CORBA_char * *) _o_args[1], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_undoEnd) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_undoEnd(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_ignoreWord) (PortableServer_Servant _servant, const CORBA_char * word, CORBA_Environment * ev)) ++{ ++ _impl_ignoreWord(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_dropUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_dropUndo(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_hasUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_hasUndo(_o_servant, _o_ev); ++} ++static ORBitSmallSkeleton ++get_skel_small_GNOME_GtkHTML_Editor_Listener(POA_GNOME_GtkHTML_Editor_Listener * servant, ++ const char *opname, gpointer * m_data, gpointer * impl) ++{ ++ switch (opname[0]) { ++ case 'e': ++ if (strcmp((opname + 1), "vent")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Listener_epv->event; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Listener__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event; ++ break; ++ case 'q': ++ if (strcmp((opname + 1), "ueryInterface")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->queryInterface; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[2]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_queryInterface; ++ break; ++ case 'r': ++ if (strcmp((opname + 1), "ef")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->ref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_ref; ++ break; ++ case 'u': ++ if (strcmp((opname + 1), "nref")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->unref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[1]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_unref; ++ break; ++ default: ++ break; ++ } ++ return NULL; ++} ++void ++POA_GNOME_GtkHTML_Editor_Listener__init(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ static PortableServer_ClassInfo class_info = {NULL, (ORBit_small_impl_finder) & get_skel_small_GNOME_GtkHTML_Editor_Listener, "IDL:GNOME/GtkHTML/Editor/Listener:1.0", &GNOME_GtkHTML_Editor_Listener__classid, NULL, &GNOME_GtkHTML_Editor_Listener__iinterface}; ++ POA_GNOME_GtkHTML_Editor_Listener__vepv *fakevepv = NULL; ++ if (((PortableServer_ServantBase *) servant)->vepv[0]->finalize == 0) { ++ ((PortableServer_ServantBase *) servant)->vepv[0]->finalize = POA_GNOME_GtkHTML_Editor_Listener__fini; ++ } ++ PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env); ++ POA_Bonobo_Unknown__init(servant, env); ++ ORBit_classinfo_register(&class_info); ++ ORBIT_SERVANT_SET_CLASSINFO(servant, &class_info); ++ if (!class_info.vepvmap) { ++ class_info.vepvmap = g_new0(ORBit_VepvIdx, GNOME_GtkHTML_Editor_Listener__classid + 1); ++ class_info.vepvmap[Bonobo_Unknown__classid] = (((char *) &(fakevepv->Bonobo_Unknown_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ class_info.vepvmap[GNOME_GtkHTML_Editor_Listener__classid] = (((char *) &(fakevepv->GNOME_GtkHTML_Editor_Listener_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ } ++} ++void ++POA_GNOME_GtkHTML_Editor_Listener__fini(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ POA_Bonobo_Unknown__fini(servant, env); ++ PortableServer_ServantBase__fini(servant, env); ++} ++static ORBitSmallSkeleton ++get_skel_small_GNOME_GtkHTML_Editor_Engine(POA_GNOME_GtkHTML_Editor_Engine * servant, ++ const char *opname, gpointer * m_data, gpointer * impl) ++{ ++ switch (opname[0]) { ++ case '_': ++ switch (opname[1]) { ++ case 'g': ++ if (strcmp((opname + 2), "et_listener")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->_get_listener; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener; ++ break; ++ case 's': ++ if (strcmp((opname + 2), "et_listener")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->_set_listener; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[1]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener; ++ break; ++ default: ++ break; ++ } ++ break; ++ case 'd': ++ if (strcmp((opname + 1), "ropUndo")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->dropUndo; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[15]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo; ++ break; ++ case 'f': ++ if (strcmp((opname + 1), "reeze")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->freeze; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[10]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze; ++ break; ++ case 'g': ++ if (strcmp((opname + 1), "etParagraphData")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->getParagraphData; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[3]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData; ++ break; ++ case 'h': ++ if (strcmp((opname + 1), "asUndo")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->hasUndo; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[16]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo; ++ break; ++ case 'i': ++ switch (opname[1]) { ++ case 'g': ++ if (strcmp((opname + 2), "noreWord")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->ignoreWord; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[14]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord; ++ break; ++ case 'n': ++ if (strcmp((opname + 2), "sertHTML")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->insertHTML; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[9]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML; ++ break; ++ case 's': ++ switch (opname[2]) { ++ case 'P': ++ switch (opname[3]) { ++ case 'a': ++ if (strcmp((opname + 4), "ragraphEmpty")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->isParagraphEmpty; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[7]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty; ++ break; ++ case 'r': ++ if (strcmp((opname + 4), "eviousParagraphEmpty")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->isPreviousParagraphEmpty; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[8]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ case 'q': ++ if (strcmp((opname + 1), "ueryInterface")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->queryInterface; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[2]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_queryInterface; ++ break; ++ case 'r': ++ switch (opname[1]) { ++ case 'e': ++ if (strcmp((opname + 2), "f")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->ref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_ref; ++ break; ++ case 'u': ++ if (strcmp((opname + 2), "nCommand")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->runCommand; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[2]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand; ++ break; ++ default: ++ break; ++ } ++ break; ++ case 's': ++ switch (opname[1]) { ++ case 'e': ++ switch (opname[2]) { ++ case 'a': ++ if (strcmp((opname + 3), "rchByData")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->searchByData; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[6]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData; ++ break; ++ case 't': ++ switch (opname[3]) { ++ case 'O': ++ if (strcmp((opname + 4), "bjectDataByType")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->setObjectDataByType; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[5]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType; ++ break; ++ case 'P': ++ if (strcmp((opname + 4), "aragraphData")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->setParagraphData; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[4]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ case 't': ++ if (strcmp((opname + 1), "haw")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->thaw; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[11]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw; ++ break; ++ case 'u': ++ switch (opname[1]) { ++ case 'n': ++ switch (opname[2]) { ++ case 'd': ++ switch (opname[3]) { ++ case 'o': ++ switch (opname[4]) { ++ case 'B': ++ if (strcmp((opname + 5), "egin")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->undoBegin; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[12]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin; ++ break; ++ case 'E': ++ if (strcmp((opname + 5), "nd")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->undoEnd; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[13]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ case 'r': ++ if (strcmp((opname + 3), "ef")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->unref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[1]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_unref; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ return NULL; ++} ++void ++POA_GNOME_GtkHTML_Editor_Engine__init(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ static PortableServer_ClassInfo class_info = {NULL, (ORBit_small_impl_finder) & get_skel_small_GNOME_GtkHTML_Editor_Engine, "IDL:GNOME/GtkHTML/Editor/Engine:1.0", &GNOME_GtkHTML_Editor_Engine__classid, NULL, &GNOME_GtkHTML_Editor_Engine__iinterface}; ++ POA_GNOME_GtkHTML_Editor_Engine__vepv *fakevepv = NULL; ++ if (((PortableServer_ServantBase *) servant)->vepv[0]->finalize == 0) { ++ ((PortableServer_ServantBase *) servant)->vepv[0]->finalize = POA_GNOME_GtkHTML_Editor_Engine__fini; ++ } ++ PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env); ++ POA_Bonobo_Unknown__init(servant, env); ++ ORBit_classinfo_register(&class_info); ++ ORBIT_SERVANT_SET_CLASSINFO(servant, &class_info); ++ if (!class_info.vepvmap) { ++ class_info.vepvmap = g_new0(ORBit_VepvIdx, GNOME_GtkHTML_Editor_Engine__classid + 1); ++ class_info.vepvmap[Bonobo_Unknown__classid] = (((char *) &(fakevepv->Bonobo_Unknown_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ class_info.vepvmap[GNOME_GtkHTML_Editor_Engine__classid] = (((char *) &(fakevepv->GNOME_GtkHTML_Editor_Engine_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ } ++} ++void ++POA_GNOME_GtkHTML_Editor_Engine__fini(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ POA_Bonobo_Unknown__fini(servant, env); ++ PortableServer_ServantBase__fini(servant, env); ++} +diff -urN components/html-editor.old/Editor-stubs.c components/html-editor/Editor-stubs.c +--- components/html-editor.old/Editor-stubs.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor-stubs.c 2004-03-06 23:22:34.821504000 +0100 +@@ -0,0 +1,294 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#include "Editor.h" ++CORBA_any * ++GNOME_GtkHTML_Editor_Listener_event(GNOME_GtkHTML_Editor_Listener _obj, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev) ++{ ++ CORBA_any *_ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Listener__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Listener__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Listener__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Listener__classid))->event) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->event(ORBIT_STUB_GetServant(_obj), name, arg, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & name, (gpointer) arg}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Listener__iinterface.methods, 0, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++GNOME_GtkHTML_Editor_Listener ++GNOME_GtkHTML_Editor_Engine__get_listener(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ GNOME_GtkHTML_Editor_Listener _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->_get_listener) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->_get_listener(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 0, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++void ++GNOME_GtkHTML_Editor_Engine__set_listener(GNOME_GtkHTML_Editor_Engine _obj, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->_set_listener) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->_set_listener(ORBIT_STUB_GetServant(_obj), value, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & value}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 1, NULL, _args, NULL, ev); ++ } ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_runCommand(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * command, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->runCommand) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->runCommand(ORBIT_STUB_GetServant(_obj), command, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & command}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 2, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++CORBA_string ++GNOME_GtkHTML_Editor_Engine_getParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, CORBA_Environment * ev) ++{ ++ CORBA_string _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->getParagraphData) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->getParagraphData(ORBIT_STUB_GetServant(_obj), key, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & key}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 3, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++void ++GNOME_GtkHTML_Editor_Engine_setParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->setParagraphData) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->setParagraphData(ORBIT_STUB_GetServant(_obj), key, value, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & key, (gpointer) & value}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 4, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_setObjectDataByType(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->setObjectDataByType) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->setObjectDataByType(ORBIT_STUB_GetServant(_obj), type_name, key, data, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & type_name, (gpointer) & key, (gpointer) & data}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 5, NULL, _args, NULL, ev); ++ } ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_searchByData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->searchByData) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->searchByData(ORBIT_STUB_GetServant(_obj), level, klass, key, value, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & level, (gpointer) & klass, (gpointer) & key, (gpointer) & value}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 6, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->isParagraphEmpty) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->isParagraphEmpty(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 7, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->isPreviousParagraphEmpty) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->isPreviousParagraphEmpty(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 8, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++void ++GNOME_GtkHTML_Editor_Engine_insertHTML(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * html, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->insertHTML) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->insertHTML(ORBIT_STUB_GetServant(_obj), html, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & html}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 9, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_freeze(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->freeze) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->freeze(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 10, NULL, NULL, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_thaw(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->thaw) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->thaw(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 11, NULL, NULL, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_undoBegin(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->undoBegin) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->undoBegin(ORBIT_STUB_GetServant(_obj), undo_name, redo_name, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & undo_name, (gpointer) & redo_name}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 12, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_undoEnd(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->undoEnd) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->undoEnd(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 13, NULL, NULL, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_ignoreWord(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * word, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->ignoreWord) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->ignoreWord(ORBIT_STUB_GetServant(_obj), word, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & word}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 14, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_dropUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->dropUndo) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->dropUndo(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 15, NULL, NULL, NULL, ev); ++ } ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_hasUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->hasUndo) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->hasUndo(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 16, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} +diff -urN components/html-editor.old/Editor.h components/html-editor/Editor.h +--- components/html-editor.old/Editor.h 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor.h 2004-03-06 23:22:34.941372000 +0100 +@@ -0,0 +1,223 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#ifndef Editor_H ++#define Editor_H 1 ++#include ++#define ORBIT_IDL_SERIAL 19 ++#include ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ /** typedefs **/ ++#include ++#if !defined(ORBIT_DECL_GNOME_GtkHTML_Editor_Listener) && !defined(_GNOME_GtkHTML_Editor_Listener_defined) ++#define ORBIT_DECL_GNOME_GtkHTML_Editor_Listener 1 ++#define _GNOME_GtkHTML_Editor_Listener_defined 1 ++#define GNOME_GtkHTML_Editor_Listener__freekids CORBA_Object__freekids ++ typedef CORBA_Object GNOME_GtkHTML_Editor_Listener; ++ extern CORBA_unsigned_long GNOME_GtkHTML_Editor_Listener__classid; ++#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0) ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0 'E' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_1 'd' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_2 'i' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_3 't' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_4 'o' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_5 'r' ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Listener_struct; ++#define TC_GNOME_GtkHTML_Editor_Listener ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_Listener_struct) ++#endif ++#endif ++#if !defined(ORBIT_DECL_GNOME_GtkHTML_Editor_Engine) && !defined(_GNOME_GtkHTML_Editor_Engine_defined) ++#define ORBIT_DECL_GNOME_GtkHTML_Editor_Engine 1 ++#define _GNOME_GtkHTML_Editor_Engine_defined 1 ++#define GNOME_GtkHTML_Editor_Engine__freekids CORBA_Object__freekids ++ typedef CORBA_Object GNOME_GtkHTML_Editor_Engine; ++ extern CORBA_unsigned_long GNOME_GtkHTML_Editor_Engine__classid; ++#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0) ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0 'E' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_1 'd' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_2 'i' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_3 't' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_4 'o' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_5 'r' ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Engine_struct; ++#define TC_GNOME_GtkHTML_Editor_Engine ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_Engine_struct) ++#endif ++#endif ++#if !defined(_GNOME_GtkHTML_Editor_URLRequestEvent_defined) ++#define _GNOME_GtkHTML_Editor_URLRequestEvent_defined 1 ++ typedef struct GNOME_GtkHTML_Editor_URLRequestEvent_type GNOME_GtkHTML_Editor_URLRequestEvent; ++ struct GNOME_GtkHTML_Editor_URLRequestEvent_type { ++ CORBA_string url; ++ Bonobo_Stream stream; ++ }; ++#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0) ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0 'E' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_1 'd' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_2 'i' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_3 't' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_4 'o' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_5 'r' ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct; ++#define TC_GNOME_GtkHTML_Editor_URLRequestEvent ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct) ++#endif ++#define GNOME_GtkHTML_Editor_URLRequestEvent__alloc() ((GNOME_GtkHTML_Editor_URLRequestEvent *)ORBit_small_alloc (TC_GNOME_GtkHTML_Editor_URLRequestEvent)) ++#define GNOME_GtkHTML_Editor_URLRequestEvent__freekids(m,d) ORBit_small_freekids (TC_GNOME_GtkHTML_Editor_URLRequestEvent,(m),(d)) ++#endif ++ /** POA structures **/ ++#ifndef _defined_POA_GNOME_GtkHTML_Editor_Listener ++#define _defined_POA_GNOME_GtkHTML_Editor_Listener 1 ++ typedef struct { ++ void *_private; ++ CORBA_any *(*event) (PortableServer_Servant _servant, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev); ++ } POA_GNOME_GtkHTML_Editor_Listener__epv; ++ typedef struct { ++ PortableServer_ServantBase__epv *_base_epv; ++ POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv; ++ POA_GNOME_GtkHTML_Editor_Listener__epv *GNOME_GtkHTML_Editor_Listener_epv; ++ } POA_GNOME_GtkHTML_Editor_Listener__vepv; ++ typedef struct { ++ void *_private; ++ POA_GNOME_GtkHTML_Editor_Listener__vepv *vepv; ++ } POA_GNOME_GtkHTML_Editor_Listener; ++ extern void POA_GNOME_GtkHTML_Editor_Listener__init(PortableServer_Servant servant, CORBA_Environment * ev); ++ extern void POA_GNOME_GtkHTML_Editor_Listener__fini(PortableServer_Servant servant, CORBA_Environment * ev); ++#endif /* _defined_POA_GNOME_GtkHTML_Editor_Listener */ ++#ifndef _defined_POA_GNOME_GtkHTML_Editor_Engine ++#define _defined_POA_GNOME_GtkHTML_Editor_Engine 1 ++ typedef struct { ++ void *_private; ++ GNOME_GtkHTML_Editor_Listener(*_get_listener) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*_set_listener) (PortableServer_Servant _servant, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev); ++ CORBA_boolean(*runCommand) (PortableServer_Servant _servant, const CORBA_char * command, CORBA_Environment * ev); ++ CORBA_string(*getParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, CORBA_Environment * ev); ++ void (*setParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ void (*setObjectDataByType) (PortableServer_Servant _servant, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev); ++ CORBA_boolean(*searchByData) (PortableServer_Servant _servant, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ CORBA_boolean(*isParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ CORBA_boolean(*isPreviousParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*insertHTML) (PortableServer_Servant _servant, const CORBA_char * html, CORBA_Environment * ev); ++ void (*freeze) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*thaw) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*undoBegin) (PortableServer_Servant _servant, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev); ++ void (*undoEnd) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*ignoreWord) (PortableServer_Servant _servant, const CORBA_char * word, CORBA_Environment * ev); ++ void (*dropUndo) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ CORBA_boolean(*hasUndo) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ } POA_GNOME_GtkHTML_Editor_Engine__epv; ++ typedef struct { ++ PortableServer_ServantBase__epv *_base_epv; ++ POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *GNOME_GtkHTML_Editor_Engine_epv; ++ } POA_GNOME_GtkHTML_Editor_Engine__vepv; ++ typedef struct { ++ void *_private; ++ POA_GNOME_GtkHTML_Editor_Engine__vepv *vepv; ++ } POA_GNOME_GtkHTML_Editor_Engine; ++ extern void POA_GNOME_GtkHTML_Editor_Engine__init(PortableServer_Servant servant, CORBA_Environment * ev); ++ extern void POA_GNOME_GtkHTML_Editor_Engine__fini(PortableServer_Servant servant, CORBA_Environment * ev); ++#endif /* _defined_POA_GNOME_GtkHTML_Editor_Engine */ ++ /** skel prototypes **/ ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event(POA_GNOME_GtkHTML_Editor_Listener * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_any * (*_impl_event) (PortableServer_Servant _servant, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, GNOME_GtkHTML_Editor_Listener(*_impl__get_listener) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl__set_listener) (PortableServer_Servant _servant, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_runCommand) (PortableServer_Servant _servant, const CORBA_char * command, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_string(*_impl_getParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_setParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_setObjectDataByType) (PortableServer_Servant _servant, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_searchByData) (PortableServer_Servant _servant, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_isParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_isPreviousParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_insertHTML) (PortableServer_Servant _servant, const CORBA_char * html, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_freeze) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_thaw) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_undoBegin) (PortableServer_Servant _servant, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_undoEnd) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_ignoreWord) (PortableServer_Servant _servant, const CORBA_char * word, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_dropUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_hasUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ /** stub prototypes **/ ++#define GNOME_GtkHTML_Editor_Listener_ref Bonobo_Unknown_ref ++#define GNOME_GtkHTML_Editor_Listener_unref Bonobo_Unknown_unref ++#define GNOME_GtkHTML_Editor_Listener_queryInterface Bonobo_Unknown_queryInterface ++ CORBA_any *GNOME_GtkHTML_Editor_Listener_event(GNOME_GtkHTML_Editor_Listener _obj, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev); ++#define GNOME_GtkHTML_Editor_Engine_ref Bonobo_Unknown_ref ++#define GNOME_GtkHTML_Editor_Engine_unref Bonobo_Unknown_unref ++#define GNOME_GtkHTML_Editor_Engine_queryInterface Bonobo_Unknown_queryInterface ++ GNOME_GtkHTML_Editor_Listener GNOME_GtkHTML_Editor_Engine__get_listener(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine__set_listener(GNOME_GtkHTML_Editor_Engine _obj, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_runCommand(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * command, CORBA_Environment * ev); ++ CORBA_string GNOME_GtkHTML_Editor_Engine_getParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_setParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_setObjectDataByType(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_searchByData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_insertHTML(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * html, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_freeze(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_thaw(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_undoBegin(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_undoEnd(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_ignoreWord(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * word, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_dropUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_hasUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ /** more internals **/ ++#if !defined(MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_0) ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_0 'E' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_1 'd' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_2 'i' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_3 't' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_4 'o' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_5 'r' ++#endif ++#include ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IInterface GNOME_GtkHTML_Editor_Listener__iinterface; ++#define GNOME_GtkHTML_Editor_Listener_IMETHODS_LEN 1 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IMethod GNOME_GtkHTML_Editor_Listener__imethods[GNOME_GtkHTML_Editor_Listener_IMETHODS_LEN]; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IInterface GNOME_GtkHTML_Editor_Engine__iinterface; ++#define GNOME_GtkHTML_Editor_Engine_IMETHODS_LEN 17 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IMethod GNOME_GtkHTML_Editor_Engine__imethods[GNOME_GtkHTML_Editor_Engine_IMETHODS_LEN]; ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++#ifndef EXCLUDE_ORBIT_H ++#include ++#endif /* EXCLUDE_ORBIT_H */ ++#endif ++#undef ORBIT_IDL_SERIAL +diff -urN components/html-editor.old/Spell-common.c components/html-editor/Spell-common.c +--- components/html-editor.old/Spell-common.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Spell-common.c 2004-03-06 23:23:57.080627000 +0100 +@@ -0,0 +1,399 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#define ORBIT_IDL_C_COMMON ++#define Spell_COMMON ++#include "Spell.h" ++static const CORBA_unsigned_long ORBit_zero_int = 0; ++#if ( (TC_IMPL_TC_CORBA_sequence_CORBA_string_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_CORBA_string) ++#define TC_DEF_TC_CORBA_sequence_CORBA_string 1 ++static const CORBA_TypeCode anon_subtypes_array1[] = {(CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_CORBA_string_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array1, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_CORBA_sequence_CORBA_string_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_CORBA_string) ++#define TC_DEF_TC_CORBA_sequence_CORBA_string 1 ++static const CORBA_TypeCode anon_subtypes_array8[] = {(CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_CORBA_string_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array8, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_StringSeq_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_StringSeq) ++#define TC_DEF_TC_GNOME_Spell_StringSeq 1 ++static const CORBA_TypeCode anon_subtypes_array11[] = {(CORBA_TypeCode) & TC_CORBA_sequence_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_StringSeq_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_alias, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array11, ++ CORBA_OBJECT_NIL, ++ "StringSeq", ++ "IDL:GNOME/Spell/StringSeq:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_Language_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_Language) ++#define TC_DEF_TC_GNOME_Spell_Language 1 ++static const char *anon_subnames_array13[] = {"name", "abbreviation"}; ++static const CORBA_TypeCode anon_subtypes_array14[] = {(CORBA_TypeCode) & TC_CORBA_string_struct, (CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_Language_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_struct, ++ 0, ++ 0, ++ 4, ++ 0, ++ 2 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array14, ++ CORBA_OBJECT_NIL, ++ "Language", ++ "IDL:GNOME/Spell/Language:1.0", ++ (char **) anon_subnames_array13, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language) ++#define TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language 1 ++static const CORBA_TypeCode anon_subtypes_array17[] = {(CORBA_TypeCode) & TC_GNOME_Spell_Language_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_GNOME_Spell_Language_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array17, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language) ++#define TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language 1 ++static const CORBA_TypeCode anon_subtypes_array24[] = {(CORBA_TypeCode) & TC_GNOME_Spell_Language_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_GNOME_Spell_Language_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array24, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_LanguageSeq_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_LanguageSeq) ++#define TC_DEF_TC_GNOME_Spell_LanguageSeq 1 ++static const CORBA_TypeCode anon_subtypes_array27[] = {(CORBA_TypeCode) & TC_CORBA_sequence_GNOME_Spell_Language_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_LanguageSeq_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_alias, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array27, ++ CORBA_OBJECT_NIL, ++ "LanguageSeq", ++ "IDL:GNOME/Spell/LanguageSeq:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_Dictionary_Error) ++#define TC_DEF_TC_GNOME_Spell_Dictionary_Error 1 ++static const char *anon_subnames_array29[] = {"error"}; ++static const CORBA_TypeCode anon_subtypes_array30[] = {(CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_Dictionary_Error_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_except, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4527] csw/mgar/pkg/hicolor-icon-theme/trunk Message-ID: Revision: 4527 http://gar.svn.sourceforge.net/gar/?rev=4527&view=rev Author: dmichelsen Date: 2009-04-27 12:47:49 +0000 (Mon, 27 Apr 2009) Log Message: ----------- hicolor-icon-theme: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/human.pl csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/sources/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/Makefile csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme Added: csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:49 UTC (rev 4527) @@ -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/hicolor-icon-theme/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/human.pl 2009-04-27 12:47:49 UTC (rev 4527) @@ -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 () { + 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 + +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 + +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/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:49 UTC (rev 4527) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/hicolor-icon-theme/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/Makefile 2009-04-27 12:47:49 UTC (rev 4527) @@ -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/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme 2009-04-27 12:47:49 UTC (rev 4527) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: hicolor-icon-theme,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'hicolor-icon-theme'; +$version = '0.5'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/icon-theme/releases/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "hicoloricontheme", + filename => "hicolor_icon_theme", + name => "hicolor_icon_theme - freedesktop.org base icon theme", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$arch="all"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4528] csw/mgar/pkg/intltool/trunk Message-ID: Revision: 4528 http://gar.svn.sourceforge.net/gar/?rev=4528&view=rev Author: dmichelsen Date: 2009-04-27 12:48:03 +0000 (Mon, 27 Apr 2009) Log Message: ----------- intltool: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/intltool/trunk/legacy/ csw/mgar/pkg/intltool/trunk/legacy/scripts/ csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/intltool/trunk/legacy/scripts/human.pl csw/mgar/pkg/intltool/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/intltool/trunk/legacy/sources/ csw/mgar/pkg/intltool/trunk/legacy/specs/ csw/mgar/pkg/intltool/trunk/legacy/specs/Makefile csw/mgar/pkg/intltool/trunk/legacy/specs/intltool Added: csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:03 UTC (rev 4528) @@ -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/intltool/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/scripts/human.pl 2009-04-27 12:48:03 UTC (rev 4528) @@ -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 () { + 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 + +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 + +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/intltool/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:03 UTC (rev 4528) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/intltool/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/specs/Makefile 2009-04-27 12:48:03 UTC (rev 4528) @@ -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/intltool/trunk/legacy/specs/intltool =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/specs/intltool (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/specs/intltool 2009-04-27 12:48:03 UTC (rev 4528) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: intltool,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'intltool'; +$version = '0.30'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/gnome/sources/intltool/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A collection of tools for internationalization", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:20 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4529] csw/mgar/pkg Message-ID: Revision: 4529 http://gar.svn.sourceforge.net/gar/?rev=4529&view=rev Author: dmichelsen Date: 2009-04-27 12:48:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- iperf: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/iperf/ csw/mgar/pkg/iperf/trunk/ csw/mgar/pkg/iperf/trunk/legacy/ csw/mgar/pkg/iperf/trunk/legacy/scripts/ csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/iperf/trunk/legacy/scripts/human.pl csw/mgar/pkg/iperf/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/iperf/trunk/legacy/sources/ csw/mgar/pkg/iperf/trunk/legacy/sources/iperf.patch csw/mgar/pkg/iperf/trunk/legacy/specs/ csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile csw/mgar/pkg/iperf/trunk/legacy/specs/iperf Added: csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:19 UTC (rev 4529) @@ -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/iperf/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/scripts/human.pl 2009-04-27 12:48:19 UTC (rev 4529) @@ -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 () { + 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 + +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 + +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/iperf/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:19 UTC (rev 4529) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/iperf/trunk/legacy/sources/iperf.patch =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/sources/iperf.patch (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/sources/iperf.patch 2009-04-27 12:48:19 UTC (rev 4529) @@ -0,0 +1,11 @@ +--- iperf-2.0.2/compat/Thread.c.orig 2007-01-03 22:57:59.258235849 +0100 ++++ iperf-2.0.2/compat/Thread.c 2007-01-03 22:58:13.065711544 +0100 +@@ -202,7 +202,7 @@ + #if defined( HAVE_POSIX_THREAD ) + // Cray J90 doesn't have pthread_cancel; Iperf works okay without + #ifdef HAVE_PTHREAD_CANCEL +- pthread_cancel( oldTID ); ++ pthread_cancel( thread->mTID ); + #endif + #else // Win32 + // this is a somewhat dangerous function; it's not Added: csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile 2009-04-27 12:48:19 UTC (rev 4529) @@ -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/iperf/trunk/legacy/specs/iperf =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/specs/iperf (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/specs/iperf 2009-04-27 12:48:19 UTC (rev 4529) @@ -0,0 +1,101 @@ +# vim: ft=perl +# $Id: iperf,v 1.1 2007-01-03 22:06:43 simigern Exp $ + +$progname = 'iperf'; +$version = '2.0.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://dast.nlanr.net/Projects/Iperf/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['iperf.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The TCP/UDP Bandwidth Measurement Tool", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share/doc/iperf +cp doc/*.html doc/*.gif ${buildroot}/opt/csw/share/doc/iperf/ +cat >COPYING <<__EOF__ + Distributed Applications Support Team + + Iperf Copyright + + ---------------------------------------------------------------------- + + Copyright (c) 1999,2000,2001,2002,2003,2004,2005 The Board of Trustees of the + University of Illinois + All Rights Reserved. + + Iperf performance test + Mark Gates + Ajay Tirumala + Jim Ferguson + Jon Dugan + Feng Qin + Kevin Gibbs + John Estabrook + National Laboratory for Applied Network Research + National Center for Supercomputing Applications + University of Illinois at Urbana-Champaign + http://www.ncsa.uiuc.edu + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software (Iperf) and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit + persons to whom the Software is furnished to do so, subject to the + following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the University of Illinois, NCSA, nor the names + of its contributors may be used to endorse or promote products derived + from this Software without specific prior written permission. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE CONTIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ---------------------------------------------------------------------- + + dast\@nlanr.net Last modified: Jan 5, 2004 + NLANR || applications support || engineering support || measurement and + operations +__EOF__ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4530] csw/mgar/pkg Message-ID: Revision: 4530 http://gar.svn.sourceforge.net/gar/?rev=4530&view=rev Author: dmichelsen Date: 2009-04-27 12:48:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libbonobo2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libbonobo2/ csw/mgar/pkg/libbonobo2/trunk/ csw/mgar/pkg/libbonobo2/trunk/legacy/ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/human.pl csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libbonobo2/trunk/legacy/sources/ csw/mgar/pkg/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch csw/mgar/pkg/libbonobo2/trunk/legacy/specs/ csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile csw/mgar/pkg/libbonobo2/trunk/legacy/specs/libbonobo2 Added: csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:35 UTC (rev 4530) @@ -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/libbonobo2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/human.pl 2009-04-27 12:48:35 UTC (rev 4530) @@ -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 () { + 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 + +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 + +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/libbonobo2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:35 UTC (rev 4530) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch 2009-04-27 12:48:35 UTC (rev 4530) @@ -0,0 +1,11 @@ +--- bonobo/bonobo-app-client.c.orig 2004-12-05 17:12:36.268428000 -0500 ++++ bonobo/bonobo-app-client.c 2004-12-05 17:13:39.028375000 -0500 +@@ -266,7 +266,7 @@ + } + + +-static __inline__ GType ++static GType + _typecode_to_gtype (CORBA_TypeCode tc) + { + static GHashTable *hash = NULL; Added: csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile 2009-04-27 12:48:35 UTC (rev 4530) @@ -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/libbonobo2/trunk/legacy/specs/libbonobo2 =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/specs/libbonobo2 (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/specs/libbonobo2 2009-04-27 12:48:35 UTC (rev 4530) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libbonobo2,v 1.6 2005/11/15 21:31:14 simigern Exp $ + +$progname = 'libbonobo'; +$version = '2.10.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['libbonobo2-nongcc-fixes.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "bonobo2", + filename => "libbonobo2", + name => "libbonobo2 - GNOME component and compound document system", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-xO2 -xspace -xarch=386' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,orbit-2.0/*.la,bonobo/monikers/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:50 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4531] csw/mgar/pkg Message-ID: Revision: 4531 http://gar.svn.sourceforge.net/gar/?rev=4531&view=rev Author: dmichelsen Date: 2009-04-27 12:48:50 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libbonoboui: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libbonoboui/ csw/mgar/pkg/libbonoboui/trunk/ csw/mgar/pkg/libbonoboui/trunk/legacy/ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/human.pl csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libbonoboui/trunk/legacy/sources/ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/Makefile csw/mgar/pkg/libbonoboui/trunk/legacy/specs/libbonoboui Added: csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:50 UTC (rev 4531) @@ -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/libbonoboui/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/human.pl 2009-04-27 12:48:50 UTC (rev 4531) @@ -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 () { + 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 + +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 + +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/libbonoboui/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:50 UTC (rev 4531) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libbonoboui/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/Makefile 2009-04-27 12:48:50 UTC (rev 4531) @@ -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/libbonoboui/trunk/legacy/specs/libbonoboui =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/specs/libbonoboui (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/libbonoboui 2009-04-27 12:48:50 UTC (rev 4531) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libbonoboui,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libbonoboui'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libbonoboui/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - UI code for the GNOME 2 Object Activation Framework", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +touch doc/api/html/index.sgml +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,libglade/2.0/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4532] csw/mgar/pkg Message-ID: Revision: 4532 http://gar.svn.sourceforge.net/gar/?rev=4532&view=rev Author: dmichelsen Date: 2009-04-27 12:49:06 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libcroco: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libcroco/ csw/mgar/pkg/libcroco/trunk/ csw/mgar/pkg/libcroco/trunk/legacy/ csw/mgar/pkg/libcroco/trunk/legacy/scripts/ csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libcroco/trunk/legacy/scripts/human.pl csw/mgar/pkg/libcroco/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libcroco/trunk/legacy/sources/ csw/mgar/pkg/libcroco/trunk/legacy/sources/libcroco.cr-num.patch csw/mgar/pkg/libcroco/trunk/legacy/specs/ csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile csw/mgar/pkg/libcroco/trunk/legacy/specs/libcroco Added: csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:06 UTC (rev 4532) @@ -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/libcroco/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/scripts/human.pl 2009-04-27 12:49:06 UTC (rev 4532) @@ -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 () { + 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 + +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 + +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/libcroco/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:06 UTC (rev 4532) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libcroco/trunk/legacy/sources/libcroco.cr-num.patch =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/sources/libcroco.cr-num.patch (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/sources/libcroco.cr-num.patch 2009-04-27 12:49:06 UTC (rev 4532) @@ -0,0 +1,19 @@ +--- src/cr-num.c.orig 2004-03-30 04:27:22.687100000 -0500 ++++ src/cr-num.c 2004-03-30 04:29:38.087105000 -0500 +@@ -268,7 +268,15 @@ + g_return_val_if_fail (a_this, FALSE); + + switch (a_this->type) { +- case NUM_LENGTH_EM...NUM_LENGTH_PC: ++ ++ case NUM_LENGTH_EM: ++ case NUM_LENGTH_EX: ++ case NUM_LENGTH_PX: ++ case NUM_LENGTH_IN: ++ case NUM_LENGTH_CM: ++ case NUM_LENGTH_MM: ++ case NUM_LENGTH_PT: ++ case NUM_LENGTH_PC: + result = TRUE; + break; + default: Added: csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile 2009-04-27 12:49:06 UTC (rev 4532) @@ -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/libcroco/trunk/legacy/specs/libcroco =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/specs/libcroco (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/specs/libcroco 2009-04-27 12:49:06 UTC (rev 4532) @@ -0,0 +1,53 @@ +# vim: ft=perl +# $Id: libcroco,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libcroco'; +$version = '0.6.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libcroco/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['libcroco.cr-num.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A CSS parsing and manipulation toolkit", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4533] csw/mgar/pkg Message-ID: Revision: 4533 http://gar.svn.sourceforge.net/gar/?rev=4533&view=rev Author: dmichelsen Date: 2009-04-27 12:49:21 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgail_gnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgail_gnome/ csw/mgar/pkg/libgail_gnome/trunk/ csw/mgar/pkg/libgail_gnome/trunk/legacy/ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgail_gnome/trunk/legacy/sources/ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/Makefile csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/libgail_gnome Added: csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:21 UTC (rev 4533) @@ -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/libgail_gnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/human.pl 2009-04-27 12:49:21 UTC (rev 4533) @@ -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 () { + 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 + +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 + +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/libgail_gnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:21 UTC (rev 4533) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgail_gnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/Makefile 2009-04-27 12:49:21 UTC (rev 4533) @@ -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/libgail_gnome/trunk/legacy/specs/libgail_gnome =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/libgail_gnome (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/libgail_gnome 2009-04-27 12:49:21 UTC (rev 4533) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libgail_gnome,v 1.2 2005/01/23 14:48:43 simigern Exp $ + +$progname = 'libgail-gnome'; +$version = '1.1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgail-gnome/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "libgailgnome", + filename => "libgail_gnome", + name => "libgail_gnome - GNOME Accessibility Implementation Module", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/gtk-2.0/modules/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4534] csw/mgar/pkg Message-ID: Revision: 4534 http://gar.svn.sourceforge.net/gar/?rev=4534&view=rev Author: dmichelsen Date: 2009-04-27 12:49:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnome/ csw/mgar/pkg/libgnome/trunk/ csw/mgar/pkg/libgnome/trunk/legacy/ csw/mgar/pkg/libgnome/trunk/legacy/scripts/ csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnome/trunk/legacy/sources/ csw/mgar/pkg/libgnome/trunk/legacy/specs/ csw/mgar/pkg/libgnome/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnome/trunk/legacy/specs/libgnome Added: csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:36 UTC (rev 4534) @@ -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/libgnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/scripts/human.pl 2009-04-27 12:49:36 UTC (rev 4534) @@ -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 () { + 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 + +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 + +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/libgnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:36 UTC (rev 4534) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/specs/Makefile 2009-04-27 12:49:36 UTC (rev 4534) @@ -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/libgnome/trunk/legacy/specs/libgnome =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/specs/libgnome (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/specs/libgnome 2009-04-27 12:49:36 UTC (rev 4534) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: libgnome,v 1.10 2005/11/12 19:29:08 simigern Exp $ + +$progname = 'libgnome'; +$version = '2.12.0.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnome/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The main GNOME 2 library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4535] csw/mgar/pkg Message-ID: Revision: 4535 http://gar.svn.sourceforge.net/gar/?rev=4535&view=rev Author: dmichelsen Date: 2009-04-27 12:49:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomecanvas: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomecanvas/ csw/mgar/pkg/libgnomecanvas/trunk/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomecanvas/trunk/legacy/sources/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/libgnomecanvas Added: csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:51 UTC (rev 4535) @@ -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/libgnomecanvas/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/human.pl 2009-04-27 12:49:51 UTC (rev 4535) @@ -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 () { + 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 + +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 + +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/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:51 UTC (rev 4535) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomecanvas/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/Makefile 2009-04-27 12:49:51 UTC (rev 4535) @@ -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/libgnomecanvas/trunk/legacy/specs/libgnomecanvas =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/libgnomecanvas (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/libgnomecanvas 2009-04-27 12:49:51 UTC (rev 4535) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: libgnomecanvas,v 1.11 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomecanvas'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomecanvas/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Gnome2 Canvas Lib", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs'] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +touch docs/reference/html/index.sgml +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share +#mv ${buildroot}/opt/csw/lib/locale ${buildroot}/opt/csw/share/locale + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:07 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4536] csw/mgar/pkg Message-ID: Revision: 4536 http://gar.svn.sourceforge.net/gar/?rev=4536&view=rev Author: dmichelsen Date: 2009-04-27 12:50:07 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomecups: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomecups/ csw/mgar/pkg/libgnomecups/trunk/ csw/mgar/pkg/libgnomecups/trunk/legacy/ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomecups/trunk/legacy/sources/ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomecups/trunk/legacy/specs/libgnomecups Added: csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:07 UTC (rev 4536) @@ -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/libgnomecups/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/human.pl 2009-04-27 12:50:07 UTC (rev 4536) @@ -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 () { + 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 + +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 + +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/libgnomecups/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:07 UTC (rev 4536) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomecups/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/Makefile 2009-04-27 12:50:07 UTC (rev 4536) @@ -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/libgnomecups/trunk/legacy/specs/libgnomecups =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/specs/libgnomecups (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/libgnomecups 2009-04-27 12:50:07 UTC (rev 4536) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libgnomecups,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomecups'; +$version = '0.1.13'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomecups/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME library for CUPS interaction", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4537] csw/mgar/pkg Message-ID: Revision: 4537 http://gar.svn.sourceforge.net/gar/?rev=4537&view=rev Author: dmichelsen Date: 2009-04-27 12:50:22 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomeprint: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomeprint/ csw/mgar/pkg/libgnomeprint/trunk/ csw/mgar/pkg/libgnomeprint/trunk/legacy/ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomeprint/trunk/legacy/sources/ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/libgnomeprint Added: csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:22 UTC (rev 4537) @@ -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/libgnomeprint/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/human.pl 2009-04-27 12:50:22 UTC (rev 4537) @@ -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 () { + 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 + +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 + +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/libgnomeprint/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:22 UTC (rev 4537) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomeprint/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/Makefile 2009-04-27 12:50:22 UTC (rev 4537) @@ -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/libgnomeprint/trunk/legacy/specs/libgnomeprint =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/libgnomeprint (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/libgnomeprint 2009-04-27 12:50:22 UTC (rev 4537) @@ -0,0 +1,61 @@ +# vim: ft=perl +# $Id: libgnomeprint,v 1.10 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomeprint'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomeprint/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The GNOME 2 print library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share +#mv ${buildroot}/opt/csw/lib/locale ${buildroot}/opt/csw/share/locale + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,libgnomeprint/2.*/modules/*.la,libgnomeprint/2.*/modules/transports/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4538] csw/mgar/pkg Message-ID: Revision: 4538 http://gar.svn.sourceforge.net/gar/?rev=4538&view=rev Author: dmichelsen Date: 2009-04-27 12:50:38 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomeprintui: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomeprintui/ csw/mgar/pkg/libgnomeprintui/trunk/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomeprintui/trunk/legacy/sources/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/libgnomeprintui Added: csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:38 UTC (rev 4538) @@ -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/libgnomeprintui/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/human.pl 2009-04-27 12:50:38 UTC (rev 4538) @@ -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 () { + 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 + +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 + +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/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:38 UTC (rev 4538) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomeprintui/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/Makefile 2009-04-27 12:50:38 UTC (rev 4538) @@ -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/libgnomeprintui/trunk/legacy/specs/libgnomeprintui =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/libgnomeprintui (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/libgnomeprintui 2009-04-27 12:50:38 UTC (rev 4538) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: libgnomeprintui,v 1.9 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomeprintui'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomeprintui/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The GNOME 2 print UI library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share +#mv ${buildroot}/opt/csw/lib/locale ${buildroot}/opt/csw/share/locale + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4539] csw/mgar/pkg Message-ID: Revision: 4539 http://gar.svn.sourceforge.net/gar/?rev=4539&view=rev Author: dmichelsen Date: 2009-04-27 12:50:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomeui: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomeui/ csw/mgar/pkg/libgnomeui/trunk/ csw/mgar/pkg/libgnomeui/trunk/legacy/ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomeui/trunk/legacy/sources/ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomeui/trunk/legacy/specs/libgnomeui Added: csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:53 UTC (rev 4539) @@ -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/libgnomeui/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/human.pl 2009-04-27 12:50:53 UTC (rev 4539) @@ -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 () { + 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 + +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 + +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/libgnomeui/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:53 UTC (rev 4539) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomeui/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/Makefile 2009-04-27 12:50:53 UTC (rev 4539) @@ -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/libgnomeui/trunk/legacy/specs/libgnomeui =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/specs/libgnomeui (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/libgnomeui 2009-04-27 12:50:53 UTC (rev 4539) @@ -0,0 +1,61 @@ +# vim: ft=perl +# $Id: libgnomeui,v 1.16 2005/11/19 11:42:55 simigern Exp $ + +$progname = 'libgnomeui'; +$version = '2.12.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomeui/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The main GNOME 2 UI library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +touch doc/reference/html/index.sgml +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,lib/libglade/2.0/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +#We don't want static libs says Phil +rm -f ${buildroot}/opt/csw/lib/libgnomeui-2.a +rm -f ${buildroot}/opt/csw/lib/gtk-2.0/2.4.0/filesystems/libgnome-vfs.a +rm -f ${buildroot}/opt/csw/lib/libglade/2.0/libgnome.a + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:12 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4540] csw/mgar/pkg Message-ID: Revision: 4540 http://gar.svn.sourceforge.net/gar/?rev=4540&view=rev Author: dmichelsen Date: 2009-04-27 12:51:12 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgtop: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgtop/ csw/mgar/pkg/libgtop/trunk/ csw/mgar/pkg/libgtop/trunk/legacy/ csw/mgar/pkg/libgtop/trunk/legacy/scripts/ csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgtop/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgtop/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgtop/trunk/legacy/sources/ csw/mgar/pkg/libgtop/trunk/legacy/specs/ csw/mgar/pkg/libgtop/trunk/legacy/specs/Makefile csw/mgar/pkg/libgtop/trunk/legacy/specs/libgtop Added: csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:12 UTC (rev 4540) @@ -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/libgtop/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/scripts/human.pl 2009-04-27 12:51:12 UTC (rev 4540) @@ -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 () { + 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 + +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 + +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/libgtop/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:12 UTC (rev 4540) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgtop/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/specs/Makefile 2009-04-27 12:51:12 UTC (rev 4540) @@ -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/libgtop/trunk/legacy/specs/libgtop =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/specs/libgtop (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/specs/libgtop 2009-04-27 12:51:12 UTC (rev 4540) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: libgtop,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgtop'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgtop/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - library that fetches system related information", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$attributes{'/opt/csw/bin/libgtop_server2'} = ({user => 'root', group => 'sys', perm => '2755'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install +rm ${buildroot}/opt/csw/share/info/dir + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4541] csw/mgar/pkg Message-ID: Revision: 4541 http://gar.svn.sourceforge.net/gar/?rev=4541&view=rev Author: dmichelsen Date: 2009-04-27 12:51:26 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libidl: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libidl/ csw/mgar/pkg/libidl/trunk/ csw/mgar/pkg/libidl/trunk/legacy/ csw/mgar/pkg/libidl/trunk/legacy/scripts/ csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libidl/trunk/legacy/scripts/human.pl csw/mgar/pkg/libidl/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libidl/trunk/legacy/sources/ csw/mgar/pkg/libidl/trunk/legacy/specs/ csw/mgar/pkg/libidl/trunk/legacy/specs/Makefile csw/mgar/pkg/libidl/trunk/legacy/specs/libidl Added: csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:26 UTC (rev 4541) @@ -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/libidl/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/scripts/human.pl 2009-04-27 12:51:26 UTC (rev 4541) @@ -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 () { + 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 + +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 + +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/libidl/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:26 UTC (rev 4541) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libidl/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/specs/Makefile 2009-04-27 12:51:26 UTC (rev 4541) @@ -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/libidl/trunk/legacy/specs/libidl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/specs/libidl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/specs/libidl 2009-04-27 12:51:26 UTC (rev 4541) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: libidl,v 1.4 2005/11/15 21:31:14 simigern Exp $ + +$progname = 'libidl'; +$version = '0.8.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libIDL/ packaged for CSW by Michael Gernoth'; + + at sources = ("libIDL-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Library for handling CORBA IDL", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "libIDL-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export CPP=/usr/lib/cpp +cd libIDL-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +rm -rf ${buildroot}/opt/csw/share/info/dir + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4542] csw/mgar/pkg Message-ID: Revision: 4542 http://gar.svn.sourceforge.net/gar/?rev=4542&view=rev Author: dmichelsen Date: 2009-04-27 12:51:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libmad: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libmad/ csw/mgar/pkg/libmad/trunk/ csw/mgar/pkg/libmad/trunk/legacy/ csw/mgar/pkg/libmad/trunk/legacy/scripts/ csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libmad/trunk/legacy/scripts/human.pl csw/mgar/pkg/libmad/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libmad/trunk/legacy/sources/ csw/mgar/pkg/libmad/trunk/legacy/sources/libmad-pkgconfig.patch csw/mgar/pkg/libmad/trunk/legacy/specs/ csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile csw/mgar/pkg/libmad/trunk/legacy/specs/libmad Added: csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:42 UTC (rev 4542) @@ -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/libmad/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/scripts/human.pl 2009-04-27 12:51:42 UTC (rev 4542) @@ -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 () { + 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 + +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 + +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/libmad/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:42 UTC (rev 4542) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libmad/trunk/legacy/sources/libmad-pkgconfig.patch =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/sources/libmad-pkgconfig.patch (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/sources/libmad-pkgconfig.patch 2009-04-27 12:51:42 UTC (rev 4542) @@ -0,0 +1,14 @@ +--- /dev/null 2004-02-20 13:03:35.000000000 +0100 ++++ mad.pc 2003-10-22 04:44:10.000000000 +0200 +@@ -0,0 +1,11 @@ ++prefix=/opt/csw ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: mad ++Description: MPEG Audio Decoder ++Requires: ++Version: 0.15.1b ++Libs: -L${libdir} -lmad -lm ++Cflags: -I${includedir} Added: csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile 2009-04-27 12:51:42 UTC (rev 4542) @@ -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/libmad/trunk/legacy/specs/libmad =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/specs/libmad (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/specs/libmad 2009-04-27 12:51:42 UTC (rev 4542) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: libmad,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libmad'; +$version = '0.15.1'; +my $addver = 'b'; +$suffix = "_rev=${addver}"; + +$buildroot = "${builddir}/${progname}-${version}${addver}-buildroot"; + +$category = 'system'; +$vendor = 'http://www.underbit.com/products/mad/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}${addver}.tar.gz"); + + at patches = (['libmad-pkgconfig.patch', "${progname}-${version}${addver}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - MPEG Audio Decoder", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}${addver}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-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}${addver} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +mkdir -p ${buildroot}/opt/csw/lib/pkgconfig +cp mad.pc ${buildroot}/opt/csw/lib/pkgconfig/ +chmod 644 ${buildroot}/opt/csw/lib/pkgconfig/mad.pc +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4543] csw/mgar/pkg Message-ID: Revision: 4543 http://gar.svn.sourceforge.net/gar/?rev=4543&view=rev Author: dmichelsen Date: 2009-04-27 12:51:58 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libpango: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libpango/ csw/mgar/pkg/libpango/trunk/ csw/mgar/pkg/libpango/trunk/legacy/ csw/mgar/pkg/libpango/trunk/legacy/scripts/ csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libpango/trunk/legacy/scripts/human.pl csw/mgar/pkg/libpango/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libpango/trunk/legacy/sources/ csw/mgar/pkg/libpango/trunk/legacy/sources/libpango.postinstall csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch csw/mgar/pkg/libpango/trunk/legacy/specs/ csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile csw/mgar/pkg/libpango/trunk/legacy/specs/libpango Added: csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:58 UTC (rev 4543) @@ -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/libpango/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/scripts/human.pl 2009-04-27 12:51:58 UTC (rev 4543) @@ -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 () { + 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 + +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 + +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/libpango/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:58 UTC (rev 4543) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libpango/trunk/legacy/sources/libpango.postinstall =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/sources/libpango.postinstall (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/sources/libpango.postinstall 2009-04-27 12:51:58 UTC (rev 4543) @@ -0,0 +1,10 @@ +#!/bin/sh + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +echo 'Updating pango.modules...' +test -x ${PKG_ROOT_DIR}/opt/csw/bin/pango-querymodules && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/pango-querymodules >/opt/csw/etc/pango/pango.modules + +/bin/true Added: csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch 2009-04-27 12:51:58 UTC (rev 4543) @@ -0,0 +1,11 @@ +--- pango/opentype/Makefile.in.orig 2004-09-13 17:40:17.000000000 -0400 ++++ pango/opentype/Makefile.in 2004-12-07 04:39:20.167073000 -0500 +@@ -278,7 +278,7 @@ + + ottest_LDADD = \ + libpango-ot.la \ +- $(FREETYPE_LIBS) ++ $(FREETYPE_LIBS) -lglib + + + EXTRA_DIST = \ Added: csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile 2009-04-27 12:51:58 UTC (rev 4543) @@ -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/libpango/trunk/legacy/specs/libpango =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/specs/libpango (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/specs/libpango 2009-04-27 12:51:58 UTC (rev 4543) @@ -0,0 +1,59 @@ +# vim: ft=perl +# $Id: libpango,v 1.10 2005/12/15 15:13:49 simigern Exp $ + +$progname = 'pango'; +$version = '1.10.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/pango packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['pango.glib.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "pango", + filename => "libpango", + name => "libpango - Library for laying out and rendering text", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'], + postinstall => "libpango.postinstall" + }); + +#$suffix='.01'; + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsunmath' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +/opt/csw/bin/gsed -i -e 's|have_cairo=true|have_cairo=false|g' configure +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,pango/1.*/modules/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:52:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:52:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4544] csw/mgar/pkg/librsvg/trunk Message-ID: Revision: 4544 http://gar.svn.sourceforge.net/gar/?rev=4544&view=rev Author: dmichelsen Date: 2009-04-27 12:52:13 +0000 (Mon, 27 Apr 2009) Log Message: ----------- librsvg: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/librsvg/trunk/legacy/ csw/mgar/pkg/librsvg/trunk/legacy/scripts/ csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/librsvg/trunk/legacy/scripts/human.pl csw/mgar/pkg/librsvg/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/librsvg/trunk/legacy/sources/ csw/mgar/pkg/librsvg/trunk/legacy/sources/librsvg.postinstall csw/mgar/pkg/librsvg/trunk/legacy/specs/ csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile csw/mgar/pkg/librsvg/trunk/legacy/specs/librsvg Added: csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:52:13 UTC (rev 4544) @@ -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/librsvg/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/scripts/human.pl 2009-04-27 12:52:13 UTC (rev 4544) @@ -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 () { + 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 + +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 + +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/librsvg/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:52:13 UTC (rev 4544) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/librsvg/trunk/legacy/sources/librsvg.postinstall =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/sources/librsvg.postinstall (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/sources/librsvg.postinstall 2009-04-27 12:52:13 UTC (rev 4544) @@ -0,0 +1,11 @@ +#!/bin/sh + +echo 'Updating gdk-pixbuf.loaders...' + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +test -x ${PKG_ROOT_DIR}/opt/csw/bin/gdk-pixbuf-query-loaders && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/gdk-pixbuf-query-loaders >/opt/csw/etc/gtk-2.0/gdk-pixbuf.loaders + +/bin/true Added: csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile 2009-04-27 12:52:13 UTC (rev 4544) @@ -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/librsvg/trunk/legacy/specs/librsvg =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/specs/librsvg (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/specs/librsvg 2009-04-27 12:52:13 UTC (rev 4544) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: librsvg,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'librsvg'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://librsvg.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Scalable Vector Graphics library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'librsvg.postinstall', + postremove => 'librsvg.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo "all:" >moz-plugin/Makefile +gmake || exit 1 +echo "install:" >moz-plugin/Makefile +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gtk-2.0/*/*/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:52:29 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:52:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4545] csw/mgar/pkg Message-ID: Revision: 4545 http://gar.svn.sourceforge.net/gar/?rev=4545&view=rev Author: dmichelsen Date: 2009-04-27 12:52:28 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libsoup: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libsoup/ csw/mgar/pkg/libsoup/trunk/ csw/mgar/pkg/libsoup/trunk/legacy/ csw/mgar/pkg/libsoup/trunk/legacy/scripts/ csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libsoup/trunk/legacy/scripts/human.pl csw/mgar/pkg/libsoup/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libsoup/trunk/legacy/sources/ csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup-gnutls.patch csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch csw/mgar/pkg/libsoup/trunk/legacy/specs/ csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile csw/mgar/pkg/libsoup/trunk/legacy/specs/libsoup Added: csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:52:28 UTC (rev 4545) @@ -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/libsoup/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/scripts/human.pl 2009-04-27 12:52:28 UTC (rev 4545) @@ -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 () { + 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 + +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 + +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/libsoup/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:52:28 UTC (rev 4545) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libsoup/trunk/legacy/sources/libsoup-gnutls.patch =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup-gnutls.patch (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup-gnutls.patch 2009-04-27 12:52:28 UTC (rev 4545) @@ -0,0 +1,11 @@ +--- libsoup/soup-gnutls.c.orig 2004-05-21 14:46:37.397102000 -0400 ++++ libsoup/soup-gnutls.c 2004-05-21 14:46:56.477037000 -0400 +@@ -77,7 +77,7 @@ + + if (status & GNUTLS_CERT_INVALID || + status & GNUTLS_CERT_NOT_TRUSTED || +- status & GNUTLS_CERT_CORRUPTED || ++ /* status & GNUTLS_CERT_CORRUPTED || */ + status & GNUTLS_CERT_REVOKED) + { + g_warning ("The certificate is not trusted."); Added: csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch 2009-04-27 12:52:28 UTC (rev 4545) @@ -0,0 +1,52 @@ +--- libsoup/soup-dns.c.orig Sun Oct 17 14:46:06 2004 ++++ libsoup/soup-dns.c Sun Oct 17 14:57:30 2004 +@@ -199,7 +199,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -208,12 +209,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL ) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) +@@ -286,7 +287,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -297,12 +299,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) Added: csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile 2009-04-27 12:52:28 UTC (rev 4545) @@ -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/libsoup/trunk/legacy/specs/libsoup =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/specs/libsoup (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/specs/libsoup 2009-04-27 12:52:28 UTC (rev 4545) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: libsoup,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libsoup'; +$version = '1.99.26'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libsoup/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['libsoup-gnutls.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - HTTP library implementation", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:52:45 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:52:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4546] csw/mgar/pkg Message-ID: Revision: 4546 http://gar.svn.sourceforge.net/gar/?rev=4546&view=rev Author: dmichelsen Date: 2009-04-27 12:52:44 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libsoup2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libsoup2/ csw/mgar/pkg/libsoup2/trunk/ csw/mgar/pkg/libsoup2/trunk/legacy/ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libsoup2/trunk/legacy/scripts/human.pl csw/mgar/pkg/libsoup2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libsoup2/trunk/legacy/sources/ csw/mgar/pkg/libsoup2/trunk/legacy/sources/libsoup2-dns.patch csw/mgar/pkg/libsoup2/trunk/legacy/specs/ csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile csw/mgar/pkg/libsoup2/trunk/legacy/specs/libsoup2 Added: csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:52:44 UTC (rev 4546) @@ -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/libsoup2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/human.pl 2009-04-27 12:52:44 UTC (rev 4546) @@ -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 () { + 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 + +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 + +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/libsoup2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:52:44 UTC (rev 4546) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libsoup2/trunk/legacy/sources/libsoup2-dns.patch =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/sources/libsoup2-dns.patch (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/sources/libsoup2-dns.patch 2009-04-27 12:52:44 UTC (rev 4546) @@ -0,0 +1,52 @@ +--- libsoup/soup-dns.c.orig Sun Oct 17 14:46:06 2004 ++++ libsoup/soup-dns.c Sun Oct 17 14:57:30 2004 +@@ -199,7 +199,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -208,12 +209,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL ) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) +@@ -286,7 +287,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -297,12 +299,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) Added: csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile 2009-04-27 12:52:44 UTC (rev 4546) @@ -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/libsoup2/trunk/legacy/specs/libsoup2 =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/specs/libsoup2 (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/specs/libsoup2 2009-04-27 12:52:44 UTC (rev 4546) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: libsoup2,v 1.8 2005/03/26 13:21:54 simigern Exp $ + +$progname = 'libsoup2'; +$version = '2.2.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libsoup/ packaged for CSW by Michael Gernoth'; + + at patches = (['libsoup2-dns.patch', "libsoup-${version}", '-p0']); + + at sources = ("libsoup-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - HTTP library implementation", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "libsoup-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd libsoup-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4547] csw/mgar/pkg Message-ID: Revision: 4547 http://gar.svn.sourceforge.net/gar/?rev=4547&view=rev Author: dmichelsen Date: 2009-04-27 12:53:00 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libwnck: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libwnck/ csw/mgar/pkg/libwnck/trunk/ csw/mgar/pkg/libwnck/trunk/legacy/ csw/mgar/pkg/libwnck/trunk/legacy/scripts/ csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libwnck/trunk/legacy/scripts/human.pl csw/mgar/pkg/libwnck/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libwnck/trunk/legacy/sources/ csw/mgar/pkg/libwnck/trunk/legacy/specs/ csw/mgar/pkg/libwnck/trunk/legacy/specs/Makefile csw/mgar/pkg/libwnck/trunk/legacy/specs/libwnck Added: csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:00 UTC (rev 4547) @@ -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/libwnck/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/scripts/human.pl 2009-04-27 12:53:00 UTC (rev 4547) @@ -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 () { + 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 + +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 + +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/libwnck/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:00 UTC (rev 4547) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libwnck/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/specs/Makefile 2009-04-27 12:53:00 UTC (rev 4547) @@ -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/libwnck/trunk/legacy/specs/libwnck =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/specs/libwnck (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/specs/libwnck 2009-04-27 12:53:00 UTC (rev 4547) @@ -0,0 +1,53 @@ +# vim: ft=perl +# $Id: libwnck,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libwnck'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libwnck/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Window Navigator Construction Kit", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:16 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4548] csw/mgar/pkg Message-ID: Revision: 4548 http://gar.svn.sourceforge.net/gar/?rev=4548&view=rev Author: dmichelsen Date: 2009-04-27 12:53:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libxft2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libxft2/ csw/mgar/pkg/libxft2/trunk/ csw/mgar/pkg/libxft2/trunk/legacy/ csw/mgar/pkg/libxft2/trunk/legacy/scripts/ csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libxft2/trunk/legacy/scripts/human.pl csw/mgar/pkg/libxft2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libxft2/trunk/legacy/sources/ csw/mgar/pkg/libxft2/trunk/legacy/specs/ csw/mgar/pkg/libxft2/trunk/legacy/specs/Makefile csw/mgar/pkg/libxft2/trunk/legacy/specs/libxft2 Added: csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:15 UTC (rev 4548) @@ -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/libxft2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/scripts/human.pl 2009-04-27 12:53:15 UTC (rev 4548) @@ -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 () { + 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 + +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 + +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/libxft2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:15 UTC (rev 4548) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libxft2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/specs/Makefile 2009-04-27 12:53:15 UTC (rev 4548) @@ -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/libxft2/trunk/legacy/specs/libxft2 =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/specs/libxft2 (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/specs/libxft2 2009-04-27 12:53:15 UTC (rev 4548) @@ -0,0 +1,53 @@ +# vim: ft=perl +# $Id: libxft2,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libXft'; +$version = '2.1.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://pdx.freedesktop.org/~xlibs/release/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "libxft2", + filename => "libxft2", + name => "libxft2 - FreeType-based font drawing library for X", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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/freetype2 -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include/freetype2 -I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*michael[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4549] csw/mgar/pkg Message-ID: Revision: 4549 http://gar.svn.sourceforge.net/gar/?rev=4549&view=rev Author: dmichelsen Date: 2009-04-27 12:53:32 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libxklavier: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libxklavier/ csw/mgar/pkg/libxklavier/trunk/ csw/mgar/pkg/libxklavier/trunk/legacy/ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libxklavier/trunk/legacy/scripts/human.pl csw/mgar/pkg/libxklavier/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libxklavier/trunk/legacy/sources/ csw/mgar/pkg/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch csw/mgar/pkg/libxklavier/trunk/legacy/specs/ csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile csw/mgar/pkg/libxklavier/trunk/legacy/specs/libxklavier Added: csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:32 UTC (rev 4549) @@ -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/libxklavier/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/human.pl 2009-04-27 12:53:32 UTC (rev 4549) @@ -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 () { + 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 + +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 + +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/libxklavier/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:32 UTC (rev 4549) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch 2009-04-27 12:53:32 UTC (rev 4549) @@ -0,0 +1,11 @@ +--- libxklavier/xklavier_config_xkb.c.old 2004-06-12 08:07:43.210000000 -0400 ++++ libxklavier/xklavier_config_xkb.c 2004-06-12 08:07:53.659999000 -0400 +@@ -32,6 +32,8 @@ + static XkbComponentNamesRec componentNames; + #endif + ++#define XKB_RF_NAMES_PROP_ATOM 4 ++ + static char *locale; + + static char* _XklGetRulesSet( void ) Added: csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile 2009-04-27 12:53:32 UTC (rev 4549) @@ -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/libxklavier/trunk/legacy/specs/libxklavier =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/specs/libxklavier (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/specs/libxklavier 2009-04-27 12:53:32 UTC (rev 4549) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: libxklavier,v 1.4 2005/03/27 10:12:07 simigern Exp $ + +$progname = 'libxklavier'; +$version = '1.04'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/LibXklavier packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['libxklavier-xklavier_config_xkb.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An XKB foundation library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/openwin/lib -R/usr/openwin/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/openwin/lib -R/usr/openwin/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:48 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4550] csw/mgar/pkg Message-ID: Revision: 4550 http://gar.svn.sourceforge.net/gar/?rev=4550&view=rev Author: dmichelsen Date: 2009-04-27 12:53:47 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libxrender: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libxrender/ csw/mgar/pkg/libxrender/trunk/ csw/mgar/pkg/libxrender/trunk/legacy/ csw/mgar/pkg/libxrender/trunk/legacy/scripts/ csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libxrender/trunk/legacy/scripts/human.pl csw/mgar/pkg/libxrender/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libxrender/trunk/legacy/sources/ csw/mgar/pkg/libxrender/trunk/legacy/specs/ csw/mgar/pkg/libxrender/trunk/legacy/specs/Makefile csw/mgar/pkg/libxrender/trunk/legacy/specs/libxrender Added: csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:47 UTC (rev 4550) @@ -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/libxrender/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/scripts/human.pl 2009-04-27 12:53:47 UTC (rev 4550) @@ -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 () { + 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 + +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 + +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/libxrender/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:47 UTC (rev 4550) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libxrender/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/specs/Makefile 2009-04-27 12:53:47 UTC (rev 4550) @@ -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/libxrender/trunk/legacy/specs/libxrender =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/specs/libxrender (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/specs/libxrender 2009-04-27 12:53:47 UTC (rev 4550) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: libxrender,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'xrender'; +$version = '0.8.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/fontconfig/releases/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "libxrender", + filename => "libxrender", + name => "libxrender - fontconfig.org Xrender library", + dependencies => ['CSWcommon','CSWrenderdev'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4551] csw/mgar/pkg Message-ID: Revision: 4551 http://gar.svn.sourceforge.net/gar/?rev=4551&view=rev Author: dmichelsen Date: 2009-04-27 12:54:02 +0000 (Mon, 27 Apr 2009) Log Message: ----------- metacity: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/metacity/ csw/mgar/pkg/metacity/trunk/ csw/mgar/pkg/metacity/trunk/legacy/ csw/mgar/pkg/metacity/trunk/legacy/scripts/ csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/metacity/trunk/legacy/scripts/human.pl csw/mgar/pkg/metacity/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/metacity/trunk/legacy/sources/ csw/mgar/pkg/metacity/trunk/legacy/sources/xinerama.h.patch csw/mgar/pkg/metacity/trunk/legacy/specs/ csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile csw/mgar/pkg/metacity/trunk/legacy/specs/metacity Added: csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:02 UTC (rev 4551) @@ -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/metacity/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/scripts/human.pl 2009-04-27 12:54:02 UTC (rev 4551) @@ -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 () { + 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 + +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 + +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/metacity/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:02 UTC (rev 4551) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/metacity/trunk/legacy/sources/xinerama.h.patch =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/sources/xinerama.h.patch (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/sources/xinerama.h.patch 2009-04-27 12:54:02 UTC (rev 4551) @@ -0,0 +1,46 @@ +--- /dev/null 2004-06-25 18:29:26.000000000 +0200 ++++ xinerama.h 2002-04-06 07:55:15.000000000 +0200 +@@ -0,0 +1,43 @@ ++/****************************************************************** ++ ++ Copyright 1990, 1991, by Sun Microsystems, Inc. ++ ++Permission to use, copy, modify, distribute, and sell this software ++and its documentation for any purpose is hereby granted without fee, ++provided that the above copyright notice appear in all copies and ++that both that copyright notice and this permission notice appear ++in supporting documentation, and that the name of Sun Microsystems, Inc. ++not be used in advertising or publicity pertaining to distribution ++of the software without specific, written prior permission. ++Sun Microsystems, Inc. makes no representations about the suitability of ++this software for any purpose. It is provided "as is" without ++express or implied warranty. ++ ++Sun Microsystems Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS ++SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, ++IN NO EVENT SHALL Sun Microsystems, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT ++OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS ++OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE ++OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ++OR PERFORMANCE OF THIS SOFTWARE. ++ ++ Author: John McKernan (jmck at Sun.COM) ++ Sun Microsystems, Inc. ++******************************************************************/ ++ ++/* Xinerama header file */ ++ ++#ifndef _XINERAMA_H_ ++#define _XINERAMA_H_ ++ ++#define MAXFRAMEBUFFERS 16 ++#define XINERAMA_PLACE_TOP 1 ++#define XINERAMA_PLACE_BOTTOM 2 ++#define XINERAMA_PLACE_RIGHT 4 ++#define XINERAMA_PLACE_LEFT 8 ++ ++Bool XineramaGetState(Display*, int); ++Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*); ++Status XineramaGetCenterHint(Display*, int, int*, int*); ++ ++#endif /* _XINERAMA_H_ */ Added: csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile 2009-04-27 12:54:02 UTC (rev 4551) @@ -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/metacity/trunk/legacy/specs/metacity =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/specs/metacity (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/specs/metacity 2009-04-27 12:54:02 UTC (rev 4551) @@ -0,0 +1,58 @@ +# vim: ft=perl +# $Id: metacity,v 1.12 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'metacity'; +$version = '2.8.8'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/metacity/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['xinerama.h.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A light-weight window manager for GNOME", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -I${builddir}/${progname}-${version}" +export CPPFLAGS='-I/opt/csw/include -I${builddir}/${progname}-${version}' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +mkdir -p X11/extensions +mv xinerama.h X11/extensions/ +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4552] csw/mgar/pkg Message-ID: Revision: 4552 http://gar.svn.sourceforge.net/gar/?rev=4552&view=rev Author: dmichelsen Date: 2009-04-27 12:54:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- mgetty: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/mgetty/ csw/mgar/pkg/mgetty/trunk/ csw/mgar/pkg/mgetty/trunk/legacy/ csw/mgar/pkg/mgetty/trunk/legacy/scripts/ csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/mgetty/trunk/legacy/scripts/human.pl csw/mgar/pkg/mgetty/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/mgetty/trunk/legacy/sources/ csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty-policy.h.patch csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall csw/mgar/pkg/mgetty/trunk/legacy/specs/ csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile csw/mgar/pkg/mgetty/trunk/legacy/specs/mgetty Added: csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:19 UTC (rev 4552) @@ -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/mgetty/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/scripts/human.pl 2009-04-27 12:54:19 UTC (rev 4552) @@ -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 () { + 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 + +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 + +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/mgetty/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:19 UTC (rev 4552) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/mgetty/trunk/legacy/sources/mgetty-policy.h.patch =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty-policy.h.patch (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty-policy.h.patch 2009-04-27 12:54:19 UTC (rev 4552) @@ -0,0 +1,603 @@ +--- /dev/null 2004-04-14 21:21:29.000000000 +0200 ++++ policy.h 2004-04-14 21:24:02.851346000 +0200 +@@ -0,0 +1,600 @@ ++#ident "$Id: policy.h,v 4.19 2002/12/05 11:52:42 gert Exp $ Copyright (c) Gert Doering" ++ ++/* this is the file where all configuration defaults for mgetty / sendfax ++ * are specified. ++ * ++ * defaults are used if no values are given in the config file(s). ++ * config file values can be overridden by command line options. ++ * ++ * see mgetty.texi/mgetty.info for a description of the configuration files. ++ */ ++ ++/* main mgetty configuration file ++ */ ++#define MGETTY_CONFIG "mgetty.config" ++ ++/* sendfax configuration file ++ * ++ * if path doesn't start with "/", it's relative to CONFDIR (Makefile) ++ * if not defined, no configuration file is read (saves a few kbytes) ++ */ ++#define SENDFAX_CONFIG "sendfax.config" ++ ++ ++/* login dispatcher config file (for mgetty) ++ * ++ * In this file, you can configure which "login" program (default /bin/login) ++ * to call for what user name. ++ * ++ * You could use it to call "uucico" for all users starting with "U*" ++ * (works only with Taylor UUCP 1.04 with my patch), or to call a fido ++ * mailer for fido calls (only if -DFIDO defined)... ++ * See the samples in the example login.config file (built from login.cfg.in). ++ * ++ * WARNING: make sure that this file isn't world-accessable (SECURITY!) ++ * ++ * If you want to call /bin/login in any case, do not define this ++ * ++ * If this doesn't start with "/", it's relative to CONFDIR. ++ */ ++#define LOGIN_CFG_FILE "login.config" ++ ++/* default login program ++ * ++ * If LOGIN_CFG_FILE is not defined, or does not exist, or doesn't ++ * have a default entry, this program is called for user logins. ++ * Normally, this is "/bin/login", just a few systems put "login" ++ * elsewhere (e.g. Free/NetBSD in "/usr/bin/login"). ++ */ ++#define DEFAULT_LOGIN_PROGRAM "/bin/login" ++ ++ ++/* callback config file ++ * ++ * this file controls the operation of the optional "callback" program. ++ * how callback works, is explained in detail in mgetty.texi. You need ++ * to set LOGIN_CFG_FILE (see above) to use callback from mgetty. ++ * ++ * If this path does not start with "/", it's relative to CONFDIR. ++ */ ++#define CALLBACK_CONFIG "callback.config" ++ ++ ++/* if this file exists, it can be used to control what callers ++ * are allowed in. If undefined, the functionality is omitted. ++ * It will work only if your modem supports it. Check the modem manual. ++ * For Rockwell-Based modems, add #CID=1 to MODEM_INIT_STRING, for ++ * ZyXELs use S40.2=1. ++ * If the path doesn't start with "/", it's relative to CONFDIR. ++ */ ++#define CNDFILE "dialin.config" ++ ++ ++/* If you want to use /etc/gettydefs to set tty flags, define this ++ * I recommend against it, I suspect some bugs lingering in that code ++ * (and one doesn't really need it in a normal setup anyway). ++ */ ++/* #define USE_GETTYDEFS */ ++ ++/* Name of the "gettydefs" file (used only if USE_GETTYDEFS is set) ++ */ ++#define GETTYDEFS "/etc/gettydefs" ++ ++/* If no gettydefs "tag" is specified on the command line, use ++ * this setting (from GETTYDEFS) as default (only if compiled with ++ * USE_GETTYDEFS set) ++ */ ++#define GETTYDEFS_DEFAULT_TAG "n" ++ ++ ++/* access modes */ ++ ++/* user id of the "uucp" user. The tty device will be owned by this user, ++ * so parallel dial-out of uucico will be possible ++ */ ++#define DEVICE_OWNER "uucp" ++/* group id that the device is chown()ed to. If not defined, the ++ * primary group of "DEVICE_OWNER" is used. ++ */ ++#define DEVICE_GROUP "uucp" ++ ++/* access mode for the line while getty has it - it should be accessible ++ * by uucp / uucp, but not by others (imagine someone dialing into your ++ * system and using another modem to dial to another country...) ++ */ ++#define FILE_MODE 0660 ++ ++/* security: optionally, mgetty can system() this, to kill any dangling ++ * processes on the current tty. A %s is replaced with the tty device. ++ * ++ * Under most circumstances, this is not needed. You might want ++ * to use it if you offer dial-in services with shell accounts to people ++ * that you don't trust (they might try to abuse your modems, and this ++ * will stop a number of attacks). ++ */ ++/* #define EXEC_FUSER "exec fuser -k -f %s >/dev/null 2>&1" */ ++ ++ ++/* logging */ ++ ++/* system console - if a severe error happens at startup, mgetty writes ++ * a message to this file and aborts ++ * On SCO, this may be /dev/syscon! ++ */ ++#define CONSOLE "/dev/console" ++ ++/* Name of the mgetty log file ++ * e.g. "/usr/spool/log/mgetty.log.%s" or "/tmp/log_mg.%s" ++ * a "%s" will be replaced by the device name, e.g. "tty2a" ++ * ++ * if the directory does not exist, the log file goes to CONSOLE (!) ++ */ ++#define LOG_PATH "/opt/csw/var/log/mgetty.%s" ++ ++/* Default log error level threshold. Possible error levels are ++ * L_FATAL, L_ERROR, L_AUDIT, L_WARN, L_MESG, L_NOISE, L_JUNK (see mgetty.h) ++ */ ++#define LOG_LEVEL L_MESG ++ ++/* Whether "\n"s in the modem response should start a new line ++ * in the logfile ++ */ ++/* #define LOG_CR_NEWLINE */ ++ ++/* System administrator - if a severe error happens (lprintf called ++ * with log_level L_FATAL) and writing to CONSOLE is not possible, ++ * the logfile will be mailed to him ++ */ ++#define ADMIN "root" ++ ++/* Syslog ++ * ++ * If you want logging messages of type L_AUDIT, L_ERROR and L_FATAL ++ * to go to the "syslog", define this. ++ * mgetty will use the facility "LOG_AUTH", and the priorities ++ * LOG_NOTICE, LOG_ERR and LOG_ALERT, respectively. ++ */ ++/* #define SYSLOG */ ++ ++/* Syslog facility ++ * ++ * This is the facility mgetty uses for logging. Ususally, this will be ++ * LOG_AUTH, but on some systems, this may not exist, try LOG_DAEMON ++ * instead (or look into the syslog manpage for available options) ++ */ ++#define SYSLOG_FC LOG_AUTH ++ ++/* login stuff */ ++ ++/* System name - printed at login prompt ++ * If you do not define this, the uname() call will be used ++ */ ++/* #define SYSTEM "greenie" */ ++ ++/* Login prompt ++ * The "@", "\\D" and "\\T" escapes will be replaced by SYSTEM, the ++ * current date and time, respectively. ++ * override with "-p " switch ++ */ ++#define LOGIN_PROMPT "@!login: " ++ ++/* On SVR4, maybe on other systems too, you can cause the 'login' program ++ * to prompt with the same string as mgetty did, instead of the standard ++ * "login:" prompt. The string will be passed to the 'login' program ++ * in the environment variable TTYPROMPT. ++ * This is done by putting "login" into a special (brain-dead) "ttymon"- ++ * compatibility mode. In that mode, mgetty doesn't ask for a login name ++ * at all, so mgetty won't work if you enable that feature and your ++ * login program doesn't support it. (You can see if it doesn't work ++ * if the user gets a double login prompt or none at all). ++ * ++ * This feature automatically disables FIDO and AutoPPP support! ++ * ++ * To use this feature, define ENV_TTYPROMPT. ++ */ ++/* #define ENV_TTYPROMPT */ ++ ++/* Some very old terminals can only generate UPPERCASE letters. ++ * Traditional getty variants detect this, and then set the ++ * corresponding termio(s) flags to convert upper/lower case letters ++ * "on the fly". Mgetty can do it, but since this is hardly ++ * needed nowadays, the default is off. ++ */ ++/* #define DO_LCUC_MAP */ ++ ++/* Maximum time before login name has to be entered (in seconds) ++ * (after that time a warning will be issued, after that, the call is ++ * dropped). To disable that feature, do not define it. ++ */ ++#define MAX_LOGIN_TIME 240 ++ ++/* nologin file ++ * ++ * If that file exists, a ringing phone won't be answered (see manual). ++ * "%s" will be replaced by the device name. ++ */ ++#define NOLOGIN_FILE "/etc/nologin.%s" ++ ++ ++/* misc */ ++ ++ ++/* Path for the lock files. A %s will be replaced with the device name, ++ * e.g. tty2a -> /usr/spool/uucp/LCK..tty2a ++ * Make sure that this is the same file that your uucico uses for ++ * locking! ++ */ ++ ++/* for a few systems, you can just take those defaults and be happy */ ++#if defined (SVR4) || defined(sunos4) ++# define LOCK_PATH "/var/spool/locks" ++# define LOCK "/var/spool/locks/LCK..%s" ++#else ++# ifdef sgi ++# define LOCK "/usr/spool/locks/LCK..%s" ++# endif ++# ifdef _AIX ++# define LOCK "/etc/locks/LCK..%s" ++# endif ++# ifdef NeXT ++# define LOCK "/usr/spool/uucp/LCK/LCK..%s" ++# endif ++# ifdef linux ++# define LOCK "/var/lock/LCK..%s" ++# endif ++# if defined(__FreeBSD__) || defined(__NetBSD__) ++# define LOCK "/var/spool/lock/LCK..%s" ++# endif ++#endif ++ ++/* if your system isn't listed above, change that line here */ ++#ifndef LOCK ++#define LOCK "/usr/spool/uucp/LCK..%s" ++#endif ++ ++/* Set this to "1" if your system uses binary lock files (i.e., the pid ++ * as four byte integer in host byte order written to the lock file) ++ * If it is "0", HDB locking will be used - the PID will be written as ++ * 10 byte ascii, with a trailing newline ++ * (Just check "LOCK" while uucico or pcomm or ... are running to find ++ * out what lock files are used on your system) ++ * On NeXT systems, you must set this to "1". ++ */ ++#define LOCKS_BINARY 0 ++ ++/* Lower case locks - change the last character of the device name ++ * to lowercase for locking purposes. ++ * ++ * If you're using a SCO Unix system with those "tty1a/tty1A" device ++ * pairs, you'll have to define this. ++ */ ++/* #define LOCKS_LOWERCASE */ ++ ++/* Change _all_ characters to lowercase (currently no system uses this) */ ++/* #define LOCKS_ALL_LOWERCASE */ ++ ++ ++/* the default speed used by mgetty - override it with "-s " ++ * ++ * WARNING: this is a bit tricky, since some modems insist on going to ++ * 19200 bps when in fax mode. So, if fax receiving with a port speed of ++ * something else doesn't work, try experimenting with FAX_RECV_SWITCHBD, ++ * and if that doesn't help, try DEFAULT_PORTSPEED 19200 ++ * ++ * WARNING2: Speeds higher than 38400 aren't supported on all platforms, ++ * and sometimes you have to use "50" to get 57600 or so! ++ */ ++#define DEFAULT_PORTSPEED 38400 ++ ++/* the modem initialization string ++ * ++ * the default string should set up most hayes compatible modems into a ++ * fairly sane state (echo on, verbose reports on, quiet off, reset on ++ * DTR toggle on), but it doesn't set any flow control options (because ++ * that's done differently on each modem, look into your manual for commands ++ * like &H3, &K4, \Q6 or similar things) or protocols. ++ * ++ * You can change the initialization sequence with the "init-chat" keyword ++ * in "mgetty.config". ++ * ++ * If you need delays, specify them as "\\d", if you want to send a ++ * backslash ('\'), give it as "\\\\". ++ * ++ * Very IMPORTANT: make sure that the modem assigns the DCD line properly, ++ * usually this is done with the AT&C1 command! ++ * ++ * The modem must answer with "OK" (!!!) - otherwise, use "init-chat". ++ */ ++#define MODEM_INIT_STRING "ATS0=0Q0&D3&C1" ++ ++/* command termination string ++ * ++ * for most modems, terminating the AT... command with "\r" is ++ * sufficient and "\r\n" also works without doing harm. ++ * Unfortunately, for the Courier HST, you've to use *only* \r, ++ * otherwise ATA won't work (immediate NO CARRIER), and for some ++ * (old) ZyXELs, you have to use \r\n (no OK otherwise). ++ * So, try one, and if it doesn't work, try the other. ++ */ ++#define MODEM_CMD_SUFFIX "\r" ++ ++/* "keep alive" ++ * ++ * mgetty can periodically check whether the modem is still alive ++ * by issueing an "AT\r" command and checking for the "OK" ++ * Define here, in seconds, how often mgetty should check. For normal ++ * reliable modems, once an hour should be sufficient... ++ * If you use "-1", or don't define this at all, mgetty won't check. ++ */ ++#define MODEM_CHECK_TIME 3600 ++ ++ ++/* modem mode ++ * ++ * DEFAULT_MODEMTYPE specifies the default way mgetty+sendfax handle a ++ * faxmodem. You have four choices: ++ * "data" - data only, no faxing available (for sendfax, equal to "auto") ++ * "cls2" - use AT+FCLASS=2 ++ * "c2.0" - use AT+FCLASS=2.0 ++ * "auto" - try "2.0", then "2", then fall to "data". ++ * ++ * Normally, you can leave this to "auto", but if you have a modem that ++ * can do class 2.0 and class 2, and 2.0 doesn't work, then you could try ++ * setting it to "cls2". ++ * You can override this define with the "-C " switch. ++ */ ++#define DEFAULT_MODEMTYPE "auto" ++ ++ ++/* some modems are a little bit slow - after sending a response (OK) ++ * to the host, it will take some time before they can accept the next ++ * command - specify the amount needed in data mode here (in ++ * milliseconds). Normally, 50 ms should be sufficient. (On a slow ++ * machine it may even work without any delay at all) ++ * ++ * Be warned: if your machine isn't able to sleep for less than one ++ * second, this may cause problems. ++ */ ++#define DO_CHAT_SEND_DELAY 50 ++ /* and this is the delay before sending each command while in fax mode ++ */ ++#define FAX_COMMAND_DELAY 50 ++ ++/* incoming faxes will be chown()ed to this uid and gid. ++ * if FAX_IN_GROUP is undefined, the group of ...OWNER is used. ++ */ ++#define FAX_IN_OWNER "uucp" ++/* #define FAX_IN_GROUP "root" */ ++ ++/* incoming faxes will be chmod()ed to this mode ++ * (if you do not define this, the file mode will be controlled by ++ * mgetty's umask) ++ */ ++#define FAX_FILE_MODE 0660 ++ ++/* FLOW CONTROL ++ * ++ * There are basically two types of flow control: ++ * - hardware flow control: pull the RTS/CTS lines low to stop the other ++ * side from spilling out data too fast ++ * - sofware flow control: send an Xoff-Character to tell the other ++ * side to stop sending, send an Xon to restart ++ * obviously, use of Xon/Xoff has the disadvantage that you cannot send ++ * those characters in your data anymore, but additionally, hardware flow ++ * control is normally faster and more reliable ++ * ++ * mgetty can use multiple flow control variants: ++ * FLOW_NONE - no flow control at all (absolutely not recommended) ++ * FLOW_HARD - use RTS/CTS flow control (if available on your machine) ++ * FLOW_SOFT - use Xon/Xoff flow control, leave HW lines alone ++ * FLOW_BOTH - use both types simultaneously, if possible ++ * ++ * Note that few operating systems allow both types to be used together. ++ * ++ * mgetty won't (cannot!) notice if your settings don't work, but you'll ++ * see it yourself: you'll experience character losses, garbled faxes, ++ * low data throughput,..., if the flow control settings are wrong ++ * ++ * If in doubt what to use, try both and compare results. ++ * (if you use FAS or SAS with the recommended settings, FLOW_HARD is a ++ * "don't care" since the driver will use RTS/CTS anyway) ++ * ++ * If you use an atypical system, check whether tio_set_flow_control in ++ * tio.c does the right thing for your system. ++ */ ++ ++/* This is the flow control used for normal data (login) connections ++ * Set it to FLOW_HARD except in very special cases. ++ */ ++#define DATA_FLOW FLOW_HARD ++ ++/* This is the flow control used for incoming fax connections ++ * Wrong settings will result in missing lines or erroneous lines ++ * in most of the received faxes. ++ * Most faxmodems expect Xon/Xoff, few honour the RTS line. ++ */ ++#define FAXREC_FLOW FLOW_HARD | FLOW_SOFT ++ ++/* And this is for sending faxes ++ * ++ * Wrong settings here will typically result in that the first few ++ * centimeters of a transmitted fax look perfect, and then (the buffer ++ * has filled up), the rest is more or less illegible junk. ++ * For most faxes, this has to be FLOW_SOFT, though the Supra and ZyXEL ++ * modems will (sometimes) do hardware flow control, too. Try it. ++ * ++ * If you see a large number of [11] and [13] characters in the sendfax ++ * log file, your modem is propably doing software flow control - and ++ * you've definitely set FAXSEND_FLOW to FLOW_HARD... ++ * ++ * Some versions of SCO Unix have a "weird" serial driver that will only ++ * do half duplex hardware flow control. You will then run into the problem ++ * that fax sending will time out after the first page sent (no ACK received) ++ * and fail if FLOW_HARD is used. Use FLOW_SOFT instead. ++ */ ++#define FAXSEND_FLOW FLOW_HARD | FLOW_SOFT ++ ++/* if your faxmodem switches port bit rate just after sending the "+FCON" ++ * message to the host, define this to contain the baudrate used. (Not ++ * important if you have the portspeed set to this value anyway). ++ * ++ * Most Rockwell-based modems need FAX_RECV_SWITCHBD 19200. ++ * ZyXELs do *not* need this, except if explicitely told to do so. ++ * ++ * You can see if this is set wrong if mgetty gets the "+FCON" response, ++ * starts the fax receiver, and times out waiting for OK, receiving ++ * nothing or just junk. ++ */ ++/* #define FAX_RECV_SWITCHBD 19200 */ ++ ++/* some genius at US Robotics obviously decided that the above method ++ * of switching baud rates is broken, and came up with something new ++ * --- broken as well (why bother switching rates at all?) --- this ++ * and other USR Courier Fax follies will be handled by enabling the ++ * following define. ++ * ++ * This should NOT be needed for recent V.34 or ISDN modems anymore ++ * (anything built after 1999). In doubt, make sure your firmware is ++ * up to date before experimenting with this. ++ */ ++/* #define FAX_USRobotics */ ++ ++/* name of the logfile for outgoing faxes (e.g. /var/log/sendfax.log) ++ * ++ * watch out: if you run 'sendfax' as non-privileged user (user 'fax' etc.) ++ * you might need to create this file manually and chown it to 'fax' ++ */ ++#define FAX_LOG "/opt/csw/var/log/sendfax.log" ++ ++/* local station ID (your fax number) ++ * 20 character string, most faxmodem allow all ascii characters 32..127, ++ * but some do only allow digits and blank ++ * AT+FLID=? should tell you what's allowed and what not. ++ */ ++#define FAX_STATION_ID "49 115 xxxxxxxx" ++ ++/* ------ sendfax-specific stuff follows here -------- */ ++ ++/* the baudrate used for *sending* faxes. ZyXELs can handle 38400, ++ * SUPRAs (and many other rockwell-based faxmodems) can not. ++ * I recommend 38400, since 19200 may be to slow for 14400 bps faxmodems! ++ */ ++#define FAX_SEND_BAUD 38400 ++ ++/* switch baud rate after +FCLASS=2 ++ * ++ * some weird modems require that you initialize the modem with one ++ * baud rate (e.g. 2400 or 9600 for cheap 2400+fax modems, or `smart' ++ * modems that insist on staying locked to 38400 (ELSA!)), but switch ++ * to another baud rate, typically 19200, immediately after receiving ++ * the "AT+FCLASS=2" command. ++ * ++ * If the following is defined, sendfax will switch to the speed given ++ * here after sending AT+FCLASS=2. ++ * ++ * Only try fiddling with this if sendfax times out during modem ++ * initialization, receiving junk instead of "OK" or "ERROR" (logfile!) ++ */ ++/* #define FAX_SEND_SWITCHBD 19200 */ ++ ++/* this is the command to set the modem to use the desired flow control. ++ * For hardware handshake, this could be AT&H3 for the ZyXEL, &K3 for ++ * Rockwell-Based modems or AT\\Q3&S0 for Exar-Based Modems (i.e. some GVC's) ++ * If you don't want extra initalization, do not define it. ++ * Don't forget the "AT"! ++ */ ++/* #define FAX_MODEM_HANDSHAKE "AT&H3" */ ++ ++/* This is the modem command used for dialing. The phone number will ++ * get appended right after the string. Normally, "ATD" or "ATDP" should ++ * suffice, but in some situations (company telephone systems) you might ++ * need something like "ATx0DT0wP" (switch of dial-tone recognition, tone- ++ * dial a "0", wait for dial-tone, pulse dial the rest) ++ */ ++#define FAX_DIAL_PREFIX "ATD" ++ ++/* When sending a fax, if the other side says "page bad, retrain ++ * requested", sendfax will retry the page. Specifiy here the maximum ++ * number of retries (I recommend 3) before hanging up. ++ * ++ * If you set it to "0", sendfax will *never* retransmit a page (only ++ * do this if you know that your modem returns +FPTS:2 even if the ++ * page arrived properly, but be warned - you wont' be able to react ++ * properly to transmission errors!) ++ * ++ * See also the description of the "max-tries" and "max-tries-continue" ++ * settings in the sendfax config file. ++ */ ++#define FAX_SEND_MAX_TRIES 3 ++ ++/* the device(s) used for faxing ++ * multiple devices can be separated by ":", e.g. "tty1a:tty2a" ++ * (with or without leading /dev/) ++ * If you don't adapt this for your needs, sendfax won't run (you can ++ * set it from the sendfax.config file, though)! ++ */ ++#define FAX_MODEM_TTYS "term/b" ++ ++/* Xon or not? ++ * ++ * the first issues of the class 2 drafts required that the program waits ++ * for an Xon character before sending the page data. Later versions ++ * removed that. Sendfax can do both, default is to wait for it. ++ * ++ * If you get an error message "... waiting for XON" when trying to ++ * send a fax, try this one. Some ELSA modems are know to need it. ++ * ++ * ** THIS OPTION IS OBSOLETE ** ++ * ** use "modem-quirks 0x08" in sendfax.config instead ** ++ */ ++ ++ ++/* define mailer that accepts destination on command line and mail text ++ * on stdin. For mailers with user friendly interfaces, (such as mail, ++ * mailx, elm), include an appropriate subject line in the command ++ * definition. If using a mail agent (such as sendmail), that reads ++ * mail headers, define NEED_MAIL_HEADERS. ++ */ ++#ifdef SVR4 ++# define MAILER "/usr/bin/mailx -s 'Incoming facsimile message'" ++#else ++# ifdef _AIX ++# define MAILER "/usr/sbin/sendmail" ++# define NEED_MAIL_HEADERS ++# endif ++# ifdef M_UNIX /* SCO */ ++# define MAILER "/usr/lib/mail/execmail" ++# define NEED_MAIL_HEADERS ++# endif ++#endif ++ ++#ifndef MAILER ++# define MAILER "/usr/lib/sendmail" ++# define NEED_MAIL_HEADERS ++#endif ++ ++/* where to send notify mail about incoming faxes to ++ * (remember to create an mail alias if no such user exists!) ++ */ ++#define MAIL_TO "root" ++ ++/* after a fax has arrived, mgetty can call a program for further ++ * processing of this fax. ++ * ++ * (e.g.: printing of the fax, sending as MIME mail, displaying in an X ++ * window (the latter one could be tricky) ...) ++ * ++ * It will be called as: ++ * "" <#pgs> ... ++ * ++ * Define the name of this program here ++ * If you don't want this type of service, do not define it at all ++ * Absolute path name has to be used here! ++ */ ++#define FAX_NOTIFY_PROGRAM "/usr/local/lib/mgetty+sendfax/new_fax" ++ ++/* default minimum space required on spooling partition for receiving a FAX ++ * (in KILObytes) ++ */ ++#define MINFREESPACE 1024 ++ Added: csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall 2009-04-27 12:54:19 UTC (rev 4552) @@ -0,0 +1,9 @@ +#!/bin/sh +#$Id: mgetty.postinstall,v 1.1 2004/03/20 17:57:01 simigern Exp $ + +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/dialin.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/dialin.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/dialin.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxheader" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxheader.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxheader +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxrunq.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxrunq.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxrunq.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/login.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/login.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/login.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/mgetty.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/mgetty.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/mgetty.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/sendfax.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/sendfax.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/sendfax.config Added: csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile 2009-04-27 12:54:19 UTC (rev 4552) @@ -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/mgetty/trunk/legacy/specs/mgetty =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/specs/mgetty (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/specs/mgetty 2009-04-27 12:54:19 UTC (rev 4552) @@ -0,0 +1,70 @@ +# vim: ft=perl +# $Id: mgetty,v 1.6 2005/06/30 12:11:50 simigern Exp $ + +$progname = 'mgetty'; +$version = '1.1.31'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://alpha.greenie.net/mgetty/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}${version}-Jul24.tar.gz"); + + at patches = (['mgetty-policy.h.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An intelligent getty with fax and voice modem support", + dependencies => ['CSWcommon'], + postinstall => "mgetty.postinstall", + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/frontends/X11/viewfax-2.5/COPYING"; + +$attributes{'/opt/csw/var/spool/fax'} = ({user => 'uucp'}); +$attributes{'/opt/csw/var/spool/fax/outgoing'} = ({user => 'uucp'}); +$attributes{'/opt/csw/lib/mgetty+sendfax/faxq-helper'} = ({user => 'uucp'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +mkdir dummybins +export PATH="${builddir}/${progname}-${version}/dummybins:\${PATH}" +ln -s /bin/true dummybins/chown +gmake CFLAGS='-Dsolaris2' LIBS='-lsocket -lnsl' prefix=/opt/csw spool=/opt/csw/var/spool CC=cc FAX_OUT_USER=uucp MAN1DIR=/opt/csw/share/man/man1 MAN4DIR=/opt/csw/share/man/man4 MAN5DIR=/opt/csw/share/man/man5 MAN8DIR=/opt/csw/share/man/man8 INFODIR=/opt/csw/share/info +mkdir -p ${buildroot}/opt/csw/var/spool +mkdir -p ${buildroot}/opt/csw/share +gmake DESTDIR=${buildroot} prefix=${buildroot}/opt/csw spool=${buildroot}/opt/csw/var/spool INSTALL='/usr/ucb/install -c -o bin -g bin' FAX_OUT_USER=uucp MAN1DIR=${buildroot}/opt/csw/share/man/man1 MAN4DIR=${buildroot}/opt/csw/share/man/man4 MAN5DIR=${buildroot}/opt/csw/share/man/man5 MAN8DIR=${buildroot}/opt/csw/share/man/man8 INFODIR=${buildroot}/opt/csw/share/info install +rm ${buildroot}/opt/csw/bin/g3topbm +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/dialin.config ${buildroot}/opt/csw/etc/mgetty+sendfax/dialin.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/faxheader ${buildroot}/opt/csw/etc/mgetty+sendfax/faxheader.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/faxrunq.config ${buildroot}/opt/csw/etc/mgetty+sendfax/faxrunq.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/login.config ${buildroot}/opt/csw/etc/mgetty+sendfax/login.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/mgetty.config ${buildroot}/opt/csw/etc/mgetty+sendfax/mgetty.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/sendfax.config ${buildroot}/opt/csw/etc/mgetty+sendfax/sendfax.config.CSW + +mv ${buildroot}/opt/csw/bin/faxq ${buildroot}/opt/csw/bin/faxq-mgetty +mv ${buildroot}/opt/csw/bin/faxrm ${buildroot}/opt/csw/bin/faxrm-mgetty +mv ${buildroot}/opt/csw/share/man/man1/faxq.1 ${buildroot}/opt/csw/share/man/man1/faxq-mgetty.1 +mv ${buildroot}/opt/csw/share/man/man1/faxrm.1 ${buildroot}/opt/csw/share/man/man1/faxrm-mgetty.1 + + +##vgetty stuff starts here... +#cd voice +#gmake CFLAGS='-Dsolaris2' LIBS='-lsocket -lnsl' prefix=/opt/csw spool=/opt/csw/var/spool CC=cc FAX_OUT_USER=uucp MAN1DIR=/opt/csw/share/man/man1 MAN4DIR=/opt/csw/share/man/man4 MAN5DIR=/opt/csw/share/man/man5 MAN8DIR=/opt/csw/share/man/man8 INFODIR=/opt/csw/share/info +#gmake DESTDIR=${buildroot} CFLAGS='-Dsolaris2' LIBS='-lsocket -lnsl' prefix=${buildroot}/opt/csw spool=${buildroot}/opt/csw/var/spool INSTALL='/usr/ucb/install -c -o bin -g bin' FAX_OUT_USER=uucp MAN1DIR=${buildroot}/opt/csw/share/man/man1 MAN4DIR=${buildroot}/opt/csw/share/man/man4 MAN5DIR=${buildroot}/opt/csw/share/man/man5 MAN8DIR=${buildroot}/opt/csw/share/man/man8 INFODIR=${buildroot}/opt/csw/share/info install + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4553] csw/mgar/pkg Message-ID: Revision: 4553 http://gar.svn.sourceforge.net/gar/?rev=4553&view=rev Author: dmichelsen Date: 2009-04-27 12:54:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- multisync: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/multisync/ csw/mgar/pkg/multisync/trunk/ csw/mgar/pkg/multisync/trunk/legacy/ csw/mgar/pkg/multisync/trunk/legacy/scripts/ csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/multisync/trunk/legacy/scripts/human.pl csw/mgar/pkg/multisync/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/multisync/trunk/legacy/sources/ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.evogui.patch csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch csw/mgar/pkg/multisync/trunk/legacy/specs/ csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile csw/mgar/pkg/multisync/trunk/legacy/specs/multisync Added: csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:36 UTC (rev 4553) @@ -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/multisync/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/scripts/human.pl 2009-04-27 12:54:36 UTC (rev 4553) @@ -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 () { + 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 + +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 + +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/multisync/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:36 UTC (rev 4553) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/multisync/trunk/legacy/sources/multisync.evogui.patch =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.evogui.patch (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.evogui.patch 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,53 @@ +--- plugins/evolution_sync/src/gui.c.orig 2004-03-24 19:20:55.749911000 +0100 ++++ plugins/evolution_sync/src/gui.c 2004-03-24 21:35:11.427197000 +0100 +@@ -35,6 +35,7 @@ + #include "gui.h" + #include "interface.h" + #include "support.h" ++#include + + GtkWidget* evowindow = NULL; + evolution_connection *evoconn = NULL; +@@ -43,12 +44,24 @@ + GList* read_filelist(GList *list, char *dirname, char *textname, + char *filename, int depth) { + DIR *dir; ++ struct stat statbuf; ++ char *tostat; ++ + if (depth < 0) + return(list); + if ((dir = opendir(dirname))) { + struct dirent *de; + while ((de = readdir(dir))) { +- if (de->d_type != DT_DIR) { ++ /* dirname/de->d_name\0 */ ++ tostat=malloc(strlen(dirname)+1+strlen(de->d_name)+1); ++ strcpy(tostat,dirname); ++ tostat[strlen(dirname)]='/'; ++ strcpy(&tostat[strlen(dirname)+1],de->d_name); ++ tostat[strlen(dirname)+1+strlen(de->d_name)+1]=0x00; ++ /* printf("CSW-solaris: stating %s\n",tostat); */ ++ stat(tostat,&statbuf); ++ ++ if (!S_ISDIR(statbuf.st_mode)) { + if (!strcmp(de->d_name, filename)) { + evo_sync_file *ef = g_malloc0(sizeof(evo_sync_file)); + ef->name = g_strdup(textname); +@@ -56,7 +69,7 @@ + list = g_list_append(list, ef); + } + } +- if (de->d_type != DT_REG) { ++ if (!S_ISREG(statbuf.st_mode)) { + char *newdir; + if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) { + newdir = g_strdup_printf("%s/%s", dirname, de->d_name); +@@ -64,6 +77,7 @@ + g_free(newdir); + } + } ++ free(tostat); + } + closedir(dir); + } Added: csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,11 @@ +--- plugins/opie_sync/src/opie_qcop.c.orig 2004-03-24 19:56:46.781075000 +0100 ++++ plugins/opie_sync/src/opie_qcop.c 2004-03-24 22:07:07.397348000 +0100 +@@ -339,7 +339,7 @@ + if (start=strstr(strstr(pc,"/")+1,"/")) /* We need the second slash */ + { + /* caller responsible for free()ing temp */ +- temp = g_strndup(start,strstr(start," ")-start); /* from slash to blank is our path */ ++ temp = g_strndup(start,(char*)strstr(start," ")-start); /* from slash to blank is our path */ + } + + g_free(pc); Added: csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,11 @@ +--- src/sync_vtype.c.orig 2004-03-24 18:51:37.684638000 +0100 ++++ src/sync_vtype.c 2004-03-24 18:53:09.459728000 +0100 +@@ -993,7 +993,7 @@ + if (z == 'Z') { + struct tm *local; + local = localtime(&dt); +- dt += local->tm_gmtoff; ++ dt += (mktime(gmtime(&dt)) - mktime(localtime(&dt))) / 60; + } + } + return(dt); Added: csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile 2009-04-27 12:54:36 UTC (rev 4553) @@ -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/multisync/trunk/legacy/specs/multisync =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/specs/multisync (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/specs/multisync 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,112 @@ +# vim: ft=perl +# $Id: multisync,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'multisync'; +$version = '0.81'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://multisync.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['multisync.vtype.patch', "${progname}-${version}", '-p0'], + ['multisync.evogui.patch', "${progname}-${version}", '-p0'], + ['multisync.opieqcop.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A calendar synchronization program", + 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:/opt/csw/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 -D_POSIX_PTHREAD_SEMANTICS" +export CPPFLAGS='-I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +cd ${progname}-${version} +for i in config.guess config.sub depcomp install-sh missing mkinstalldirs; do + rm "\${i}" + ln -s /opt/csw/share/automake*/"\${i}" "\${i}" +done +sed -e 's|-rdynamic||' 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 || exit 1 + +#Backup-Plugin +cd ${builddir}/${progname}-${version}/plugins/backup_plugin +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#Evolution-Plugin +cd ${builddir}/${progname}-${version}/plugins/evolution_sync +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#LDAP-Plugin +cd ${builddir}/${progname}-${version}/plugins/ldap_plugin +sed -e 's|-Werror||' 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 || exit 1 + +#OPIE-Plugin +cd ${builddir}/${progname}-${version}/plugins/opie_sync +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#PALM-Plugin +cd ${builddir}/${progname}-${version}/plugins/palm_sync +sed -e 's|-Werror||' 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 || exit 1 + +#SyncML-Plugin +cd ${builddir}/${progname}-${version}/plugins/syncml_plugin +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#GCC :-( +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' + +#IrMC-Plugin +cd ${builddir}/${progname}-${version}/plugins/irmc_sync +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo "#include " >src/stdint.h +echo "#define TCSBRKP TCSBRK" >>src/stdint.h +cp src/stdint.h stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4554] csw/mgar/pkg Message-ID: Revision: 4554 http://gar.svn.sourceforge.net/gar/?rev=4554&view=rev Author: dmichelsen Date: 2009-04-27 12:54:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- nautilus: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/nautilus/ csw/mgar/pkg/nautilus/trunk/ csw/mgar/pkg/nautilus/trunk/legacy/ csw/mgar/pkg/nautilus/trunk/legacy/scripts/ csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/nautilus/trunk/legacy/scripts/human.pl csw/mgar/pkg/nautilus/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/nautilus/trunk/legacy/sources/ csw/mgar/pkg/nautilus/trunk/legacy/sources/nautilus-exif.diff csw/mgar/pkg/nautilus/trunk/legacy/specs/ csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile csw/mgar/pkg/nautilus/trunk/legacy/specs/nautilus Added: csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:53 UTC (rev 4554) @@ -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/nautilus/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/scripts/human.pl 2009-04-27 12:54:53 UTC (rev 4554) @@ -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 () { + 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 + +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 + +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/nautilus/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:53 UTC (rev 4554) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/nautilus/trunk/legacy/sources/nautilus-exif.diff =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/sources/nautilus-exif.diff (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/sources/nautilus-exif.diff 2009-04-27 12:54:53 UTC (rev 4554) @@ -0,0 +1,18 @@ +--- components/image_properties/nautilus-image-properties-view.c.orig 2005-12-23 14:54:48.001747000 -0500 ++++ components/image_properties/nautilus-image-properties-view.c 2005-12-23 14:57:53.441687000 -0500 +@@ -124,13 +124,14 @@ + exif_content_callback (ExifContent *content, gpointer data) + { + struct ExifAttribute *attribute; ++ char val[4096]; + + attribute = (struct ExifAttribute *)data; + if (attribute->found) { + return; + } + +- attribute->value = g_strdup (exif_content_get_value (content, attribute->tag)); ++ attribute->value = g_strdup (exif_content_get_value (content, attribute->tag, val, 4096)); + if (attribute->value != NULL) { + attribute->found = TRUE; + } Added: csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile 2009-04-27 12:54:53 UTC (rev 4554) @@ -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/nautilus/trunk/legacy/specs/nautilus =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/specs/nautilus (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/specs/nautilus 2009-04-27 12:54:53 UTC (rev 4554) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: nautilus,v 1.11 2005/12/23 20:01:05 simigern Exp $ + +$progname = 'nautilus'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/nautilus/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['nautilus-exif.diff', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - file manager and graphical shell for GNOME 2", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +for i in ${buildroot}/opt/csw/lib/{*.la,bonobo/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:11 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4555] csw/mgar/pkg Message-ID: Revision: 4555 http://gar.svn.sourceforge.net/gar/?rev=4555&view=rev Author: dmichelsen Date: 2009-04-27 12:55:11 +0000 (Mon, 27 Apr 2009) Log Message: ----------- nethack: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/nethack/ csw/mgar/pkg/nethack/trunk/ csw/mgar/pkg/nethack/trunk/legacy/ csw/mgar/pkg/nethack/trunk/legacy/scripts/ csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/nethack/trunk/legacy/scripts/human.pl csw/mgar/pkg/nethack/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/nethack/trunk/legacy/sources/ csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.patch csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall csw/mgar/pkg/nethack/trunk/legacy/specs/ csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile csw/mgar/pkg/nethack/trunk/legacy/specs/nethack Added: csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:11 UTC (rev 4555) @@ -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/nethack/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/scripts/human.pl 2009-04-27 12:55:11 UTC (rev 4555) @@ -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 () { + 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 + +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 + +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/nethack/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:11 UTC (rev 4555) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/nethack/trunk/legacy/sources/nethack.patch =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.patch (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.patch 2009-04-27 12:55:11 UTC (rev 4555) @@ -0,0 +1,216 @@ +diff -ru orignethack-343/include/config.h nethack-3.4.3/include/config.h +--- orignethack-343/include/config.h 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/include/config.h 2004-03-22 01:19:54.606853000 +0100 +@@ -43,7 +43,7 @@ + * Some combinations make no sense. See the installation document. + */ + #define TTY_GRAPHICS /* good old tty based graphics */ +-/* #define X11_GRAPHICS */ /* X11 interface */ ++#define X11_GRAPHICS /* X11 interface */ + /* #define QT_GRAPHICS */ /* Qt interface */ + /* #define GNOME_GRAPHICS */ /* Gnome interface */ + /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ +@@ -126,7 +126,7 @@ + * would allow: + * xpmtoppm x11tiles_big.xpm + */ +-/* # define USE_XPM */ /* Disable if you do not have the XPM library */ ++# define USE_XPM /* Disable if you do not have the XPM library */ + # ifdef USE_XPM + # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ + # endif +@@ -172,7 +172,7 @@ + #define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ + #define COMPRESS_EXTENSION ".Z" /* compress's extension */ + /* An example of one alternative you might want to use: */ +-/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ ++/* #define COMPRESS "/opt/csw/bin/gzip" */ /* FSF gzip compression */ + /* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ + #endif + +@@ -185,7 +185,7 @@ + * a tar-like file, thus making a neater installation. See *conf.h + * for detailed configuration. + */ +-/* #define DLB */ /* not supported on all platforms */ ++#define DLB /* not supported on all platforms */ + + /* + * Defining INSURANCE slows down level changes, but allows games that +@@ -204,7 +204,7 @@ + * otherwise it will be the current directory. + */ + # ifndef HACKDIR +-# define HACKDIR "/usr/games/lib/nethackdir" ++# define HACKDIR "/opt/csw/share/nethack" + # endif + + /* +@@ -214,7 +214,7 @@ + * since the user might create files in a directory of his choice. + * Of course SECURE is meaningful only if HACKDIR is defined. + */ +-/* #define SECURE */ /* do setuid(getuid()) after chdir() */ ++#define SECURE /* do setuid(getuid()) after chdir() */ + + /* + * If it is desirable to limit the number of people that can play Hack +@@ -338,7 +338,7 @@ + #endif + + #define EXP_ON_BOTL /* Show experience on bottom line */ +-/* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson at ucivax) */ ++#define SCORE_ON_BOTL /* added by Gary Erickson (erickson at ucivax) */ + + /* + * Section 5: EXPERIMENTAL STUFF +@@ -349,7 +349,7 @@ + */ + + /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ +-/*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */ ++#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ + + /* End of Section 5 */ + +diff -ru orignethack-343/include/unixconf.h nethack-3.4.3/include/unixconf.h +--- orignethack-343/include/unixconf.h 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/include/unixconf.h 2004-03-22 01:17:44.956458000 +0100 +@@ -96,7 +96,7 @@ + */ + + /* #define NO_FILE_LINKS */ /* if no hard links */ +-/* #define LOCKDIR "/usr/games/lib/nethackdir" */ /* where to put locks */ ++#define LOCKDIR "/opt/csw/share/nethack" /* where to put locks */ + + /* + * If you want the static parts of your playground on a read-only file +@@ -132,7 +132,7 @@ + * "extra output" method is used, but not all systems provide access to + * a fine-grained timer. + */ +-/* #define TIMED_DELAY */ /* usleep() */ ++#define TIMED_DELAY /* usleep() */ + #endif + + /* +diff -ru orignethack-343/sys/unix/Makefile.src nethack-3.4.3/sys/unix/Makefile.src +--- orignethack-343/sys/unix/Makefile.src 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/sys/unix/Makefile.src 2004-03-22 01:17:44.975790000 +0100 +@@ -146,13 +146,13 @@ + # directories. The ones given below is the usual spot for linux systems. + # The paths are for glibconfig.h and gnomesupport.h respectively. + # +-GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome ++GNOMEINC=-I/opt/csw/include -I../win/gnome + + # flags for debugging: + # CFLAGS = -g -I../include + +-CFLAGS = -O -I../include +-LFLAGS = ++CFLAGS = -O -I/opt/csw/include -I../include ++LFLAGS = -L/opt/csw/lib -R/opt/csw/lib + + # The Qt and Be window systems are written in C++, while the rest of + # NetHack is standard C. If using Qt, uncomment the LINK line here to get +@@ -214,8 +214,8 @@ + + # + # +-WINSRC = $(WINTTYSRC) +-WINOBJ = $(WINTTYOBJ) ++WINSRC = $(WINTTYSRC) $(WINX11SRC) ++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) + + # on some systems the termcap library is in -ltermcap or -lcurses + # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead +@@ -235,7 +235,7 @@ + # + # libraries for X11 + # If USE_XPM is defined in config.h, you will also need -lXpm here. +-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 ++WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -lXpm + # WINX11LIB = -lXaw -lXmu -lXt -lX11 + # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm + # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0 +@@ -255,7 +255,7 @@ + # libraries for BeOS + WINBELIB = -lbe + +-WINLIB = $(WINTTYLIB) ++WINLIB = $(WINTTYLIB) $(WINX11LIB) + + # any other strange libraries your system needs (for Sysunix only -- the more + # specialized targets should already be right) +diff -ru orignethack-343/sys/unix/Makefile.top nethack-3.4.3/sys/unix/Makefile.top +--- orignethack-343/sys/unix/Makefile.top 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/sys/unix/Makefile.top 2004-03-22 01:17:44.978021000 +0100 +@@ -14,18 +14,18 @@ + # MAKE = make + + # make NetHack +-PREFIX = /usr ++PREFIX = /opt/csw + GAME = nethack + # GAME = nethack.prg +-GAMEUID = games +-GAMEGRP = bin ++GAMEUID = nobody ++GAMEGRP = nogroup + + # Permissions - some places use setgid instead of setuid, for instance + # See also the option "SECURE" in include/config.h +-GAMEPERM = 04755 +-FILEPERM = 0644 ++GAMEPERM = 02755 ++FILEPERM = 0664 + EXEPERM = 0755 +-DIRPERM = 0755 ++DIRPERM = 0775 + + # GAMEDIR also appears in config.h as "HACKDIR". + # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR +@@ -35,12 +35,12 @@ + # therefore there should not be anything in GAMEDIR that you want to keep + # (if there is, you'll have to do the installation by hand or modify the + # instructions) +-GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir ++GAMEDIR = $(PREFIX)/share/$(GAME) + VARDIR = $(GAMEDIR) +-SHELLDIR = $(PREFIX)/games ++SHELLDIR = $(PREFIX)/bin + + # per discussion in Install.X11 and Install.Qt +-VARDATND = ++VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm mapbg.xpm + # VARDATND = x11tiles NetHack.ad pet_mark.xbm + # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm + # for Atari/Gem +@@ -193,11 +193,11 @@ + # set up their permissions + -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ + $(CHGRP) $(GAMEGRP) $(GAME) recover ) +- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) +- chmod $(EXEPERM) $(GAMEDIR)/recover ++ -chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) ++ -chmod $(EXEPERM) $(GAMEDIR)/recover + -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) +- $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) +- chmod $(EXEPERM) $(SHELLDIR)/$(GAME) ++ -$(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) ++ -chmod $(EXEPERM) $(SHELLDIR)/$(GAME) + + dofiles-dlb: check-dlb + ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) ) +@@ -238,8 +238,8 @@ + -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save + -rmdir ./-p + -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save ++ -$(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save ++ -chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save + # set up the game files + ( $(MAKE) dofiles ) + # set up some additional files Added: csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall 2009-04-27 12:55:11 UTC (rev 4555) @@ -0,0 +1,11 @@ +#!/bin/sh +#$Id: nethack.postinstall,v 1.3 2004/03/22 00:33:49 simigern Exp $ + +for statefile in logfile perm record; do + if [ ! -f "${BASEDIR}/opt/csw/share/nethack/${statefile}" ]; then + echo "Creating ${statefile}" + touch "${BASEDIR}/opt/csw/share/nethack/${statefile}" + chgrp nogroup "${BASEDIR}/opt/csw/share/nethack/${statefile}" + chmod 664 "${BASEDIR}/opt/csw/share/nethack/${statefile}" + fi +done Added: csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile 2009-04-27 12:55:11 UTC (rev 4555) @@ -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/nethack/trunk/legacy/specs/nethack =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/specs/nethack (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/specs/nethack 2009-04-27 12:55:11 UTC (rev 4555) @@ -0,0 +1,69 @@ +# vim: ft=perl +# $Id: nethack,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'nethack'; +$version = '3.4.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.nethack.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-343-src.tgz"); + + at patches = (['nethack.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A single player dungeon exploration game", + dependencies => ['CSWcommon'], + postinstall => "nethack.postinstall", + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/dat/license"; + +$attributes{'/opt/csw/share/nethack/nethack'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/share/nethack'} = ({user => 'root', group => 'nogroup', perm => '1775'}); +$attributes{'/opt/csw/share/nethack/save'} = ({user => 'root', group => 'nogroup', perm => '1775'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version}/ + +(cd sys/unix/ && sh -x ./setup.sh) +#./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake PREFIX=${buildroot}/opt/csw install +cd doc +mkdir -p ${buildroot}/opt/csw/share/man/man6 +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 Guidebook.ps +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 Guidebook.dvi +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 distrib +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 manpages +mkdir -p ${buildroot}/opt/csw/share/doc/nethack +cp Guidebook ${buildroot}/opt/csw/share/doc/nethack/ +cp Guidebook.ps ${buildroot}/opt/csw/share/doc/nethack/ +cp Guidebook.dvi ${buildroot}/opt/csw/share/doc/nethack/ +cp *.txt ${buildroot}/opt/csw/share/doc/nethack/ +chmod g-w ${buildroot}/opt/csw/share/nethack/* +rm ${buildroot}/opt/csw/share/nethack/{logfile,perm,record} +sed -e 's|${buildroot}||' ${buildroot}/opt/csw/bin/nethack >${buildroot}/opt/csw/bin/nethack.new +mv ${buildroot}/opt/csw/bin/nethack.new ${buildroot}/opt/csw/bin/nethack +chmod 755 ${buildroot}/opt/csw/bin/nethack +#mkdir -p ${buildroot}/opt/csw/lib/X11/app-defaults +#mv ${buildroot}/opt/csw/share/nethack/NetHack.ad ${buildroot}/opt/csw/lib/X11/app-defaults/NetHack +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:27 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4556] csw/mgar/pkg Message-ID: Revision: 4556 http://gar.svn.sourceforge.net/gar/?rev=4556&view=rev Author: dmichelsen Date: 2009-04-27 12:55:26 +0000 (Mon, 27 Apr 2009) Log Message: ----------- npadmin: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/npadmin/ csw/mgar/pkg/npadmin/trunk/ csw/mgar/pkg/npadmin/trunk/legacy/ csw/mgar/pkg/npadmin/trunk/legacy/scripts/ csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/npadmin/trunk/legacy/scripts/human.pl csw/mgar/pkg/npadmin/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/npadmin/trunk/legacy/sources/ csw/mgar/pkg/npadmin/trunk/legacy/specs/ csw/mgar/pkg/npadmin/trunk/legacy/specs/Makefile csw/mgar/pkg/npadmin/trunk/legacy/specs/npadmin Added: csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:26 UTC (rev 4556) @@ -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/npadmin/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/scripts/human.pl 2009-04-27 12:55:26 UTC (rev 4556) @@ -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 () { + 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 + +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 + +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/npadmin/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:26 UTC (rev 4556) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/npadmin/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/specs/Makefile 2009-04-27 12:55:26 UTC (rev 4556) @@ -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/npadmin/trunk/legacy/specs/npadmin =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/specs/npadmin (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/specs/npadmin 2009-04-27 12:55:26 UTC (rev 4556) @@ -0,0 +1,36 @@ +# vim: ft=perl +# $Id: npadmin,v 1.2 2004/11/27 11:52:42 simigern Exp $ + +$progname = 'npadmin'; +$version = '0.13'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://lpr.sourceforge.net packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Command line SNMP based network adminstration tool for printers", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -lgcc_s' +export LD_RUN_PATH='/opt/csw/lib' +cd ${progname}-${version} +./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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4557] csw/mgar/pkg Message-ID: Revision: 4557 http://gar.svn.sourceforge.net/gar/?rev=4557&view=rev Author: dmichelsen Date: 2009-04-27 12:55:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- octave: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/octave/ csw/mgar/pkg/octave/trunk/ csw/mgar/pkg/octave/trunk/legacy/ csw/mgar/pkg/octave/trunk/legacy/scripts/ csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/octave/trunk/legacy/scripts/human.pl csw/mgar/pkg/octave/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/octave/trunk/legacy/sources/ csw/mgar/pkg/octave/trunk/legacy/sources/octave-gcc-segvfix.patch csw/mgar/pkg/octave/trunk/legacy/specs/ csw/mgar/pkg/octave/trunk/legacy/specs/Makefile csw/mgar/pkg/octave/trunk/legacy/specs/octave Added: csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:42 UTC (rev 4557) @@ -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/octave/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/scripts/human.pl 2009-04-27 12:55:42 UTC (rev 4557) @@ -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 () { + 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 + +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 + +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/octave/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:42 UTC (rev 4557) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/octave/trunk/legacy/sources/octave-gcc-segvfix.patch =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/sources/octave-gcc-segvfix.patch (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/sources/octave-gcc-segvfix.patch 2009-04-27 12:55:42 UTC (rev 4557) @@ -0,0 +1,19 @@ +--- octave-3.0.0/src/oct-hist.cc.orig 2007-12-23 13:50:54.494837000 -0500 ++++ octave-3.0.0/src/oct-hist.cc 2007-12-23 13:51:35.309798000 -0500 +@@ -76,6 +76,16 @@ + // TRUE means input is coming from temporary history file. + bool input_from_tmp_history_file = false; + ++char file_ops::dir_sep_char = '/'; ++std::string file_ops::dir_sep_str ("/"); ++std::string file_ops::dir_sep_chars (file_ops::dir_sep_str); ++ ++bool ++file_ops::is_dir_sep (char c) ++{ ++ return dir_sep_chars.find (c) != NPOS; ++} ++ + static std::string + default_history_file (void) + { Added: csw/mgar/pkg/octave/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/specs/Makefile 2009-04-27 12:55:42 UTC (rev 4557) @@ -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/octave/trunk/legacy/specs/octave =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/specs/octave (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/specs/octave 2009-04-27 12:55:42 UTC (rev 4557) @@ -0,0 +1,63 @@ +# vim: ft=perl +# $Id: octave,v 1.11 2007-12-30 00:06:41 simigern Exp $ + +$progname = 'octave'; +$version = '3.0.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.octave.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['octave-gcc-segvfix.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The GNU Octave language for numerical computations", + dependencies => ['CSWcommon','CSWgnuplot','CSWgcc3g++rt','CSWgcc3g77rt'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +#This works, but links against sunmath and sunperf... +#export CC=cc +#export CXX=CC +#export F77=f77 +#export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' + +export PATH="/opt/csw/gcc3/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="-I/opt/csw/include" +export CPPFLAGS="-I/opt/csw/include" +export LD_OPTIONS="-R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/octave-${version} -L/opt/csw/lib/octave-${version}" +export CC=gcc +export CXX=g++ +export F77=g77 + + +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-hdf5 +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +rm -f ${buildroot}/opt/csw/share/info/dir +find ${buildroot} -perm -u+x -type f -exec strip {} \\; + +for i in faq interpreter liboctave refcard; do + mkdir -p ${buildroot}/opt/csw/share/doc/octave/\$i + cp doc/\$i/*.pdf doc/\$i/*.html ${buildroot}/opt/csw/share/doc/octave/\$i/ || true + test -d doc/\$i/HTML && cp -r doc/\$i/HTML ${buildroot}/opt/csw/share/doc/octave/\$i/HTML +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:58 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4558] csw/mgar/pkg Message-ID: Revision: 4558 http://gar.svn.sourceforge.net/gar/?rev=4558&view=rev Author: dmichelsen Date: 2009-04-27 12:55:58 +0000 (Mon, 27 Apr 2009) Log Message: ----------- openobex: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/openobex/ csw/mgar/pkg/openobex/trunk/ csw/mgar/pkg/openobex/trunk/legacy/ csw/mgar/pkg/openobex/trunk/legacy/scripts/ csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/openobex/trunk/legacy/scripts/human.pl csw/mgar/pkg/openobex/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/openobex/trunk/legacy/sources/ csw/mgar/pkg/openobex/trunk/legacy/specs/ csw/mgar/pkg/openobex/trunk/legacy/specs/Makefile csw/mgar/pkg/openobex/trunk/legacy/specs/openobex Added: csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:58 UTC (rev 4558) @@ -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/openobex/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/scripts/human.pl 2009-04-27 12:55:58 UTC (rev 4558) @@ -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 () { + 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 + +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 + +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/openobex/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:58 UTC (rev 4558) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/openobex/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/specs/Makefile 2009-04-27 12:55:58 UTC (rev 4558) @@ -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/openobex/trunk/legacy/specs/openobex =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/specs/openobex (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/specs/openobex 2009-04-27 12:55:58 UTC (rev 4558) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: openobex,v 1.3 2004/03/24 18:47:35 simigern Exp $ + +$progname = 'openobex'; +$version = '1.0.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://openobex.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An Object Exchange (OBEX) protocol implementation", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=gcc +export CXX=g++ +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include' +export LD_OPTIONS='-R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -lsocket -lnsl' +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo "#include " >src/stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install +sed -e 's|#include ||' ${buildroot}/opt/csw/include/openobex/obex.h >${buildroot}/opt/csw/include/openobex/obex.hnew +mv ${buildroot}/opt/csw/include/openobex/obex.hnew ${buildroot}/opt/csw/include/openobex/obex.h +sed -e 's|#include ||' ${buildroot}/opt/csw/include/openobex/obex_const.h >${buildroot}/opt/csw/include/openobex/obex_const.hnew +mv ${buildroot}/opt/csw/include/openobex/obex_const.hnew ${buildroot}/opt/csw/include/openobex/obex_const.h +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:56:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:56:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4559] csw/mgar/pkg Message-ID: Revision: 4559 http://gar.svn.sourceforge.net/gar/?rev=4559&view=rev Author: dmichelsen Date: 2009-04-27 12:56:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- orbit2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/orbit2/ csw/mgar/pkg/orbit2/trunk/ csw/mgar/pkg/orbit2/trunk/legacy/ csw/mgar/pkg/orbit2/trunk/legacy/scripts/ csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/orbit2/trunk/legacy/scripts/human.pl csw/mgar/pkg/orbit2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/orbit2/trunk/legacy/sources/ csw/mgar/pkg/orbit2/trunk/legacy/specs/ csw/mgar/pkg/orbit2/trunk/legacy/specs/Makefile csw/mgar/pkg/orbit2/trunk/legacy/specs/orbit2 Added: csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:56:15 UTC (rev 4559) @@ -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/orbit2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/scripts/human.pl 2009-04-27 12:56:15 UTC (rev 4559) @@ -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 () { + 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 + +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 + +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/orbit2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:56:15 UTC (rev 4559) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/orbit2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/specs/Makefile 2009-04-27 12:56:15 UTC (rev 4559) @@ -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/orbit2/trunk/legacy/specs/orbit2 =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/specs/orbit2 (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/specs/orbit2 2009-04-27 12:56:15 UTC (rev 4559) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: orbit2,v 1.2 2005/11/12 19:29:36 simigern Exp $ + +$progname = 'orbit2'; +$version = '2.12.4'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/gnome/sources/ORBit2 packaged for CSW by Michael Gernoth'; + + at sources = ("ORBit2-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - ORBit 2.x CORBA tools and libraries", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:${builddir}/ORBit2-${version}/src/idl-compiler/:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export CPP='/opt/csw/gcc3/bin/cpp' +cd ORBit2-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:${builddir}/ORBit2-${version}/src/idl-compiler:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:56:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:56:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4560] csw/mgar/pkg Message-ID: Revision: 4560 http://gar.svn.sourceforge.net/gar/?rev=4560&view=rev Author: dmichelsen Date: 2009-04-27 12:56:31 +0000 (Mon, 27 Apr 2009) Log Message: ----------- patchutils: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/patchutils/ csw/mgar/pkg/patchutils/trunk/ csw/mgar/pkg/patchutils/trunk/legacy/ csw/mgar/pkg/patchutils/trunk/legacy/scripts/ csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/patchutils/trunk/legacy/scripts/human.pl csw/mgar/pkg/patchutils/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/patchutils/trunk/legacy/sources/ csw/mgar/pkg/patchutils/trunk/legacy/specs/ csw/mgar/pkg/patchutils/trunk/legacy/specs/Makefile csw/mgar/pkg/patchutils/trunk/legacy/specs/patchutils Added: csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:56:31 UTC (rev 4560) @@ -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/patchutils/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/scripts/human.pl 2009-04-27 12:56:31 UTC (rev 4560) @@ -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 () { + 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 + +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 + +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/patchutils/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:56:31 UTC (rev 4560) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/patchutils/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/specs/Makefile 2009-04-27 12:56:31 UTC (rev 4560) @@ -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/patchutils/trunk/legacy/specs/patchutils =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/specs/patchutils (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/specs/patchutils 2009-04-27 12:56:31 UTC (rev 4560) @@ -0,0 +1,35 @@ +# vim: ft=perl +# $Id: patchutils,v 1.2 2004/06/27 22:30:36 simigern Exp $ + +$progname = 'patchutils'; +$version = '0.2.29'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://cyberelk.net/tim/patchutils/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Tools for manipulating patch files", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:56:47 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:56:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4561] csw/mgar/pkg/rdesktop/trunk Message-ID: Revision: 4561 http://gar.svn.sourceforge.net/gar/?rev=4561&view=rev Author: dmichelsen Date: 2009-04-27 12:56:47 +0000 (Mon, 27 Apr 2009) Log Message: ----------- rdesktop: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/rdesktop/trunk/legacy/ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/rdesktop/trunk/legacy/scripts/human.pl csw/mgar/pkg/rdesktop/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/rdesktop/trunk/legacy/sources/ csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff csw/mgar/pkg/rdesktop/trunk/legacy/specs/ csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile csw/mgar/pkg/rdesktop/trunk/legacy/specs/rdesktop Added: csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:56:47 UTC (rev 4561) @@ -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/rdesktop/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/human.pl 2009-04-27 12:56:47 UTC (rev 4561) @@ -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 () { + 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 + +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 + +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/rdesktop/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:56:47 UTC (rev 4561) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff 2009-04-27 12:56:47 UTC (rev 4561) @@ -0,0 +1,19 @@ +? aclocal.m4 +? link.hpux +? rdpsnd_libao.c.sic +Index: keymaps/common +=================================================================== +RCS file: /cvsroot/rdesktop/rdesktop/keymaps/common,v +retrieving revision 1.15 +diff -u -r1.15 common +--- keymaps/common 8 Dec 2003 12:01:25 -0000 1.15 ++++ keymaps/common 25 Mar 2005 11:12:47 -0000 +@@ -79,6 +79,8 @@ + F10 0x44 localstate + F11 0x57 localstate + F12 0x58 localstate ++SunF36 0x57 localstate ++SunF37 0x58 localstate + + # Printscreen, Scrollock and Pause + # Printscreen really requires four scancodes (0xe0, 0x2a, 0xe0, 0x37), Added: csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff 2009-04-27 12:56:47 UTC (rev 4561) @@ -0,0 +1,15 @@ +Index: xkeymap.c +=================================================================== +RCS file: /cvsroot/rdesktop/rdesktop/xkeymap.c,v +retrieving revision 1.67 +diff -u -r1.67 xkeymap.c +--- xkeymap.c 6 Mar 2005 21:11:17 -0000 1.67 ++++ xkeymap.c 25 Mar 2005 15:00:59 -0000 +@@ -326,6 +326,7 @@ + break; + + case XK_Pause: ++ case XK_F21: /* Pause on SUN Keyboard */ + /* According to MS Keyboard Scan Code + Specification, pressing Pause should result + in E1 1D 45 E1 9D C5. I'm not exactly sure Added: csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile 2009-04-27 12:56:47 UTC (rev 4561) @@ -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/rdesktop/trunk/legacy/specs/rdesktop =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/specs/rdesktop (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/specs/rdesktop 2009-04-27 12:56:47 UTC (rev 4561) @@ -0,0 +1,44 @@ +# vim: ft=perl +# $Id: rdesktop,v 1.6 2006/09/13 17:20:00 simigern Exp $ + +$progname = 'rdesktop'; +$version = '1.5.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.rdesktop.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['rdesktop-morekeys.diff',"${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - RDP client for Windows NT/2000/2003/XP Terminal Server", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-sound=sun --with-ipv6 --with-openssl=/opt/csw +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +mkdir -p ${buildroot}/opt/csw/share/doc/rdesktop +cp doc/* ${buildroot}/opt/csw/share/doc/rdesktop/ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:02 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:02 +0000 Subject: [csw-devel] SF.net SVN: gar:[4562] csw/mgar/pkg Message-ID: Revision: 4562 http://gar.svn.sourceforge.net/gar/?rev=4562&view=rev Author: dmichelsen Date: 2009-04-27 12:57:01 +0000 (Mon, 27 Apr 2009) Log Message: ----------- render_dev: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/render_dev/ csw/mgar/pkg/render_dev/trunk/ csw/mgar/pkg/render_dev/trunk/legacy/ csw/mgar/pkg/render_dev/trunk/legacy/scripts/ csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/render_dev/trunk/legacy/scripts/human.pl csw/mgar/pkg/render_dev/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/render_dev/trunk/legacy/sources/ csw/mgar/pkg/render_dev/trunk/legacy/specs/ csw/mgar/pkg/render_dev/trunk/legacy/specs/Makefile csw/mgar/pkg/render_dev/trunk/legacy/specs/render_dev Added: csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:01 UTC (rev 4562) @@ -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/render_dev/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/scripts/human.pl 2009-04-27 12:57:01 UTC (rev 4562) @@ -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 () { + 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 + +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 + +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/render_dev/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:01 UTC (rev 4562) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/render_dev/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/specs/Makefile 2009-04-27 12:57:01 UTC (rev 4562) @@ -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/render_dev/trunk/legacy/specs/render_dev =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/specs/render_dev (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/specs/render_dev 2009-04-27 12:57:01 UTC (rev 4562) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: render_dev,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'render'; +$version = '0.8'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/fontconfig/releases/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "renderdev", + filename => "render_dev", + name => "render_dev - fontconfig.org render development files", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$arch='all'; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:16 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4563] csw/mgar/pkg/scrollkeeper/trunk Message-ID: Revision: 4563 http://gar.svn.sourceforge.net/gar/?rev=4563&view=rev Author: dmichelsen Date: 2009-04-27 12:57:16 +0000 (Mon, 27 Apr 2009) Log Message: ----------- scrollkeeper: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/scrollkeeper/trunk/legacy/ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/human.pl csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/ csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/ csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/scrollkeeper Added: csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:16 UTC (rev 4563) @@ -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/scrollkeeper/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/human.pl 2009-04-27 12:57:16 UTC (rev 4563) @@ -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 () { + 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 + +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 + +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/scrollkeeper/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:16 UTC (rev 4563) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall 2009-04-27 12:57:16 UTC (rev 4563) @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +PATH="/opt/csw/bin:${PATH}" +export PATH + +test -f "${PKG_ROOT_DIR}/opt/csw/etc/scrollkeeper.conf" || cp "${PKG_ROOT_DIR}/opt/csw/etc/scrollkeeper.conf.CSW" "${PKG_ROOT_DIR}/opt/csw/etc/scrollkeeper.conf" +chroot "${PKG_ROOT_DIR}" /opt/csw/bin/scrollkeeper-rebuilddb -q -p /opt/csw/var/lib/scrollkeeper + Added: csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile 2009-04-27 12:57:16 UTC (rev 4563) @@ -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/scrollkeeper/trunk/legacy/specs/scrollkeeper =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/scrollkeeper (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/scrollkeeper 2009-04-27 12:57:16 UTC (rev 4563) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: scrollkeeper,v 1.7 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'scrollkeeper'; +$version = '0.3.14'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://scrollkeeper.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - a cataloging system for documentation on open systems", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + #postinstall => "scrollkeeper.postinstall", + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$suffix='.02'; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -L${buildroot}/opt/csw/lib' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-omfdirs=/opt/csw/share/omf --with-xml-catalog=/opt/csw/etc/xml/catalog +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +sed -e 's|echo "`date|#echo "`date|' Makefile | sed -e 's|\$(DESTDIR)\$(bindir)/scrollkeeper-rebuilddb -q|#\$(DESTDIR)\$(bindir)/scrollkeeper-rebuilddb -q|' >Makefile.new +mv Makefile.new Makefile +gmake +gmake DESTDIR=${buildroot} install +mv ${buildroot}/opt/csw/etc/scrollkeeper.conf ${buildroot}/opt/csw/etc/scrollkeeper.conf.CSW + +sed -e 's|scrollkeeper-config|/opt/csw/bin/scrollkeeper-config|g' ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb | sed -e 's|scrollkeeper-update|/opt/csw/bin/scrollkeeper-update|g' >${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb.new +mv ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb.new ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb +chmod 755 ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4564] csw/mgar/pkg Message-ID: Revision: 4564 http://gar.svn.sourceforge.net/gar/?rev=4564&view=rev Author: dmichelsen Date: 2009-04-27 12:57:31 +0000 (Mon, 27 Apr 2009) Log Message: ----------- scummvm: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/scummvm/ csw/mgar/pkg/scummvm/trunk/ csw/mgar/pkg/scummvm/trunk/legacy/ csw/mgar/pkg/scummvm/trunk/legacy/scripts/ csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/scummvm/trunk/legacy/scripts/human.pl csw/mgar/pkg/scummvm/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/scummvm/trunk/legacy/sources/ csw/mgar/pkg/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch csw/mgar/pkg/scummvm/trunk/legacy/specs/ csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile csw/mgar/pkg/scummvm/trunk/legacy/specs/scummvm Added: csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:31 UTC (rev 4564) @@ -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/scummvm/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/scripts/human.pl 2009-04-27 12:57:31 UTC (rev 4564) @@ -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 () { + 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 + +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 + +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/scummvm/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:31 UTC (rev 4564) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch 2009-04-27 12:57:31 UTC (rev 4564) @@ -0,0 +1,23 @@ +--- base/gameDetector.cpp.orig 2004-12-24 09:10:42.958207000 -0500 ++++ base/gameDetector.cpp 2004-12-24 09:13:03.298223000 -0500 +@@ -37,6 +37,7 @@ + #endif + + #ifdef UNIX ++#include + #include + #include + #ifdef MACOSX +--- backends/midi/mt32/mt32emu.h.orig 2004-12-24 09:29:26.658230000 -0500 ++++ backends/midi/mt32/mt32emu.h 2004-12-24 09:34:35.428219000 -0500 +@@ -56,6 +56,10 @@ + #define MT32EMU_USE_MMX 0 + #endif + ++#define powf pow ++#define logf log ++#define expf exp ++ + #include "freeverb.h" + + #include "structures.h" Added: csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile 2009-04-27 12:57:31 UTC (rev 4564) @@ -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/scummvm/trunk/legacy/specs/scummvm =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/specs/scummvm (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/specs/scummvm 2009-04-27 12:57:31 UTC (rev 4564) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: scummvm,v 1.7 2004/12/24 14:51:40 simigern Exp $ + +$progname = 'scummvm'; +$version = '0.7.0'; +#my $addver = "b"; +#$suffix = "_rev=${addver}"; +my $addver=""; + +$buildroot = "${builddir}/${progname}-${version}${addver}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.scummvm.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}${addver}.tar.bz2"); + + at patches = (['scummvm-solaris.fixes.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - virtual machine for several classic graphical point-and-click adventure games", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}${addver}/COPYING"; + +$build = <<"EOF"; +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin:${builddir}/${progname}-${version}${addver}" +export CFLAGS="-I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib' # -lgcc_s' +export LD_RUN_PATH='/opt/csw/lib' +cd ${progname}-${version}${addver} +ln -s /opt/csw/bin/ginstall install +./configure --with-vorbis-prefix=/opt/csw --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake || exit 1 +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man BINDIR=${buildroot}/opt/csw/bin install +gmkdir -p ${buildroot}/opt/csw/share/applications +cp scummvm.desktop ${buildroot}/opt/csw/share/applications +#gmkdir -p ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/share/doc/${progname} +#cp scummvm ${buildroot}/opt/csw/bin +#cp NEWS README ${buildroot}/opt/csw/share/doc/${progname} +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:48 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4565] csw/mgar/pkg Message-ID: Revision: 4565 http://gar.svn.sourceforge.net/gar/?rev=4565&view=rev Author: dmichelsen Date: 2009-04-27 12:57:47 +0000 (Mon, 27 Apr 2009) Log Message: ----------- shared-mime-info: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/shared-mime-info/ csw/mgar/pkg/shared-mime-info/trunk/ csw/mgar/pkg/shared-mime-info/trunk/legacy/ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/human.pl csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/ csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/ csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/shared-mime-info Added: csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:47 UTC (rev 4565) @@ -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/shared-mime-info/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/human.pl 2009-04-27 12:57:47 UTC (rev 4565) @@ -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 () { + 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 + +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 + +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/shared-mime-info/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:47 UTC (rev 4565) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst 2009-04-27 12:57:47 UTC (rev 4565) @@ -0,0 +1,10 @@ +#!/bin/sh +#$Id: shared-mime-info.postinst,v 1.1 2004/06/25 16:35:27 simigern Exp $ + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +XDG_DATA_DIRS=/opt/csw/share/:/usr/local/share/:/usr/share/ +export XDG_DATA_DIRS +chroot "${PKG_ROOT_DIR}" /opt/csw/bin/update-mime-database /opt/csw/share/mime Added: csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile 2009-04-27 12:57:47 UTC (rev 4565) @@ -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/shared-mime-info/trunk/legacy/specs/shared-mime-info =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/shared-mime-info (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/shared-mime-info 2009-04-27 12:57:47 UTC (rev 4565) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: shared-mime-info,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'shared-mime-info'; +$version = '0.15'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/shared-mime-info packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "sharedmimeinfo", + filename => "shared_mime_info", + name => "shared_mime_info - freedesktop.org common MIME database", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4566] csw/mgar/pkg Message-ID: Revision: 4566 http://gar.svn.sourceforge.net/gar/?rev=4566&view=rev Author: dmichelsen Date: 2009-04-27 12:58:02 +0000 (Mon, 27 Apr 2009) Log Message: ----------- skeleton: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/skeleton/ csw/mgar/pkg/skeleton/trunk/ csw/mgar/pkg/skeleton/trunk/legacy/ csw/mgar/pkg/skeleton/trunk/legacy/scripts/ csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/skeleton/trunk/legacy/scripts/human.pl csw/mgar/pkg/skeleton/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/skeleton/trunk/legacy/sources/ csw/mgar/pkg/skeleton/trunk/legacy/specs/ csw/mgar/pkg/skeleton/trunk/legacy/specs/Makefile csw/mgar/pkg/skeleton/trunk/legacy/specs/skeleton Added: csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:02 UTC (rev 4566) @@ -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/skeleton/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/scripts/human.pl 2009-04-27 12:58:02 UTC (rev 4566) @@ -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 () { + 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 + +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 + +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/skeleton/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:02 UTC (rev 4566) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/skeleton/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/specs/Makefile 2009-04-27 12:58:02 UTC (rev 4566) @@ -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/skeleton/trunk/legacy/specs/skeleton =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/specs/skeleton (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/specs/skeleton 2009-04-27 12:58:02 UTC (rev 4566) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: skeleton,v 1.4 2004/12/23 14:29:09 simigern Exp $ + +$progname = 'program_name_here'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://URL packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Description", + 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} +./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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:18 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4567] csw/mgar/pkg Message-ID: Revision: 4567 http://gar.svn.sourceforge.net/gar/?rev=4567&view=rev Author: dmichelsen Date: 2009-04-27 12:58:18 +0000 (Mon, 27 Apr 2009) Log Message: ----------- sox: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/sox/ csw/mgar/pkg/sox/trunk/ csw/mgar/pkg/sox/trunk/legacy/ csw/mgar/pkg/sox/trunk/legacy/scripts/ csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/sox/trunk/legacy/scripts/human.pl csw/mgar/pkg/sox/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/sox/trunk/legacy/sources/ csw/mgar/pkg/sox/trunk/legacy/sources/sox.diff csw/mgar/pkg/sox/trunk/legacy/specs/ csw/mgar/pkg/sox/trunk/legacy/specs/Makefile csw/mgar/pkg/sox/trunk/legacy/specs/sox Added: csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:18 UTC (rev 4567) @@ -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/sox/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/scripts/human.pl 2009-04-27 12:58:18 UTC (rev 4567) @@ -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 () { + 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 + +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 + +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/sox/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:18 UTC (rev 4567) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/sox/trunk/legacy/sources/sox.diff =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/sources/sox.diff (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/sources/sox.diff 2009-04-27 12:58:18 UTC (rev 4567) @@ -0,0 +1,11 @@ +--- sox-13.0.0/src/st.h.orig 2007-03-04 11:15:32.159095000 -0500 ++++ sox-13.0.0/src/st.h 2007-03-04 11:15:40.478940000 -0500 +@@ -27,6 +27,8 @@ + /* Avoid warnings about unused parameters. */ + #ifdef __GNUC__ + #define UNUSED __attribute__ ((unused)) ++#else ++#define UNUSED + #endif + + /* C language enhancements: */ Added: csw/mgar/pkg/sox/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/specs/Makefile 2009-04-27 12:58:18 UTC (rev 4567) @@ -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/sox/trunk/legacy/specs/sox =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/specs/sox (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/specs/sox 2009-04-27 12:58:18 UTC (rev 4567) @@ -0,0 +1,48 @@ +# vim: ft=perl +# $Id: sox,v 1.7 2007-03-04 16:25:37 simigern Exp $ + +$progname = 'sox'; +$version = '13.0.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://sox.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['sox.diff', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Sound Processing Tool", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake prefix=${buildroot}/opt/csw mandir=${buildroot}/opt/csw/share/man install +rm ${buildroot}/opt/csw/bin/rec +ln -s play ${buildroot}/opt/csw/bin/rec +rm ${buildroot}/opt/csw/share/man/man1/rec.1 +ln -s play.1 ${buildroot}/opt/csw/share/man/man1/rec.1 +rm ${buildroot}/opt/csw/share/man/man1/soxmix.1 +ln -s sox.1 ${buildroot}/opt/csw/share/man/man1/soxmix.1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:34 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4568] csw/mgar/pkg Message-ID: Revision: 4568 http://gar.svn.sourceforge.net/gar/?rev=4568&view=rev Author: dmichelsen Date: 2009-04-27 12:58:34 +0000 (Mon, 27 Apr 2009) Log Message: ----------- sqlite: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/sqlite/ csw/mgar/pkg/sqlite/trunk/ csw/mgar/pkg/sqlite/trunk/legacy/ csw/mgar/pkg/sqlite/trunk/legacy/scripts/ csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/sqlite/trunk/legacy/scripts/human.pl csw/mgar/pkg/sqlite/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/sqlite/trunk/legacy/sources/ csw/mgar/pkg/sqlite/trunk/legacy/sources/sqlite-COPYING.patch csw/mgar/pkg/sqlite/trunk/legacy/specs/ csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile csw/mgar/pkg/sqlite/trunk/legacy/specs/sqlite Added: csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:34 UTC (rev 4568) @@ -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/sqlite/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/scripts/human.pl 2009-04-27 12:58:34 UTC (rev 4568) @@ -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 () { + 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 + +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 + +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/sqlite/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:34 UTC (rev 4568) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/sqlite/trunk/legacy/sources/sqlite-COPYING.patch =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/sources/sqlite-COPYING.patch (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/sources/sqlite-COPYING.patch 2009-04-27 12:58:34 UTC (rev 4568) @@ -0,0 +1,40 @@ +--- /dev/null 2004-02-24 11:11:49.000000000 -0500 ++++ COPYING 2004-02-24 11:17:14.915481000 -0500 +@@ -0,0 +1,37 @@ ++SQLite Copyright ++ ++The original author of SQLite has dedicated the code to the public domain. ++Anyone is free to copy, modify, publish, use, compile, sell, or distribute the ++original SQLite code, either in source code form or as a compiled binary, for ++any purpose, commerical or non-commerical, and by any means. ++ ++Contributed Code ++ ++In order to keep SQLite complete free and unencumbered by copyright, other ++contributors to the SQLite code base are asked to likewise dedicate their ++contributions to the public domain. If you want to send a patch or enhancement ++for possible inclusion in the SQLite source tree, please accompany the patch ++with the following statement: ++ ++ The author or authors of this code dedicate any and all copyright interest ++ in this code to the public domain. We make this dedication for the benefit ++ of the public at large and to the detriment of our heirs and successors. ++ We intend this dedication to be an overt act of relinquishment in ++ perpetuity of all present and future rights this code under copyright law. ++ ++Regrettably, as of 2003 October 20, we will no longer be able to accept patches ++or changes to SQLite that are not accompanied by a statement such as the above. ++In addition, if you make changes or enhancements as an employee, then a simple ++statement such as the above is insufficient. You must also send by surface mail ++a copyright release signed by a company officer. A signed original of the ++copyright release should be mailed to: ++ ++ Hwaci ++ 6200 Maple Cove Lane ++ Charlotte, NC 28269 ++ USA ++ ++A template copyright release is available in PDF or HTML. You can use this ++release to make future changes. If you have contributed changes or enhancements ++to SQLite in the past, and have not already done so, you are invited to ++complete and sign a copy of the template and mail it to the address above. Added: csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile 2009-04-27 12:58:34 UTC (rev 4568) @@ -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/sqlite/trunk/legacy/specs/sqlite =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/specs/sqlite (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/specs/sqlite 2009-04-27 12:58:34 UTC (rev 4568) @@ -0,0 +1,73 @@ +# vim: ft=perl +# $Id: sqlite,v 1.8 2005/04/09 12:18:18 simigern Exp $ + +$progname = 'sqlite'; +$version = '2.8.16'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.sqlite.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("sqlite-${version}.tar.gz"); + at patches = (['sqlite-COPYING.patch', "sqlite-${version}", '-p0']); + at packages = ({ + pkgname => ${progname}, + filename => ${progname}, + name => "${progname} - An embeddable SQL engine in a C library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); +$copyright = "${progname}-${version}/COPYING"; + +if ("$arch" eq "sparc") { + @isaexecs = ('/opt/csw/bin/sqlite'); +} + +#$suffix='.01'; + +$build = <<"EOF"; +set -x +export CC=cc +export PATH="${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +export LD_RUN_PATH='/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-fast -xarch=386' + #export CFLAGS='' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include -I/opt/csw/include/readline" +export CPPFLAGS="-I/opt/csw/include -I/opt/csw/include/readline" +cd sqlite-${version} +mkdir bld +cd bld +../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --mandir=/opt/csw/share/man --enable-threadsafe +gmake +gmake prefix=${buildroot}/opt/csw install +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp ../sqlite.1 ${buildroot}/opt/csw/share/man/man1/ + +#We need 64-bit libreadline (really?) +if [ "${arch}" = "sparc" ]; then + mkdir -p ${buildroot}/opt/csw/bin/sparcv8 + mv ${buildroot}/opt/csw/bin/sqlite ${buildroot}/opt/csw/bin/sparcv8/ + gmake distclean + export CFLAGS='-fast -xtarget=ultra -xarch=v9 -I/opt/csw/include -I/opt/csw/include/readline' + export LD_OPTIONS='-R/opt/csw/lib/sparcv9 -L/opt/csw/lib/sparcv9' + export LD_RUN_PATH='/opt/csw/lib/sparcv9' + ../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --libdir=/opt/csw/lib/sparcv9 --bindir=/opt/csw/bin/sparcv9 --mandir=/opt/csw/share/man --enable-threadsafe + gmake + #This is ugly :-( + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/lib/sparcv9 + ./libtool /opt/csw/bin/ginstall -c libsqlite.la ${buildroot}/opt/csw/lib/sparcv9 + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/bin/sparcv9 + ./libtool /opt/csw/bin/ginstall -c sqlite ${buildroot}/opt/csw/bin/sparcv9 + ln -s sparcv8/sqlite ${buildroot}/opt/csw/bin/sqlite32 + ln -s sparcv9/sqlite ${buildroot}/opt/csw/bin/sqlite64 +else + ln -s sqlite ${buildroot}/opt/csw/bin/sqlite32 +fi + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4569] csw/mgar/pkg/sqlite3/trunk Message-ID: Revision: 4569 http://gar.svn.sourceforge.net/gar/?rev=4569&view=rev Author: dmichelsen Date: 2009-04-27 12:58:48 +0000 (Mon, 27 Apr 2009) Log Message: ----------- sqlite3: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/sqlite3/trunk/legacy/ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/sqlite3/trunk/legacy/scripts/human.pl csw/mgar/pkg/sqlite3/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/sqlite3/trunk/legacy/sources/ csw/mgar/pkg/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch csw/mgar/pkg/sqlite3/trunk/legacy/specs/ csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile csw/mgar/pkg/sqlite3/trunk/legacy/specs/sqlite3 Added: csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:48 UTC (rev 4569) @@ -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/sqlite3/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/human.pl 2009-04-27 12:58:48 UTC (rev 4569) @@ -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 () { + 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 + +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 + +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/sqlite3/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:48 UTC (rev 4569) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch 2009-04-27 12:58:48 UTC (rev 4569) @@ -0,0 +1,40 @@ +--- /dev/null 2004-02-24 11:11:49.000000000 -0500 ++++ COPYING 2004-02-24 11:17:14.915481000 -0500 +@@ -0,0 +1,37 @@ ++SQLite Copyright ++ ++The original author of SQLite has dedicated the code to the public domain. ++Anyone is free to copy, modify, publish, use, compile, sell, or distribute the ++original SQLite code, either in source code form or as a compiled binary, for ++any purpose, commerical or non-commerical, and by any means. ++ ++Contributed Code ++ ++In order to keep SQLite complete free and unencumbered by copyright, other ++contributors to the SQLite code base are asked to likewise dedicate their ++contributions to the public domain. If you want to send a patch or enhancement ++for possible inclusion in the SQLite source tree, please accompany the patch ++with the following statement: ++ ++ The author or authors of this code dedicate any and all copyright interest ++ in this code to the public domain. We make this dedication for the benefit ++ of the public at large and to the detriment of our heirs and successors. ++ We intend this dedication to be an overt act of relinquishment in ++ perpetuity of all present and future rights this code under copyright law. ++ ++Regrettably, as of 2003 October 20, we will no longer be able to accept patches ++or changes to SQLite that are not accompanied by a statement such as the above. ++In addition, if you make changes or enhancements as an employee, then a simple ++statement such as the above is insufficient. You must also send by surface mail ++a copyright release signed by a company officer. A signed original of the ++copyright release should be mailed to: ++ ++ Hwaci ++ 6200 Maple Cove Lane ++ Charlotte, NC 28269 ++ USA ++ ++A template copyright release is available in PDF or HTML. You can use this ++release to make future changes. If you have contributed changes or enhancements ++to SQLite in the past, and have not already done so, you are invited to ++complete and sign a copy of the template and mail it to the address above. Added: csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile 2009-04-27 12:58:48 UTC (rev 4569) @@ -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/sqlite3/trunk/legacy/specs/sqlite3 =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/specs/sqlite3 (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/specs/sqlite3 2009-04-27 12:58:48 UTC (rev 4569) @@ -0,0 +1,75 @@ +# vim: ft=perl +# $Id: sqlite3,v 1.5 2005/07/10 18:33:04 simigern Exp $ + +$progname = 'sqlite3'; +$version = '3.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.sqlite.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("sqlite-${version}.tar.gz"); + at patches = (['sqlite-COPYING.patch', "sqlite-${version}", '-p0']); + at packages = ({ + pkgname => ${progname}, + filename => ${progname}, + name => "${progname} - An embeddable SQL engine in a C library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); +$copyright = "sqlite-${version}/COPYING"; + +if ("$arch" eq "sparc") { + @isaexecs = ('/opt/csw/bin/sqlite3'); +} + +#$suffix='.01'; + +$build = <<"EOF"; +set -x +export CC=cc +export PATH="${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +export LD_RUN_PATH='/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-fast -xarch=386' + #export CFLAGS='' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include -I/opt/csw/include/readline" +export CPPFLAGS="-I/opt/csw/include -I/opt/csw/include/readline" +cd sqlite-${version} +mkdir bld +cd bld +ln -s /opt/csw/bin/gawk awk +export PATH="`pwd`:\${PATH}" +../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --mandir=/opt/csw/share/man --enable-threadsafe +gmake +gmake prefix=${buildroot}/opt/csw install +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp ../sqlite3.1 ${buildroot}/opt/csw/share/man/man1/ + +#We need 64-bit libreadline (really?) +if [ "${arch}" = "sparc" ]; then + mkdir -p ${buildroot}/opt/csw/bin/sparcv8 + mv ${buildroot}/opt/csw/bin/sqlite3 ${buildroot}/opt/csw/bin/sparcv8/ + gmake distclean + export CFLAGS='-fast -xtarget=ultra -xarch=v9 -I/opt/csw/include -I/opt/csw/include/readline' + export LD_OPTIONS='-R/opt/csw/lib/sparcv9 -L/opt/csw/lib/sparcv9' + export LD_RUN_PATH='/opt/csw/lib/sparcv9' + ../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --libdir=/opt/csw/lib/sparcv9 --bindir=/opt/csw/bin/sparcv9 --mandir=/opt/csw/share/man --enable-threadsafe + gmake + #This is ugly :-( + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/lib/sparcv9 + ./libtool /opt/csw/bin/ginstall -c libsqlite3.la ${buildroot}/opt/csw/lib/sparcv9 + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/bin/sparcv9 + ./libtool /opt/csw/bin/ginstall -c sqlite3 ${buildroot}/opt/csw/bin/sparcv9 + ln -s sparcv8/sqlite3 ${buildroot}/opt/csw/bin/sqlite3-32 + ln -s sparcv9/sqlite3 ${buildroot}/opt/csw/bin/sqlite3-64 +else + ln -s sqlite3 ${buildroot}/opt/csw/bin/sqlite3-32 +fi + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4570] csw/mgar/pkg Message-ID: Revision: 4570 http://gar.svn.sourceforge.net/gar/?rev=4570&view=rev Author: dmichelsen Date: 2009-04-27 12:59:05 +0000 (Mon, 27 Apr 2009) Log Message: ----------- startup-notification: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/startup-notification/ csw/mgar/pkg/startup-notification/trunk/ csw/mgar/pkg/startup-notification/trunk/legacy/ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/startup-notification/trunk/legacy/scripts/human.pl csw/mgar/pkg/startup-notification/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/startup-notification/trunk/legacy/sources/ csw/mgar/pkg/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch csw/mgar/pkg/startup-notification/trunk/legacy/specs/ csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile csw/mgar/pkg/startup-notification/trunk/legacy/specs/startup-notification Added: csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:05 UTC (rev 4570) @@ -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/startup-notification/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/human.pl 2009-04-27 12:59:05 UTC (rev 4570) @@ -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 () { + 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 + +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 + +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/startup-notification/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:05 UTC (rev 4570) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch 2009-04-27 12:59:05 UTC (rev 4570) @@ -0,0 +1,22 @@ +--- libsn/sn-launcher.c.orig 2002-11-30 12:58:17.000000000 -0500 ++++ libsn/sn-launcher.c 2004-03-29 15:41:49.000000000 -0500 +@@ -175,8 +175,7 @@ + + if (context->startup_id != NULL) + { +- fprintf (stderr, "%s called twice for the same SnLaunchContext\n", +- __FUNCTION__); ++ fprintf (stderr, "sn_launcher_context_initiate called twice for the same SnLaunchContext\n"); + return; + } + +@@ -361,8 +360,7 @@ + + /* FIXME use something pluggable, not fprintf */ + #define WARN_ALREADY_INITIATED(context) do { if ((context)->startup_id != NULL) { \ +- fprintf (stderr, "%s called for an SnLauncherContext that has already been initiated\n", \ +- __FUNCTION__); \ ++ fprintf (stderr, "sn_launcher_context_setup_child_process called for an SnLauncherContext that has already been initiated\n"); \ + return; \ + } } while (0) + Added: csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile 2009-04-27 12:59:05 UTC (rev 4570) @@ -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/startup-notification/trunk/legacy/specs/startup-notification =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/specs/startup-notification (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/specs/startup-notification 2009-04-27 12:59:05 UTC (rev 4570) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: startup-notification,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'startup-notification'; +$version = '0.7'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/startup-notification/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['startup-notification.sn-launcher.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "startupnotif", + filename => "startup_notif", + name => "startup_notif - Library for tracking application startup", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4571] csw/mgar/pkg/subversion/trunk Message-ID: Revision: 4571 http://gar.svn.sourceforge.net/gar/?rev=4571&view=rev Author: dmichelsen Date: 2009-04-27 12:59:21 +0000 (Mon, 27 Apr 2009) Log Message: ----------- subversion: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/subversion/trunk/legacy/ csw/mgar/pkg/subversion/trunk/legacy/scripts/ csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/subversion/trunk/legacy/scripts/human.pl csw/mgar/pkg/subversion/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/subversion/trunk/legacy/sources/ csw/mgar/pkg/subversion/trunk/legacy/sources/subversion-utf.patch csw/mgar/pkg/subversion/trunk/legacy/specs/ csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile csw/mgar/pkg/subversion/trunk/legacy/specs/subversion Added: csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:21 UTC (rev 4571) @@ -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/subversion/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/scripts/human.pl 2009-04-27 12:59:21 UTC (rev 4571) @@ -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 () { + 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 + +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 + +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/subversion/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:21 UTC (rev 4571) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/subversion/trunk/legacy/sources/subversion-utf.patch =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/sources/subversion-utf.patch (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/sources/subversion-utf.patch 2009-04-27 12:59:21 UTC (rev 4571) @@ -0,0 +1,20 @@ +--- subversion/libsvn_subr/utf.c.orig 2004-03-26 21:34:00.815411000 +0100 ++++ subversion/libsvn_subr/utf.c 2004-03-26 21:45:05.375692000 +0100 +@@ -92,7 +92,7 @@ + static svn_error_t * + get_ntou_xlate_handle (apr_xlate_t **ret, apr_pool_t *pool) + { +- return get_xlate_handle(ret, "UTF-8", APR_LOCALE_CHARSET, ++ return get_xlate_handle(ret, "UTF-8", "ASCII", + SVN_UTF_NTOU_XLATE_HANDLE, pool); + } + +@@ -105,7 +105,7 @@ + static svn_error_t * + get_uton_xlate_handle (apr_xlate_t **ret, apr_pool_t *pool) + { +- return get_xlate_handle(ret, APR_LOCALE_CHARSET, "UTF-8", ++ return get_xlate_handle(ret, "ASCII", "UTF-8", + SVN_UTF_UTON_XLATE_HANDLE, pool); + } + Added: csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile 2009-04-27 12:59:21 UTC (rev 4571) @@ -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/subversion/trunk/legacy/specs/subversion =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/specs/subversion (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/specs/subversion 2009-04-27 12:59:21 UTC (rev 4571) @@ -0,0 +1,88 @@ +# vim: ft=perl +# $Id: subversion,v 1.24 2004/08/29 19:52:11 simigern Exp $ + +$progname = 'subversion'; +$version = '1.0.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://subversion.tigris.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("subversion-${version}.tar.bz2"); +#@patches = (['rdesktop-sound-configure.patch', "rdesktop-${version}", '-p0'], +# ['rdesktop-1.3.1-backingstore.diff', "rdesktop-${version}", '-p1']); + + at patches = (['subversion-utf.patch',"subversion-${version}",'-p0']); + at packages = ({ + pkgname => 'svn', + filename => $progname, + name => "${progname} - Version Control rethought", + dependencies => ['CSWcommon','CSWswig'], + filelist => [qw( + opt/csw/bin + opt/csw/include + opt/csw/lib + opt/csw/share + )], + exclude_dependencies => ['SUNWbash'] + }, + { + pkgname => "ap2-svn", + filename => "ap2_${progname}", + name => "ap2_${progname} - Version Control rethought (Apache 2 Module)", + dependencies => ['CSWcommon','CSWapache2','CSWsvn'], + postinstall => "ap2_subversion.postinstall", + filelist => [qw( + opt/csw/apache2 + )] + #exclude_dependencies => ['CSWexpat'] + }, + ); +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +set -x +export CC=cc +export PATH="${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +export LDFLAGS='-R/opt/csw/bdb4/lib -L/opt/csw/bdb4/lib -R/opt/csw/lib/svn -L/opt/csw/lib/svn -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib/svn' +export LD_OPTIONS='-R/opt/csw/bdb4/lib -L/opt/csw/bdb4/lib -R/opt/csw/lib/svn -L/opt/csw/lib/svn -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib/svn' +export LD_RUN_PATH='/opt/csw/bdb4/lib:/opt/csw/lib/svn:/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8 -I${builddir}/svninc -I/opt/csw/bdb4/include -I/opt/csw/include' +else + export CFLAGS='-fast -xarch=386 -I${builddir}/svninc -I/opt/csw/bdb4/include -I/opt/csw/include' +fi +export CPPFLAGS="\${CFLAGS}" +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig +mkdir svninc +cp /usr/include/iconv.h svninc/ +cd subversion-${version} +./configure --prefix=/opt/csw --infodir=/opt/csw/share/info --mandir=/opt/csw/share/man --with-zlib --with-berkeley-db=/opt/csw/bdb4 --libdir=/opt/csw/lib/svn --includedir=/opt/csw/include/svn --with-apxs=/opt/csw/apache2/sbin/apxs --with-ssl --with-zlib --enable-swig-bindings=all #--with-apr=/opt/csw/bin/apr-config --with-apr-util=/opt/csw +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#swig-python +#gmake swig-py || exit 1 +#gmake DESTDIR=${buildroot} install-swig-py || exit 1 + +#swig-perl +gmake swig-pl-lib || exit 1 +gmake DESTDIR=${buildroot} install-swig-pl-lib || exit 1 +cd subversion/bindings/swig/perl +env APR_CONFIG=/opt/csw/bin/apr-config perl Makefile.PL || exit 1 +gmake all || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +cd ${builddir}/${progname}-${version} + +mkdir -p ${buildroot}/opt/csw/share/doc/subversion +cp -r ${builddir}/subversion-${version}/doc/book/book/images ${buildroot}/opt/csw/share/doc/subversion +cp ${builddir}/subversion-${version}/doc/book/book/book.{html,pdf} ${buildroot}/opt/csw/share/doc/subversion +#mv ${buildroot}/opt/csw/build ${buildroot}/opt/csw/share/doc/subversion/ +#mv ${buildroot}/opt/csw/bin/apr-config ${buildroot}/opt/csw/share/doc/subversion/ +#mv ${buildroot}/opt/csw/bin/apu-config ${buildroot}/opt/csw/share/doc/subversion/ +rm -rf ${buildroot}/opt/csw/build ${buildroot}/opt/csw/bin/apr-config ${buildroot}/opt/csw/bin/apu-config +rm -f ${buildroot}/opt/csw/lib/perl/5*/perllocal.pod +rmdir ${buildroot}/opt/csw/lib/perl/5* +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4572] csw/mgar/pkg Message-ID: Revision: 4572 http://gar.svn.sourceforge.net/gar/?rev=4572&view=rev Author: dmichelsen Date: 2009-04-27 12:59:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- synce: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/synce/ csw/mgar/pkg/synce/trunk/ csw/mgar/pkg/synce/trunk/legacy/ csw/mgar/pkg/synce/trunk/legacy/scripts/ csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/synce/trunk/legacy/scripts/human.pl csw/mgar/pkg/synce/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/synce/trunk/legacy/sources/ csw/mgar/pkg/synce/trunk/legacy/specs/ csw/mgar/pkg/synce/trunk/legacy/specs/Makefile csw/mgar/pkg/synce/trunk/legacy/specs/synce Added: csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:35 UTC (rev 4572) @@ -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/synce/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/scripts/human.pl 2009-04-27 12:59:35 UTC (rev 4572) @@ -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 () { + 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 + +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 + +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/synce/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:35 UTC (rev 4572) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/synce/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/specs/Makefile 2009-04-27 12:59:35 UTC (rev 4572) @@ -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/synce/trunk/legacy/specs/synce =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/specs/synce (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/specs/synce 2009-04-27 12:59:35 UTC (rev 4572) @@ -0,0 +1,120 @@ +# vim: ft=perl +# $Id: synce,v 1.7 2004/03/25 01:01:22 simigern Exp $ + +$progname = 'synce'; +$version = '0.8.9'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://synce.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("synce-dccm-${version}.tar.gz", + "synce-librapi2-${version}.tar.gz", + "synce-libsynce-${version}.tar.gz", + "synce-serial-${version}.tar.gz", + "libmimedir-0.3.tar.gz", + "unshield-0.2.tar.gz", + "synce-rra-${version}.tar.gz", + "synce-multisync_plugin-${version}.tar.gz", + "multisync-0.81.tar.bz2"); + +#@patches = (['synce-rra-0.8.9', "${progname}-rra-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Windows CE and Pocket PC connectivity for Unix", + dependencies => ['CSWcommon','CSWmultisync'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-dccm-${version}/LICENSE"; + +$build = <<"EOF"; +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' + +#libsynce +cd ${builddir}/synce-libsynce-${version} +sed -e 's|-Werror||' lib/Makefile.in >lib/Makefile.innew +mv lib/Makefile.innew lib/Makefile.in +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#librapi2 +cd ${builddir}/synce-librapi2-${version} +for i in src src/support tests tools; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#dccm +cd ${builddir}/synce-dccm-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +sed -e 's|LOG_PERROR|LOG_CONS|' src/dccm.c >src/dccm.cnew +mv src/dccm.cnew src/dccm.c +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#serial +cd ${builddir}/synce-serial-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#libmimedir +cd ${builddir}/libmimedir-0.3 +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake prefix=${buildroot}/opt/csw install || exit 1 + +export CFLAGS="\$CFLAGS -D__EXTENSIONS__" +#unshield +cd ${builddir}/unshield-0.2 +for i in src lib; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo '#define MIN(x,y) (((x) < (y)) ? (x) : (y))' >>lib/internal.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#rra +cd ${builddir}/synce-rra-${version} +for i in src lib; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo '#include ' >stdint.h +echo '#define MIN(x,y) (((x) < (y)) ? (x) : (y))' >>stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +export CFLAGS="\$CFLAGS -I${buildroot}/opt/csw/include/rra" +export CPPFLAGS="\$CPPFLAGS -I${buildroot}/opt/csw/include/rra" + +#multisync_plugin +cd ${builddir}/synce-multisync_plugin-${version} +for i in src; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-multisync-source=${builddir}/multisync-0.81 --with-multisync-include=${builddir}/multisync-0.81/include +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4573] csw/mgar/pkg Message-ID: Revision: 4573 http://gar.svn.sourceforge.net/gar/?rev=4573&view=rev Author: dmichelsen Date: 2009-04-27 12:59:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- synce_multisync: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/synce_multisync/ csw/mgar/pkg/synce_multisync/trunk/ csw/mgar/pkg/synce_multisync/trunk/legacy/ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/human.pl csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/synce_multisync/trunk/legacy/sources/ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/Makefile csw/mgar/pkg/synce_multisync/trunk/legacy/specs/synce_multisync Added: csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:51 UTC (rev 4573) @@ -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/synce_multisync/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/human.pl 2009-04-27 12:59:51 UTC (rev 4573) @@ -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 () { + 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 + +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 + +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/synce_multisync/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:51 UTC (rev 4573) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/synce_multisync/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/Makefile 2009-04-27 12:59:51 UTC (rev 4573) @@ -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/synce_multisync/trunk/legacy/specs/synce_multisync =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/specs/synce_multisync (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/synce_multisync 2009-04-27 12:59:51 UTC (rev 4573) @@ -0,0 +1,62 @@ +# vim: ft=perl +# $Id: synce_multisync,v 1.2 2004/03/25 00:00:50 simigern Exp $ + +$progname = 'syncemultisync'; +$version = '0.8.9'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://synce.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("synce-rra-${version}.tar.gz", + "synce-multisync_plugin-${version}.tar.gz", + "multisync-0.81.tar.bz2"); + +#@patches = (['synce-rra-0.8.9', "${progname}-rra-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => "synce_multisync", + name => "synce_multisync - synce plugin for multisync", + dependencies => ['CSWcommon','CSWsynce','CSWmultisync'], + filelist => [qw(opt)] + }); + +$copyright = "synce-multisync_plugin-${version}/LICENSE"; + +$build = <<"EOF"; +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include -D__EXTENSIONS__" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' + +#rra +cd ${builddir}/synce-rra-${version} +for i in src lib; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo '#include ' >stdint.h +echo '#define MIN(x,y) (((x) < (y)) ? (x) : (y))' >>stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +export CFLAGS="\$CFLAGS -I${buildroot}/opt/csw/include/rra" +export CPPFLAGS="\$CPPFLAGS -I${buildroot}/opt/csw/include/rra" +#multisync_plugin +cd ${builddir}/synce-multisync_plugin-${version} +for i in src; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-multisync-source=${builddir}/multisync-0.81 --with-multisync-include=${builddir}/multisync-0.81/include +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:10 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4574] csw/mgar/pkg Message-ID: Revision: 4574 http://gar.svn.sourceforge.net/gar/?rev=4574&view=rev Author: dmichelsen Date: 2009-04-27 13:00:10 +0000 (Mon, 27 Apr 2009) Log Message: ----------- timidity: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/timidity/ csw/mgar/pkg/timidity/trunk/ csw/mgar/pkg/timidity/trunk/legacy/ csw/mgar/pkg/timidity/trunk/legacy/scripts/ csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/timidity/trunk/legacy/scripts/human.pl csw/mgar/pkg/timidity/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/timidity/trunk/legacy/sources/ csw/mgar/pkg/timidity/trunk/legacy/sources/timidity.sysdep.patch csw/mgar/pkg/timidity/trunk/legacy/specs/ csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile csw/mgar/pkg/timidity/trunk/legacy/specs/timidity Added: csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:10 UTC (rev 4574) @@ -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/timidity/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/scripts/human.pl 2009-04-27 13:00:10 UTC (rev 4574) @@ -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 () { + 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 + +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 + +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/timidity/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:10 UTC (rev 4574) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/timidity/trunk/legacy/sources/timidity.sysdep.patch =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/sources/timidity.sysdep.patch (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/sources/timidity.sysdep.patch 2009-04-27 13:00:10 UTC (rev 4574) @@ -0,0 +1,28 @@ +--- timidity/sysdep.h.orig 2004-10-08 12:53:38.427830000 -0400 ++++ timidity/sysdep.h 2004-10-08 12:54:47.397766000 -0400 +@@ -79,6 +79,7 @@ + #endif + + ++#if 0 + /* integer type definitions: ISO C now knows a better way */ + #if __STDC_VERSION__ == 199901L || __GNUC__ >= 3 + #include // int types are defined here +@@ -138,7 +139,17 @@ + #endif + #endif /* 64bit arch */ + #endif /* C99 */ ++#endif + ++typedef int8_t int8; ++typedef uint8_t uint8; ++typedef int16_t int16; ++typedef uint16_t uint16; ++typedef int32_t int32; ++typedef uint32_t uint32; ++typedef int64_t int64; ++typedef uint64_t uint64; ++#define TIMIDITY_HAVE_INT64 1 + + /* Instrument files are little-endian, MIDI files big-endian, so we + need to do some conversions. */ Added: csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile 2009-04-27 13:00:10 UTC (rev 4574) @@ -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/timidity/trunk/legacy/specs/timidity =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/specs/timidity (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/specs/timidity 2009-04-27 13:00:10 UTC (rev 4574) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: timidity,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'TiMidity++'; +$version = '2.13.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://timidity.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","timidity-patches_0.1-5.tar.gz"); + + at patches = (['timidity.sysdep.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => 'timidity', + filename => 'timidity', + name => "timidity - A MIDI to WAVE converter and player", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --enable-gtk --enable-slang --enable-motif --enable-vt100 --enable-xaw --enable-xskin --enable-server --enable-offix --enable-network --enable-spectrogram --enable-audio=sun,vorbis,esd #--enable-ncurses +gmake || exit 1 +gmake DESTDIR=${buildroot} install +echo >>COPYING +echo "===============================================================================" >>COPYING +echo "Copyright for sound-samples:" >>COPYING +cat ${builddir}/timidity-patches-0.1/debian/copyright >>COPYING +cd ${builddir}/timidity-patches-0.1 +mkdir -p ${buildroot}/opt/csw/share/timidity/patches +cp -p cfg/*.cfg ${buildroot}/opt/csw/share/timidity +cp -p pat/*.pat ${buildroot}/opt/csw/share/timidity/patches +chmod 644 ${buildroot}/opt/csw/share/timidity/patches/* +sed -e 's|/sedona/users/klee/instruments|/opt/csw/share/timidity/patches|' cfg/timidity.cfg >${buildroot}/opt/csw/share/timidity/timidity.cfg +chmod 644 ${buildroot}/opt/csw/share/timidity/*.cfg + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:27 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4575] csw/mgar/pkg Message-ID: Revision: 4575 http://gar.svn.sourceforge.net/gar/?rev=4575&view=rev Author: dmichelsen Date: 2009-04-27 13:00:27 +0000 (Mon, 27 Apr 2009) Log Message: ----------- tla: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/tla/ csw/mgar/pkg/tla/trunk/ csw/mgar/pkg/tla/trunk/legacy/ csw/mgar/pkg/tla/trunk/legacy/scripts/ csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/tla/trunk/legacy/scripts/human.pl csw/mgar/pkg/tla/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/tla/trunk/legacy/sources/ csw/mgar/pkg/tla/trunk/legacy/sources/tla-solaris.patch csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch csw/mgar/pkg/tla/trunk/legacy/specs/ csw/mgar/pkg/tla/trunk/legacy/specs/Makefile csw/mgar/pkg/tla/trunk/legacy/specs/tla Added: csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:27 UTC (rev 4575) @@ -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/tla/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/scripts/human.pl 2009-04-27 13:00:27 UTC (rev 4575) @@ -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 () { + 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 + +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 + +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/tla/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:27 UTC (rev 4575) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/tla/trunk/legacy/sources/tla-solaris.patch =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/sources/tla-solaris.patch (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/sources/tla-solaris.patch 2009-04-27 13:00:27 UTC (rev 4575) @@ -0,0 +1,69 @@ +diff -ru -x{arch} tla-ref/src/PLUGIN/auto tla/src/PLUGIN/auto +--- tla-ref/src/PLUGIN/auto 2004-01-22 10:35:33.000000000 +0900 ++++ tla/src/PLUGIN/auto 2004-01-06 13:57:02.000000000 +0900 +@@ -6,6 +6,10 @@ + + library-test socket-library -lsocket + ++library-test net-library -lnsl ++ ++library-test resolv-library -lresolv ++ + gcc-test gcc-version + + exec-suffix-test +diff -ru -x{arch} tla-ref/src/build-tools/scripts/configure-top tla/src/build-tools/scripts/configure-top +--- tla-ref/src/build-tools/scripts/configure-top 2004-01-22 10:35:33.000000000 +0900 ++++ tla/src/build-tools/scripts/configure-top 2004-01-06 13:57:02.000000000 +0900 +@@ -2,7 +2,7 @@ + # configure - The hackerlab configure script + # + ################################################################ +-# Copyright (C) 2001, 2002 Tom Lord ++# Copyright (C) 2001, 2002, 2004 Tom Lord + # + # See the file "COPYING" for further information about + # the copyright and warranty status of this work. +@@ -845,7 +845,7 @@ + # make is in the works: + # + +-cc_setting="`cat \"$optfile\" \"$tmpoptfile\" | grep -E -e '^string cc=' | tail -n 1 | sed -e 's/string cc=//'`" ++cc_setting="`cat \"$optfile\" \"$tmpoptfile\" | grep -E -e '^string cc=' | sed -n '$p' | sed -e 's/string cc=//'`" + if test -z "$cc_setting" ; then + CC=cc + else +diff -ru -x{arch} tla-ref/src/tla/tests/changeset-tests/edit-tree-randomly tla/src/tla/tests/changeset-tests/edit-tree-randomly +--- tla-ref/src/tla/tests/changeset-tests/edit-tree-randomly 2004-01-22 10:36:45.000000000 +0900 ++++ tla/src/tla/tests/changeset-tests/edit-tree-randomly 2004-01-06 13:56:32.000000000 +0900 +@@ -1,7 +1,7 @@ + # edit-tree-randomly: + # + ################################################################ +-# Copyright (C) 2003 Robert Anderson and Tom Lord ++# Copyright (C) 2003, 2004 Robert Anderson and Tom Lord + # + # See the file "COPYING" for further information about + # the copyright and warranty status of this work. +@@ -409,7 +409,7 @@ + + num=`random_upto $n` + +- name=`head -n $num ,,list | tail -n 1` ++ name=`sed -n "${num}p" ,,list` + + echo -n "$name" + } +diff -ru -x{arch} tla-ref/src/tla/tla/Makefile.in tla/src/tla/tla/Makefile.in +--- tla-ref/src/tla/tla/Makefile.in 2004-01-22 10:36:56.000000000 +0900 ++++ tla/src/tla/tla/Makefile.in 2004-01-06 13:56:35.000000000 +0900 +@@ -4,6 +4,9 @@ + ../libdate/libdate.a \ + $(objroot)/hackerlab/libhackerlab/libhackerlab.a \ + ../libneon/libneon.a \ ++ $(cfg__socket_library) \ ++ $(cfg__resolv_library) \ ++ $(cfg__net_library) \ + -lm + + mains := tla.c Added: csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch 2009-04-27 13:00:27 UTC (rev 4575) @@ -0,0 +1,117 @@ +diff -ruN tla-tools-0.31.orig/tla-changelogs-to-log.shpp tla-tools-0.31/tla-changelogs-to-log.shpp +--- tla-tools-0.31.orig/tla-changelogs-to-log.shpp 2004-03-02 14:19:54.000000000 +0100 ++++ tla-tools-0.31/tla-changelogs-to-log.shpp 2004-03-02 14:35:36.532827000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-changelogs-to-log -- Construct an arch patch-log from ChangeLog changes + # Usage: tla-changelogs-to-log SUMMARY + # +diff -ruN tla-tools-0.31.orig/tla-copy-changes.shpp tla-tools-0.31/tla-copy-changes.shpp +--- tla-tools-0.31.orig/tla-copy-changes.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-copy-changes.shpp 2004-03-02 14:35:47.046364000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-copy-changes -- Copy and commit arch changesets from another branch + # Usage: tla-copy-changes [OPTION...] SOURCE_VERSION_OR_REVISION... + # +diff -ruN tla-tools-0.31.orig/tla-cvs-sync.shpp tla-tools-0.31/tla-cvs-sync.shpp +--- tla-tools-0.31.orig/tla-cvs-sync.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-cvs-sync.shpp 2004-03-02 14:35:55.618048000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-cvs-sync -- Propagate changes between arch and CVS + # + # Copyright (C) 2003, 2004 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp tla-tools-0.31/tla-emacs-xids-to-db.shpp +--- tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-emacs-xids-to-db.shpp 2004-03-02 14:36:06.251350000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-emacs-xids-to-db -- Produce a id rename database for emacs + # + # Copyright (C) 2003 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-file-log.shpp tla-tools-0.31/tla-file-log.shpp +--- tla-tools-0.31.orig/tla-file-log.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-file-log.shpp 2004-03-02 14:36:16.966566000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-file-log -- Output a historical log for a file in an arch project tree + # Usage: tla-file-log FILE [VERSION] + # +diff -ruN tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp tla-tools-0.31/tla-fix-changelog-conflicts.shpp +--- tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fix-changelog-conflicts.shpp 2004-03-02 14:36:27.636640000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fix-changelog-conflicts -- Automatically resolve merge conflicts + # in ChangeLog files + # Usage: tla-fix-changelog-conflicts [CHANGELOG...] +diff -ruN tla-tools-0.31.orig/tla-fork-archive.shpp tla-tools-0.31/tla-fork-archive.shpp +--- tla-tools-0.31.orig/tla-fork-archive.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork-archive.shpp 2004-03-02 14:36:42.268565000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork-archive -- Make a new arch archive continuing from an old one + # Usage: tla-fork-archive OLD_ARCHIVE NEW_ARCHIVE + # +diff -ruN tla-tools-0.31.orig/tla-fork.shpp tla-tools-0.31/tla-fork.shpp +--- tla-tools-0.31.orig/tla-fork.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork.shpp 2004-03-02 14:36:51.641449000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork -- Create an arch branch forking off an existing branch + # Usage: tla-fork [OPTION...] NEW_BRANCH + # +diff -ruN tla-tools-0.31.orig/tla-munge-archive-names.shpp tla-tools-0.31/tla-munge-archive-names.shpp +--- tla-tools-0.31.orig/tla-munge-archive-names.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-names.shpp 2004-03-02 14:37:01.087381000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-names -- Destructively modify an arch archive to change + # the names of arch categories/branches/versions + # Usage: tla-munge-archive-names [OPTION...] CHANGE_RULE ARCHIVE_DIR... +diff -ruN tla-tools-0.31.orig/tla-munge-archive-xids.shpp tla-tools-0.31/tla-munge-archive-xids.shpp +--- tla-tools-0.31.orig/tla-munge-archive-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-xids.shpp 2004-03-02 14:37:09.088401000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-xids -- Destructively modify an arch archive to use + # taglines instead of explicit ids + # Usage: tla-munge-archive-xids TAG_RENAME_DB DIR... +diff -ruN tla-tools-0.31.orig/tla-scan-for-xids.shpp tla-tools-0.31/tla-scan-for-xids.shpp +--- tla-tools-0.31.orig/tla-scan-for-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-scan-for-xids.shpp 2004-03-02 14:37:18.985842000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-scan-for-xids -- Print a list of explicit ids used in an arch archive + # Usage: tla-scan-for-xids ARCHIVE_DIR... + # +diff -ruN tla-tools-0.31.orig/tla-switch.shpp tla-tools-0.31/tla-switch.shpp +--- tla-tools-0.31.orig/tla-switch.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-switch.shpp 2004-03-02 14:37:27.335854000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-switch -- Switch an arch project tree to a new branch/version/revision + # Usage: tla-switch [OPTION...] NEW + # +diff -ruN tla-tools-0.31.orig/tla-update-ids.shpp tla-tools-0.31/tla-update-ids.shpp +--- tla-tools-0.31.orig/tla-update-ids.shpp 2004-03-02 14:19:51.000000000 +0100 ++++ tla-tools-0.31/tla-update-ids.shpp 2004-03-02 14:37:36.773607000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-update-ids -- Handle adding arch id-tags to new files, removing + # deleted explicit ids, and some renames + # Added: csw/mgar/pkg/tla/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/specs/Makefile 2009-04-27 13:00:27 UTC (rev 4575) @@ -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/tla/trunk/legacy/specs/tla =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/specs/tla (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/specs/tla 2009-04-27 13:00:27 UTC (rev 4575) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: tla,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'tla'; +$version = '1.2.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnu.org/software/gnu-arch/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['tla-solaris.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNU arch - A modern CVS replacement", + dependencies => ['CSWcommon','SUNWbash','CSWdiffutils','CSWgtar','SUNWgpch'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' +mkdir ${progname}-${version}/build-dir +cd ${progname}-${version} +cd build-dir +ln -s /opt/csw/bin/ggrep grep +ln -s /opt/csw/bin/gawk awk +ln -s /opt/csw/bin/gsed sed +ln -s /opt/csw/bin/gdiff diff +ln -s /opt/csw/bin/gdiff3 diff3 + +export PATH="${builddir}/${progname}-${version}/build-dir:\${PATH}" +../src/configure --prefix=/opt/csw --config-shell /usr/bin/bash --with-posix-shell=/usr/bin/bash --with-gnu-diff /opt/csw/bin/gdiff --with-gnu-diff3 /opt/csw/bin/gdiff3 --with-gnu-patch /usr/bin/gpatch --with-gnu-tar /opt/csw/bin/gtar --destdir ${buildroot} +gmake +gmake install +mkdir -p ${buildroot}/opt/csw/share/doc/tla +gcp -vax ../src/docs-tla/* ${buildroot}/opt/csw/share/doc/tla/ +mv ${buildroot}/opt/csw/share/doc/tla/\=README ${buildroot}/opt/csw/share/doc/tla/README +grm -rfv ${buildroot}/opt/csw/share/doc/tla/\{arch\} ${buildroot}/opt/csw/share/doc/tla/PLUGIN ${buildroot}/opt/csw/share/doc/tla/src ${buildroot}/opt/csw/share/doc/tla/Makefile.in ${buildroot}/opt/csw/share/doc/tla/{html,ps,texi}/.arch-ids +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:43 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4576] csw/mgar/pkg Message-ID: Revision: 4576 http://gar.svn.sourceforge.net/gar/?rev=4576&view=rev Author: dmichelsen Date: 2009-04-27 13:00:43 +0000 (Mon, 27 Apr 2009) Log Message: ----------- tla-tools: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/tla-tools/ csw/mgar/pkg/tla-tools/trunk/ csw/mgar/pkg/tla-tools/trunk/legacy/ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/tla-tools/trunk/legacy/scripts/human.pl csw/mgar/pkg/tla-tools/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/tla-tools/trunk/legacy/sources/ csw/mgar/pkg/tla-tools/trunk/legacy/sources/tla-tools-shell.patch csw/mgar/pkg/tla-tools/trunk/legacy/specs/ csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile csw/mgar/pkg/tla-tools/trunk/legacy/specs/tla-tools Added: csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:43 UTC (rev 4576) @@ -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/tla-tools/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/human.pl 2009-04-27 13:00:43 UTC (rev 4576) @@ -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 () { + 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 + +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 + +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/tla-tools/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:43 UTC (rev 4576) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/tla-tools/trunk/legacy/sources/tla-tools-shell.patch =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/sources/tla-tools-shell.patch (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/sources/tla-tools-shell.patch 2009-04-27 13:00:43 UTC (rev 4576) @@ -0,0 +1,117 @@ +diff -ruN tla-tools-0.31.orig/tla-changelogs-to-log.shpp tla-tools-0.31/tla-changelogs-to-log.shpp +--- tla-tools-0.31.orig/tla-changelogs-to-log.shpp 2004-03-02 14:19:54.000000000 +0100 ++++ tla-tools-0.31/tla-changelogs-to-log.shpp 2004-03-02 14:35:36.532827000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-changelogs-to-log -- Construct an arch patch-log from ChangeLog changes + # Usage: tla-changelogs-to-log SUMMARY + # +diff -ruN tla-tools-0.31.orig/tla-copy-changes.shpp tla-tools-0.31/tla-copy-changes.shpp +--- tla-tools-0.31.orig/tla-copy-changes.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-copy-changes.shpp 2004-03-02 14:35:47.046364000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-copy-changes -- Copy and commit arch changesets from another branch + # Usage: tla-copy-changes [OPTION...] SOURCE_VERSION_OR_REVISION... + # +diff -ruN tla-tools-0.31.orig/tla-cvs-sync.shpp tla-tools-0.31/tla-cvs-sync.shpp +--- tla-tools-0.31.orig/tla-cvs-sync.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-cvs-sync.shpp 2004-03-02 14:35:55.618048000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-cvs-sync -- Propagate changes between arch and CVS + # + # Copyright (C) 2003, 2004 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp tla-tools-0.31/tla-emacs-xids-to-db.shpp +--- tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-emacs-xids-to-db.shpp 2004-03-02 14:36:06.251350000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-emacs-xids-to-db -- Produce a id rename database for emacs + # + # Copyright (C) 2003 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-file-log.shpp tla-tools-0.31/tla-file-log.shpp +--- tla-tools-0.31.orig/tla-file-log.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-file-log.shpp 2004-03-02 14:36:16.966566000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-file-log -- Output a historical log for a file in an arch project tree + # Usage: tla-file-log FILE [VERSION] + # +diff -ruN tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp tla-tools-0.31/tla-fix-changelog-conflicts.shpp +--- tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fix-changelog-conflicts.shpp 2004-03-02 14:36:27.636640000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fix-changelog-conflicts -- Automatically resolve merge conflicts + # in ChangeLog files + # Usage: tla-fix-changelog-conflicts [CHANGELOG...] +diff -ruN tla-tools-0.31.orig/tla-fork-archive.shpp tla-tools-0.31/tla-fork-archive.shpp +--- tla-tools-0.31.orig/tla-fork-archive.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork-archive.shpp 2004-03-02 14:36:42.268565000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork-archive -- Make a new arch archive continuing from an old one + # Usage: tla-fork-archive OLD_ARCHIVE NEW_ARCHIVE + # +diff -ruN tla-tools-0.31.orig/tla-fork.shpp tla-tools-0.31/tla-fork.shpp +--- tla-tools-0.31.orig/tla-fork.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork.shpp 2004-03-02 14:36:51.641449000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork -- Create an arch branch forking off an existing branch + # Usage: tla-fork [OPTION...] NEW_BRANCH + # +diff -ruN tla-tools-0.31.orig/tla-munge-archive-names.shpp tla-tools-0.31/tla-munge-archive-names.shpp +--- tla-tools-0.31.orig/tla-munge-archive-names.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-names.shpp 2004-03-02 14:37:01.087381000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-names -- Destructively modify an arch archive to change + # the names of arch categories/branches/versions + # Usage: tla-munge-archive-names [OPTION...] CHANGE_RULE ARCHIVE_DIR... +diff -ruN tla-tools-0.31.orig/tla-munge-archive-xids.shpp tla-tools-0.31/tla-munge-archive-xids.shpp +--- tla-tools-0.31.orig/tla-munge-archive-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-xids.shpp 2004-03-02 14:37:09.088401000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-xids -- Destructively modify an arch archive to use + # taglines instead of explicit ids + # Usage: tla-munge-archive-xids TAG_RENAME_DB DIR... +diff -ruN tla-tools-0.31.orig/tla-scan-for-xids.shpp tla-tools-0.31/tla-scan-for-xids.shpp +--- tla-tools-0.31.orig/tla-scan-for-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-scan-for-xids.shpp 2004-03-02 14:37:18.985842000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-scan-for-xids -- Print a list of explicit ids used in an arch archive + # Usage: tla-scan-for-xids ARCHIVE_DIR... + # +diff -ruN tla-tools-0.31.orig/tla-switch.shpp tla-tools-0.31/tla-switch.shpp +--- tla-tools-0.31.orig/tla-switch.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-switch.shpp 2004-03-02 14:37:27.335854000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-switch -- Switch an arch project tree to a new branch/version/revision + # Usage: tla-switch [OPTION...] NEW + # +diff -ruN tla-tools-0.31.orig/tla-update-ids.shpp tla-tools-0.31/tla-update-ids.shpp +--- tla-tools-0.31.orig/tla-update-ids.shpp 2004-03-02 14:19:51.000000000 +0100 ++++ tla-tools-0.31/tla-update-ids.shpp 2004-03-02 14:37:36.773607000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-update-ids -- Handle adding arch id-tags to new files, removing + # deleted explicit ids, and some renames + # Added: csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile 2009-04-27 13:00:43 UTC (rev 4576) @@ -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/tla-tools/trunk/legacy/specs/tla-tools =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/specs/tla-tools (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/specs/tla-tools 2009-04-27 13:00:43 UTC (rev 4576) @@ -0,0 +1,44 @@ +# vim: ft=perl +# $Id: tla-tools,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'tla-tools'; +$version = '0.31'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://wiki.gnuarch.org/moin.cgi/tla_2dtools packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gpl-copying.patch', "${progname}-${version}", '-p0'], + ['tla-tools-shell.patch',"${progname}-${version}",'-p1']); + + at packages = ({ + pkgname => $progname, + filename => 'tla_tools', + name => "tla_tools - Helpful utilities for use with tla", + dependencies => ['CSWcommon','CSWgsed'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw +gmake +mkdir -p ${buildroot}/opt/csw/bin +gmake prefix=${buildroot}/opt/csw install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4577] csw/mgar/pkg Message-ID: Revision: 4577 http://gar.svn.sourceforge.net/gar/?rev=4577&view=rev Author: dmichelsen Date: 2009-04-27 13:00:59 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wbxml2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wbxml2/ csw/mgar/pkg/wbxml2/trunk/ csw/mgar/pkg/wbxml2/trunk/legacy/ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wbxml2/trunk/legacy/scripts/human.pl csw/mgar/pkg/wbxml2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wbxml2/trunk/legacy/sources/ csw/mgar/pkg/wbxml2/trunk/legacy/specs/ csw/mgar/pkg/wbxml2/trunk/legacy/specs/Makefile csw/mgar/pkg/wbxml2/trunk/legacy/specs/wbxml2 Added: csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:59 UTC (rev 4577) @@ -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/wbxml2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/human.pl 2009-04-27 13:00:59 UTC (rev 4577) @@ -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 () { + 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 + +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 + +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/wbxml2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:59 UTC (rev 4577) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wbxml2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/specs/Makefile 2009-04-27 13:00:59 UTC (rev 4577) @@ -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/wbxml2/trunk/legacy/specs/wbxml2 =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/specs/wbxml2 (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/specs/wbxml2 2009-04-27 13:00:59 UTC (rev 4577) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: wbxml2,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wbxml2'; +$version = '0.9.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://libwbxml.aymerick.com/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}-src.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "lib".$progname, + filename => "lib".$progname, + name => "lib${progname} - A WBXML parser and encoder", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +#Solche Idioten +egrep -v '(-Wall|O3)' src/Makefile.am >src/Makefile.amnew +mv src/Makefile.amnew src/Makefile.am +egrep -v '(-Wall|O3)' tools/Makefile.am >tools/Makefile.amnew +mv tools/Makefile.amnew tools/Makefile.am + +./bootstrap +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +rm tools/attgetopt.c tools/getopt.h +touch tools/attgetopt.c tools/getopt.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install +chmod 644 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/* +chmod 755 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images +chmod 644 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images/* +chmod 755 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images/callouts +chmod 644 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images/callouts/* +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:01:17 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:01:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4578] csw/mgar/pkg Message-ID: Revision: 4578 http://gar.svn.sourceforge.net/gar/?rev=4578&view=rev Author: dmichelsen Date: 2009-04-27 13:01:16 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wmcliphist: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wmcliphist/ csw/mgar/pkg/wmcliphist/trunk/ csw/mgar/pkg/wmcliphist/trunk/legacy/ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/human.pl csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wmcliphist/trunk/legacy/sources/ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/Makefile csw/mgar/pkg/wmcliphist/trunk/legacy/specs/wmcliphist Added: csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:01:16 UTC (rev 4578) @@ -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/wmcliphist/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/human.pl 2009-04-27 13:01:16 UTC (rev 4578) @@ -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 () { + 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 + +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 + +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/wmcliphist/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:01:16 UTC (rev 4578) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wmcliphist/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/Makefile 2009-04-27 13:01:16 UTC (rev 4578) @@ -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/wmcliphist/trunk/legacy/specs/wmcliphist =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/specs/wmcliphist (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/wmcliphist 2009-04-27 13:01:16 UTC (rev 4578) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: wmcliphist,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wmcliphist'; +$version = '0.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://linux.nawebu.cz/wmcliphist/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-latest.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Clipboard history dockapp for Window Maker", + 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 -DPATH_MAX=1024 -DS_IRUSR=00400 -DS_IWUSR=00200' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version} +gmake || exit 1 +mkdir -p ${buildroot}/opt/csw/bin +gmake DESTDIR=${buildroot}/opt/csw/bin install +mkdir -p ${buildroot}/opt/csw/share/doc/wmcliphist +cp AUTHORS INSTALL NEWS ChangeLog README ${buildroot}/opt/csw/share/doc/wmcliphist +cp .wmcliphistrc ${buildroot}/opt/csw/share/doc/wmcliphist/wmcliphistrc.sample +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:01:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:01:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4579] csw/mgar/pkg Message-ID: Revision: 4579 http://gar.svn.sourceforge.net/gar/?rev=4579&view=rev Author: dmichelsen Date: 2009-04-27 13:01:32 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wmclock: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wmclock/ csw/mgar/pkg/wmclock/trunk/ csw/mgar/pkg/wmclock/trunk/legacy/ csw/mgar/pkg/wmclock/trunk/legacy/scripts/ csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wmclock/trunk/legacy/scripts/human.pl csw/mgar/pkg/wmclock/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wmclock/trunk/legacy/sources/ csw/mgar/pkg/wmclock/trunk/legacy/specs/ csw/mgar/pkg/wmclock/trunk/legacy/specs/Makefile csw/mgar/pkg/wmclock/trunk/legacy/specs/wmclock Added: csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:01:32 UTC (rev 4579) @@ -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/wmclock/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/scripts/human.pl 2009-04-27 13:01:32 UTC (rev 4579) @@ -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 () { + 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 + +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 + +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/wmclock/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:01:32 UTC (rev 4579) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wmclock/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/specs/Makefile 2009-04-27 13:01:32 UTC (rev 4579) @@ -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/wmclock/trunk/legacy/specs/wmclock =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/specs/wmclock (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/specs/wmclock 2009-04-27 13:01:32 UTC (rev 4579) @@ -0,0 +1,49 @@ +# vim: ft=perl +# $Id: wmclock,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wmclock'; +$version = '1.0.12'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.jmknoble.net/WindowMaker/wmclock/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A Window Maker clock applet", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake +mkdir -p ${buildroot}/opt/csw/bin +cp wmclock ${buildroot}/opt/csw/bin/ +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp wmclock.man ${buildroot}/opt/csw/share/man/man1/wmclock.1 +mkdir -p ${buildroot}/opt/csw/share/wmclock +cp -r lang.* ${buildroot}/opt/csw/share/wmclock/ +mkdir -p ${buildroot}/opt/csw/share/doc/wmclock +cp README ${buildroot}/opt/csw/share/doc/wmclock/ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4581] csw/mgar/pkg Message-ID: Revision: 4581 http://gar.svn.sourceforge.net/gar/?rev=4581&view=rev Author: dmichelsen Date: 2009-04-27 13:02:08 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wv2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wv2/ csw/mgar/pkg/wv2/trunk/ csw/mgar/pkg/wv2/trunk/legacy/ csw/mgar/pkg/wv2/trunk/legacy/scripts/ csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wv2/trunk/legacy/scripts/human.pl csw/mgar/pkg/wv2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wv2/trunk/legacy/sources/ csw/mgar/pkg/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch csw/mgar/pkg/wv2/trunk/legacy/specs/ csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile csw/mgar/pkg/wv2/trunk/legacy/specs/wv2 Added: csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:08 UTC (rev 4581) @@ -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/wv2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/scripts/human.pl 2009-04-27 13:02:08 UTC (rev 4581) @@ -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 () { + 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 + +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 + +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/wv2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:08 UTC (rev 4581) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch 2009-04-27 13:02:08 UTC (rev 4581) @@ -0,0 +1,269 @@ +--- src/word97_helper.cpp.orig 2004-12-11 06:59:50.444882000 -0500 ++++ src/word97_helper.cpp 2004-12-11 07:07:11.099394000 -0500 +@@ -358,8 +358,187 @@ + // Apply a grpprl of a given size ("count" bytes long) + // This template function might be a bit sick, but it helps to + // avoid duplicated code, so what ;) +-template +-void apply( T* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++//"word97_helper.cpp", line 571: Error: Could not find a match for wvWare::Word97::SPRM::apply(wvWare::Word97::PAP*, const unsigned char*, unsigned short, const wvWare::Style*, wvWare::OLEStreamReader*, wvWare::WordVersion). ++ ++//template ++//void apply( T* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++void apply( wvWare::Word97::PAP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyPAPSPRM )( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, paragraphStyle, dataStream, version ); ++void apply( wvWare::Word97::CHP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyCHPSPRM)( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, style, dataStream, version ); ++void apply( wvWare::Word97::PICF* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyPICFSPRM)( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, style, dataStream, version ); ++void apply( wvWare::Word97::SEP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applySEPSPRM)( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, style, dataStream, version ); ++void apply( wvWare::Word97::TAP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + if ( !grpprl ) + return; +@@ -371,7 +550,8 @@ + + // walk through the grpprl, applying one sprm after the other + while ( safeCount > 1 ) { +- S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyTAPSPRM)( grpprl, style, dataStream, version ); + if ( result == -1 ) { + U16 sprm; + if ( version == Word8 ) { +@@ -568,7 +748,7 @@ + void PAP::apply( const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + // A PAP grpprl might contain TAP sprms, we just skip them +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + // Helper methods for the more complex sprms +@@ -999,7 +1179,7 @@ + void CHP::apply( const U8* grpprl, U16 count, const Style* paragraphStyle, OLEStreamReader* dataStream, WordVersion version ) + { + // There should be only CHP sprms in the grpprl we get +- SPRM::apply( this, grpprl, count, paragraphStyle, dataStream, version ); ++ SPRM::apply( this, grpprl, count, paragraphStyle, dataStream, version ); + } + + void CHP::applyExceptions( const U8* exceptions, const Style* paragraphStyle, OLEStreamReader* dataStream, WordVersion version ) +@@ -1457,7 +1637,7 @@ + void PICF::apply( const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + // There should be only PICF sprms in the grpprl we get +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + void PICF::applyExceptions(const U8* /*exceptions*/, const StyleSheet* /*stylesheet*/, OLEStreamReader* /*dataStream*/, WordVersion /*version*/ ) +@@ -1520,7 +1700,7 @@ + void SEP::apply( const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + // There should be only SEP sprms in the grpprl we get +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + void SEP::applyExceptions( const U8* exceptions, const StyleSheet* /*stylesheet*/, OLEStreamReader* dataStream, WordVersion version ) +@@ -1733,7 +1913,7 @@ + { + // There should be mostly TAP sprms in the grpprl we get, and we + // have to ignore the remaining PAP sprms, just what the template does +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + void TAP::applyExceptions( const U8* /*exceptions*/, const StyleSheet* /*stylesheet*/, OLEStreamReader* /*dataStream*/, WordVersion /*version*/ ) +--- src/parser9x.h.orig 2004-12-11 07:08:37.949425000 -0500 ++++ src/parser9x.h 2004-12-11 07:10:50.309395000 -0500 +@@ -158,7 +158,7 @@ + // on the parsed content. These variables have to be saved and restored + // to make the parsing code reentrant. + +- private: ++ public: + // Don't copy or assign us + Parser9x( const Parser9x& rhs ); + Parser9x& operator=( const Parser9x& rhs ); +--- src/headers95.cpp.orig 2004-12-11 07:11:55.089459000 -0500 ++++ src/headers95.cpp 2004-12-11 07:12:06.869394000 -0500 +@@ -31,7 +31,7 @@ + { + if ( m_grpfIhdt.size() <= static_cast::size_type>( sectionNumber ) ) { + wvlog << "Warning: You are trying to access a section that has not been registered yet!" << std::endl; +- return std::make_pair( 0, 0 ); ++ return std::make_pair( (unsigned)0, (unsigned)0 ); + } + + // The offset to the begin of the section + offset due to mask/grpfIhdt Added: csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile 2009-04-27 13:02:08 UTC (rev 4581) @@ -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/wv2/trunk/legacy/specs/wv2 =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/specs/wv2 (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/specs/wv2 2009-04-27 13:02:08 UTC (rev 4581) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: wv2,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wv2'; +$version = '0.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://wvware.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['wv2-nongcc-fixes.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - a library for accessing Microsoft Word documents", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-libiconv=/opt/csw +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. From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:24 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4582] csw/mgar/pkg Message-ID: Revision: 4582 http://gar.svn.sourceforge.net/gar/?rev=4582&view=rev Author: dmichelsen Date: 2009-04-27 13:02:24 +0000 (Mon, 27 Apr 2009) Log Message: ----------- x11-ssh-askpass: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/x11-ssh-askpass/ csw/mgar/pkg/x11-ssh-askpass/trunk/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/human.pl csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/sources/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/Makefile csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass Added: csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:24 UTC (rev 4582) @@ -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/x11-ssh-askpass/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/human.pl 2009-04-27 13:02:24 UTC (rev 4582) @@ -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 () { + 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 + +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 + +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/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:24 UTC (rev 4582) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/x11-ssh-askpass/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/Makefile 2009-04-27 13:02:24 UTC (rev 4582) @@ -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/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass 2009-04-27 13:02:24 UTC (rev 4582) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: x11-ssh-askpass,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'x11-ssh-askpass'; +$version = '1.2.4.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.jmknoble.net/software/x11-ssh-askpass/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "x11sshaskp", + filename => "x11_ssh_askpass", + name => "x11_ssh_askpass - a lightweight passphrase dialog for OpenSSH", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-app-defaults-dir=/opt/csw/lib/X11/app-defaults +xmkmf +gmake includes +gmake +gmake DESTDIR=${buildroot} install +tail -36 README | head -34 >COPYING +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dam at opencsw.org Mon Apr 27 15:03:01 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Mon, 27 Apr 2009 15:03:01 +0200 Subject: [csw-devel] Build descriptions from Michael Gernoth In-Reply-To: <20081107133324.GA2059@zerfleddert.de> References: <49137326.3000605@wbonnet.net> <20081107100724.GA24461@zerfleddert.de> <491441EA.9000302@wbonnet.net> <20081107133324.GA2059@zerfleddert.de> Message-ID: Hi Michael, Am 07.11.2008 um 14:33 schrieb Michael Gernoth: > My old build-scripts and sources for all my packages can be found at: > http://csw.informatik.uni-erlangen.de/csw/users/michael/sources/ > The scripts are in the 'specs' subdirectory. I copied your old build descriptions to the GAR repository in the respective pkg//trunk/legacy/ folders as a reference if someone wants to bring a package in GAR. Best regards -- Dago From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4583] csw/mgar/pkg Message-ID: Revision: 4583 http://gar.svn.sourceforge.net/gar/?rev=4583&view=rev Author: dmichelsen Date: 2009-04-27 13:02:38 +0000 (Mon, 27 Apr 2009) Log Message: ----------- x2x: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/x2x/ csw/mgar/pkg/x2x/trunk/ csw/mgar/pkg/x2x/trunk/legacy/ csw/mgar/pkg/x2x/trunk/legacy/scripts/ csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/x2x/trunk/legacy/scripts/human.pl csw/mgar/pkg/x2x/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/x2x/trunk/legacy/sources/ csw/mgar/pkg/x2x/trunk/legacy/specs/ csw/mgar/pkg/x2x/trunk/legacy/specs/Makefile csw/mgar/pkg/x2x/trunk/legacy/specs/x2x Added: csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:38 UTC (rev 4583) @@ -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/x2x/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/scripts/human.pl 2009-04-27 13:02:38 UTC (rev 4583) @@ -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 () { + 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 + +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 + +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/x2x/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:38 UTC (rev 4583) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/x2x/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/specs/Makefile 2009-04-27 13:02:38 UTC (rev 4583) @@ -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/x2x/trunk/legacy/specs/x2x =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/specs/x2x (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/specs/x2x 2009-04-27 13:02:38 UTC (rev 4583) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: x2x,v 1.3 2005/07/10 18:33:04 simigern Exp $ + +$progname = 'x2x'; +$version = '1.30'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.odsd.org/x2x/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}-beta.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Control one X display from another", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}-beta/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -R/usr/openwin/lib' +cd ${progname}-${version}-beta +xmkmf +gmake CC=cc +head -38 x2x.c | tail -33 | cut -b4- >COPYING +mkdir -p ${buildroot}/opt/csw/bin +cp x2x ${buildroot}/opt/csw/bin/ +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp x2x.man ${buildroot}/opt/csw/share/man/man1/x2x.1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:01:52 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:01:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4580] csw/mgar/pkg Message-ID: Revision: 4580 http://gar.svn.sourceforge.net/gar/?rev=4580&view=rev Author: dmichelsen Date: 2009-04-27 13:01:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wmmail: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wmmail/ csw/mgar/pkg/wmmail/trunk/ csw/mgar/pkg/wmmail/trunk/legacy/ csw/mgar/pkg/wmmail/trunk/legacy/scripts/ csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wmmail/trunk/legacy/scripts/human.pl csw/mgar/pkg/wmmail/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wmmail/trunk/legacy/sources/ csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-debian.patch csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-proplist.patch csw/mgar/pkg/wmmail/trunk/legacy/specs/ csw/mgar/pkg/wmmail/trunk/legacy/specs/Makefile csw/mgar/pkg/wmmail/trunk/legacy/specs/wmmail Added: csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:01:51 UTC (rev 4580) @@ -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/wmmail/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/scripts/human.pl 2009-04-27 13:01:51 UTC (rev 4580) @@ -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 () { + 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 + +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 + +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/wmmail/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:01:51 UTC (rev 4580) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wmmail/trunk/legacy/sources/wmmail-debian.patch =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-debian.patch (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-debian.patch 2009-04-27 13:01:51 UTC (rev 4580) @@ -0,0 +1,7276 @@ +--- wmmail-0.64.orig/ChangeLog ++++ wmmail-0.64/ChangeLog +@@ -1,5 +1,23 @@ + $Id: wmmail-debian.patch,v 1.1 2004/02/29 12:11:17 simigern Exp $ + ++----begin changelog for patch from Daniel Richard G. ---- ++- Factored out 'mailbox->last_update = time(NULL)' from the various ++ mailbox-checking modules to wmmail.c (at least mbox.c wasn't properly ++ doing this in some cases) ++- Removed redundant stat() call from mbox.c ++- Receiving SIGCHLD from an exiting button-click program now causes a ++ status update; now WMMail.app won't say new mail is waiting for so many ++ seconds after you've just finished reading said new mail ++- Added logic to SIGCHLD handler to process any pending X expose events ++ before the status update, in case the button-click program had been ++ obscuring the appicon (otherwise, the appicon can remain annoyingly ++ unpainted during a slow status update) ++- Added handler so that SIGUSR1 causes a status update; now you can say ++ 'killall -USR1 WMMail' in your ~/.procmailrc for non-delayed new mail ++ notification ++- Fixed potential race condition in update_status() ++----end changelog for patch---- ++ + Changes since version 0.63a: + + - added back ExecuteOnUpdate +--- wmmail-0.64.orig/Makefile.in ++++ wmmail-0.64/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -74,11 +81,12 @@ + wmmaildir = @wmmaildir@ + + SUBDIRS = src Defaults Anims Sounds ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_CLEAN_FILES = + DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ +-Makefile.in NEWS configure configure.in install-sh missing \ +-mkinstalldirs ++Makefile.in NEWS aclocal.m4 config.guess config.sub configure \ ++configure.in install-sh missing mkinstalldirs + + + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +@@ -87,17 +95,19 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in ++ cd $(srcdir) && $(ACLOCAL) + + config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ++$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + + # This directory's subdirectories are mostly independent; you can cd +@@ -136,7 +146,7 @@ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +- test "$$subdir" = "." && dot_seen=yes; \ ++ test "$$subdir" != "." || dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ +@@ -178,7 +188,7 @@ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) ++ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) + + mostlyclean-tags: + +@@ -235,7 +245,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/configure ++++ wmmail-0.64/configure +@@ -12,11 +12,10 @@ + ac_default_prefix=/usr/local + # Any additions from configure.in: + ac_help="$ac_help +- --with-x use the X Window System" +-ac_help="$ac_help +- --with-PL-libs pass compiler flags to find libPropList libraries" ++ --enable-maintainer-mode enable make rules and dependencies not useful ++ (and sometimes confusing) to the casual installer" + ac_help="$ac_help +- --with-PL-incs pass compiler flags to find libPropList header files" ++ --with-x use the X Window System" + ac_help="$ac_help + --with-WM-libs pass compiler flags to find Window Maker libraries" + ac_help="$ac_help +@@ -546,7 +545,7 @@ + + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:550: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:549: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -579,10 +578,260 @@ + VERSION=0.64 + + ++ac_aux_dir= ++for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ++ if test -f $ac_dir/install-sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install-sh -c" ++ break ++ elif test -f $ac_dir/install.sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install.sh -c" ++ break ++ fi ++done ++if test -z "$ac_aux_dir"; then ++ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } ++fi ++ac_config_guess=$ac_aux_dir/config.guess ++ac_config_sub=$ac_aux_dir/config.sub ++ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ++ ++am__api_version="1.4" ++# Find a good install program. We prefer a C program (faster), ++# so one script is as good as another. But avoid the broken or ++# incompatible versions: ++# SysV /etc/install, /usr/sbin/install ++# SunOS /usr/etc/install ++# IRIX /sbin/install ++# AIX /bin/install ++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag ++# AFS /usr/afsws/bin/install, which mishandles nonexistent args ++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" ++# ./install, which can be erroneously created by make from ./install.sh. ++echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ++echo "configure:614: checking for a BSD compatible install" >&5 ++if test -z "$INSTALL"; then ++if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ++ for ac_dir in $PATH; do ++ # Account for people who put trailing slashes in PATH elements. ++ case "$ac_dir/" in ++ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ *) ++ # OSF1 and SCO ODT 3.0 have their own names for install. ++ # Don't use installbsd from OSF since it installs stuff as root ++ # by default. ++ for ac_prog in ginstall scoinst install; do ++ if test -f $ac_dir/$ac_prog; then ++ if test $ac_prog = install && ++ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ++ # AIX install. It has an incompatible calling convention. ++ : ++ else ++ ac_cv_path_install="$ac_dir/$ac_prog -c" ++ break 2 ++ fi ++ fi ++ done ++ ;; ++ esac ++ done ++ IFS="$ac_save_IFS" ++ ++fi ++ if test "${ac_cv_path_install+set}" = set; then ++ INSTALL="$ac_cv_path_install" ++ else ++ # As a last resort, use the slow shell script. We don't cache a ++ # path for INSTALL within a source directory, because that will ++ # break other packages using the cache if that directory is ++ # removed, or if the path is relative. ++ INSTALL="$ac_install_sh" ++ fi ++fi ++echo "$ac_t""$INSTALL" 1>&6 ++ ++# Use test -z because SunOS4 sh mishandles braces in ${var-val}. ++# It thinks the first close brace ends the variable substitution. ++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ++ ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ ++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ++ ++echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ++echo "configure:667: checking whether build environment is sane" >&5 ++# Just in case ++sleep 1 ++echo timestamp > conftestfile ++# Do `set' in a subshell so we don't clobber the current shell's ++# arguments. Must try -L first in case configure is actually a ++# symlink; some systems play weird games with the mod time of symlinks ++# (eg FreeBSD returns the mod time of the symlink's containing ++# directory). ++if ( ++ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` ++ if test "$*" = "X"; then ++ # -L didn't work. ++ set X `ls -t $srcdir/configure conftestfile` ++ fi ++ if test "$*" != "X $srcdir/configure conftestfile" \ ++ && test "$*" != "X conftestfile $srcdir/configure"; then ++ ++ # If neither matched, then we have a broken ls. This can happen ++ # if, for instance, CONFIG_SHELL is bash and it inherits a ++ # broken ls alias from the environment. This has actually ++ # happened. Such a system could not be considered "sane". ++ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken ++alias in your environment" 1>&2; exit 1; } ++ fi ++ ++ test "$2" = conftestfile ++ ) ++then ++ # Ok. ++ : ++else ++ { echo "configure: error: newly created file is older than distributed files! ++Check your system clock" 1>&2; exit 1; } ++fi ++rm -f conftest* ++echo "$ac_t""yes" 1>&6 ++if test "$program_transform_name" = s,x,x,; then ++ program_transform_name= ++else ++ # Double any \ or $. echo might interpret backslashes. ++ cat <<\EOF_SED > conftestsed ++s,\\,\\\\,g; s,\$,$$,g ++EOF_SED ++ program_transform_name="`echo $program_transform_name|sed -f conftestsed`" ++ rm -f conftestsed ++fi ++test "$program_prefix" != NONE && ++ program_transform_name="s,^,${program_prefix},; $program_transform_name" ++# Use a double $ so make ignores it. ++test "$program_suffix" != NONE && ++ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" ++ ++# sed with no file args requires a program. ++test "$program_transform_name" = "" && program_transform_name="s,x,x," ++ ++ ++PACKAGE=$PACKAGE ++ ++VERSION=$VERSION ++ ++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ++ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } ++fi ++cat >> confdefs.h <> confdefs.h <&6 ++echo "configure:743: checking for working aclocal-${am__api_version}" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then ++ ACLOCAL=aclocal-${am__api_version} ++ echo "$ac_t""found" 1>&6 ++else ++ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ++echo "configure:756: checking for working autoconf" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (autoconf --version) < /dev/null > /dev/null 2>&1; then ++ AUTOCONF=autoconf ++ echo "$ac_t""found" 1>&6 ++else ++ AUTOCONF="$missing_dir/missing autoconf" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 ++echo "configure:769: checking for working automake-${am__api_version}" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then ++ AUTOMAKE=automake-${am__api_version} ++ echo "$ac_t""found" 1>&6 ++else ++ AUTOMAKE="$missing_dir/missing automake-${am__api_version}" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ++echo "configure:782: checking for working autoheader" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (autoheader --version) < /dev/null > /dev/null 2>&1; then ++ AUTOHEADER=autoheader ++ echo "$ac_t""found" 1>&6 ++else ++ AUTOHEADER="$missing_dir/missing autoheader" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ++echo "configure:795: checking for working makeinfo" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (makeinfo --version) < /dev/null > /dev/null 2>&1; then ++ MAKEINFO=makeinfo ++ echo "$ac_t""found" 1>&6 ++else ++ MAKEINFO="$missing_dir/missing makeinfo" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++ ++echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ++echo "configure:809: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. ++if test "${enable_maintainer_mode+set}" = set; then ++ enableval="$enable_maintainer_mode" ++ USE_MAINTAINER_MODE=$enableval ++else ++ USE_MAINTAINER_MODE=no ++fi ++ ++ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 ++ ++ ++if test $USE_MAINTAINER_MODE = yes; then ++ MAINTAINER_MODE_TRUE= ++ MAINTAINER_MODE_FALSE='#' ++else ++ MAINTAINER_MODE_TRUE='#' ++ MAINTAINER_MODE_FALSE= ++fi ++ MAINT=$MAINTAINER_MODE_TRUE ++ ++ ++ + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:586: checking for $ac_word" >&5 ++echo "configure:835: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -612,7 +861,7 @@ + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:616: checking for $ac_word" >&5 ++echo "configure:865: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -663,7 +912,7 @@ + # Extract the first word of "cl", so it can be a program name with args. + set dummy cl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:667: checking for $ac_word" >&5 ++echo "configure:916: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -695,7 +944,7 @@ + fi + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:948: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +@@ -706,12 +955,12 @@ + + cat > conftest.$ac_ext << EOF + +-#line 710 "configure" ++#line 959 "configure" + #include "confdefs.h" + + main(){return(0);} + EOF +-if { (eval echo configure:715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +@@ -737,12 +986,12 @@ + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:741: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:990: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +-echo "configure:746: checking whether we are using GNU C" >&5 ++echo "configure:995: checking whether we are using GNU C" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -751,7 +1000,7 @@ + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no +@@ -770,7 +1019,7 @@ + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +-echo "configure:774: checking whether ${CC-cc} accepts -g" >&5 ++echo "configure:1023: checking whether ${CC-cc} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -801,25 +1050,6 @@ + fi + fi + +-ac_aux_dir= +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +- if test -f $ac_dir/install-sh; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/install-sh -c" +- break +- elif test -f $ac_dir/install.sh; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/install.sh -c" +- break +- fi +-done +-if test -z "$ac_aux_dir"; then +- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +-fi +-ac_config_guess=$ac_aux_dir/config.guess +-ac_config_sub=$ac_aux_dir/config.sub +-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +- + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or + # incompatible versions: +@@ -832,7 +1062,7 @@ + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:836: checking for a BSD compatible install" >&5 ++echo "configure:1066: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -885,7 +1115,7 @@ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:889: checking whether ln -s works" >&5 ++echo "configure:1119: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -929,7 +1159,7 @@ + # Extract the first word of "autoconf", so it can be a program name with args. + set dummy autoconf; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:933: checking for $ac_word" >&5 ++echo "configure:1163: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -964,7 +1194,7 @@ + # Extract the first word of "aclocal", so it can be a program name with args. + set dummy aclocal; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:968: checking for $ac_word" >&5 ++echo "configure:1198: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ACLOCAL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -999,7 +1229,7 @@ + # Extract the first word of "autoheader", so it can be a program name with args. + set dummy autoheader; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1003: checking for $ac_word" >&5 ++echo "configure:1233: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1034,7 +1264,7 @@ + # Extract the first word of "automake", so it can be a program name with args. + set dummy automake; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1038: checking for $ac_word" >&5 ++echo "configure:1268: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AUTOMAKE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1069,7 +1299,7 @@ + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1073: checking how to run the C preprocessor" >&5 ++echo "configure:1303: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1084,13 +1314,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1101,13 +1331,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1118,13 +1348,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1153,7 +1383,7 @@ + # Uses ac_ vars as temps to allow command line to override cache and checks. + # --without-x overrides everything else, but does not touch the cache. + echo $ac_n "checking for X""... $ac_c" 1>&6 +-echo "configure:1157: checking for X" >&5 ++echo "configure:1387: checking for X" >&5 + + # Check whether --with-x or --without-x was given. + if test "${with_x+set}" = set; then +@@ -1215,12 +1445,12 @@ + + # First, try using that file with no special directory specified. + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1289,14 +1519,14 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LIBS="$ac_save_LIBS" + # We can link X programs with no special library path. +@@ -1392,24 +1622,6 @@ + fi + + +-# Check whether --with-PL-libs or --without-PL-libs was given. +-if test "${with_PL_libs+set}" = set; then +- withval="$with_PL_libs" +- PLLIBS=$withval +-else +- PLLIBS="" +-fi +- +- +-# Check whether --with-PL-incs or --without-PL-incs was given. +-if test "${with_PL_incs+set}" = set; then +- withval="$with_PL_incs" +- PLINCS=$withval +-else +- PLINCS="" +-fi +- +- + # Check whether --with-WM-libs or --without-WM-libs was given. + if test "${with_WM_libs+set}" = set; then + withval="$with_WM_libs" +@@ -1428,8 +1640,8 @@ + fi + + +-CFLAGS="$CFLAGS $PLINCS $WMINCS" +-LDFLAGS="$LDFLAGS $PLLIBS $WMLIBS" ++CFLAGS="$CFLAGS $WMINCS" ++LDFLAGS="$LDFLAGS $WMLIBS" + + + appspath="" +@@ -1549,7 +1761,7 @@ + + + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +-echo "configure:1553: checking for gethostbyname in -lnsl" >&5 ++echo "configure:1765: checking for gethostbyname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1557,7 +1769,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1596,7 +1808,7 @@ + fi + + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:1600: checking for socket in -lsocket" >&5 ++echo "configure:1812: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1604,7 +1816,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1645,7 +1857,7 @@ + + + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 +-echo "configure:1649: checking for XOpenDisplay in -lX11" >&5 ++echo "configure:1861: checking for XOpenDisplay in -lX11" >&5 + ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1653,7 +1865,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lX11 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1692,7 +1904,7 @@ + fi + + echo $ac_n "checking for XShapeCombineMask in -lXext""... $ac_c" 1>&6 +-echo "configure:1696: checking for XShapeCombineMask in -lXext" >&5 ++echo "configure:1908: checking for XShapeCombineMask in -lXext" >&5 + ac_lib_var=`echo Xext'_'XShapeCombineMask | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1700,7 +1912,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXext $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1739,7 +1951,7 @@ + fi + + echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6 +-echo "configure:1743: checking for XtAppInitialize in -lXt" >&5 ++echo "configure:1955: checking for XtAppInitialize in -lXt" >&5 + ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1747,7 +1959,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1786,7 +1998,7 @@ + fi + + echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6 +-echo "configure:1790: checking for XpmCreatePixmapFromData in -lXpm" >&5 ++echo "configure:2002: checking for XpmCreatePixmapFromData in -lXpm" >&5 + ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1794,7 +2006,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXpm $LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1832,27 +2044,27 @@ + echo "$ac_t""no" 1>&6 + fi + +-echo $ac_n "checking for PLGetProplistWithPath in -lPropList""... $ac_c" 1>&6 +-echo "configure:1837: checking for PLGetProplistWithPath in -lPropList" >&5 +-ac_lib_var=`echo PropList'_'PLGetProplistWithPath | sed 'y%./+-%__p_%'` ++echo $ac_n "checking for WMReadPropListFromFile in -lWUtil""... $ac_c" 1>&6 ++echo "configure:2049: checking for WMReadPropListFromFile in -lWUtil" >&5 ++ac_lib_var=`echo WUtil'_'WMReadPropListFromFile | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" +-LIBS="-lPropList $LIBS $LIBS" ++LIBS="-lWUtil $LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1867,13 +2079,13 @@ + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 +- ac_tr_lib=HAVE_LIB`echo PropList | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ ac_tr_lib=HAVE_LIB`echo WUtil | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +@@ -1884,12 +2096,12 @@ + + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:1888: checking for ANSI C header files" >&5 ++echo "configure:2100: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1897,7 +2109,7 @@ + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1914,7 +2126,7 @@ + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -1932,7 +2144,7 @@ + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -1953,7 +2165,7 @@ + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -1964,7 +2176,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -1992,12 +2204,12 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +-echo "configure:1996: checking for $ac_hdr that defines DIR" >&5 ++echo "configure:2208: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -2005,7 +2217,7 @@ + DIR *dirp = 0; + ; return 0; } + EOF +-if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +@@ -2030,7 +2242,7 @@ + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +-echo "configure:2034: checking for opendir in -ldir" >&5 ++echo "configure:2246: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2038,7 +2250,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2071,7 +2283,7 @@ + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +-echo "configure:2075: checking for opendir in -lx" >&5 ++echo "configure:2287: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2079,7 +2291,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2116,17 +2328,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2120: checking for $ac_hdr" >&5 ++echo "configure:2332: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2155,12 +2367,12 @@ + + + echo $ac_n "checking for off_t""... $ac_c" 1>&6 +-echo "configure:2159: checking for off_t" >&5 ++echo "configure:2371: checking for off_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -2188,12 +2400,12 @@ + fi + + echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +-echo "configure:2192: checking for pid_t" >&5 ++echo "configure:2404: checking for pid_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -2221,12 +2433,12 @@ + fi + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:2225: checking for size_t" >&5 ++echo "configure:2437: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -2256,12 +2468,12 @@ + + + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +-echo "configure:2260: checking return type of signal handlers" >&5 ++echo "configure:2472: checking return type of signal handlers" >&5 + if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -2278,7 +2490,7 @@ + int i; + ; return 0; } + EOF +-if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void + else +@@ -2297,12 +2509,12 @@ + + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +-echo "configure:2301: checking for vprintf" >&5 ++echo "configure:2513: checking for vprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else +@@ -2349,12 +2561,12 @@ + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:2353: checking for _doprnt" >&5 ++echo "configure:2565: checking for _doprnt" >&5 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else +@@ -2404,12 +2616,12 @@ + for ac_func in socket strstr + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2408: checking for $ac_func" >&5 ++echo "configure:2620: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2608,15 +2820,19 @@ + s%@SET_MAKE@%$SET_MAKE%g + s%@PACKAGE@%$PACKAGE%g + s%@VERSION@%$VERSION%g +-s%@CC@%$CC%g + s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g + s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g + s%@INSTALL_DATA@%$INSTALL_DATA%g +-s%@LN_S@%$LN_S%g +-s%@AUTOCONF@%$AUTOCONF%g + s%@ACLOCAL@%$ACLOCAL%g +-s%@AUTOHEADER@%$AUTOHEADER%g ++s%@AUTOCONF@%$AUTOCONF%g + s%@AUTOMAKE@%$AUTOMAKE%g ++s%@AUTOHEADER@%$AUTOHEADER%g ++s%@MAKEINFO@%$MAKEINFO%g ++s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g ++s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g ++s%@MAINT@%$MAINT%g ++s%@CC@%$CC%g ++s%@LN_S@%$LN_S%g + s%@CPP@%$CPP%g + s%@wmmaildir@%$wmmaildir%g + s%@MBOX_SUPPORT@%$MBOX_SUPPORT%g +--- wmmail-0.64.orig/configure.in ++++ wmmail-0.64/configure.in +@@ -32,6 +32,9 @@ + VERSION=0.64 + AC_SUBST(VERSION) + ++AM_INIT_AUTOMAKE($PACKAGE, $VERSION) ++AM_MAINTAINER_MODE ++ + dnl + dnl check for programs + dnl +@@ -62,18 +65,14 @@ + + + dnl +-dnl get compiler flags for libPropList and Window Maker ++dnl get compiler flags for Window Maker + dnl +-AC_ARG_WITH(PL-libs, [ --with-PL-libs pass compiler flags to find libPropList libraries], [PLLIBS=$withval], [PLLIBS=""]) +- +-AC_ARG_WITH(PL-incs, [ --with-PL-incs pass compiler flags to find libPropList header files], [PLINCS=$withval], [PLINCS=""]) +- + AC_ARG_WITH(WM-libs, [ --with-WM-libs pass compiler flags to find Window Maker libraries], [WMLIBS=$withval], [WMLIBS=""]) + + AC_ARG_WITH(WM-incs, [ --with-WM-incs pass compiler flags to find Window Maker header files], [WMINCS=$withval], [WMINCS=""]) + +-CFLAGS="$CFLAGS $PLINCS $WMINCS" +-LDFLAGS="$LDFLAGS $PLLIBS $WMLIBS" ++CFLAGS="$CFLAGS $WMINCS" ++LDFLAGS="$LDFLAGS $WMLIBS" + + + dnl +@@ -166,7 +165,7 @@ + AC_CHECK_LIB(Xext, XShapeCombineMask) + AC_CHECK_LIB(Xt, XtAppInitialize) + AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, , , $LIBS) +-AC_CHECK_LIB(PropList, PLGetProplistWithPath, , , $LIBS) ++AC_CHECK_LIB(WUtil, WMReadPropListFromFile, , , $LIBS) + + + dnl +--- wmmail-0.64.orig/Anims/NeXT/Makefile.in ++++ wmmail-0.64/Anims/NeXT/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/NeXT/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/Makefile.in ++++ wmmail-0.64/Anims/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -85,7 +92,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -129,7 +136,7 @@ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +- test "$$subdir" = "." && dot_seen=yes; \ ++ test "$$subdir" != "." || dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ +@@ -171,7 +178,7 @@ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) ++ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) + + mostlyclean-tags: + +@@ -195,7 +202,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/asmail/Makefile.in ++++ wmmail-0.64/Anims/asmail/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/asmail/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/e/Makefile.in ++++ wmmail-0.64/Anims/e/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/e/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/monitor-e/Makefile.in ++++ wmmail-0.64/Anims/monitor-e/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/monitor-e/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Defaults/Makefile.in ++++ wmmail-0.64/Defaults/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -93,7 +100,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Defaults/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -136,7 +143,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Sounds/Makefile.in ++++ wmmail-0.64/Sounds/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Sounds/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/src/Makefile.in ++++ wmmail-0.64/src/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -116,7 +123,7 @@ + all: all-redirect + .SUFFIXES: + .SUFFIXES: .S .c .o .s +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -191,7 +198,7 @@ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) ++ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) + + mostlyclean-tags: + +@@ -215,7 +222,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/src/imap.c ++++ wmmail-0.64/src/imap.c +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include "wmmail.h" + #include "wmutil.h" + #include "net.h" +@@ -45,6 +45,7 @@ + * Username + * Password + * Folder (optional) ++ * UseSelect (optional) -- added by Chris Waters + * + * See mbox.c for information on states and transitions. + * +@@ -62,6 +63,7 @@ + char *folder_name; + int socket; + int cmd_seq; ++ int use_sel ; /* added by xtifr */ + } Connection; + + /* internal functions */ +@@ -84,7 +86,6 @@ + prev_new_mail_count; + + connection = init_connection(mailbox); +- mailbox->last_update = time(NULL); + + if (connection == NULL) + return False; +@@ -159,13 +160,15 @@ + port, + username, + password, +- folder; ++ folder, ++ use_sel; + + GET_ENTRY(mailbox->options, hostname, "Hostname"); + GET_ENTRY(mailbox->options, port, "Port"); + GET_ENTRY(mailbox->options, username, "Username"); + GET_ENTRY(mailbox->options, password, "Password"); + GET_ENTRY(mailbox->options, folder, "Folder"); ++ GET_ENTRY(mailbox->options, use_sel, "UseSelect"); /* xtifr */ + + if (!username || !password || !hostname) + { +@@ -178,7 +181,10 @@ + !PLIsString(password) || + (folder && !PLIsString(folder)) || + (port && (!PLIsString(port) || +- sscanf(PLGetString(port), "%i", &port_no) != 1)) ) ++ sscanf(PLGetString(port), "%i", &port_no) != 1)) || ++ (use_sel && (!PLIsString (use_sel) || /* xtifr */ ++ !(!strcasecmp(PLGetString(use_sel), "Yes") || ++ !strcasecmp(PLGetString(use_sel), "No")) )) ) + { + croak("mailbox \"%s\" has invalid options; ignored", mailbox->name); + return (Connection *) NULL; +@@ -233,12 +239,17 @@ + connection->socket = sockfd; + connection->cmd_seq = 1; /* A000 is already issued, above */ + ++ if (use_sel && !strcasecmp(PLGetString(use_sel), "Yes")) /* xtifr */ ++ connection->use_sel = True; ++ else ++ connection->use_sel = False; ++ + return connection; + } + else + { + /* FIXME: remove this debug message before release! */ +- croak("%s", buf); ++ /* croak("%s", buf); */ + /* if we can't login, then don't try any more */ + croak("login failed for mailbox \"%s\"; ignored", mailbox->name); + close(sockfd); +@@ -259,8 +270,14 @@ + buf[MAX_STRING_SIZE] = 0; /* fix buffer overflow */ + cmd[MAX_STRING_SIZE] = 0; + +- sprintf(cmd, "A%03i SELECT %s\r\n", ++ /* changed from "SELECT" to choice of "EXAMINE" or "SELECT" (defaults to ++ * "EXAMINE") by Chris Waters ++ * (According to RFC1730, the EXAMINE command is identical to ++ * SELECT, except that the folder is opened in in read-only mode.) ++ */ ++ sprintf(cmd, "A%03i %s %s\r\n", + connection->cmd_seq++, ++ (connection->use_sel ? "SELECT" : "EXAMINE"), + connection->folder_name); + + if (socket_write(connection->socket, cmd)) +--- wmmail-0.64.orig/src/maildir.c ++++ wmmail-0.64/src/maildir.c +@@ -118,8 +118,6 @@ + + *redraw |= (prev_status != mailbox->status); + +- mailbox->last_update = time(NULL); +- + wfree(mailbox_path); + return True; + } +--- wmmail-0.64.orig/src/mbox.c ++++ wmmail-0.64/src/mbox.c +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include "wmmail.h" + #include "wmutil.h" + +@@ -196,8 +196,6 @@ + + *redraw |= (prev_status != mailbox->status); + +- mailbox->last_update = time(NULL); +- + wfree(mailbox_path); + return True; + } +@@ -299,8 +297,9 @@ + return True; + #endif + +- /* save atime */ ++ /* save atime and mtime */ + xtime.actime = t.st_atime; ++ xtime.modtime = t.st_mtime; + + if ((file = fopen(mailbox_path, "r")) == NULL) + return False; +@@ -366,11 +365,7 @@ + + fclose(file); + +- stat(mailbox_path, &t); +- xtime.modtime = t.st_mtime; /* save mtime */ +- utime(mailbox_path, &xtime); /* reset atime and mtime */ +- +- mailbox->last_update = time(NULL); ++ utime(mailbox_path, &xtime); /* reset atime, keep mtime the same */ + + mailbox->total_mail_count = m; + mailbox->new_mail_count = n; +--- wmmail-0.64.orig/src/mh.c ++++ wmmail-0.64/src/mh.c +@@ -130,8 +130,6 @@ + + *redraw |= (prev_status != mailbox->status); + +- mailbox->last_update = time(NULL); +- + wfree(mailbox_path); + return True; + } +--- wmmail-0.64.orig/src/pop3.c ++++ wmmail-0.64/src/pop3.c +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include "wmmail.h" + #include "wmutil.h" + #include "net.h" +@@ -81,7 +81,6 @@ + prev_new_mail_count; + + connection = init_connection(mailbox); +- mailbox->last_update = time(NULL); + + if (connection == NULL) + return False; +--- wmmail-0.64.orig/src/properties.c ++++ wmmail-0.64/src/properties.c +@@ -44,10 +44,12 @@ + * + */ + ++#include + #include + #include + #include +-#include ++#include ++#include + #include + #include + #include +--- wmmail-0.64.orig/src/std_icons.c ++++ wmmail-0.64/src/std_icons.c +@@ -24,6 +24,7 @@ + * + */ + ++#include + #include "wmmail.h" + #include "wmutil.h" + #include "std_icons.h" +--- wmmail-0.64.orig/src/wmmail.c ++++ wmmail-0.64/src/wmmail.c +@@ -26,6 +26,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -36,6 +37,7 @@ + #include + #include + #include ++#include + + #include "wmmail.h" + #include "wmutil.h" +@@ -43,6 +45,7 @@ + #include "std_icons.h" + + int end_of_cycle = False; ++pid_t click_command_pid = -2; + + #ifdef MBOX_SUPPORT + # include "mbox.h" +@@ -74,7 +77,8 @@ + void redraw_appicon(void); + void animate(XtPointer, XtIntervalId *); + Pixel get_pixel_by_color(char *); +-void update_status(XtPointer, XtIntervalId *); ++void update_status_timeout(XtPointer, XtIntervalId *); ++void update_status(int); + void handle_expose(Widget, XtPointer, XEvent *); + void handle_button(Widget, XtPointer, XEvent *); + +@@ -85,7 +89,7 @@ + + create_appicon(); + +- update_status(NULL, NULL); ++ update_status(True); + animate(NULL, NULL); + + XtAppMainLoop(wmmail_context); +@@ -143,11 +147,45 @@ + /* SIGCHLD handler */ + void sig_chld(int signo) + { +- waitpid((pid_t) -1, NULL, WNOHANG); ++ if (waitpid((pid_t) -1, NULL, WNOHANG) == click_command_pid) ++ { ++ /* Handle any pending exposure events, potentially raised by ++ * the window of the click command process going away. This ++ * prevents the appicon from remaining unpainted during the ++ * (sometimes slow) update procedure. */ ++ while (XtAppPending(wmmail_context) & XtIMXEvent) ++ { ++ XEvent xev; ++ XtAppPeekEvent(wmmail_context, &xev); ++ if (xev.type != Expose) ++ break; ++ ++ XtAppProcessEvent(wmmail_context, XtIMXEvent); ++ } ++ ++#ifdef DEBUG ++ croak("caught SIGCHLD from click command process; performing update"); ++#endif ++ ++ update_status(False); ++ click_command_pid = -2; ++ } + signal(SIGCHLD, sig_chld); + } + + ++/* SIGUSR1 handler */ ++void sig_usr1(int signo) ++{ ++#ifdef DEBUG ++ croak("caught SIGUSR1; performing update"); ++#endif ++ ++ update_status(False); ++ signal(SIGUSR1, sig_usr1); ++} ++ ++ + /* handle command line options, open the configuration file for reading */ + void initialize(int argc, char **argv) + { +@@ -267,6 +305,9 @@ + + /* zombie children are dealt with in the SIG_CHLD handler */ + signal(SIGCHLD, sig_chld); ++ ++ /* mechanism for an external process to signal a mailbox update */ ++ signal(SIGUSR1, sig_usr1); + } + + +@@ -502,27 +543,43 @@ + } + + +-void update_status(XtPointer XtP, XtIntervalId * XtI) ++void update_status_timeout(XtPointer XtP, XtIntervalId * XtI) ++{ ++ update_status(True); ++} ++ ++ ++void update_status(int interval_check) + { + Mailbox *mailbox; + static int update_in_progress = False; ++ static int next_update_scheduled = False; ++ static XtIntervalId next_update_timer; ++ time_t cur_time = time(NULL); + int i, ret; + int new_status = NO_MAIL; + int beep = False, + redraw = False, + run = False, +- next_update = -1; /* time to next update in seconds */ ++ next_update = INT_MAX; /* time to next update in seconds */ + +- if (!update_in_progress) +- { ++ if (update_in_progress) ++ return; + update_in_progress = True; ++ ++#ifdef DEBUG ++ croak("updating status at time %d", cur_time); ++#endif ++ ++ /* FIXME: code below (and above) needs to be re-indented! */ ++ + mailbox_count = list_length(mailbox_list); + + for (i = 0; i < mailbox_count; i++) + { + mailbox = list_nth(i, mailbox_list); + +- if (mailbox->last_update + mailbox->update_interval > time(NULL)) ++ if (interval_check && mailbox->last_update + mailbox->update_interval > cur_time) + { + /* don't check this mailbox if it isn't time yet */ + ret = True; +@@ -563,6 +620,14 @@ + #endif + /* ignore anything that we cannot handle; bug in properties.c? */ + continue; ++ ++ if (ret) ++ { ++ /* Update cur_time, as the mailbox check may have taken a ++ * non-negligible amount of time (e.g. mbox on NFS) */ ++ cur_time = time(NULL); ++ mailbox->last_update = cur_time; ++ } + } + + /* delete mailbox if it has become rotten */ +@@ -581,14 +646,14 @@ + } + else + { +- int tmp = mailbox->last_update + mailbox->update_interval; ++ /* delta == number of seconds till this particular mailbox ++ * is scheduled to be checked again */ ++ int delta = mailbox->last_update + mailbox->update_interval - cur_time; ++ if (delta > 0 && delta < next_update) ++ next_update = delta; + + if (mailbox->status > new_status) + new_status = mailbox->status; +- +- if ( (next_update == -1) || +- (time(NULL) < tmp && time(NULL) + next_update > tmp) ) +- next_update = tmp - time(NULL); + } + } + +@@ -600,9 +665,6 @@ + + wmmail_status = new_status; + +- update_in_progress = False; +- } +- @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:55 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4584] csw/mgar/pkg Message-ID: Revision: 4584 http://gar.svn.sourceforge.net/gar/?rev=4584&view=rev Author: dmichelsen Date: 2009-04-27 13:02:55 +0000 (Mon, 27 Apr 2009) Log Message: ----------- ximian_connector: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/ximian_connector/ csw/mgar/pkg/ximian_connector/trunk/ csw/mgar/pkg/ximian_connector/trunk/legacy/ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/human.pl csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ximian_connector Added: csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:55 UTC (rev 4584) @@ -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/ximian_connector/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/human.pl 2009-04-27 13:02:55 UTC (rev 4584) @@ -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 () { + 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 + +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 + +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/ximian_connector/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:55 UTC (rev 4584) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,27 @@ +=================================================================== +RCS file: /cvs/gnome/evolution-exchange/storage/main.c,v +retrieving revision 1.10 +retrieving revision 1.11 +diff -u -r1.10 -r1.11 +--- storage/main.c 2004/11/26 12:07:10 1.10 ++++ storage/main.c 2004/12/09 05:54:08 1.11 +@@ -201,6 +201,7 @@ + main (int argc, char **argv) + { + char *path; ++ char *config_directory; + + bindtextdomain (PACKAGE, CONNECTOR_LOCALEDIR); + bind_textdomain_codeset (PACKAGE, "UTF-8"); +@@ -211,7 +212,10 @@ + GNOME_PARAM_HUMAN_READABLE_NAME, _("Ximian Connector for Microsoft Exchange"), + NULL); + e_icon_factory_init (); +- camel_init (NULL, FALSE); ++ ++ config_directory = g_build_filename (g_get_home_dir(), ".evolution", NULL); ++ camel_init (config_directory, FALSE); ++ g_free(config_directory); + + path = g_strdup_printf ("/tmp/.exchange-%s", g_get_user_name ()); + if (mkdir (path, 0700) == -1) { Added: csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,11 @@ +--- lib/e2k-autoconfig.c.orig 2004-05-11 13:54:31.739024000 -0400 ++++ lib/e2k-autoconfig.c 2004-05-11 13:55:27.249000000 -0400 +@@ -23,6 +23,8 @@ + #include + #endif + ++#include ++#include + #include + #include + #include Added: csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,20 @@ +--- calendar/e-cal-backend-exchange-tasks.c.orig 2004-09-27 18:41:48.290940000 -0400 ++++ calendar/e-cal-backend-exchange-tasks.c 2004-09-27 18:42:22.160879000 -0400 +@@ -644,7 +644,7 @@ + if ((str = e2k_properties_get_prop (result->props, E2K_PR_MAPI_COMMON_END))) { + itt = icaltime_from_timet (e2k_parse_timestamp (str), 0); + if (!icaltime_is_null_time (itt)) { +- itzone = icaltime_get_timezone ((const struct icaltimetype)itt); ++ itzone = icaltime_get_timezone (itt); + tzid = icaltimezone_get_tzid ((icaltimezone *)itzone); + ecdatetime.value = &itt; + ecdatetime.tzid = tzid; +@@ -657,7 +657,7 @@ + E2K_PR_MAPI_COMMON_START))) { + itt = icaltime_from_timet (e2k_parse_timestamp (str), 0); + if (!icaltime_is_null_time (itt)) { +- itzone = icaltime_get_timezone ((const struct icaltimetype) itt); ++ itzone = icaltime_get_timezone (itt); + tzid = icaltimezone_get_tzid ((icaltimezone *)itzone); + ecdatetime.value = &itt; + ecdatetime.tzid = tzid; Added: csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile 2009-04-27 13:02:55 UTC (rev 4584) @@ -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/ximian_connector/trunk/legacy/specs/ximian_connector =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ximian_connector (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ximian_connector 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,68 @@ +# vim: ft=perl +# $Id: ximian_connector,v 1.18 2005/04/13 15:17:12 simigern Exp $ + +$progname = 'ximian-connector'; +$version = '2.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.novell.com/products/connector/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","openldap-2.2.23.tgz"); + + at patches = (['ximian-connector-nongcc-fixes.patch', "${progname}-${version}", '-p0'], + ['openldap-ntlm.diff' ,"openldap-2.2.23", "-p0"]); + + at packages = ({ + pkgname => "ximian-connector", + filename => "ximian_connector", + name => "ximian_connector - Novell/Ximian connector for Evolution & MS Exchange", + dependencies => ['CSWcommon','CSWgnomespell'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; + +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-xO3 -xspace -xarch=386' +fi + +#openldap +cd ${builddir}/openldap-2.2.23 +./configure --prefix=${builddir}/evo-ldap --disable-shared --disable-slapd --without-cyrus-sasl +gmake || exit 1 +gmake install || exit 1 + +#ximian +export CFLAGS="\$CFLAGS -I${builddir}/evo-ldap/include -I/opt/csw/include" +export CPPFLAGS='-I${builddir}/evo-ldap/include -I/opt/csw/include' +export LD_OPTIONS='-L${builddir}/evo-ldap/lib -R/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib/evolution/nss/lib -R/opt/csw/lib/evolution/nss/lib' +export LDFLAGS="\$LD_OPTIONS" + +cd ${builddir}/${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-openldap=${builddir}/evo-ldap || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install_sh=ginstall install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/evolution/*/camel-providers/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:03:10 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:03:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4585] csw/mgar/pkg Message-ID: Revision: 4585 http://gar.svn.sourceforge.net/gar/?rev=4585&view=rev Author: dmichelsen Date: 2009-04-27 13:03:10 +0000 (Mon, 27 Apr 2009) Log Message: ----------- xmlparser: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/xmlparser/ csw/mgar/pkg/xmlparser/trunk/ csw/mgar/pkg/xmlparser/trunk/legacy/ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/xmlparser/trunk/legacy/scripts/human.pl csw/mgar/pkg/xmlparser/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/xmlparser/trunk/legacy/sources/ csw/mgar/pkg/xmlparser/trunk/legacy/specs/ csw/mgar/pkg/xmlparser/trunk/legacy/specs/Makefile csw/mgar/pkg/xmlparser/trunk/legacy/specs/xmlparser Added: csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:03:10 UTC (rev 4585) @@ -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/xmlparser/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/human.pl 2009-04-27 13:03:10 UTC (rev 4585) @@ -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 () { + 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 + +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 + +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/xmlparser/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:03:10 UTC (rev 4585) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/xmlparser/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/specs/Makefile 2009-04-27 13:03:10 UTC (rev 4585) @@ -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/xmlparser/trunk/legacy/specs/xmlparser =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/specs/xmlparser (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/specs/xmlparser 2009-04-27 13:03:10 UTC (rev 4585) @@ -0,0 +1,35 @@ +# vim: ft=perl + +$progname = 'xmlparser'; +$version = '2.34'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://search.cpan.org/~msergeant/XML-Parser-2.34/ packaged for CSW by Michael Gernoth'; + + at sources = ("XML-Parser-${version}.tar.gz"); + at packages = ({ + pkgname => "pm${progname}", + filename => "pm_${progname}", + name => "pm_${progname} - A perl module for parsing XML documents", + dependencies => ['CSWcommon', 'CSWperl'], + filelist => [qw(opt)] + }); + +$copyright = "XML-Parser-${version}/COPYRIGHT"; + +$build = <<"EOF"; +export CC=${sunwspropath}/cc +export PATH="/opt/csw/bin:${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +cd XML-Parser-${version} +/opt/csw/bin/perl Makefile.PL INSTALLDIRS=vendor +make +gmake DESTDIR=${buildroot} install +echo > ${builddir}/XML-Parser-${version}/COPYRIGHT < Revision: 4586 http://gar.svn.sourceforge.net/gar/?rev=4586&view=rev Author: valholla Date: 2009-04-27 17:48:31 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fix dependencies Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-27 13:03:10 UTC (rev 4585) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-27 17:48:31 UTC (rev 4586) @@ -4,8 +4,8 @@ CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module -REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib CSWexpat -REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWiconv CSWexpat +REQUIRED_PKGS_CSWmodphp5 += CSWlibxml2 CSWphp5 CSWzlib DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-27 13:03:10 UTC (rev 4585) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-27 17:48:31 UTC (rev 4586) @@ -4,9 +4,8 @@ CATALOGNAME_CSWap2modphp5 = ap2_modphp5 SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 2.2.x Module -REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv -REQUIRED_PKGS_CSWap2modphp5 += CSWkrb5lib CSWexpat CSWlibmm -REQUIRED_PKGS_CSWap2modphp5 += CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +REQUIRED_PKGS_CSWap2modphp5 = CSWphp5 CSWap2prefork CSWiconv +REQUIRED_PKGS_CSWap2modphp5 += CSWexpat CSWlibxml2 CSWzlib DISTFILES += CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 20:02:25 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 18:02:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4587] csw/mgar/pkg/php5 Message-ID: Revision: 4587 http://gar.svn.sourceforge.net/gar/?rev=4587&view=rev Author: valholla Date: 2009-04-27 18:02:25 +0000 (Mon, 27 Apr 2009) Log Message: ----------- prep for move Added Paths: ----------- csw/mgar/pkg/php5/trunk/legacy/ Property Changed: ---------------- csw/mgar/pkg/php5-apache/trunk/ csw/mgar/pkg/php5-apache2/trunk/ Property changes on: csw/mgar/pkg/php5-apache/trunk ___________________________________________________________________ Deleted: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 Property changes on: csw/mgar/pkg/php5-apache2/trunk ___________________________________________________________________ Deleted: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 20:16:39 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 18:16:39 +0000 Subject: [csw-devel] SF.net SVN: gar:[4588] csw/mgar/pkg/php5/trunk/legacy Message-ID: Revision: 4588 http://gar.svn.sourceforge.net/gar/?rev=4588&view=rev Author: valholla Date: 2009-04-27 18:16:39 +0000 (Mon, 27 Apr 2009) Log Message: ----------- consolidate old php5* to current php5 trunk/legacy Added Paths: ----------- csw/mgar/pkg/php5/trunk/legacy/php5-apache/ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/files/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/files/ Removed Paths: ------------- csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/files/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/files/ Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5-apache/trunk/Makefile 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,52 +0,0 @@ -GARNAME = php -GARVERSION = 5.2.6 -CATEGORIES = lang - -# This directory is for the build and packaging of the Apache 1.3.x -# SAPI module for PHP5. PHP CGI/CLI and extensions are built along -# with the Apache 2.0.x SAPI. - -DESCRIPTION = A high-level scripting language. -define BLURB - PHP is a widely-used Open Source general-purpose scripting language that is - especially suited for Web development and can be embedded into HTML. Its - syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many - different platforms and can be used as a standalone executable or as a - module under a variety of Web servers. It has excellent support for - databases, XML, LDAP, IMAP, Java, various Internet protocols, and general - data manipulation, and is extensible via its powerful API. It is actively - developed and supported by a talented and energetic international team. - Numerous Open Source and commercial PHP-based application packages are - available. -endef - -# PHP Apache SAPI -ADMFILES = depend prototype preremove postinstall space -DISTFILES += $(call admfiles,CSWmodphp5,$(ADMFILES)) - -# Patches -include files/patches.mk - -# Dependencies -include files/depend.mk -DEPENDS += server/apache - -# SAPI Common Configuration -include files/config.mk - -# Apache SAPI Specific Configuration -CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs -INSTALL_SCRIPTS = sapi-only - -# System Rules/Configuration -include gar/category.mk - -# Common Rules -include files/rules.mk - -# SAPI Specific Rules -STRIP_DIRS += $(DESTDIR)$(prefix)/apache/libexec - -install-sapi-only: - @( cd $(WORKSRC) ; $(INSTALL_ENV) $(MAKE) install-sapi ) - Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile (from rev 4451, csw/mgar/pkg/php5-apache/trunk/Makefile) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,52 @@ +GARNAME = php +GARVERSION = 5.2.6 +CATEGORIES = lang + +# This directory is for the build and packaging of the Apache 1.3.x +# SAPI module for PHP5. PHP CGI/CLI and extensions are built along +# with the Apache 2.0.x SAPI. + +DESCRIPTION = A high-level scripting language. +define BLURB + PHP is a widely-used Open Source general-purpose scripting language that is + especially suited for Web development and can be embedded into HTML. Its + syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many + different platforms and can be used as a standalone executable or as a + module under a variety of Web servers. It has excellent support for + databases, XML, LDAP, IMAP, Java, various Internet protocols, and general + data manipulation, and is extensible via its powerful API. It is actively + developed and supported by a talented and energetic international team. + Numerous Open Source and commercial PHP-based application packages are + available. +endef + +# PHP Apache SAPI +ADMFILES = depend prototype preremove postinstall space +DISTFILES += $(call admfiles,CSWmodphp5,$(ADMFILES)) + +# Patches +include files/patches.mk + +# Dependencies +include files/depend.mk +DEPENDS += server/apache + +# SAPI Common Configuration +include files/config.mk + +# Apache SAPI Specific Configuration +CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs +INSTALL_SCRIPTS = sapi-only + +# System Rules/Configuration +include gar/category.mk + +# Common Rules +include files/rules.mk + +# SAPI Specific Rules +STRIP_DIRS += $(DESTDIR)$(prefix)/apache/libexec + +install-sapi-only: + @( cd $(WORKSRC) ; $(INSTALL_ENV) $(MAKE) install-sapi ) + Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums =================================================================== --- csw/mgar/pkg/php5-apache/trunk/checksums 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,8 +0,0 @@ -c37758ca9bed5b5f9a15fd636acd7149 download/CSWmodphp5.gspec -b226254db72796595d88577d2c769dc9 download/CSWmodphp5.depend -74c60f89b137d7e30882c28aac392133 download/CSWmodphp5.prototype -2e5dbed2c9dd5e24c331753984946822 download/CSWmodphp5.preremove -5f0046fe1b3f8e2228fdb165bdbbe73a download/CSWmodphp5.postinstall -0dd379f20ceb32fc77bb3a9bf045097f download/CSWmodphp5.space -7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 -a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums (from rev 4451, csw/mgar/pkg/php5-apache/trunk/checksums) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,8 @@ +c37758ca9bed5b5f9a15fd636acd7149 download/CSWmodphp5.gspec +b226254db72796595d88577d2c769dc9 download/CSWmodphp5.depend +74c60f89b137d7e30882c28aac392133 download/CSWmodphp5.prototype +2e5dbed2c9dd5e24c331753984946822 download/CSWmodphp5.preremove +5f0046fe1b3f8e2228fdb165bdbbe73a download/CSWmodphp5.postinstall +0dd379f20ceb32fc77bb3a9bf045097f download/CSWmodphp5.space +7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 +a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5-apache2/trunk/Makefile 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,55 +0,0 @@ -GARNAME = php -GARVERSION = 5.2.6 -CATEGORIES = lang - -DESCRIPTION = A high-level scripting language. -define BLURB - PHP is a widely-used Open Source general-purpose scripting language that is - especially suited for Web development and can be embedded into HTML. Its - syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many - different platforms and can be used as a standalone executable or as a - module under a variety of Web servers. It has excellent support for - databases, XML, LDAP, IMAP, Java, various Internet protocols, and general - data manipulation, and is extensible via its powerful API. It is actively - developed and supported by a talented and energetic international team. - Numerous Open Source and commercial PHP-based application packages are - available. -endef - -# Auxilliary files -DISTFILES += httpd-php5.conf.CSW - -# PHP Apache2 SAPI -ADMFILES = depend prototype postinstall preremove space -DISTFILES += $(call admfiles,CSWap2modphp5,$(ADMFILES)) - -# Patches -include files/patches.mk - -# Dependencies -include files/depend.mk -DEPENDS += server/apache2 - -# SAPI Common Configuration -include files/config.mk - -# Apache2 SAPI Specific Configuration -CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs - -# System Rules/Configuration -include gar/category.mk - -# Common Rules -include files/rules.mk - -# SAPI Specific Rules -STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec - -# Copy over template config files and utility scripts -post-install: - ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra - ginstall -m 0644 \ - $(WORKDIR)/httpd-php5.conf.CSW \ - $(DESTDIR)$(prefix)/apache2/etc/extra - @$(MAKECOOKIE) - Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile (from rev 3986, csw/mgar/pkg/php5-apache2/trunk/Makefile) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,55 @@ +GARNAME = php +GARVERSION = 5.2.6 +CATEGORIES = lang + +DESCRIPTION = A high-level scripting language. +define BLURB + PHP is a widely-used Open Source general-purpose scripting language that is + especially suited for Web development and can be embedded into HTML. Its + syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many + different platforms and can be used as a standalone executable or as a + module under a variety of Web servers. It has excellent support for + databases, XML, LDAP, IMAP, Java, various Internet protocols, and general + data manipulation, and is extensible via its powerful API. It is actively + developed and supported by a talented and energetic international team. + Numerous Open Source and commercial PHP-based application packages are + available. +endef + +# Auxilliary files +DISTFILES += httpd-php5.conf.CSW + +# PHP Apache2 SAPI +ADMFILES = depend prototype postinstall preremove space +DISTFILES += $(call admfiles,CSWap2modphp5,$(ADMFILES)) + +# Patches +include files/patches.mk + +# Dependencies +include files/depend.mk +DEPENDS += server/apache2 + +# SAPI Common Configuration +include files/config.mk + +# Apache2 SAPI Specific Configuration +CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs + +# System Rules/Configuration +include gar/category.mk + +# Common Rules +include files/rules.mk + +# SAPI Specific Rules +STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec + +# Copy over template config files and utility scripts +post-install: + ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra + ginstall -m 0644 \ + $(WORKDIR)/httpd-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache2/etc/extra + @$(MAKECOOKIE) + Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums =================================================================== --- csw/mgar/pkg/php5-apache2/trunk/checksums 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,9 +0,0 @@ -a71677d80f5cfd1aeb03547dfdeb705a download/httpd-php5.conf.CSW -47f2f1ccf059cf948e762fa3628a8cf1 download/CSWap2modphp5.gspec -77076f9a0bab2777c15b84c4c0bd7ba4 download/CSWap2modphp5.depend -05d40405b247a12c25c04a26c68c208a download/CSWap2modphp5.prototype -632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall -e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove -0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space -7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 -a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums (from rev 3986, csw/mgar/pkg/php5-apache2/trunk/checksums) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,9 @@ +a71677d80f5cfd1aeb03547dfdeb705a download/httpd-php5.conf.CSW +47f2f1ccf059cf948e762fa3628a8cf1 download/CSWap2modphp5.gspec +77076f9a0bab2777c15b84c4c0bd7ba4 download/CSWap2modphp5.depend +05d40405b247a12c25c04a26c68c208a download/CSWap2modphp5.prototype +632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall +e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove +0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space +7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 +a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 20:18:33 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 18:18:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4589] csw/mgar/pkg Message-ID: Revision: 4589 http://gar.svn.sourceforge.net/gar/?rev=4589&view=rev Author: valholla Date: 2009-04-27 18:18:33 +0000 (Mon, 27 Apr 2009) Log Message: ----------- misc checkin Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/squid/trunk/Makefile csw/mgar/pkg/squid/trunk/checksums csw/mgar/pkg/squirrelmail/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/gcc4/Makefile csw/mgar/pkg/gcc4/branches/ csw/mgar/pkg/gcc4/tags/ csw/mgar/pkg/libffi/Makefile Removed Paths: ------------- csw/mgar/pkg/php5-apache/ csw/mgar/pkg/php5-apache2/ csw/mgar/pkg/sudo-ldap/ Property Changed: ---------------- csw/mgar/pkg/squid/trunk/ Added: csw/mgar/pkg/gcc4/Makefile =================================================================== --- csw/mgar/pkg/gcc4/Makefile (rev 0) +++ csw/mgar/pkg/gcc4/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-27 18:18:33 UTC (rev 4589) @@ -26,7 +26,7 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) + $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/i386) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) @@ -45,51 +45,48 @@ $(_DBG)$(MAKECOOKIE) ifeq ($(shell uname -p), i386) -ISAEXEC_DIRS = /opt/csw/gcc4/bin -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcov -ISAEXEC_FILES += /opt/csw/gcc4/bin/gccbug -ISAEXEC_FILES += /opt/csw/gcc4/bin/gfortran -ISAEXEC_FILES += /opt/csw/gcc4/bin/c++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/g++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/cpp -ISAEXEC_FILES += /opt/csw/gcc4/bin/addr2name.awk -ISAEXEC_FILES += /opt/csw/gcc4/bin/gc-analyze -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcjh -ISAEXEC_FILES += /opt/csw/gcc4/bin/gjarsigner -ISAEXEC_FILES += /opt/csw/gcc4/bin/grmic -ISAEXEC_FILES += /opt/csw/gcc4/bin/gjavah -ISAEXEC_FILES += /opt/csw/gcc4/bin/grmid -ISAEXEC_FILES += /opt/csw/gcc4/bin/jcf-dump -ISAEXEC_FILES += /opt/csw/gcc4/bin/gkeytool -ISAEXEC_FILES += /opt/csw/gcc4/bin/grmiregistry -ISAEXEC_FILES += /opt/csw/gcc4/bin/jv-convert -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj -ISAEXEC_FILES += /opt/csw/gcc4/bin/gij -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii -ISAEXEC_FILES += /opt/csw/gcc4/bin/gserialver -ISAEXEC_FILES += /opt/csw/gcc4/bin/gappletviewer -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj-dbtool -ISAEXEC_FILES += /opt/csw/gcc4/bin/gjar -ISAEXEC_FILES += /opt/csw/gcc4/bin/gorbd -ISAEXEC_FILES += /opt/csw/gcc4/bin/gtnameserv -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnat -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbind -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbl -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatmake -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-c++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-g++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc-4.3.3 -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcj -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gfortran +EXTRA_PKGFILES_CSWgcc4core = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcc +EXTRA_PKGFILES_CSWgcc4core += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/cpp + +EXTRA_PKGFILES_CSWgcc4g++ = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/c++ +EXTRA_PKGFILES_CSWgcc4g++ += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/g++ + +EXTRA_PKGFILES_CSWgcc4gfortran = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gfortran + +EXTRA_PKGFILES_CSWgcc4java = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcov +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gccbug +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/addr2name.awk +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gc-analyze +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcjh +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjarsigner +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmic +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjavah +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmid +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jcf-dump +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gkeytool +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmiregistry +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jv-convert +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gij +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnative2ascii +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gserialver +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gappletviewer +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj-dbtool +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjar +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gorbd +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gtnameserv + +EXTRA_PKGFILES_CSWgcc4ada = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnat +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbind +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbl +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatchop +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatclean +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatfind +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatkr +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatlink +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatls +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatmake +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatname +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatprep +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatxref endif Added: csw/mgar/pkg/libffi/Makefile =================================================================== --- csw/mgar/pkg/libffi/Makefile (rev 0) +++ csw/mgar/pkg/libffi/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/squid/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/squid/trunk/Makefile =================================================================== --- csw/mgar/pkg/squid/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/squid/trunk/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -1,9 +1,10 @@ GARNAME = squid -GARVERSION = 2.7 +GARVERSION = 3.0 CATEGORIES = server -RELEASE = STABLE3 +RELEASE = STABLE14 DISTVERSION = $(GARVERSION).$(RELEASE) DISTNAME = $(GARNAME)-$(DISTVERSION) +RELVER = $(shell echo $(GARVERSION) |gsed 's/\(^[0-9]\).*\.[0-9]*/\1/') DESCRIPTION = High performance Web proxy cache define BLURB @@ -12,31 +13,36 @@ bandwith usage. Squid runs on all popular Unix and Windows platforms. endef -MASTER_SITES = http://www.squid-cache.org/Versions/v2/2.7/ +MASTER_SITES = http://www.squid-cache.org/Versions/v$(RELVER)/$(GARVERSION)/ DISTFILES = $(DISTNAME).tar.bz2 -DISTFILES += $(call admfiles,CSWsquid, depend prototype copyright postinstall preremove) -CONFIGURE_ARGS = --prefix=$(prefix) --mandir=/opt/csw/share/man -CONFIGURE_ARGS += --localstatedir=/var/$(prefix) +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --disable-static CONFIGURE_ARGS += --datadir=$(datadir)/$(GARNAME) CONFIGURE_ARGS += --with-large-files CONFIGURE_ARGS += --enable-large-cache-files CONFIGURE_ARGS += --enable-ssl +CONFIGURE_ARGS += --with-openssl=$(prefix) CONFIGURE_ARGS += --enable-icmp CONFIGURE_ARGS += --enable-delay-pools CONFIGURE_ARGS += --enable-useragent-log CONFIGURE_ARGS += --enable-referer-log CONFIGURE_ARGS += --enable-arp-acl CONFIGURE_ARGS += --enable-snmp -CONFIGURE_ARGS += --enable-auth=basic -CONFIGURE_ARGS += --enable-basic-auth-helpers=LDAP,SMB,YP,PAM,SASL,NCSA +#CONFIGURE_ARGS += --enable-auth=basic +#CONFIGURE_ARGS += --enable-basic-auth-helpers=LDAP,SMB,YP,PAM,SASL,NCSA TEST_TARGET = check include gar/category.mk + SPKG_REVSTAMP := $(SPKG_REVSTAMP)_$(RELEASE) -post-install: +pre-configure-modulated: + cd $(WORKSRC) && $(BUILD_ENV) ./bootstrap.sh + @$(MAKECOOKIE) + +post-install-modulated: ( cp -r $(FILEDIR)/etc $(DESTDIR)/etc ) @$(MAKECOOKIE) Modified: csw/mgar/pkg/squid/trunk/checksums =================================================================== --- csw/mgar/pkg/squid/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/squid/trunk/checksums 2009-04-27 18:18:33 UTC (rev 4589) @@ -1,7 +1 @@ -eb49bc06ea1a40421b6f1ac9e76d1757 download/squid-2.6.STABLE18.tar.bz2 -18288c834ba98c10a67d0cfc07445879 download/CSWsquid.gspec -1c3e1327ace797a240fc66e36a127f59 download/CSWsquid.depend -ca01a650e044db58f282732f8b9ddbc5 download/CSWsquid.prototype -c492e2d6d32ec5c1aad0e0609a141ce9 download/CSWsquid.copyright -84f3b2fdb7dfd33f05096f5b2051e80e download/CSWsquid.postinstall -97d93eadab6a33c4e0cabf76b351364d download/CSWsquid.preremove +7aaff2319d2263404d788a82a10c8633 download/squid-3.0.STABLE14.tar.bz2 Modified: csw/mgar/pkg/squirrelmail/trunk/Makefile =================================================================== --- csw/mgar/pkg/squirrelmail/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/squirrelmail/trunk/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -13,6 +13,7 @@ MIME support, address books, and folder manipulation. endef +ARCHALL = 1 MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 @@ -20,13 +21,18 @@ CATALOGNAME_CSWsquirrelmail = squirrelmail SPKG_DESC_CSWsquirrelmail = $(DESCRIPTION) -REQUIRED_PKGS_CSWsquirrelmail = CSWimaprt +REQUIRED_PKGS_CSWsquirrelmail = CSWimap CSWapache2c # We define upstream file regex so we can be notifed of # new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_SCRIPTS = cswize +configure-cswize: + @(perl -i -pe 's|/var/local|/opt/csw|' $(WORKSRC)/config/config_default.php) + @(perl -i -pe 's|/usr/sbin/sendmail|/usr/lib/sendmail|' \ + $(WORKSRC)/config/config_default.php) + @$(MAKECOOKIE) include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 28 21:31:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 28 Apr 2009 19:31:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4590] csw/mgar/pkg/subversion/trunk Message-ID: Revision: 4590 http://gar.svn.sourceforge.net/gar/?rev=4590&view=rev Author: valholla Date: 2009-04-28 19:31:31 +0000 (Tue, 28 Apr 2009) Log Message: ----------- add tools and contrib to package Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile csw/mgar/pkg/subversion/trunk/checksums Added Paths: ----------- csw/mgar/pkg/subversion/trunk/files/subversion161.diff Removed Paths: ------------- csw/mgar/pkg/subversion/trunk/files/subversion156.diff Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-27 18:18:33 UTC (rev 4589) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-28 19:31:31 UTC (rev 4590) @@ -80,7 +80,7 @@ # Fix: Add java headers for nested classes # https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-June/004633.html PATCHFILES += javahl_headers_for_nested_classes.diff -PATCHFILES += subversion156.diff +PATCHFILES += subversion161.diff DEPENDS = server/apache2 DEPENDS = lib/neon @@ -113,19 +113,20 @@ TEST_SCRIPTS = skip test-skip: - @$(DONADA) + @$(MAKECOOKIE) include gar/category.mk BINDING_LANGS = java perl python ruby BINDING_TARGETS = $(foreach LANG,$(BINDING_LANGS),svn-$(LANG)) -PI_DEPENDS = $(BINDING_TARGETS) +PI_DEPENDS = install-extras +PI_DEPENDS += $(BINDING_TARGETS) PI_DEPENDS += copy-templates PI_DEPENDS += fix-install post-install-modulated: $(PI_DEPENDS) - $(DONADA) + $(MAKECOOKIE) post-configure-modulated: @echo "~~~ Fixing Libtool ~~~" @@ -147,7 +148,7 @@ else \ perl -i -pe 's|-xarch=386|-march=i386|' $(WORKSRC)/*.gcc; \ fi ) - $(DONADA) + $(MAKECOOKIE) fix-install: @(grm -fr $(DESTDIR)$(prefix)/lib/perl/5.8.8) @@ -160,8 +161,17 @@ ginstall -m 0644 \ $(WORKDIR)/svn_access.conf.CSW \ $(DESTDIR)$(prefix)/apache2/etc - $(DONADA) + $(MAKECOOKIE) +install-extras: + @(ginstall -d $(DESTDIR)$(docdir)/tools) + @(ginstall -d $(DESTDIR)$(docdir)/contrib) + @(gcp -R $(WORKSRC)/tools/* $(DESTDIR)$(docdir)/tools/) + @(gcp -R $(WORKSRC)/contrib/* $(DESTDIR)$(docdir)/contrib/) + @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-tools + @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-contrib + @$(MAKECOOKIE) + svn-python: @echo " ==> Building Python bindings" @touch \ @@ -170,7 +180,7 @@ @$(BUILD_ENV) gmake -C $(WORKSRC) swig-py #@$(TEST_ENV) gmake -C $(WORKSRC) check-swig-py @$(INSTALL_ENV) gmake -C $(WORKSRC) install-swig-py - $(DONADA) + $(MAKECOOKIE) svn-perl: @echo " ==> Building Perl bindings" @@ -180,7 +190,7 @@ @$(BUILD_ENV) gmake -C $(WORKSRC) swig-pl #@$(TEST_ENV) gmake -C $(WORKSRC) check-swig-pl @$(INSTALL_ENV) gmake DESTDIR=$(DESTDIR) -C $(WORKSRC) install-swig-pl - $(DONADA) + $(MAKECOOKIE) svn-ruby: @echo " ==> Building Ruby bindings" @@ -188,13 +198,13 @@ $(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) swig-rb #@$(TEST_ENV) gmake -f Makefile.gcc -C $(WORKSRC) check-swig-rb @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-swig-rb - $(DONADA) + $(MAKECOOKIE) svn-java: @echo " ==> Building Java bindings" @touch $(WORKSRC)/subversion/bindings/javahl/native/*.c $(BUILD_ENV) gmake -C $(WORKSRC) javahl; $(INSTALL_ENV) gmake -C $(WORKSRC) install-javahl; - $(DONADA) + $(MAKECOOKIE) Modified: csw/mgar/pkg/subversion/trunk/checksums =================================================================== --- csw/mgar/pkg/subversion/trunk/checksums 2009-04-27 18:18:33 UTC (rev 4589) +++ csw/mgar/pkg/subversion/trunk/checksums 2009-04-28 19:31:31 UTC (rev 4590) @@ -3,9 +3,7 @@ 395ec6d1bfe07efadc1c0aa8816673fa download/CSWsvn.checkinstall 41ec540885de7c34625768aa1fb9682b download/fixme.sh f107831ad0c702ff32e51df6a207237b download/httpd-svn.conf.CSW -6caa3c518b84c2b3f6a33b61d1b022e3 download/i386-gcc.diff f0aa58c145ae99f8e4d72499ab826169 download/javahl_headers_for_nested_classes.diff -91d4c5a963192f113602b1bd1917d0cb download/sparc-gcc.diff 95708b96b920faeffca017f43ec96777 download/subversion-1.6.1.tar.bz2 -f7d05c59656dcf01fb844295c9912f78 download/subversion156.diff +f7d05c59656dcf01fb844295c9912f78 download/subversion161.diff 1b532d3055708a97771f5cd959983628 download/svn_access.conf.CSW Deleted: csw/mgar/pkg/subversion/trunk/files/subversion156.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/subversion156.diff 2009-04-27 18:18:33 UTC (rev 4589) +++ csw/mgar/pkg/subversion/trunk/files/subversion156.diff 2009-04-28 19:31:31 UTC (rev 4590) @@ -1,33 +0,0 @@ ---- subversion-1.5.5/Makefile.in.orig 2008-08-26 12:27:56.000000000 -0500 -+++ subversion-1.5.5/Makefile.in 2009-02-21 17:26:25.849467074 -0600 -@@ -68,15 +69,15 @@ - swig_rb_libdir = @libdir@ - - ### these possibly need further discussion --swig_pydir = @libdir@/svn-python/libsvn --swig_pydir_extra = @libdir@/svn-python/svn --swig_pldir = @libdir@/svn-perl -+swig_pydir = @prefix@/lib/python/site-packages/libsvn -+swig_pydir_extra = @prefix@/lib/python/site-packages/svn -+#swig_pldir = @libdir@/svn-perl - swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext - contribdir = @bindir@/svn-contrib - toolsdir = @bindir@/svn-tools - --javahl_javadir = @libdir@/svn-javahl --javahl_javahdir = @libdir@/svn-javahl/include -+javahl_javadir = @libdir@ -+javahl_javahdir = @libdir@/include - javahl_libdir = @libdir@ - javahl_test_rootdir=$(abs_builddir)/subversion/bindings/javahl/test-work - ---- subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py.orig 2009-02-21 17:00:06.832094681 -0600 -+++ subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py 2009-02-21 16:59:46.198583440 -0600 -@@ -97,7 +97,7 @@ - - # use an array for the command to avoid the shell and potential - # security exposures -- cmd = ["diff"] \ -+ cmd = ["gdiff"] \ - + self.diffoptions \ - + [self.tempfile1, self.tempfile2] Copied: csw/mgar/pkg/subversion/trunk/files/subversion161.diff (from rev 4589, csw/mgar/pkg/subversion/trunk/files/subversion156.diff) =================================================================== --- csw/mgar/pkg/subversion/trunk/files/subversion161.diff (rev 0) +++ csw/mgar/pkg/subversion/trunk/files/subversion161.diff 2009-04-28 19:31:31 UTC (rev 4590) @@ -0,0 +1,33 @@ +--- subversion-1.5.5/Makefile.in.orig 2008-08-26 12:27:56.000000000 -0500 ++++ subversion-1.5.5/Makefile.in 2009-02-21 17:26:25.849467074 -0600 +@@ -68,15 +69,15 @@ + swig_rb_libdir = @libdir@ + + ### these possibly need further discussion +-swig_pydir = @libdir@/svn-python/libsvn +-swig_pydir_extra = @libdir@/svn-python/svn +-swig_pldir = @libdir@/svn-perl ++swig_pydir = @prefix@/lib/python/site-packages/libsvn ++swig_pydir_extra = @prefix@/lib/python/site-packages/svn ++#swig_pldir = @libdir@/svn-perl + swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext + contribdir = @bindir@/svn-contrib + toolsdir = @bindir@/svn-tools + +-javahl_javadir = @libdir@/svn-javahl +-javahl_javahdir = @libdir@/svn-javahl/include ++javahl_javadir = @libdir@ ++javahl_javahdir = @libdir@/include + javahl_libdir = @libdir@ + javahl_test_rootdir=$(abs_builddir)/subversion/bindings/javahl/test-work + +--- subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py.orig 2009-02-21 17:00:06.832094681 -0600 ++++ subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py 2009-02-21 16:59:46.198583440 -0600 +@@ -97,7 +97,7 @@ + + # use an array for the command to avoid the shell and potential + # security exposures +- cmd = ["diff"] \ ++ cmd = ["gdiff"] \ + + self.diffoptions \ + + [self.tempfile1, self.tempfile2] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 28 23:28:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 28 Apr 2009 21:28:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4591] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4591 http://gar.svn.sourceforge.net/gar/?rev=4591&view=rev Author: valholla Date: 2009-04-28 21:28:06 +0000 (Tue, 28 Apr 2009) Log Message: ----------- relocate tools and contrib to doc/subversion Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-28 19:31:31 UTC (rev 4590) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-28 21:28:06 UTC (rev 4591) @@ -164,10 +164,10 @@ $(MAKECOOKIE) install-extras: - @(ginstall -d $(DESTDIR)$(docdir)/tools) - @(ginstall -d $(DESTDIR)$(docdir)/contrib) - @(gcp -R $(WORKSRC)/tools/* $(DESTDIR)$(docdir)/tools/) - @(gcp -R $(WORKSRC)/contrib/* $(DESTDIR)$(docdir)/contrib/) + @(ginstall -d $(DESTDIR)$(docdir)/subversion/tools) + @(ginstall -d $(DESTDIR)$(docdir)/subversion/contrib) + @(gcp -R $(WORKSRC)/tools/* $(DESTDIR)$(docdir)/subversion/tools/) + @(gcp -R $(WORKSRC)/contrib/* $(DESTDIR)$(docdir)/subversion/contrib/) @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-tools @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-contrib @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 29 01:39:12 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 28 Apr 2009 23:39:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4592] csw/mgar/pkg/git/tags/1.6.2.1-2009.04.14/ Message-ID: Revision: 4592 http://gar.svn.sourceforge.net/gar/?rev=4592&view=rev Author: bdwalton Date: 2009-04-28 23:39:12 +0000 (Tue, 28 Apr 2009) Log Message: ----------- Tagged most recent public release. Added Paths: ----------- csw/mgar/pkg/git/tags/1.6.2.1-2009.04.14/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 29 04:27:41 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 29 Apr 2009 02:27:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4593] csw/mgar/pkg/git/trunk Message-ID: Revision: 4593 http://gar.svn.sourceforge.net/gar/?rev=4593&view=rev Author: bdwalton Date: 2009-04-29 02:27:41 +0000 (Wed, 29 Apr 2009) Log Message: ----------- Prepare for 1.6.3 - remove all patches (accepted upstream) - rc3 passes all tests on sparc and i386 Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch csw/mgar/pkg/git/trunk/files/doc-makefile.patch Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,9 +1,10 @@ GARNAME = git -GARVERSION = 1.6.2.1 +GARVERSION = 1.6.3 +PATCHLEVEL = rc3 CATEGORIES = devel # disable tests until next version bump (at the top so it stands out) -TEST_SCRIPTS = +# TEST_SCRIPTS = PACKAGES = CSWgit CSWgitk CSWgitgui CSWgitsvn CSWgitcvs CSWgitemacs CSWgitdoc @@ -69,17 +70,8 @@ #NOTE: If you need to proxy git:// connections, set GIT_USE_PROXY in # your .garrc file. (That leaves this recipe in a more generic form.) GIT_REPOS = git://git.kernel.org/pub/scm/git/git.git -GIT_TREEISH_git.git = v$(GARVERSION) +GIT_TREEISH_git.git = v$(GARVERSION)$(if $(PATCHLEVEL),-$(PATCHLEVEL)) -PATCHFILES = doc-makefile.patch -PATCHFILES += 0001-configure-ensure-settings-from-user-are-also-usable.patch -PATCHFILES += 0002-configure-reorganize-flow-of-argument-checks.patch -PATCHFILES += 0003-configure-add-macros-to-stash-FLAG-variables.patch -PATCHFILES += 0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch -PATCHFILES += 0005-configure-asciidoc-version-test-cleanup.patch -PATCHFILES += 0006-configure-make-iconv-tests-aware-of-user-arguments.patch -PATCHFILES += 0007-configure-rework-pthread-handling-to-allow-for-user.patch - fdirs = $(bindir_install) $(mandir) $(libexecdir_install) define _git_files $(foreach d,$(fdirs),$(d)/.*$(1).*) $(sharedstatedir)/$(1).* Deleted: csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,56 +0,0 @@ -From 63b740b85248d3ff5a2a458cc5068f5e2c180f0d Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Thu, 12 Mar 2009 17:30:56 +0100 -Subject: [PATCH] configure: ensure settings from user are also usable in the script - -Allow things set by the user (--with-lib, --with-iconv, etc) to set -variables for use by other parts of the script. Display values as -they're set. - -Signed-off-by: Ben Walton ---- - configure.ac | 11 +++++++++++ - 1 files changed, 11 insertions(+), 0 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 082a03d..0b314d7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -42,6 +42,8 @@ else \ - if test "$withval" = "yes"; then \ - AC_MSG_WARN([You should provide path for --with-$1=PATH]); \ - else \ -+ m4_toupper($1)_PATH=$withval; \ -+ AC_MSG_NOTICE([Setting m4_toupper($1)_PATH to $withval]); \ - GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=$withval); \ - fi; \ - fi; \ -@@ -61,6 +63,8 @@ elif test "$withval" = "yes"; then \ - m4_toupper(NO_$1)=; \ - else \ - m4_toupper(NO_$1)=; \ -+ m4_toupper($1)DIR=$withval; \ -+ AC_MSG_NOTICE([Setting m4_toupper($1)DIR to $withval]); \ - GIT_CONF_APPEND_LINE(${PACKAGE}DIR=$withval); \ - fi \ - ])# GIT_PARSE_WITH -@@ -86,9 +90,16 @@ AC_ARG_WITH([lib], - [if test "$withval" = "no" || test "$withval" = "yes"; then \ - AC_MSG_WARN([You should provide name for --with-lib=ARG]); \ - else \ -+ lib=$withval; \ -+ AC_MSG_NOTICE([Setting lib to '$lib']); \ - GIT_CONF_APPEND_LINE(lib=$withval); \ - fi; \ - ],[]) -+ -+if test -z "$lib"; then -+ AC_MSG_NOTICE([Setting lib to 'lib' (the default)]) -+ lib=lib -+fi - # - # Define SHELL_PATH to provide path to shell. - GIT_ARG_SET_PATH(shell) --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,212 +0,0 @@ -From 142c46f4db8f7d32ed455316704503fca2bf4857 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Thu, 12 Mar 2009 17:33:38 +0100 -Subject: [PATCH] configure: reorganize flow of argument checks - -Move the argument tests from the 'site overrides' so that they are -ahead of any library tests. This allows for library tests to take -user specified paths into account. The intent here is to avoid things -like NO_DEFLATE_BOUND being set due to finding old zlib when the user -has specified an alternate location for zlib. (Ignore the fact that -properly set *FLAGS can avoid solve this issue.) - -Signed-off-by: Ben Walton ---- - configure.ac | 174 +++++++++++++++++++++++++++++----------------------------- - 1 files changed, 87 insertions(+), 87 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0b314d7..0bff480 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -100,6 +100,93 @@ if test -z "$lib"; then - AC_MSG_NOTICE([Setting lib to 'lib' (the default)]) - lib=lib - fi -+ -+## Site configuration (override autodetection) -+## --with-PACKAGE[=ARG] and --without-PACKAGE -+AC_MSG_NOTICE([CHECKS for site configuration]) -+# -+# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability -+# tests. These tests take up a significant amount of the total test time -+# but are not needed unless you plan to talk to SVN repos. -+# -+# Define MOZILLA_SHA1 environment variable when running make to make use of -+# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast -+# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default -+# choice) has very fast version optimized for i586. -+# -+# Define PPC_SHA1 environment variable when running make to make use of -+# a bundled SHA1 routine optimized for PowerPC. -+# -+# Define ARM_SHA1 environment variable when running make to make use of -+# a bundled SHA1 routine optimized for ARM. -+# -+# Define NO_OPENSSL environment variable if you do not have OpenSSL. -+# This also implies MOZILLA_SHA1. -+# -+# Define OPENSSLDIR=/foo/bar if your openssl header and library files are in -+# /foo/bar/include and /foo/bar/lib directories. -+AC_ARG_WITH(openssl, -+AS_HELP_STRING([--with-openssl],[use OpenSSL library (default is YES)]) -+AS_HELP_STRING([], [ARG can be prefix for openssl library and headers]),\ -+GIT_PARSE_WITH(openssl)) -+# -+# Define NO_CURL if you do not have curl installed. git-http-pull and -+# git-http-push are not built, and you cannot use http:// and https:// -+# transports. -+# -+# Define CURLDIR=/foo/bar if your curl header and library files are in -+# /foo/bar/include and /foo/bar/lib directories. -+AC_ARG_WITH(curl, -+AS_HELP_STRING([--with-curl],[support http(s):// transports (default is YES)]) -+AS_HELP_STRING([], [ARG can be also prefix for curl library and headers]), -+GIT_PARSE_WITH(curl)) -+# -+# Define NO_EXPAT if you do not have expat installed. git-http-push is -+# not built, and you cannot push using http:// and https:// transports. -+# -+# Define EXPATDIR=/foo/bar if your expat header and library files are in -+# /foo/bar/include and /foo/bar/lib directories. -+AC_ARG_WITH(expat, -+AS_HELP_STRING([--with-expat], -+[support git-push using http:// and https:// transports via WebDAV (default is YES)]) -+AS_HELP_STRING([], [ARG can be also prefix for expat library and headers]), -+GIT_PARSE_WITH(expat)) -+# -+# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink -+# installed in /sw, but don't want GIT to link against any libraries -+# installed there. If defined you may specify your own (or Fink's) -+# include directories and library directories by defining CFLAGS -+# and LDFLAGS appropriately. -+# -+# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X, -+# have DarwinPorts installed in /opt/local, but don't want GIT to -+# link against any libraries installed there. If defined you may -+# specify your own (or DarwinPort's) include directories and -+# library directories by defining CFLAGS and LDFLAGS appropriately. -+# -+# Define NO_MMAP if you want to avoid mmap. -+# -+# Define NO_ICONV if your libc does not properly support iconv. -+AC_ARG_WITH(iconv, -+AS_HELP_STRING([--without-iconv], -+[if your architecture doesn't properly support iconv]) -+AS_HELP_STRING([--with-iconv=PATH], -+[PATH is prefix for libiconv library and headers]) -+AS_HELP_STRING([], -+[used only if you need linking with libiconv]), -+GIT_PARSE_WITH(iconv)) -+ -+## --enable-FEATURE[=ARG] and --disable-FEATURE -+# -+# Define USE_NSEC below if you want git to care about sub-second file mtimes -+# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and -+# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely -+# randomly break unless your underlying filesystem supports those sub-second -+# times (my ext3 doesn't). -+# -+# Define USE_STDEV below if you want git to care about the underlying device -+# change being considered an inode change from the update-index perspective. -+ - # - # Define SHELL_PATH to provide path to shell. - GIT_ARG_SET_PATH(shell) -@@ -526,93 +613,6 @@ AC_SUBST(PTHREAD_LIBS) - AC_SUBST(NO_PTHREADS) - AC_SUBST(THREADED_DELTA_SEARCH) - --## Site configuration (override autodetection) --## --with-PACKAGE[=ARG] and --without-PACKAGE --AC_MSG_NOTICE([CHECKS for site configuration]) --# --# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability --# tests. These tests take up a significant amount of the total test time --# but are not needed unless you plan to talk to SVN repos. --# --# Define MOZILLA_SHA1 environment variable when running make to make use of --# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast --# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default --# choice) has very fast version optimized for i586. --# --# Define PPC_SHA1 environment variable when running make to make use of --# a bundled SHA1 routine optimized for PowerPC. --# --# Define ARM_SHA1 environment variable when running make to make use of --# a bundled SHA1 routine optimized for ARM. --# --# Define NO_OPENSSL environment variable if you do not have OpenSSL. --# This also implies MOZILLA_SHA1. --# --# Define OPENSSLDIR=/foo/bar if your openssl header and library files are in --# /foo/bar/include and /foo/bar/lib directories. --AC_ARG_WITH(openssl, --AS_HELP_STRING([--with-openssl],[use OpenSSL library (default is YES)]) --AS_HELP_STRING([], [ARG can be prefix for openssl library and headers]),\ --GIT_PARSE_WITH(openssl)) --# --# Define NO_CURL if you do not have curl installed. git-http-pull and --# git-http-push are not built, and you cannot use http:// and https:// --# transports. --# --# Define CURLDIR=/foo/bar if your curl header and library files are in --# /foo/bar/include and /foo/bar/lib directories. --AC_ARG_WITH(curl, --AS_HELP_STRING([--with-curl],[support http(s):// transports (default is YES)]) --AS_HELP_STRING([], [ARG can be also prefix for curl library and headers]), --GIT_PARSE_WITH(curl)) --# --# Define NO_EXPAT if you do not have expat installed. git-http-push is --# not built, and you cannot push using http:// and https:// transports. --# --# Define EXPATDIR=/foo/bar if your expat header and library files are in --# /foo/bar/include and /foo/bar/lib directories. --AC_ARG_WITH(expat, --AS_HELP_STRING([--with-expat], --[support git-push using http:// and https:// transports via WebDAV (default is YES)]) --AS_HELP_STRING([], [ARG can be also prefix for expat library and headers]), --GIT_PARSE_WITH(expat)) --# --# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink --# installed in /sw, but don't want GIT to link against any libraries --# installed there. If defined you may specify your own (or Fink's) --# include directories and library directories by defining CFLAGS --# and LDFLAGS appropriately. --# --# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X, --# have DarwinPorts installed in /opt/local, but don't want GIT to --# link against any libraries installed there. If defined you may --# specify your own (or DarwinPort's) include directories and --# library directories by defining CFLAGS and LDFLAGS appropriately. --# --# Define NO_MMAP if you want to avoid mmap. --# --# Define NO_ICONV if your libc does not properly support iconv. --AC_ARG_WITH(iconv, --AS_HELP_STRING([--without-iconv], --[if your architecture doesn't properly support iconv]) --AS_HELP_STRING([--with-iconv=PATH], --[PATH is prefix for libiconv library and headers]) --AS_HELP_STRING([], --[used only if you need linking with libiconv]), --GIT_PARSE_WITH(iconv)) -- --## --enable-FEATURE[=ARG] and --disable-FEATURE --# --# Define USE_NSEC below if you want git to care about sub-second file mtimes --# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and --# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely --# randomly break unless your underlying filesystem supports those sub-second --# times (my ext3 doesn't). --# --# Define USE_STDEV below if you want git to care about the underlying device --# change being considered an inode change from the update-index perspective. -- -- - ## Output files - AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"]) - AC_OUTPUT --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,54 +0,0 @@ -From 620f4827cf3e2899fe9ffd7245f87bb558446832 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 16:59:22 +0100 -Subject: [PATCH] configure: add macros to stash FLAG variables - -Allow for quick stash/unstash of CPPFLAGS and LDFLAGS. Library tests -can now be easily bracketted with these macros to allow for values -set in user/site arguments. - -Signed-off-by: Ben Walton ---- - configure.ac | 26 ++++++++++++++++++++++++++ - 1 files changed, 26 insertions(+), 0 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0bff480..469c9a9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -80,6 +80,32 @@ AC_DEFUN([GIT_CHECK_FUNC],[AC_CHECK_FUNC([$1],[ - AC_SEARCH_LIBS([$1],, - [$2],[$3]) - ],[$3])]) -+ -+dnl -+dnl GIT_STASH_FLAGS(BASEPATH_VAR) -+dnl ----------------------------- -+dnl Allow for easy stashing of LDFLAGS and CPPFLAGS before running -+dnl tests that may want to take user settings into account. -+AC_DEFUN([GIT_STASH_FLAGS],[ -+if test -n "$1"; then -+ old_CPPFLAGS="$CPPFLAGS" -+ old_LDFLAGS="$LDFLAGS" -+ CPPFLAGS="-I$1/include $CPPFLAGS" -+ LDFLAGS="-L$1/$lib $LDFLAGS" -+fi -+]) -+ -+dnl -+dnl GIT_UNSTASH_FLAGS(BASEPATH_VAR) -+dnl ----------------------------- -+dnl Restore the stashed *FLAGS values. -+AC_DEFUN([GIT_UNSTASH_FLAGS],[ -+if test -n "$1"; then -+ CPPFLAGS="$old_CPPFLAGS" -+ LDFLAGS="$old_LDFLAGS" -+fi -+]) -+ - ## Site configuration related to programs (before tests) - ## --with-PACKAGE[=ARG] and --without-PACKAGE - # --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,113 +0,0 @@ -From 412626c9183b5109e04826c9ce8033636258ee91 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 17:22:45 +0100 -Subject: [PATCH] configure: wrap some library tests with GIT_STASH_FLAGS - -Libraries that can have user specificed base paths are wrapped with -GIT_STASH_FLAGS/GIT_UNSTASH_FLAGS to ensure that the proper versions -on the system are tested. This ensures, for example, that the zlib -tests for deflateUnbound are done with the version of zlib requested -by the user. This is most useful in the absence of good settings for -CPPFLAGS and/or LDFLAGS. - -Signed-off-by: Ben Walton ---- - configure.ac | 36 +++++++++++++++++++++++++++++++++++- - 1 files changed, 35 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 469c9a9..fe9d7eb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -315,33 +315,57 @@ AC_MSG_NOTICE([CHECKS for libraries]) - # - # Define NO_OPENSSL environment variable if you do not have OpenSSL. - # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin). -+ -+GIT_STASH_FLAGS($OPENSSLDIR) -+ - AC_CHECK_LIB([crypto], [SHA1_Init], - [NEEDS_SSL_WITH_CRYPTO=], - [AC_CHECK_LIB([ssl], [SHA1_Init], - [NEEDS_SSL_WITH_CRYPTO=YesPlease - NEEDS_SSL_WITH_CRYPTO=], - [NO_OPENSSL=YesPlease])]) -+ -+GIT_UNSTASH_FLAGS($OPENSSLDIR) -+ - AC_SUBST(NEEDS_SSL_WITH_CRYPTO) - AC_SUBST(NO_OPENSSL) -+ - # - # Define NO_CURL if you do not have libcurl installed. git-http-pull and - # git-http-push are not built, and you cannot use http:// and https:// - # transports. -+ -+GIT_STASH_FLAGS($CURLDIR) -+ - AC_CHECK_LIB([curl], [curl_global_init], - [NO_CURL=], - [NO_CURL=YesPlease]) -+ -+GIT_UNSTASH_FLAGS($CURLDIR) -+ - AC_SUBST(NO_CURL) -+ - # - # Define NO_EXPAT if you do not have expat installed. git-http-push is - # not built, and you cannot push using http:// and https:// transports. -+ -+GIT_STASH_FLAGS($EXPATDIR) -+ - AC_CHECK_LIB([expat], [XML_ParserCreate], - [NO_EXPAT=], - [NO_EXPAT=YesPlease]) -+ -+GIT_UNSTASH_FLAGS($EXPATDIR) -+ - AC_SUBST(NO_EXPAT) -+ - # - # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin and - # some Solaris installations). - # Define NO_ICONV if neither libc nor libiconv support iconv. -+ -+GIT_STASH_FLAGS($ICONVDIR) -+ - AC_DEFUN([ICONVTEST_SRC], [ - #include - -@@ -365,11 +389,17 @@ AC_LINK_IFELSE(ICONVTEST_SRC, - [AC_MSG_RESULT([no]) - NO_ICONV=YesPlease]) - LIBS="$old_LIBS"]) -+ -+GIT_UNSTASH_FLAGS($ICONVDIR) -+ - AC_SUBST(NEEDS_LIBICONV) - AC_SUBST(NO_ICONV) --test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv" -+ - # - # Define NO_DEFLATE_BOUND if deflateBound is missing from zlib. -+ -+GIT_STASH_FLAGS($ZLIB_PATH) -+ - AC_DEFUN([ZLIBTEST_SRC], [ - #include - -@@ -387,7 +417,11 @@ AC_LINK_IFELSE(ZLIBTEST_SRC, - [AC_MSG_RESULT([no]) - NO_DEFLATE_BOUND=yes]) - LIBS="$old_LIBS" -+ -+GIT_UNSTASH_FLAGS($ZLIB_PATH) -+ - AC_SUBST(NO_DEFLATE_BOUND) -+ - # - # Define NEEDS_SOCKET if linking with libc is not enough (SunOS, - # Patrick Mauritz). --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,30 +0,0 @@ -From 9cf13a507a47de584600cd5daa5af6a9846a2d7b Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 17:23:35 +0100 -Subject: [PATCH] configure: asciidoc version test cleanup - -Redirect stderr to /dev/null instead of stdout. This discards warnings -generated by python 2.6 related to the reorganization of functions within -modules. The warnings were causing the version detection to break. - -Signed-off-by: Ben Walton ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index fe9d7eb..f4b8e49 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -291,7 +291,7 @@ fi - AC_CHECK_PROGS(ASCIIDOC, [asciidoc]) - if test -n "$ASCIIDOC"; then - AC_MSG_CHECKING([for asciidoc version]) -- asciidoc_version=`$ASCIIDOC --version 2>&1` -+ asciidoc_version=`$ASCIIDOC --version 2>/dev/null` - case "${asciidoc_version}" in - asciidoc' '8*) - ASCIIDOC8=YesPlease --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,90 +0,0 @@ -From 983a81ed86532d2563bbeb528f436134a6ab872e Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 18:32:34 +0100 -Subject: [PATCH] configure: make iconv tests aware of user arguments - ---with-iconv is now taken into account when doing the tests for iconv. -If the user requests alternate handling for libiconv, the -liconv test -is run before the -lc test. - -Signed-off-by: Ben Walton ---- - configure.ac | 48 ++++++++++++++++++++++++++++++++++-------------- - 1 files changed, 34 insertions(+), 14 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f4b8e49..6fe4bfe 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -375,20 +375,35 @@ int main(void) - return 0; - } - ]) --AC_MSG_CHECKING([for iconv in -lc]) --AC_LINK_IFELSE(ICONVTEST_SRC, -+ -+if test -n "$ICONVDIR"; then -+ lib_order="-liconv -lc" -+else -+ lib_order="-lc -liconv" -+fi -+ -+NO_ICONV=YesPlease -+ -+for l in $lib_order; do -+ if test "$l" = "-liconv"; then -+ NEEDS_LIBICONV=YesPlease -+ else -+ NEEDS_LIBICONV= -+ fi -+ -+ old_LIBS="$LIBS" -+ LIBS="$LIBS $l" -+ AC_MSG_CHECKING([for iconv in $l]) -+ AC_LINK_IFELSE(ICONVTEST_SRC, - [AC_MSG_RESULT([yes]) -- NEEDS_LIBICONV=], -- [AC_MSG_RESULT([no]) -- old_LIBS="$LIBS" -- LIBS="$LIBS -liconv" -- AC_MSG_CHECKING([for iconv in -liconv]) -- AC_LINK_IFELSE(ICONVTEST_SRC, -- [AC_MSG_RESULT([yes]) -- NEEDS_LIBICONV=YesPlease], -- [AC_MSG_RESULT([no]) -- NO_ICONV=YesPlease]) -- LIBS="$old_LIBS"]) -+ NO_ICONV= -+ break], -+ [AC_MSG_RESULT([no])]) -+ LIBS="$old_LIBS" -+done -+ -+#in case of break -+LIBS="$old_LIBS" - - GIT_UNSTASH_FLAGS($ICONVDIR) - -@@ -455,13 +470,18 @@ int main(void) - return 0; - } - ]]) -+ -+GIT_STASH_FLAGS($ICONVDIR) -+ - AC_MSG_CHECKING([for old iconv()]) - AC_COMPILE_IFELSE(OLDICONVTEST_SRC, - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - OLD_ICONV=UnfortunatelyYes]) --AC_SUBST(OLD_ICONV) - -+GIT_UNSTASH_FLAGS($ICONVDIR) -+ -+AC_SUBST(OLD_ICONV) - - ## Checks for typedefs, structures, and compiler characteristics. - AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics]) --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,129 +0,0 @@ -From 50df9056b97dc9d6e972e10f6948f0d6761b43b3 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Thu, 12 Mar 2009 19:45:02 +0100 -Subject: [PATCH] configure: rework pthread handling to allow for user defined flags - -The tests for POSIX threads can now be controlled by the user with the ---enable-pthreads=FLAGS option. If this is set (to some value other -than yes or no), the value is passed to the compiler. Thread support -is based solely on the outcome of this test. The user may specify not -to use threading at all or to use the default tests (first -pthread -then -lpthread) by not specifying FLAGS when passing --enable-pthreads. - -Signed-off-by: Ben Walton ---- - configure.ac | 89 ++++++++++++++++++++++++++++++++++++++++++++++++---------- - 1 files changed, 74 insertions(+), 15 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 6fe4bfe..4e728bc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -127,6 +127,27 @@ if test -z "$lib"; then - lib=lib - fi - -+AC_ARG_ENABLE([pthreads], -+ [AS_HELP_STRING([--enable-pthreads=FLAGS], -+ [FLAGS is the value to pass to the compiler to enable POSIX Threads.] -+ [The default if FLAGS is not specified is to try first -pthread] -+ [and then -lpthread.] -+ [--without-pthreads will disable threading.])], -+[ -+if test "x$enableval" = "xyes"; then -+ AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads]) -+elif test "x$enableval" != "xno"; then -+ PTHREAD_CFLAGS=$enableval -+ AC_MSG_NOTICE([Setting '$PTHREAD_CFLAGS' as the FLAGS to enable POSIX Threads]) -+else -+ AC_MSG_NOTICE([POSIX Threads will be disabled.]) -+ NO_PTHREADS=YesPlease -+ USER_NOPTHREAD=1 -+fi], -+[ -+ AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads.]) -+]) -+ - ## Site configuration (override autodetection) - ## --with-PACKAGE[=ARG] and --without-PACKAGE - AC_MSG_NOTICE([CHECKS for site configuration]) -@@ -672,23 +693,61 @@ AC_SUBST(NO_MKDTEMP) - # - # Define PTHREAD_LIBS to the linker flag used for Pthread support and define - # THREADED_DELTA_SEARCH if Pthreads are available. --AC_LANG_CONFTEST([AC_LANG_PROGRAM( -- [[#include ]], -- [[pthread_mutex_t test_mutex;]] --)]) --${CC} -pthread conftest.c -o conftest.o > /dev/null 2>&1 --if test $? -eq 0;then -- PTHREAD_LIBS="-pthread" -- THREADED_DELTA_SEARCH=YesPlease -+AC_DEFUN([PTHREADTEST_SRC], [ -+#include -+ -+int main(void) -+{ -+ pthread_mutex_t test_mutex; -+ return (0); -+} -+]) -+ -+dnl AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+dnl [[#include ]], -+dnl [[pthread_mutex_t test_mutex;]] -+dnl )]) -+ -+NO_PTHREADS=UnfortunatelyYes -+THREADED_DELTA_SEARCH= -+PTHREAD_LIBS= -+ -+if test -n "$USER_NOPTHREAD"; then -+ AC_MSG_NOTICE([Skipping POSIX Threads at user request.]) -+# handle these separately since PTHREAD_CFLAGS could be '-lpthreads -+# -D_REENTRANT' or some such. -+elif test -z "$PTHREAD_CFLAGS"; then -+ for opt in -pthread -lpthread; do -+ old_CFLAGS="$CFLAGS" -+ CFLAGS="$opt $CFLAGS" -+ AC_MSG_CHECKING([Checking for POSIX Threads with '$opt']) -+ AC_LINK_IFELSE(PTHREADTEST_SRC, -+ [AC_MSG_RESULT([yes]) -+ NO_PTHREADS= -+ PTHREAD_LIBS="$opt" -+ THREADED_DELTA_SEARCH=YesPlease -+ break -+ ], -+ [AC_MSG_RESULT([no])]) -+ CFLAGS="$old_CFLAGS" -+ done - else -- ${CC} -lpthread conftest.c -o conftest.o > /dev/null 2>&1 -- if test $? -eq 0;then -- PTHREAD_LIBS="-lpthread" -- THREADED_DELTA_SEARCH=YesPlease -- else -- NO_PTHREADS=UnfortunatelyYes -- fi -+ old_CFLAGS="$CFLAGS" -+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS" -+ AC_MSG_CHECKING([Checking for POSIX Threads with '$PTHREAD_CFLAGS']) -+ AC_LINK_IFELSE(PTHREADTEST_SRC, -+ [AC_MSG_RESULT([yes]) -+ NO_PTHREADS= -+ PTHREAD_LIBS="$PTHREAD_CFLAGS" -+ THREADED_DELTA_SEARCH=YesPlease -+ ], -+ [AC_MSG_RESULT([no])]) -+ -+ CFLAGS="$old_CFLAGS" - fi -+ -+CFLAGS="$old_CFLAGS" -+ - AC_SUBST(PTHREAD_LIBS) - AC_SUBST(NO_PTHREADS) - AC_SUBST(THREADED_DELTA_SEARCH) --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/doc-makefile.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/doc-makefile.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/doc-makefile.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,56 +0,0 @@ ---- git-1.6.1.3/Documentation/Makefile.orig 2009-02-07 20:46:30.000000000 +0100 -+++ git-1.6.1.3/Documentation/Makefile 2009-02-18 20:53:41.159467914 +0100 -@@ -57,6 +57,8 @@ - -include ../config.mak.autogen - -include ../config.mak - -+SHELL = $(SHELL_PATH) -+ - ifdef ASCIIDOC8 - ASCIIDOC_EXTRA += -a asciidoc7compatible - endif -@@ -108,7 +110,7 @@ - fi - - install-html: html -- sh ./install-webdoc.sh $(DESTDIR)$(htmldir) -+ $(SHELL) ./install-webdoc.sh $(DESTDIR)$(htmldir) - - ../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE - $(MAKE) -C ../ GIT-VERSION-FILE -@@ -170,7 +172,7 @@ - - technical/api-index.txt: technical/api-index-skel.txt \ - technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS)) -- cd technical && sh ./api-index.sh -+ cd technical && $(SHELL) ./api-index.sh - - $(patsubst %,%.html,$(API_DOCS) technical/api-index): %.html : %.txt - $(ASCIIDOC) -b xhtml11 -f asciidoc.conf \ -@@ -206,7 +208,7 @@ - - howto-index.txt: howto-index.sh $(wildcard howto/*.txt) - $(RM) $@+ $@ -- sh ./howto-index.sh $(wildcard howto/*.txt) >$@+ -+ $(SHELL) ./howto-index.sh $(wildcard howto/*.txt) >$@+ - mv $@+ $@ - - $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt -@@ -220,14 +222,14 @@ - mv $@+ $@ - - install-webdoc : html -- sh ./install-webdoc.sh $(WEBDOC_DEST) -+ $(SHELL) ./install-webdoc.sh $(WEBDOC_DEST) - - quick-install: quick-install-man - - quick-install-man: -- sh ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) -+ $(SHELL) ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) - - quick-install-html: -- sh ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) -+ $(SHELL) ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) - - .PHONY: .FORCE-GIT-VERSION-FILE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 29 16:19:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 29 Apr 2009 14:19:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4594] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4594 http://gar.svn.sourceforge.net/gar/?rev=4594&view=rev Author: valholla Date: 2009-04-29 14:19:57 +0000 (Wed, 29 Apr 2009) Log Message: ----------- remove extra dependencies in ruby and java bindings Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 02:27:41 UTC (rev 4593) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 14:19:57 UTC (rev 4594) @@ -44,9 +44,8 @@ REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt CSWiconv SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn -REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt +REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWapache2rt CSWneon CSWoldaprt REQUIRED_PKGS_CSWjavasvn += CSWbdb44 CSWexpat CSWggettextrt CSWiconv -REQUIRED_PKGS_CSWjavasvn += CSWneon CSWoldaprt SPKG_DESC_CSWpmsvn = Subversion Perl Language Binding CATALOGNAME_CSWpmsvn = pmsvn REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl CSWapache2rt CSWbdb44 CSWexpat @@ -57,9 +56,8 @@ REQUIRED_PKGS_CSWpysvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWrbsvn = Subversion Ruby Language Binding CATALOGNAME_CSWrbsvn = rbsvn -REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWiconv CSWoldaprt REQUIRED_PKGS_CSWrbsvn += CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt -REQUIRED_PKGS_CSWrbsvn += CSWiconv CSWoldaprt PKGFILES_CSWsvn-devel = $(PKGFILES_DEVEL) PKGFILES_CSWap2svn = $(prefix)/apache2.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 17:32:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 15:32:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4595] csw/mgar/pkg/libcairo/trunk/Makefile Message-ID: Revision: 4595 http://gar.svn.sourceforge.net/gar/?rev=4595&view=rev Author: dmichelsen Date: 2009-04-29 15:32:23 +0000 (Wed, 29 Apr 2009) Log Message: ----------- libcairo: Make docs archall Modified Paths: -------------- csw/mgar/pkg/libcairo/trunk/Makefile Modified: csw/mgar/pkg/libcairo/trunk/Makefile =================================================================== --- csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-29 14:19:57 UTC (rev 4594) +++ csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-29 15:32:23 UTC (rev 4595) @@ -37,6 +37,8 @@ REQUIRED_PKGS_CSWlibcairodevel = CSWlibcairo REQUIRED_PKGS_CSWlibcairodoc = +ARCHALL_CSWlibcairodoc = 1 + # Wait for libpixman, libfontconfig and libXrender to be 64 bit #BUILD64 = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 17:40:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 15:40:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4596] csw/mgar/gar/v2 Message-ID: Revision: 4596 http://gar.svn.sourceforge.net/gar/?rev=4596&view=rev Author: dmichelsen Date: 2009-04-29 15:40:22 +0000 (Wed, 29 Apr 2009) Log Message: ----------- mGAR v2: Allow resetting prefix in categories to completely relocate trees, here: x11 Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-29 15:32:23 UTC (rev 4595) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-29 15:40:22 UTC (rev 4596) @@ -14,24 +14,27 @@ # Preprocessor flags # Linker flags -LDFLAGS += -L/opt/csw/lib -R/opt/csw/lib +#LDFLAGS += -L/opt/csw/lib -R/opt/csw/lib # Defines some tools used by autostuff GREP = ggrep +_CATEGORY_COMMON_EXPORTS = GREP # export the variables -export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP +#export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -_CATEGORY_PKG_CONFIG_PATH = $(abspath $(prefix)/X11/lib/$(MM_LIBDIR)/pkgconfig) +#_CATEGORY_PKG_CONFIG_PATH = $(abspath $(prefix)/X11/lib/$(MM_LIBDIR)/pkgconfig) +prefix = $(BUILD_PREFIX)/X11 + # Configure common options -CONFIGURE_ARGS = --prefix=/opt/csw/X11 -CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 -CONFIGURE_ARGS += --libdir=/opt/csw/X11/lib -CONFIGURE_ARGS += --includedir=/opt/csw/X11/include -CONFIGURE_ARGS += --datadir=/opt/csw/X11/share -CONFIGURE_ARGS += --mandir=/opt/csw/X11/share/man +#CONFIGURE_ARGS = --prefix=/opt/csw/X11 +#CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 +#CONFIGURE_ARGS += --libdir=/opt/csw/X11/lib +#CONFIGURE_ARGS += --includedir=/opt/csw/X11/include +#CONFIGURE_ARGS += --datadir=/opt/csw/X11/share +#CONFIGURE_ARGS += --mandir=/opt/csw/X11/share/man # No tests scripts, thus there is no "gmake test" target TEST_SCRIPTS = Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-29 15:32:23 UTC (rev 4595) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-29 15:40:22 UTC (rev 4596) @@ -121,6 +121,8 @@ binpath ?= $(abspath $(binpath_install)/$(MM_BINDIR)) sbinpath_install ?= $(BUILD_PREFIX)/sbin sbinpath ?= $(abspath $(sbinpath_install)/$(MM_BINDIR)) +libpath_install ?= $(BUILD_PREFIX)/lib +libpath ?= $(abspath $(libpath_install)/$(MM_LIBDIR)) # DESTDIR is used at INSTALL TIME ONLY to determine what the # filesystem root should be. @@ -448,10 +450,10 @@ # may not be a subdirectory for the 32-bit standard case (this would normally # be a symlink of the form lib/sparcv8 -> . and lib/i386 -> .). This is most likely # the case for libraries in $(EXTRA_LIBS) for which no links generated in CSWcommon. -RUNPATH_DIRS ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_DIRS) +RUNPATH_DIRS ?= $(libpath_install) $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_DIRS) ifndef NOISALIST -RUNPATH_ISALIST ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_ISALIST) +RUNPATH_ISALIST ?= $(libpath_install) $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_ISALIST) endif # Iterate over all directories in RUNPATH_DIRS, prefix each directory with one @@ -493,7 +495,7 @@ PATH = $(if $(filter SOS12,$(GARCOMPILER)),$(abspath $(GARBIN)/sos12-wrappers):)$(if $(IGNORE_DESTDIR),,$(abspath $(DESTDIR)$(binpath_install)/$(MM_BINDIR)):$(DESTDIR)$(binpath_install):$(abspath $(DESTDIR)$(sbinpath_install)/$(MM_BINDIR)):$(DESTDIR)$(sbinpath_install):)$(abspath $(binpath_install)/$(MM_BINDIR)):$(binpath_install):$(abspath $(sbinpath_install)/$(MM_BINDIR)):$(sbinpath_install):$(CC_HOME)/bin:$(abspath $(GARBIN)):/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin # This is for foo-config chaos -PKG_CONFIG_DIRS ?= $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) +PKG_CONFIG_DIRS ?= $(libpath_install) $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) PKG_CONFIG_PATH ?= $(call MAKEPATH,$(foreach D,$(PKG_CONFIG_DIRS),$(abspath $D/$(MM_LIBDIR)/pkgconfig)) $(_CATEGORY_PKG_CONFIG_PATH) $(EXTRA_PKG_CONFIG_PATH)) # @@ -557,7 +559,7 @@ GARPKG_EXPORTS += GARCH GAROSREL GARPACKAGE endif -COMMON_EXPORTS ?= $(DIRECTORY_EXPORTS) $(COMPILER_EXPORTS) $(GARPKG_EXPORTS) $(EXTRA_COMMON_EXPORTS) +COMMON_EXPORTS ?= $(DIRECTORY_EXPORTS) $(COMPILER_EXPORTS) $(GARPKG_EXPORTS) $(EXTRA_COMMON_EXPORTS) $(_CATEGORY_COMMON_EXPORTS) # LD_OPTIONS = $(LINKER_FLAGS) ifneq ($(LD_OPTIONS),) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 17:54:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 15:54:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4597] csw/mgar/pkg/x11/libXdmcp/trunk Message-ID: Revision: 4597 http://gar.svn.sourceforge.net/gar/?rev=4597&view=rev Author: dmichelsen Date: 2009-04-29 15:54:34 +0000 (Wed, 29 Apr 2009) Log Message: ----------- libXdmcp: Prepare for dynamic gspec and 64 bit Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile csw/mgar/pkg/x11/libXdmcp/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-29 15:54:34 UTC (rev 4597) @@ -4,17 +4,22 @@ DESCRIPTION = X11 display manager control protocol library define BLURB -This package provides the main interface to the X11 display manager control protocol library, which allows for remote logins to display managers. + This package provides the main interface to the X11 display manager control + protocol library, which allows for remote logins to display managers. endef -MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ +MASTER_SITES = http://xorg.freedesktop.org/releases/individual/lib/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibxdmcpdevel, ) -DISTFILES += $(call admfiles,CSWlibxdmcp, ) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +PACKAGES = CSWlibxdmcp CSWlibxdmcpdevel +CATALOGNAME_CSWlibxdmcp = libxdmcp +CATALOGNAME_CSWlibxdmcpdevel = libxdmcp_devel + +REQUIRED_PKGS_CSWlibxdmcpdevel = CSWlibxdmcp + SPKG_DESC_CSWlibxdmcp = X11 display manager control protocol library SPKG_DESC_CSWlibxdmcpdevel = X11 display manager control protocol library development package @@ -22,17 +27,15 @@ PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/include/.* PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/lib/.*\.a PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/lib/pkgconfig/.* -PKGFILES_CSWlibxdmcpdevel += $(prefix)/share/doc/$(GARNAME)/License-devel.txt BUILD64 = 1 - +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License-devel.txt - include gar/category.mk +post-merge: + gln -s . $(PKGROOT)$(libdir)/32 + gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/64 + @$(MAKECOOKIE) Modified: csw/mgar/pkg/x11/libXdmcp/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/checksums 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/checksums 2009-04-29 15:54:34 UTC (rev 4597) @@ -1,3 +1 @@ a7e23f356a2b4fe8668f9ff4a2b0413a download/libXdmcp-1.0.2.tar.gz -624a709339fbb4feaaad957025c543eb download/CSWlibxdmcpdevel.gspec -e232536fb776ff75d8905a9ddf00fd90 download/CSWlibxdmcp.gspec Deleted: csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec 2009-04-29 15:54:34 UTC (rev 4597) @@ -1,6 +0,0 @@ -%var bitname libxdmcp -%var pkgname CSWlibxdmcp -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information Deleted: csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec 2009-04-29 15:54:34 UTC (rev 4597) @@ -1,6 +0,0 @@ -%var bitname libxdmcp_devel -%var pkgname CSWlibxdmcpdevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License-devel.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 18:54:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 16:54:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4598] csw/mgar/pkg/x11/inputproto/trunk Message-ID: Revision: 4598 http://gar.svn.sourceforge.net/gar/?rev=4598&view=rev Author: dmichelsen Date: 2009-04-29 16:54:31 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/inputproto: Use dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/inputproto/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec Modified: csw/mgar/pkg/x11/inputproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 15:54:34 UTC (rev 4597) +++ csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 16:54:31 UTC (rev 4598) @@ -5,21 +5,18 @@ DESCRIPTION = Input extension headers from X.org project define BLURB -This provides the input extension headers from modular X.org X11 project + This provides the input extension headers from modular X.org X11 project endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles, CSWinputproto) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz - -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + include gar/category.mk - - Deleted: csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec =================================================================== --- csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec 2009-04-29 15:54:34 UTC (rev 4597) +++ csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec 2009-04-29 16:54:31 UTC (rev 4598) @@ -1,7 +0,0 @@ -%var bitname inputproto -%var pkgname CSWinputproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 18:59:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 16:59:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4599] csw/mgar/pkg/x11/kbproto/trunk Message-ID: Revision: 4599 http://gar.svn.sourceforge.net/gar/?rev=4599&view=rev Author: dmichelsen Date: 2009-04-29 16:59:13 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/kbproto: Use dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/kbproto/trunk/Makefile csw/mgar/pkg/x11/kbproto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec Modified: csw/mgar/pkg/x11/kbproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/kbproto/trunk/Makefile 2009-04-29 16:54:31 UTC (rev 4598) +++ csw/mgar/pkg/x11/kbproto/trunk/Makefile 2009-04-29 16:59:13 UTC (rev 4599) @@ -5,19 +5,17 @@ DESCRIPTION = KB extension headers from X.org define BLURB -This provides the KB extension headers from modular X.org X11 project. + This provides the KB extension headers from modular X.org X11 project. endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWkbproto) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/kbproto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/kbproto/trunk/checksums 2009-04-29 16:54:31 UTC (rev 4598) +++ csw/mgar/pkg/x11/kbproto/trunk/checksums 2009-04-29 16:59:13 UTC (rev 4599) @@ -1,2 +1 @@ 1efc6a4d97acb3ec3f34c4b2508478dc download/kbproto-1.0.3.tar.gz -d6ad9e150887bbed709f99db1dc86e7e download/CSWkbproto.gspec Deleted: csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec =================================================================== --- csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec 2009-04-29 16:54:31 UTC (rev 4598) +++ csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec 2009-04-29 16:59:13 UTC (rev 4599) @@ -1,7 +0,0 @@ -%var bitname kbproto -%var pkgname CSWkbproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:00:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:00:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4600] csw/mgar/pkg/x11/inputproto/trunk/Makefile Message-ID: Revision: 4600 http://gar.svn.sourceforge.net/gar/?rev=4600&view=rev Author: dmichelsen Date: 2009-04-29 17:00:15 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/inputproto: Skip superflous 64 bit in includefiles Modified Paths: -------------- csw/mgar/pkg/x11/inputproto/trunk/Makefile Modified: csw/mgar/pkg/x11/inputproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 16:59:13 UTC (rev 4599) +++ csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 17:00:15 UTC (rev 4600) @@ -15,7 +15,6 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz ARCHALL = 1 -BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:23:28 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:23:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4601] csw/mgar/pkg/x11/xtrans/trunk Message-ID: Revision: 4601 http://gar.svn.sourceforge.net/gar/?rev=4601&view=rev Author: dmichelsen Date: 2009-04-29 17:23:28 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xtrans: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xtrans/trunk/Makefile csw/mgar/pkg/x11/xtrans/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec Modified: csw/mgar/pkg/x11/xtrans/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xtrans/trunk/Makefile 2009-04-29 17:00:15 UTC (rev 4600) +++ csw/mgar/pkg/x11/xtrans/trunk/Makefile 2009-04-29 17:23:28 UTC (rev 4601) @@ -4,19 +4,18 @@ DESCRIPTION = X transport library define BLURB -xtrans includes a number of routines to make X implementations transport-independent; at time of writing, it includes support for UNIX sockets, IPv4, IPv6, and DECnet. + xtrans includes a number of routines to make X implementations transport-independent; + at time of writing, it includes support for UNIX sockets, IPv4, IPv6, and DECnet. endef MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PKGDIST = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -SPKG_DESC_CSWxtrans = X transport library +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) -DISTFILES += $(call admfiles,CSWxtrans, ) - include gar/category.mk Modified: csw/mgar/pkg/x11/xtrans/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xtrans/trunk/checksums 2009-04-29 17:00:15 UTC (rev 4600) +++ csw/mgar/pkg/x11/xtrans/trunk/checksums 2009-04-29 17:23:28 UTC (rev 4601) @@ -1,2 +1 @@ 1b9362b6c7577f1cd5009703949ac5d0 download/xtrans-1.2.2.tar.gz -c1c9b2429bbfb10c8c8c915cbf01ee93 download/CSWxtrans.gspec Deleted: csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec =================================================================== --- csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec 2009-04-29 17:00:15 UTC (rev 4600) +++ csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec 2009-04-29 17:23:28 UTC (rev 4601) @@ -1,4 +0,0 @@ -%var bitname libxtrans -%var pkgname CSWlibxtrans -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:38:48 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:38:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4602] csw/mgar/pkg/x11/xrender/trunk Message-ID: Revision: 4602 http://gar.svn.sourceforge.net/gar/?rev=4602&view=rev Author: dmichelsen Date: 2009-04-29 17:38:48 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xrender: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xrender/trunk/Makefile csw/mgar/pkg/x11/xrender/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec Modified: csw/mgar/pkg/x11/xrender/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-29 17:38:48 UTC (rev 4602) @@ -4,37 +4,33 @@ DESCRIPTION = X Render extension library define BLURB -The X Rendering Extension (Render) introduces digital image composition as the foundation of a new rendering model within the X Window System. Rendering geometric figures is accomplished by client-side tesselation into either triangles or trapezoids. + The X Rendering Extension (Render) introduces digital image composition as + the foundation of a new rendering model within the X Window System. + Rendering geometric figures is accomplished by client-side tesselation + into either triangles or trapezoids. endef -MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ -DISTFILES = libXrender-$(GARVERSION).tar.gz -PKGDIST = libXrender-$(GARVERSION).tar.gz +MASTER_SITES = http://xorg.freedesktop.org/releases/individual/lib/ +DISTNAME = libXrender-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = libXrender-(\d+(?:\.\d+)*).tar.gz +PACKAGES = CSWlibxrender CSWrenderdev + +REQUIRED_PKGS_CSWrenderdev = CSWlibxrender +REQUIRED_PKGS_CSWlibxrender = CSWlibx11 + SPKG_DESC_CSWlibxrender = $(DESCRIPTION) SPKG_DESC_CSWrenderdev = $(DESCRIPTION) development package -DISTFILES += $(call admfiles,CSWlibxrender, ) -DISTFILES += $(call admfiles,CSWrenderdev, ) - PKGFILES_CSWrenderdev = $(PKGFILES_DEVEL) -PKGFILES_CSWrenderdev += $(prefix)/X11/include/.* -PKGFILES_CSWrenderdev += $(prefix)/X11/lib/.*\.a -PKGFILES_CSWrenderdev += $(prefix)/X11/lib/pkgconfig/.* -REQUIRED_PKGS_CSWrenderdev = CSWlibxrender -REQUIRED_PKGS_CSWlibxrender = CSWlibx11 - BUILD64 = 1 +NOARCHLIST = 1 +CONFIGURE_ARGS = $(DIRPATHS) -post-extract: - ( cd $(WORKROOTDIR)/build-$(firstword $(MODULATIONS)) ; \ - mv libXrender-$(GARVERSION) $(DISTNAME) ) - @$(MAKECOOKIE) - include gar/category.mk Modified: csw/mgar/pkg/x11/xrender/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/checksums 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/checksums 2009-04-29 17:38:48 UTC (rev 4602) @@ -1,3 +1 @@ 1d9cb49e6c9149d5a5eca118c9c2bcf6 download/libXrender-0.9.4.tar.gz -3322ccec3c0c00155a5c2600dfbe8798 download/CSWlibxrender.gspec -459f8856062d315597cb957fc16e8850 download/CSWrenderdev.gspec Deleted: csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec 2009-04-29 17:38:48 UTC (rev 4602) @@ -1,4 +0,0 @@ -%var bitname libxrender -%var pkgname CSWlibxrender -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec 2009-04-29 17:38:48 UTC (rev 4602) @@ -1,4 +0,0 @@ -%var bitname renderdev -%var pkgname CSWrenderdev -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:48:20 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:48:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4603] csw/mgar/pkg/x11/xproto/trunk Message-ID: Revision: 4603 http://gar.svn.sourceforge.net/gar/?rev=4603&view=rev Author: dmichelsen Date: 2009-04-29 17:48:20 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xproto: Use dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xproto/trunk/Makefile csw/mgar/pkg/x11/xproto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec Modified: csw/mgar/pkg/x11/xproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xproto/trunk/Makefile 2009-04-29 17:38:48 UTC (rev 4602) +++ csw/mgar/pkg/x11/xproto/trunk/Makefile 2009-04-29 17:48:20 UTC (rev 4603) @@ -4,19 +4,17 @@ DESCRIPTION = X protocol and ancillary headers from X.org X11 define BLURB -X protocol and ancillary headers from modular X.org X11 + X protocol and ancillary headers from modular X.org X11 endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWxproto) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/xproto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xproto/trunk/checksums 2009-04-29 17:38:48 UTC (rev 4602) +++ csw/mgar/pkg/x11/xproto/trunk/checksums 2009-04-29 17:48:20 UTC (rev 4603) @@ -1,2 +1 @@ 9186713de3ec8a9fdd6ec3f4c4534fde download/xproto-7.0.15.tar.gz -613afd970a2e684a1b6a5323569acdef download/CSWxproto.gspec Deleted: csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec =================================================================== --- csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec 2009-04-29 17:38:48 UTC (rev 4602) +++ csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec 2009-04-29 17:48:20 UTC (rev 4603) @@ -1,7 +0,0 @@ -%var bitname xproto -%var pkgname CSWxproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:54:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:54:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4604] csw/mgar/pkg/x11/xextproto/trunk Message-ID: Revision: 4604 http://gar.svn.sourceforge.net/gar/?rev=4604&view=rev Author: dmichelsen Date: 2009-04-29 17:54:09 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xextproto: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xextproto/trunk/Makefile csw/mgar/pkg/x11/xextproto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec Modified: csw/mgar/pkg/x11/xextproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xextproto/trunk/Makefile 2009-04-29 17:48:20 UTC (rev 4603) +++ csw/mgar/pkg/x11/xextproto/trunk/Makefile 2009-04-29 17:54:09 UTC (rev 4604) @@ -5,19 +5,17 @@ DESCRIPTION = XExt extension headers from X.org define BLURB -This provides the XExt extension headers from modular X.org X11 + This provides the XExt extension headers from modular X.org X11 endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWxextproto) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/xextproto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xextproto/trunk/checksums 2009-04-29 17:48:20 UTC (rev 4603) +++ csw/mgar/pkg/x11/xextproto/trunk/checksums 2009-04-29 17:54:09 UTC (rev 4604) @@ -1,2 +1 @@ f6274c778e571130484fb0650651ac02 download/xextproto-7.0.5.tar.gz -e30e1b897995ae6d0044ae87f3e58756 download/CSWxextproto.gspec Deleted: csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec =================================================================== --- csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec 2009-04-29 17:48:20 UTC (rev 4603) +++ csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec 2009-04-29 17:54:09 UTC (rev 4604) @@ -1,8 +0,0 @@ -%var bitname xextproto -%var pkgname CSWxextproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:34:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:34:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4605] csw/mgar/pkg/x11/xcb-proto/trunk Message-ID: Revision: 4605 http://gar.svn.sourceforge.net/gar/?rev=4605&view=rev Author: dmichelsen Date: 2009-04-29 19:34:42 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xcb-proto: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xcb-proto/trunk/Makefile csw/mgar/pkg/x11/xcb-proto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec Modified: csw/mgar/pkg/x11/xcb-proto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xcb-proto/trunk/Makefile 2009-04-29 17:54:09 UTC (rev 4604) +++ csw/mgar/pkg/x11/xcb-proto/trunk/Makefile 2009-04-29 19:34:42 UTC (rev 4605) @@ -5,35 +5,37 @@ DESCRIPTION = XCB protocol descriptions (in XML) define BLURB -The xcb-proto package provides the XML-XCB (X C Bindings) protocol -descriptions that libxcb uses to generate the majority of its code and API. -We provide them separately from libxcb to allow reuse by other projects, -such as additional language bindings, protocol dissectors, or -documentation generators. + The xcb-proto package provides the XML-XCB (X C Bindings) protocol + descriptions that libxcb uses to generate the majority of its code and API. + We provide them separately from libxcb to allow reuse by other projects, + such as additional language bindings, protocol dissectors, or + documentation generators. -Separation of XCB's transport and protocol layers simplifies both -writing extensions and client-side support for extensions. -By contrast, with the xlib infrastructure, client-side support for -new extensions requires significant duplication of effort. With XCB and -the XML-XCB protocol descriptions, client-side support for a new -extension requires only an XML description of the extension--and not a -single line of code. + Separation of XCB's transport and protocol layers simplifies both + writing extensions and client-side support for extensions. + By contrast, with the xlib infrastructure, client-side support for + new extensions requires significant duplication of effort. With XCB and + the XML-XCB protocol descriptions, client-side support for a new + extension requires only an XML description of the extension--and not a + single line of code. -Python libraries: xcb-proto also contains language-independent Python -libraries that are used to parse an XML description and create objects -used by Python code generators in individual language bindings. + Python libraries: xcb-proto also contains language-independent Python + libraries that are used to parse an XML description and create objects + used by Python code generators in individual language bindings. endef MASTER_SITES = $(XCB_MASTER_SITES) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWxcb-proto) +PACKAGES = CSWxcbproto + +REQUIRED_PKGS = CSWpython + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/xcb-proto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xcb-proto/trunk/checksums 2009-04-29 17:54:09 UTC (rev 4604) +++ csw/mgar/pkg/x11/xcb-proto/trunk/checksums 2009-04-29 19:34:42 UTC (rev 4605) @@ -1,2 +1 @@ 475312ad5b41e6a543f92da82b9dd959 download/xcb-proto-1.4.tar.gz -187ab0fada6adab4e77ad04abfe9a093 download/CSWxcb-proto.gspec Deleted: csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec =================================================================== --- csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec 2009-04-29 17:54:09 UTC (rev 4604) +++ csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec 2009-04-29 19:34:42 UTC (rev 4605) @@ -1,6 +0,0 @@ -%var bitname xcbproto -%var pkgname CSWxcbproto -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:52:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:52:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4606] csw/mgar/pkg Message-ID: Revision: 4606 http://gar.svn.sourceforge.net/gar/?rev=4606&view=rev Author: dmichelsen Date: 2009-04-29 19:52:49 +0000 (Wed, 29 Apr 2009) Log Message: ----------- pango: Unify legacy tree to tag of new package Added Paths: ----------- csw/mgar/pkg/pango/tags/legacy/ Removed Paths: ------------- csw/mgar/pkg/libpango/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:53:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:53:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4607] csw/mgar/pkg/x11/libXau/trunk Message-ID: Revision: 4607 http://gar.svn.sourceforge.net/gar/?rev=4607&view=rev Author: dmichelsen Date: 2009-04-29 19:53:31 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/libxau: Update to dynamic gspec, license and 64 bit Modified Paths: -------------- csw/mgar/pkg/x11/libXau/trunk/Makefile csw/mgar/pkg/x11/libXau/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec Modified: csw/mgar/pkg/x11/libXau/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/Makefile 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/Makefile 2009-04-29 19:53:31 UTC (rev 4607) @@ -4,27 +4,29 @@ DESCRIPTION = X11 authorisation library define BLURB -This package provides the main interface to the X11 authorisation handling, which controls authorisation for X connections, both client-side and server-side. + This package provides the main interface to the X11 authorisation handling, + which controls authorisation for X connections, both client-side and server-side. endef -MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ +MASTER_SITES = http://xorg.freedesktop.org/releases/individual/lib/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PKGDIST = $(GARNAME)-$(GARVERSION).tar.gz +PACKAGES = CSWlibxau CSWlibxaudevel + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +CATALOGNAME_CSWlibxau = libxau +CATALOGNAME_CSWlibxaudevel = libxau_devel + SPKG_DESC_CSWlibxau = X11 authorisation library SPKG_DESC_CSWlibxaudevel = X11 authorisation library development package -DISTFILES += $(call admfiles,CSWlibxaudevel, ) -DISTFILES += $(call admfiles,CSWlibxau, ) - PKGFILES_CSWlibxaudevel = $(PKGFILES_DEVEL) -PKGFILES_CSWlibxaudevel += $(prefix)/X11/include/.* -PKGFILES_CSWlibxaudevel += $(prefix)/X11/lib/.*\.a -PKGFILES_CSWlibxaudevel += $(prefix)/X11/lib/pkgconfig/.* +BUILD64 = 1 +NOISALIST = 1 +CONFIGURE_ARGS = $(DIRPATHS) + include gar/category.mk - Modified: csw/mgar/pkg/x11/libXau/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/checksums 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/checksums 2009-04-29 19:53:31 UTC (rev 4607) @@ -1,3 +1 @@ 77c3de874155456c857b331063ad2fd9 download/libXau-1.0.4.tar.gz -03fd9250999932312a8f773cf5bc036d download/CSWlibxaudevel.gspec -4dba507bb4e471f3f15a039958063ee8 download/CSWlibxau.gspec Deleted: csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec 2009-04-29 19:53:31 UTC (rev 4607) @@ -1,4 +0,0 @@ -%var bitname libxau -%var pkgname CSWlibxau -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec 2009-04-29 19:53:31 UTC (rev 4607) @@ -1,4 +0,0 @@ -%var bitname libxau_devel -%var pkgname CSWlibxaudevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:55:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:55:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4608] csw/mgar/pkg Message-ID: Revision: 4608 http://gar.svn.sourceforge.net/gar/?rev=4608&view=rev Author: dmichelsen Date: 2009-04-29 19:55:40 +0000 (Wed, 29 Apr 2009) Log Message: ----------- xrender: Unify legacy tree to tag of new package Added Paths: ----------- csw/mgar/pkg/x11/xrender/tags/legacy/ Removed Paths: ------------- csw/mgar/pkg/libxrender/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 29 23:38:51 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 29 Apr 2009 21:38:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4609] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4609 http://gar.svn.sourceforge.net/gar/?rev=4609&view=rev Author: valholla Date: 2009-04-29 21:38:51 +0000 (Wed, 29 Apr 2009) Log Message: ----------- archall for devel and fix catelog names for ap2 and pm Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 19:55:40 UTC (rev 4608) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 21:38:51 UTC (rev 4609) @@ -30,6 +30,7 @@ PACKAGES = CSWsvn CSWsvn-devel CSWap2svn CSWpmsvn PACKAGES += CSWpysvn CSWrbsvn CSWjavasvn +ARCHALL_CSWsvn-devel = 1 SPKG_DESC_CSWsvn = Version control rethought CATALOGNAME_CSWsvn = subversion @@ -40,14 +41,14 @@ CATALOGNAME_CSWsvn-devel = subversion_devel REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 -CATALOGNAME_CSWap2svn = ap2svn +CATALOGNAME_CSWap2svn = ap2_subversion REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt CSWiconv SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWapache2rt CSWneon CSWoldaprt REQUIRED_PKGS_CSWjavasvn += CSWbdb44 CSWexpat CSWggettextrt CSWiconv SPKG_DESC_CSWpmsvn = Subversion Perl Language Binding -CATALOGNAME_CSWpmsvn = pmsvn +CATALOGNAME_CSWpmsvn = pm_subversion REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl CSWapache2rt CSWbdb44 CSWexpat REQUIRED_PKGS_CSWpmsvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWpysvn = Subversion Python Language Binding This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 02:22:46 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 00:22:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4610] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4610 http://gar.svn.sourceforge.net/gar/?rev=4610&view=rev Author: valholla Date: 2009-04-30 00:22:46 +0000 (Thu, 30 Apr 2009) Log Message: ----------- attempt to fix amd_merge Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-29 21:38:51 UTC (rev 4609) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 00:22:46 UTC (rev 4610) @@ -27,6 +27,7 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/i386) + $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/amd64) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 03:13:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 01:13:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4611] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4611 http://gar.svn.sourceforge.net/gar/?rev=4611&view=rev Author: valholla Date: 2009-04-30 01:13:27 +0000 (Thu, 30 Apr 2009) Log Message: ----------- another fix attempt Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 00:22:46 UTC (rev 4610) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 01:13:27 UTC (rev 4611) @@ -26,7 +26,7 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" - $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/i386) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/amd64) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:26:07 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:26:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4612] csw/mgar/pkg/alpine/trunk/ Message-ID: Revision: 4612 http://gar.svn.sourceforge.net/gar/?rev=4612&view=rev Author: valholla Date: 2009-04-30 02:26:07 +0000 (Thu, 30 Apr 2009) Log Message: ----------- checkin Property Changed: ---------------- csw/mgar/pkg/alpine/trunk/ Property changes on: csw/mgar/pkg/alpine/trunk ___________________________________________________________________ Added: svn:ignore + work cookies download This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:27:00 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:27:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4613] csw/mgar/pkg/alpine/trunk/files/install_scripts.mk Message-ID: Revision: 4613 http://gar.svn.sourceforge.net/gar/?rev=4613&view=rev Author: valholla Date: 2009-04-30 02:26:59 +0000 (Thu, 30 Apr 2009) Log Message: ----------- custom install script Added Paths: ----------- csw/mgar/pkg/alpine/trunk/files/install_scripts.mk Added: csw/mgar/pkg/alpine/trunk/files/install_scripts.mk =================================================================== --- csw/mgar/pkg/alpine/trunk/files/install_scripts.mk (rev 0) +++ csw/mgar/pkg/alpine/trunk/files/install_scripts.mk 2009-04-30 02:26:59 UTC (rev 4613) @@ -0,0 +1,38 @@ +PI_SCRIPTS = cleanup-web +PI_SCRIPTS += install-mlock +PI_SCRIPTS += install-web + +post-install-modulated: $(PI_SCRIPTS) + + +install-mlock: + @(echo "==> Installing mlock") + (ginstall -d $(DESTDIR)$(sbindir)) + @(gcp $(WORKSRC)/imap/mlock/mlock $(DESTDIR)$(sbindir)) + @$(MAKECOOKIE) + +cleanup-web: + @(grm -fr $(DESTDIR)/home) + +install-web: + @(echo "==> Installing Web Interface") + @(ginstall -d $(DESTDIR)$(libexecdir)/alpine-2.00) + @(gcp -R $(WORKSRC)/web/* $(DESTDIR)$(libexecdir)/alpine-2.00) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_gssapi_proxy \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_tclsh \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_uidmapper \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_umc \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/debug.cgi \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(grm -fr $(DESTDIR)$(libexecdir)/alpine-2.00/src) + @(grm -f $(DESTDIR)$(libexecdir)/alpine-2.00/bin/tclsh) + @(gln -s $(bindir)/tclsh \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin/tclsh) + @(cd $(DESTDIR)$(libexecdir); gln -s ./alpine-2.00 ./alpine) + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:34:35 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:34:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4614] csw/mgar/pkg/alpine/trunk/Makefile Message-ID: Revision: 4614 http://gar.svn.sourceforge.net/gar/?rev=4614&view=rev Author: valholla Date: 2009-04-30 02:34:35 +0000 (Thu, 30 Apr 2009) Log Message: ----------- package checkin Modified Paths: -------------- csw/mgar/pkg/alpine/trunk/Makefile Modified: csw/mgar/pkg/alpine/trunk/Makefile =================================================================== --- csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:26:59 UTC (rev 4613) +++ csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:34:35 UTC (rev 4614) @@ -58,7 +58,7 @@ TEST_TARGET = check -REQUIRED_PKGS = CSWgcc3corert CSWggettextrt CSWiconv +REQUIRED_PKGS = CSWgcc4corert CSWggettextrt CSWiconv REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWaspell REQUIRED_PKGS += CSWoldaprt CSWosslrt CSWsasl CSWtcl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:43:08 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:43:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4615] csw/mgar/pkg/alpine/trunk/Makefile Message-ID: Revision: 4615 http://gar.svn.sourceforge.net/gar/?rev=4615&view=rev Author: valholla Date: 2009-04-30 02:43:08 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix depends Modified Paths: -------------- csw/mgar/pkg/alpine/trunk/Makefile Modified: csw/mgar/pkg/alpine/trunk/Makefile =================================================================== --- csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:34:35 UTC (rev 4614) +++ csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:43:08 UTC (rev 4615) @@ -58,9 +58,8 @@ TEST_TARGET = check -REQUIRED_PKGS = CSWgcc4corert CSWggettextrt CSWiconv -REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWaspell -REQUIRED_PKGS += CSWoldaprt CSWosslrt CSWsasl CSWtcl +REQUIRED_PKGS = CSWggettextrt CSWiconv CSWtcl CSWsasl CSWosslrt +REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWoldaprt include files/install_scripts.mk include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 30 14:42:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 30 Apr 2009 12:42:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4616] csw/mgar/pkg/x11/libpthread-stubs/trunk Message-ID: Revision: 4616 http://gar.svn.sourceforge.net/gar/?rev=4616&view=rev Author: dmichelsen Date: 2009-04-30 12:42:37 +0000 (Thu, 30 Apr 2009) Log Message: ----------- x11/libpthread-stubs:Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec Modified: csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile 2009-04-30 02:43:08 UTC (rev 4615) +++ csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile 2009-04-30 12:42:37 UTC (rev 4616) @@ -8,15 +8,16 @@ endef MASTER_SITES = $(XCB_MASTER_SITES) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibpthreadstubs) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PACKAGES = CSWlibpthreadstubs + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +BUILD64 = 1 +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums 2009-04-30 02:43:08 UTC (rev 4615) +++ csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums 2009-04-30 12:42:37 UTC (rev 4616) @@ -1,2 +1 @@ 5e3e75160ab6a8c212d0ecd82aa04651 download/libpthread-stubs-0.1.tar.gz -f5b34f077f7dfdb644340b71164c8c78 download/CSWlibpthreadstubs.gspec Deleted: csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec =================================================================== --- csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec 2009-04-30 02:43:08 UTC (rev 4615) +++ csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec 2009-04-30 12:42:37 UTC (rev 4616) @@ -1,7 +0,0 @@ -%var bitname libpthreadstubs -%var pkgname CSWlibpthreadstubs -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 30 14:53:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 30 Apr 2009 12:53:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4617] csw/mgar/pkg/x11/libxcb/trunk Message-ID: Revision: 4617 http://gar.svn.sourceforge.net/gar/?rev=4617&view=rev Author: dmichelsen Date: 2009-04-30 12:53:26 +0000 (Thu, 30 Apr 2009) Log Message: ----------- x11/libxcb: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/libxcb/trunk/Makefile csw/mgar/pkg/x11/libxcb/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec Modified: csw/mgar/pkg/x11/libxcb/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:53:26 UTC (rev 4617) @@ -4,35 +4,37 @@ DESCRIPTION = The XCB library define BLURB -The XCB library provides an interface to the X Window System protocol, designed to replace the Xlib interface + The XCB library provides an interface to the X Window System protocol, + designed to replace the Xlib interface endef -MASTER_SITES =http://xcb.freedesktop.org/dist/ +MASTER_SITES = http://xcb.freedesktop.org/dist/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PKGDIST = $(GARNAME)-$(GARVERSION).tar.gz +PREREQUISITE_PKGS = CSWlibxaudevel CSWlibpthreadstubs CSWdoxygen +REQUIRED_PKGS = CSWxcbproto CSWlibxau +PACKAGES = CSWlibxcb CSWlibxcbdevel CSWlibxcbdoc + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -SPKG_DESC_CSWlibxcb = The XCB library +SPKG_DESC_CSWlibxcb = The XCB library SPKG_DESC_CSWlibxcbdevel = The XCB library development package -SPKG_DESC_CSWlibxcbdoc = The XCB library documentation +SPKG_DESC_CSWlibxcbdoc = The XCB library documentation -DISTFILES += $(call admfiles,CSWlibxcbdevel, ) -DISTFILES += $(call admfiles,CSWlibxcbdoc, ) -DISTFILES += $(call admfiles,CSWlibxcb, ) +CATALOGNAME_CSWlibxcb = libxcb +CATALOGNAME_CSWlibxcbdevel = libxcb_dev +CATALOGNAME_CSWlibxcbdoc = libxcb_doc -PKGFILES_CSWlibxcbdevel = $(PKGFILES_DEVEL) -PKGFILES_CSWlibxcbdevel += $(prefix)/X11/include/.* -PKGFILES_CSWlibxcbdevel += $(prefix)/X11/lib/.*\.a -PKGFILES_CSWlibxcbdevel += $(prefix)/X11/lib/pkgconfig/.* +PKGFILES_CSWlibxcbdevel = $(PKGFILES_DEVEL) +PKGFILES_CSWlibxcbdoc = $(PKGFILES_DOC) -PKGFILES_CSWlibxcbdoc += $(prefix)/X11/share/doc/.* - REQUIRED_PKGS_CSWlibxcbdevel = CSWlibxcb -REQUIRED_PKGS_CSWlibxcb = CSWlibxau CSWlibxdmcp +REQUIRED_PKGS_CSWlibxcb = CSWlibxau CSWlibxdmcp +BUILD64 = 1 +NOISALIST = 1 +CONFIGURE_ARGS = $(DIRPATHS) + include gar/category.mk - - Modified: csw/mgar/pkg/x11/libxcb/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/checksums 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/checksums 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +1 @@ 90e02378256d5dec96ddc6c7d72119b6 download/libxcb-1.1.tar.gz -5ea9d5ef0b88062e38c0987c0ef48806 download/CSWlibxcbdevel.gspec -78e2027279d9012eb201138cf565d92a download/CSWlibxcbdoc.gspec -3a12038cc886e84f7e7a1d93dbe98c3a download/CSWlibxcb.gspec Deleted: csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +0,0 @@ -%var bitname libxcb -%var pkgname CSWlibxcb -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +0,0 @@ -%var bitname libxcb_dev -%var pkgname CSWlibxcbdev -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +0,0 @@ -%var bitname libxcb_doc -%var pkgname CSWlibxcbdoc -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 30 14:56:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 30 Apr 2009 12:56:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4618] csw/mgar/pkg/x11/libxcb/trunk/Makefile Message-ID: Revision: 4618 http://gar.svn.sourceforge.net/gar/?rev=4618&view=rev Author: dmichelsen Date: 2009-04-30 12:56:13 +0000 (Thu, 30 Apr 2009) Log Message: ----------- x11/libxcb: Fix dependency Modified Paths: -------------- csw/mgar/pkg/x11/libxcb/trunk/Makefile Modified: csw/mgar/pkg/x11/libxcb/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:53:26 UTC (rev 4617) +++ csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:56:13 UTC (rev 4618) @@ -12,7 +12,7 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PREREQUISITE_PKGS = CSWlibxaudevel CSWlibpthreadstubs CSWdoxygen -REQUIRED_PKGS = CSWxcbproto CSWlibxau +REQUIRED_PKGS_CSWlibxcb = CSWxcbproto CSWlibxau PACKAGES = CSWlibxcb CSWlibxcbdevel CSWlibxcbdoc # We define upstream file regex so we can be notifed of new upstream software release @@ -30,7 +30,7 @@ PKGFILES_CSWlibxcbdoc = $(PKGFILES_DOC) REQUIRED_PKGS_CSWlibxcbdevel = CSWlibxcb -REQUIRED_PKGS_CSWlibxcb = CSWlibxau CSWlibxdmcp +REQUIRED_PKGS_CSWlibxcb = CSWlibxau BUILD64 = 1 NOISALIST = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:00:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:00:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4619] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4619 http://gar.svn.sourceforge.net/gar/?rev=4619&view=rev Author: valholla Date: 2009-04-30 15:00:05 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix apache modphp5 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 12:56:13 UTC (rev 4618) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 15:00:05 UTC (rev 4619) @@ -85,9 +85,6 @@ SKIPTEST = 1 ENABLE_CHECK = 0 -# SAPI Specific Rules -STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec - # Rebuild Configure Args to build mod_php5 NEW_CONFIGURE_ARGS = $(shell echo $(CONFIGURE_ARGS) |sed -e 's/apxs2/apxs/' \ -e 's/apache2\/sbin\/apxs/apache\/bin\/apxs/') @@ -115,6 +112,14 @@ @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @( gfind $(DESTDIR)$(prefix)/apache* \ -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) + @(ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra) + @(ginstall -m 0644 \ + $(WORKDIR)/http-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache2/etc/extra) + @(ginstall -d $(DESTDIR)$(prefix)/apache/etc/extra) + @(ginstall -m 0644 \ + $(WORKDIR)/http-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache/etc/extra) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-30 12:56:13 UTC (rev 4618) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-30 15:00:05 UTC (rev 4619) @@ -7,6 +7,8 @@ REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWiconv CSWexpat REQUIRED_PKGS_CSWmodphp5 += CSWlibxml2 CSWphp5 CSWzlib +STRIP_DIRS += $(DESTDIR)$(prefix)/apache/libexec + DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space PKGFILES_CSWmodphp5 = .*/csw/apache/.* Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-30 12:56:13 UTC (rev 4618) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-30 15:00:05 UTC (rev 4619) @@ -10,6 +10,8 @@ DISTFILES += CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space +STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec + CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs PKGFILES_CSWap2modphp5 = .*/csw/apache2/.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:33:19 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:33:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4620] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4620 http://gar.svn.sourceforge.net/gar/?rev=4620&view=rev Author: valholla Date: 2009-04-30 15:33:19 +0000 (Thu, 30 Apr 2009) Log Message: ----------- add new target to amd_merge.mk Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-30 15:00:05 UTC (rev 4619) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-30 15:33:19 UTC (rev 4620) @@ -38,11 +38,9 @@ CONFIGURE_ARGS += --enable-languages=ada,c,c++,fortran,java,objc ## For cleanliness I split the Configuration into separate files -#include files/amd_merge.mk include files/gar_override.mk include files/package_def.mk include files/pkg_scripts.mk include files/package_files.mk include files/amd_merge.mk -## include mGar definitions include gar/category.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:00:05 UTC (rev 4619) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:33:19 UTC (rev 4620) @@ -12,6 +12,7 @@ PPREFIX = $(PKGROOT)/$(MPREFIX) AMD_MERGE_TARGETS = merge-dirs-amd +AMD_MERGE_TARGETS += merge-fix-links AMD_MERGE_TARGETS += merge-i386-files AMD_MERGE_TARGETS += merge-amd64-files @@ -24,10 +25,36 @@ $(_DBG)(ginstall -d $(PPREFIX)/bin/i386) $(_DBG)$(MAKECOOKIE) +## Remove the Hard Links and re-create as files +merge-fix-links: + @echo "[===== Merging Fixing Hard Links =====]" + $(_DBG)(cd $(IPREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) + $(_DBG)(cd $(IPREFIX)/bin; \ + gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + $(_DBG)(cd $(IPREFIX)/bin; \ + gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + $(_DBG)(cd $(APREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) + $(_DBG)(cd $(APREFIX)/bin; \ + gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + $(_DBG)(cd $(APREFIX)/bin; \ + gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + $(_DBG)$(MAKECOOKIE) + merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) - $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/amd64) + $(_DBG)(cd $(IPREFIX)/bin; \ + /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/i386) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:35:58 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:35:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4621] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4621 http://gar.svn.sourceforge.net/gar/?rev=4621&view=rev Author: valholla Date: 2009-04-30 15:35:58 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix typos Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:33:19 UTC (rev 4620) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:35:58 UTC (rev 4621) @@ -40,14 +40,14 @@ $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) $(_DBG)(cd $(APREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + gcp sparc-sun-solaris2.10-gcc-4.3.3 sparc-sun-solaris2.10-gcc) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcc-4.3.3 gcc) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + gcp sparc-sun-solaris2.10-g++ sparc-sun-solaris2.10-c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ g++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcj gcj) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gfortran gfortran) $(_DBG)$(MAKECOOKIE) merge-i386-files: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:54:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:54:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4622] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4622 http://gar.svn.sourceforge.net/gar/?rev=4622&view=rev Author: valholla Date: 2009-04-30 15:54:50 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix isaexec Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:35:58 UTC (rev 4621) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:54:50 UTC (rev 4622) @@ -1,3 +1,4 @@ +AMD_DEBUG = 1 ifeq ($(AMD_DEBUG),) _DBG=@ else @@ -30,31 +31,30 @@ @echo "[===== Merging Fixing Hard Links =====]" $(_DBG)(cd $(IPREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) $(_DBG)(cd $(IPREFIX)/bin; \ - gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + gcp i386-pc-solaris2.8-gcc-4.3.3 i386-pc-solaris2.8-gcc) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-gcc-4.3.3 gcc) $(_DBG)(cd $(IPREFIX)/bin; \ - gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + gcp i386-pc-solaris2.8-g++ i386-pc-solaris2.8-c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-g++ g++) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-g++ c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-gcj gcj) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-gfortran gfortran) $(_DBG)(cd $(APREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.10-gcc-4.3.3 sparc-sun-solaris2.10-gcc) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcc-4.3.3 gcc) + gcp i386-pc-solaris2.10-gcc-4.3.3 i386-pc-solaris2.10-gcc) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-gcc-4.3.3 gcc) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.10-g++ sparc-sun-solaris2.10-c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ g++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcj gcj) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gfortran gfortran) + gcp i386-pc-solaris2.10-g++ i386-pc-solaris2.10-c++) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-g++ g++) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-g++ c++) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-gcj gcj) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-gfortran gfortran) $(_DBG)$(MAKECOOKIE) merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) - $(_DBG)(cd $(IPREFIX)/bin; \ - /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/i386) + $(_DBG)(cd $(PPREFIX)/bin; gmv *solaris2* $(PPREFIX)/bin/i386) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) @@ -73,48 +73,46 @@ $(_DBG)$(MAKECOOKIE) ifeq ($(shell uname -p), i386) -EXTRA_PKGFILES_CSWgcc4core = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcc -EXTRA_PKGFILES_CSWgcc4core += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/cpp - -EXTRA_PKGFILES_CSWgcc4g++ = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/c++ -EXTRA_PKGFILES_CSWgcc4g++ += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/g++ - -EXTRA_PKGFILES_CSWgcc4gfortran = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gfortran - -EXTRA_PKGFILES_CSWgcc4java = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcov -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gccbug -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/addr2name.awk -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gc-analyze -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcjh -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjarsigner -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmic -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjavah -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmid -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jcf-dump -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gkeytool -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmiregistry -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jv-convert -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gij -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnative2ascii -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gserialver -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gappletviewer -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj-dbtool -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjar -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gorbd -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gtnameserv - -EXTRA_PKGFILES_CSWgcc4ada = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnat -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbind -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbl -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatchop -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatclean -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatfind -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatkr -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatlink -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatls -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatmake -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatname -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatprep -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatxref +ISAEXEC_DIRS = /opt/csw/gcc4/bin +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcov +ISAEXEC_FILES += /opt/csw/gcc4/bin/gccbug +ISAEXEC_FILES += /opt/csw/gcc4/bin/gfortran +ISAEXEC_FILES += /opt/csw/gcc4/bin/c++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/g++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/cpp +ISAEXEC_FILES += /opt/csw/gcc4/bin/addr2name.awk +ISAEXEC_FILES += /opt/csw/gcc4/bin/gc-analyze +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcjh +ISAEXEC_FILES += /opt/csw/gcc4/bin/gjarsigner +ISAEXEC_FILES += /opt/csw/gcc4/bin/grmic +ISAEXEC_FILES += /opt/csw/gcc4/bin/gjavah +ISAEXEC_FILES += /opt/csw/gcc4/bin/grmid +ISAEXEC_FILES += /opt/csw/gcc4/bin/jcf-dump +ISAEXEC_FILES += /opt/csw/gcc4/bin/gkeytool +ISAEXEC_FILES += /opt/csw/gcc4/bin/grmiregistry +ISAEXEC_FILES += /opt/csw/gcc4/bin/jv-convert +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj +ISAEXEC_FILES += /opt/csw/gcc4/bin/gij +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii +ISAEXEC_FILES += /opt/csw/gcc4/bin/gserialver +ISAEXEC_FILES += /opt/csw/gcc4/bin/gappletviewer +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj-dbtool +ISAEXEC_FILES += /opt/csw/gcc4/bin/gjar +ISAEXEC_FILES += /opt/csw/gcc4/bin/gorbd +ISAEXEC_FILES += /opt/csw/gcc4/bin/gtnameserv +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnat +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbl +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatmake +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 20:18:33 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 18:18:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4623] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4623 http://gar.svn.sourceforge.net/gar/?rev=4623&view=rev Author: valholla Date: 2009-04-30 18:18:33 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 15:54:50 UTC (rev 4622) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 18:18:33 UTC (rev 4623) @@ -102,6 +102,10 @@ ginstall -m 0644 \ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc + ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra + ginstall -m 0644 \ + $(WORKDIR)/httpd-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache2/etc/extra @(grm -fr $(DESTDIR)/.[a-z]*) @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) @( echo " ==> Now Building mod_php5 <==" ) @@ -112,14 +116,6 @@ @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @( gfind $(DESTDIR)$(prefix)/apache* \ -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) - @(ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra) - @(ginstall -m 0644 \ - $(WORKDIR)/http-php5.conf.CSW \ - $(DESTDIR)$(prefix)/apache2/etc/extra) - @(ginstall -d $(DESTDIR)$(prefix)/apache/etc/extra) - @(ginstall -m 0644 \ - $(WORKDIR)/http-php5.conf.CSW \ - $(DESTDIR)$(prefix)/apache/etc/extra) @$(MAKECOOKIE) post-configure-modulated: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 21:39:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 19:39:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4624] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4624 http://gar.svn.sourceforge.net/gar/?rev=4624&view=rev Author: valholla Date: 2009-04-30 19:39:37 +0000 (Thu, 30 Apr 2009) Log Message: ----------- redo post-install Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 18:18:33 UTC (rev 4623) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 19:39:37 UTC (rev 4624) @@ -91,31 +91,35 @@ # Copy over template config files and utility scripts -post-install-modulated: - ginstall -m 0755 \ - $(WORKDIR)/phpext \ - $(DESTDIR)$(prefix)/php5/bin - gsed -i -e s,PHPEXTDIR,$(shell $(DESTDIR)$(prefix)/php5/bin/php-config --extension-dir), $(WORKDIR)/php.ini.CSW - ginstall -m 0644 \ - $(WORKDIR)/php.ini.CSW \ - $(DESTDIR)$(prefix)/php5/lib - ginstall -m 0644 \ - $(WORKDIR)/pear.conf.CSW \ - $(DESTDIR)$(prefix)/php5/etc +PI_SCRIPTS = install-extras +PI_SCRIPTS += install-modphp5 + +post-install-modulated: $(PI_SCRIPTS) + @$(MAKECOOKIE) + +install-extras: + ginstall -m 0755 $(WORKDIR)/phpext $(DESTDIR)$(prefix)/php5/bin + gsed -i -e s,PHPEXTDIR,$(shell $(PHP5ROOT)/bin/php-config --extension-dir),\ + $(WORKDIR)/php.ini.CSW + ginstall -m 0644 $(WORKDIR)/php.ini.CSW $(DESTDIR)$(prefix)/php5/lib + ginstall -m 0644 $(WORKDIR)/pear.conf.CSW $(DESTDIR)$(prefix)/php5/etc ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra - ginstall -m 0644 \ - $(WORKDIR)/httpd-php5.conf.CSW \ + ginstall -m 0644 $(WORKDIR)/httpd-php5.conf.CSW \ $(DESTDIR)$(prefix)/apache2/etc/extra @(grm -fr $(DESTDIR)/.[a-z]*) @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) + @$(MAKECOOKIE) + +install-modphp5: @( echo " ==> Now Building mod_php5 <==" ) @( if [ -f $(WORKSRC)/Makefile ]; then \ - $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi) - cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) + $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi ) + @( cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) ) + @( $(DOWNLOADDIR)/fixme.sh $(WORKSRC) ) @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @( gfind $(DESTDIR)$(prefix)/apache* \ - -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) + -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr ) @$(MAKECOOKIE) post-configure-modulated: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 00:30:12 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 22:30:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4122] csw/mgar/pkg/cpan/Mail-IMAPClient/trunk Message-ID: Revision: 4122 http://gar.svn.sourceforge.net/gar/?rev=4122&view=rev Author: skayser Date: 2009-03-31 22:30:12 +0000 (Tue, 31 Mar 2009) Log Message: ----------- pm_mailimapclient: version bumped, changed to garv2 Modified Paths: -------------- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec Property Changed: ---------------- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/ Property changes on: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/Makefile 2009-03-31 22:30:12 UTC (rev 4122) @@ -1,7 +1,7 @@ GARNAME = Mail-IMAPClient -GARVERSION = 2.2.9 +GARVERSION = 3.15 CATEGORIES = cpan -AUTHOR = DJKERNEN +AUTHOR = MARKOV DESCRIPTION = IMAP Client API define BLURB @@ -9,8 +9,14 @@ scripts to interact with IMAP message stores. endef -DISTFILES += CSWpmmailimapclient.gspec CSWpmmailimapclient.depend +PACKAGES = CSWpmmailimapclient +CATALOGNAME = pm_mailimapclient +ARCHALL = 1 -DEPENDS += cpan/Parse-RecDescent +LICENSE = COPYRIGHT +# Don't know about those yet +#DEPENDS += cpan/Parse-RecDescent +#DEPENDS += cpan/Digest-HMAC + include gar/category.mk Modified: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/checksums 2009-03-31 22:30:12 UTC (rev 4122) @@ -1,3 +1 @@ -29ea00ff47fc77d307f24efdf8ba40f8 download/CSWpmmailimapclient.gspec -737756fbcd7276890f88420cfd4760d5 download/CSWpmmailimapclient.depend -21c1901d55a2d57f73840cad478c665d download/Mail-IMAPClient-2.2.9.tar.gz +85450b57f77f92f8dda9ecf8ff046a1e download/Mail-IMAPClient-3.15.tar.gz Deleted: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.depend 2009-03-31 22:30:12 UTC (rev 4122) @@ -1 +0,0 @@ -P CSWpmparserecdescent pm_parserecdescent - %var bitname pm_parserecdescent Deleted: csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec =================================================================== --- csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec 2009-03-31 20:50:58 UTC (rev 4121) +++ csw/mgar/pkg/cpan/Mail-IMAPClient/trunk/files/CSWpmmailimapclient.gspec 2009-03-31 22:30:12 UTC (rev 4122) @@ -1,5 +0,0 @@ -%var bitname pm_mailimapclient -%var pkgname CSWpmmailimapclient -%var arch all -%include url file://%{PKGLIB}/csw_cpan.gspec -%copyright url file://%{WORKSRC}/Copying This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 01:04:47 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:04:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4123] csw/mgar/pkg/cpan Message-ID: Revision: 4123 http://gar.svn.sourceforge.net/gar/?rev=4123&view=rev Author: skayser Date: 2009-03-31 23:04:47 +0000 (Tue, 31 Mar 2009) Log Message: ----------- File-Next: initial commit Added Paths: ----------- csw/mgar/pkg/cpan/File-Next/ csw/mgar/pkg/cpan/File-Next/branches/ csw/mgar/pkg/cpan/File-Next/tags/ csw/mgar/pkg/cpan/File-Next/trunk/ csw/mgar/pkg/cpan/File-Next/trunk/Makefile csw/mgar/pkg/cpan/File-Next/trunk/checksums csw/mgar/pkg/cpan/File-Next/trunk/files/ Property changes on: csw/mgar/pkg/cpan/File-Next/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/cpan/File-Next/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/File-Next/trunk/Makefile (rev 0) +++ csw/mgar/pkg/cpan/File-Next/trunk/Makefile 2009-03-31 23:04:47 UTC (rev 4123) @@ -0,0 +1,18 @@ +GARNAME = File-Next +GARVERSION = 1.02 +CATEGORIES = cpan +AUTHOR = PETDANCE + +DESCRIPTION = File-finding iterator +define BLURB +File::Next is a lightweight, taint-safe file-finding module. It's lightweight +and has no non-core prerequisites. +endef + +PACKAGES = CSWpmfilenext +CATALOGNAME = pm_filenext +ARCHALL = 1 + +LICENSE = + +include gar/category.mk Added: csw/mgar/pkg/cpan/File-Next/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/File-Next/trunk/checksums (rev 0) +++ csw/mgar/pkg/cpan/File-Next/trunk/checksums 2009-03-31 23:04:47 UTC (rev 4123) @@ -0,0 +1 @@ +ad2800827fd053f556e5e18fe9d50202 download/File-Next-1.02.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 01:09:06 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:09:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4124] csw/mgar/pkg/cpan Message-ID: Revision: 4124 http://gar.svn.sourceforge.net/gar/?rev=4124&view=rev Author: skayser Date: 2009-03-31 23:09:06 +0000 (Tue, 31 Mar 2009) Log Message: ----------- ack: initial commit Added Paths: ----------- csw/mgar/pkg/cpan/ack/ csw/mgar/pkg/cpan/ack/branches/ csw/mgar/pkg/cpan/ack/tags/ csw/mgar/pkg/cpan/ack/trunk/ csw/mgar/pkg/cpan/ack/trunk/Makefile csw/mgar/pkg/cpan/ack/trunk/checksums csw/mgar/pkg/cpan/ack/trunk/files/ Property changes on: csw/mgar/pkg/cpan/ack/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/cpan/ack/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/Makefile (rev 0) +++ csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-03-31 23:09:06 UTC (rev 4124) @@ -0,0 +1,19 @@ +GARNAME = ack +GARVERSION = 1.88 +CATEGORIES = cpan +AUTHOR = PETDANCE + +DESCRIPTION = A tool like grep, aimed at programmers +define BLURB +ack is a tool like grep, aimed at programmers with large trees of heterogeneous +source code. ack is written purely in Perl, and takes advantage of the power of +Perl's regular expressions. +endef + +PACKAGES = CSWack +CATALOGNAME = ack +ARCHALL = 1 + +LICENSE = COPYRIGHT + +include gar/category.mk Added: csw/mgar/pkg/cpan/ack/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/checksums (rev 0) +++ csw/mgar/pkg/cpan/ack/trunk/checksums 2009-03-31 23:09:06 UTC (rev 4124) @@ -0,0 +1 @@ +a1aad025ac94d582628ee72872d44c94 download/ack-1.88.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 01:52:30 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:52:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4125] csw/mgar/pkg/cpan/ack/trunk/Makefile Message-ID: Revision: 4125 http://gar.svn.sourceforge.net/gar/?rev=4125&view=rev Author: skayser Date: 2009-03-31 23:52:30 +0000 (Tue, 31 Mar 2009) Log Message: ----------- ack: only install ack itself Modified Paths: -------------- csw/mgar/pkg/cpan/ack/trunk/Makefile Modified: csw/mgar/pkg/cpan/ack/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-03-31 23:09:06 UTC (rev 4124) +++ csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-03-31 23:52:30 UTC (rev 4125) @@ -3,17 +3,26 @@ CATEGORIES = cpan AUTHOR = PETDANCE -DESCRIPTION = A tool like grep, aimed at programmers +DESCRIPTION = grep-like text finder, aimed at programmers define BLURB -ack is a tool like grep, aimed at programmers with large trees of heterogeneous -source code. ack is written purely in Perl, and takes advantage of the power of -Perl's regular expressions. + ack is a tool like grep, aimed at programmers with large trees of + heterogeneous source code. ack is written purely in Perl, and takes + advantage of the power of Perl's regular expressions. endef PACKAGES = CSWack CATALOGNAME = ack ARCHALL = 1 -LICENSE = COPYRIGHT +LICENSE = +INSTALL_SCRIPTS = custom + include gar/category.mk + +install-custom: + @ginstall -d $(DESTDIR)$(bindir) + @ginstall -d $(DESTDIR)$(mandir)/man1 + @cp $(WORKSRC)/ack $(DESTDIR)$(bindir) + @pod2man --section=1 $(WORKSRC)/ack > $(DESTDIR)$(mandir)/man1/ack.1 + @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 1 01:55:01 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 31 Mar 2009 23:55:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4126] csw/mgar/pkg/cvsps/trunk/Makefile Message-ID: Revision: 4126 http://gar.svn.sourceforge.net/gar/?rev=4126&view=rev Author: bdwalton Date: 2009-03-31 23:55:01 +0000 (Tue, 31 Mar 2009) Log Message: ----------- apply RPATH correction to address mantis #3528 Modified Paths: -------------- csw/mgar/pkg/cvsps/trunk/Makefile Modified: csw/mgar/pkg/cvsps/trunk/Makefile =================================================================== --- csw/mgar/pkg/cvsps/trunk/Makefile 2009-03-31 23:52:30 UTC (rev 4125) +++ csw/mgar/pkg/cvsps/trunk/Makefile 2009-03-31 23:55:01 UTC (rev 4126) @@ -32,6 +32,9 @@ TEST_SCRIPTS = +# to fix mantis bug #3528 +RUNPATHQUOTE = 1 + CONFIGURE_ARGS = $(DIRPATHS) --with-zlib=/opt/csw include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 1 02:17:10 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 01 Apr 2009 00:17:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4127] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4127 http://gar.svn.sourceforge.net/gar/?rev=4127&view=rev Author: bdwalton Date: 2009-04-01 00:17:10 +0000 (Wed, 01 Apr 2009) Log Message: ----------- address mantis bug #3539 (improperly quoted RPATH) Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-03-31 23:55:01 UTC (rev 4126) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-01 00:17:10 UTC (rev 4127) @@ -94,6 +94,9 @@ # software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 +# properly quote RPATH to address mantis bug #3539 +RUNPATHQUOTE = 1 + CONFIGURE_ARGS = $(DIRPATHS) --with-shell=$(bindir)/bash CONFIGURE_ARGS += --with-perl=$(bindir)/perl CONFIGURE_ARGS += --with-tcltk=$(bindir)/wish This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 14:36:16 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 01 Apr 2009 12:36:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4128] csw/mgar/pkg/cpan/ack/trunk/Makefile Message-ID: Revision: 4128 http://gar.svn.sourceforge.net/gar/?rev=4128&view=rev Author: skayser Date: 2009-04-01 12:36:16 +0000 (Wed, 01 Apr 2009) Log Message: ----------- ack: added license and changelog Modified Paths: -------------- csw/mgar/pkg/cpan/ack/trunk/Makefile Modified: csw/mgar/pkg/cpan/ack/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-04-01 00:17:10 UTC (rev 4127) +++ csw/mgar/pkg/cpan/ack/trunk/Makefile 2009-04-01 12:36:16 UTC (rev 4128) @@ -14,8 +14,6 @@ CATALOGNAME = ack ARCHALL = 1 -LICENSE = - INSTALL_SCRIPTS = custom include gar/category.mk @@ -23,6 +21,12 @@ install-custom: @ginstall -d $(DESTDIR)$(bindir) @ginstall -d $(DESTDIR)$(mandir)/man1 + @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) @cp $(WORKSRC)/ack $(DESTDIR)$(bindir) @pod2man --section=1 $(WORKSRC)/ack > $(DESTDIR)$(mandir)/man1/ack.1 + @cp $(WORKSRC)/Changes $(DESTDIR)$(docdir)/$(GARNAME)/changelog @$(MAKECOOKIE) + +pre-merge-modulated: + @$(WORKSRC)/ack --version | sed -n '/^Copyright/,$$p' > $(WORKSRC)/COPYING + @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 1 18:50:50 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 01 Apr 2009 16:50:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4129] csw/mgar/pkg Message-ID: Revision: 4129 http://gar.svn.sourceforge.net/gar/?rev=4129&view=rev Author: skayser Date: 2009-04-01 16:50:50 +0000 (Wed, 01 Apr 2009) Log Message: ----------- vttest: initial commit Added Paths: ----------- csw/mgar/pkg/vttest/ csw/mgar/pkg/vttest/branches/ csw/mgar/pkg/vttest/tags/ csw/mgar/pkg/vttest/trunk/ csw/mgar/pkg/vttest/trunk/Makefile csw/mgar/pkg/vttest/trunk/checksums csw/mgar/pkg/vttest/trunk/files/ Property changes on: csw/mgar/pkg/vttest/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/vttest/trunk/Makefile =================================================================== --- csw/mgar/pkg/vttest/trunk/Makefile (rev 0) +++ csw/mgar/pkg/vttest/trunk/Makefile 2009-04-01 16:50:50 UTC (rev 4129) @@ -0,0 +1,25 @@ +GARNAME = vttest +GARVERSION = 20071216 +CATEGORIES = utils + +DESCRIPTION = Tool for testing VT100 compatibility of terminals +define BLURB +This is a program to test the compatibility (or to demonstrate the +non-compatibility) of so-called "VT100-compatible" terminals. Additional tests +(past version 1.7) are provided for analysis of vt220, vt420 terminals, as well +as variants of xterm. +endef + +MASTER_SITES = ftp://invisible-island.net/vttest/ +DISTFILES = $(GARNAME)-$(GARVERSION).tgz + +UFILES_REGEX = $(GARNAME)-(\d+).tgz + +TEST_SCRIPTS = + +CONFIGURE_ARGS = $(DIRPATHS) + +# No RUNPATH needed, vttest only links against system libs +LINKER_FLAGS = + +include gar/category.mk Added: csw/mgar/pkg/vttest/trunk/checksums =================================================================== --- csw/mgar/pkg/vttest/trunk/checksums (rev 0) +++ csw/mgar/pkg/vttest/trunk/checksums 2009-04-01 16:50:50 UTC (rev 4129) @@ -0,0 +1 @@ +490cebc85e531c833dcf14c32790184b download/vttest-20071216.tgz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 19:01:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 17:01:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4131] csw/mgar/pkg/chrpath/trunk/ Message-ID: Revision: 4131 http://gar.svn.sourceforge.net/gar/?rev=4131&view=rev Author: valholla Date: 2009-04-01 17:01:20 +0000 (Wed, 01 Apr 2009) Log Message: ----------- svnprop garv2 checkin Property Changed: ---------------- csw/mgar/pkg/chrpath/trunk/ Property changes on: csw/mgar/pkg/chrpath/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 19:00:29 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 17:00:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4130] csw/mgar/pkg Message-ID: Revision: 4130 http://gar.svn.sourceforge.net/gar/?rev=4130&view=rev Author: valholla Date: 2009-04-01 17:00:29 +0000 (Wed, 01 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/chrpath/ csw/mgar/pkg/chrpath/Makefile csw/mgar/pkg/chrpath/branches/ csw/mgar/pkg/chrpath/tags/ csw/mgar/pkg/chrpath/trunk/ csw/mgar/pkg/chrpath/trunk/Makefile csw/mgar/pkg/chrpath/trunk/checksums csw/mgar/pkg/chrpath/trunk/files/ csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff Added: csw/mgar/pkg/chrpath/Makefile =================================================================== --- csw/mgar/pkg/chrpath/Makefile (rev 0) +++ csw/mgar/pkg/chrpath/Makefile 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/chrpath/trunk/Makefile =================================================================== --- csw/mgar/pkg/chrpath/trunk/Makefile (rev 0) +++ csw/mgar/pkg/chrpath/trunk/Makefile 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,40 @@ +GARNAME = chrpath +GARVERSION = 0.13 +CATEGORIES = utils + +DESCRIPTION = A program to fix/change runpaths +define BLURB +endef + +MASTER_SITES = http://directory.fsf.org/project/chrpath/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +PACKAGES = CSWchrpath +CATALOGNAME_CSWchrpath = chrpath +SPKG_DESC_CSWchrpath = $(DESCRIPTION) + +PATCHFILES = chrpath_0.13-2.diff +PATCHDIR = $(WORKSRC) + + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +NOISALIST = 1 + +CONFIGURE_ARGS = $(DIRPATHS) + +## There are no tests for this +## runtest.ksh is broken manual test required +TEST_SCRIPTS = skip + +test-skip: + $(DONADA) + +post-configure-modulated: + @(perl -i -plne 's|docdir = .*|docdir = $(prefix)/share/doc/$(GARNAME)|'\ + $(WORKSRC)/Makefile) + +include gar/category.mk Added: csw/mgar/pkg/chrpath/trunk/checksums =================================================================== --- csw/mgar/pkg/chrpath/trunk/checksums (rev 0) +++ csw/mgar/pkg/chrpath/trunk/checksums 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,2 @@ +b73072a8fbba277558c50364b65bb407 download/chrpath-0.13.tar.gz +963e8a8a27f91bf1f7a37c66750f60d7 download/chrpath_0.13-2.diff Added: csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff =================================================================== --- csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff (rev 0) +++ csw/mgar/pkg/chrpath/trunk/files/chrpath_0.13-2.diff 2009-04-01 17:00:29 UTC (rev 4130) @@ -0,0 +1,8899 @@ +--- chrpath-0.13.orig/Makefile.in ++++ chrpath-0.13/Makefile.in +@@ -1,6 +1,8 @@ +-# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am ++# Makefile.in generated by automake 1.8.5 from Makefile.am. ++# @configure_input@ + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -10,75 +12,189 @@ + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A + # PARTICULAR PURPOSE. + ++ at SET_MAKE@ + +-SHELL = @SHELL@ ++ ++SOURCES = $(chrpath_SOURCES) + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +-prefix = @prefix@ +-exec_prefix = @exec_prefix@ +- +-bindir = @bindir@ +-sbindir = @sbindir@ +-libexecdir = @libexecdir@ +-datadir = @datadir@ +-sysconfdir = @sysconfdir@ +-sharedstatedir = @sharedstatedir@ +-localstatedir = @localstatedir@ +-libdir = @libdir@ +-infodir = @infodir@ +-mandir = @mandir@ +-includedir = @includedir@ +-oldincludedir = /usr/include +- +-DESTDIR = +- + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +- + top_builddir = . +- +-ACLOCAL = @ACLOCAL@ +-AUTOCONF = @AUTOCONF@ +-AUTOMAKE = @AUTOMAKE@ +-AUTOHEADER = @AUTOHEADER@ +- ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd + INSTALL = @INSTALL@ +-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +-INSTALL_DATA = @INSTALL_DATA@ +-INSTALL_SCRIPT = @INSTALL_SCRIPT@ +-transform = @program_transform_name@ +- ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) + NORMAL_INSTALL = : + PRE_INSTALL = : + POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_triplet = @host@ ++bin_PROGRAMS = chrpath$(EXEEXT) ++DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ ++ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ ++ config.guess config.sub depcomp install-sh ltmain.sh missing \ ++ mkinstalldirs ++subdir = . ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ ++ $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ++ configure.lineno configure.status.lineno ++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs ++CONFIG_HEADER = config.h ++CONFIG_CLEAN_FILES = ++am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" ++binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) ++PROGRAMS = $(bin_PROGRAMS) ++am_chrpath_OBJECTS = chrpath.$(OBJEXT) killrpath.$(OBJEXT) \ ++ main.$(OBJEXT) elf.$(OBJEXT) ++chrpath_OBJECTS = $(am_chrpath_OBJECTS) ++chrpath_LDADD = $(LDADD) ++DEFAULT_INCLUDES = -I. -I$(srcdir) -I. ++depcomp = $(SHELL) $(top_srcdir)/depcomp ++am__depfiles_maybe = depfiles ++ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/chrpath.Po ./$(DEPDIR)/elf.Po \ ++ at AMDEP_TRUE@ ./$(DEPDIR)/killrpath.Po ./$(DEPDIR)/main.Po ++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++CCLD = $(CC) ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++SOURCES = $(chrpath_SOURCES) ++DIST_SOURCES = $(chrpath_SOURCES) ++RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ++ html-recursive info-recursive install-data-recursive \ ++ install-exec-recursive install-info-recursive \ ++ install-recursive installcheck-recursive installdirs-recursive \ ++ pdf-recursive ps-recursive uninstall-info-recursive \ ++ uninstall-recursive ++man1dir = $(mandir)/man1 ++NROFF = nroff ++MANS = $(man_MANS) ++docDATA_INSTALL = $(INSTALL_DATA) ++DATA = $(doc_DATA) ++ETAGS = etags ++CTAGS = ctags ++DIST_SUBDIRS = $(SUBDIRS) ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++distdir = $(PACKAGE)-$(VERSION) ++top_distdir = $(distdir) ++am__remove_distdir = \ ++ { test ! -d $(distdir) \ ++ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ++ && rm -fr $(distdir); }; } ++DIST_ARCHIVES = $(distdir).tar.gz ++GZIP_ENV = --best ++distuninstallcheck_listfiles = find . -type f -print ++distcleancheck_listfiles = find . -type f -print ++ACLOCAL = @ACLOCAL@ ++AMDEP_FALSE = @AMDEP_FALSE@ ++AMDEP_TRUE = @AMDEP_TRUE@ ++AMTAR = @AMTAR@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AWK = @AWK@ + CC = @CC@ ++CCDEPMODE = @CCDEPMODE@ ++CFLAGS = @CFLAGS@ ++CPP = @CPP@ ++CPPFLAGS = @CPPFLAGS@ ++CYGPATH_W = @CYGPATH_W@ ++DEFS = @DEFS@ ++DEPDIR = @DEPDIR@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++EXEEXT = @EXEEXT@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++LDFLAGS = @LDFLAGS@ + LDRPATH = @LDRPATH@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ ++MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ++MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ ++OBJEXT = @OBJEXT@ + PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++SET_MAKE = @SET_MAKE@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ + VERSION = @VERSION@ +- ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_STRIP = @ac_ct_STRIP@ ++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ ++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ ++am__include = @am__include@ ++am__leading_dot = @am__leading_dot@ ++am__quote = @am__quote@ ++bindir = @bindir@ ++build = @build@ ++build_alias = @build_alias@ ++build_cpu = @build_cpu@ ++build_os = @build_os@ ++build_vendor = @build_vendor@ ++datadir = @datadir@ ++exec_prefix = @exec_prefix@ ++host = @host@ ++host_alias = @host_alias@ ++host_cpu = @host_cpu@ ++host_os = @host_os@ ++host_vendor = @host_vendor@ ++includedir = @includedir@ ++infodir = @infodir@ ++install_sh = @install_sh@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++localstatedir = @localstatedir@ ++mandir = @mandir@ ++mkdir_p = @mkdir_p@ ++oldincludedir = @oldincludedir@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++sbindir = @sbindir@ ++sharedstatedir = @sharedstatedir@ ++sysconfdir = @sysconfdir@ ++target = @target@ ++target_alias = @target_alias@ ++target_cpu = @target_cpu@ ++target_os = @target_os@ ++target_vendor = @target_vendor@ + SUBDIRS = testsuite deb +- + docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION) +- + doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README +- +-bin_PROGRAMS = chrpath +- + man_MANS = chrpath.1 +- +-chrpath_SOURCES = chrpath.c killrpath.c main.c elf.c protos.h +- ++chrpath_SOURCES = \ ++ chrpath.c \ ++ killrpath.c \ ++ main.c \ ++ elf.c \ ++ protos.h + + EXTRA_DIST = ChangeLog.usermap $(man_MANS) +- + CLEANFILES = *.bb *.bbg *.da *.gcov testsuite/*.bb testsuite/*.bbg + + # ChangeLog autogenerated from CVS log messages +@@ -90,142 +206,121 @@ + # --usermap ... Make usernames with names/emails in given file + # --ignore ChangeLog Don't log changes to the ChangeLog itself + CVS2CL = cvs2cl +-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +-CONFIG_HEADER = config.h +-CONFIG_CLEAN_FILES = +-PROGRAMS = $(bin_PROGRAMS) +- +- +-DEFS = @DEFS@ -I. -I$(srcdir) -I. +-CPPFLAGS = @CPPFLAGS@ +-LDFLAGS = @LDFLAGS@ +-LIBS = @LIBS@ +-chrpath_OBJECTS = chrpath.o killrpath.o main.o elf.o +-chrpath_LDADD = $(LDADD) +-chrpath_DEPENDENCIES = +-chrpath_LDFLAGS = +-CFLAGS = @CFLAGS@ +-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-CCLD = $(CC) +-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +-man1dir = $(mandir)/man1 +-MANS = $(man_MANS) +- +-NROFF = nroff +-DATA = $(doc_DATA) +- +-DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ +-Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 config.guess \ +-config.h.in config.sub configure configure.ac install-sh ltmain.sh \ +-missing mkinstalldirs +- +- +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +- +-TAR = tar +-GZIP_ENV = --best +-SOURCES = $(chrpath_SOURCES) +-OBJECTS = $(chrpath_OBJECTS) ++all: config.h ++ $(MAKE) $(AM_MAKEFLAGS) all-recursive + +-all: all-redirect + .SUFFIXES: +-.SUFFIXES: .S .c .o .s +-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile +- +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +- cd $(top_builddir) \ +- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status +- +-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4 +- cd $(srcdir) && $(ACLOCAL) ++.SUFFIXES: .c .o .obj ++am--refresh: ++ @: ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ ++ cd $(srcdir) && $(AUTOMAKE) --gnu \ ++ && exit 0; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ ++ cd $(top_srcdir) && \ ++ $(AUTOMAKE) --gnu Makefile ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ echo ' $(SHELL) ./config.status'; \ ++ $(SHELL) ./config.status;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ ++ esac; + +-config.status: $(srcdir)/configure.ac $(CONFIG_STATUS_DEPENDENCIES) ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ++ ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +-config.h: stamp-h ++config.h: stamp-h1 + @if test ! -f $@; then \ +- rm -f stamp-h; \ +- $(MAKE) stamp-h; \ ++ rm -f stamp-h1; \ ++ $(MAKE) stamp-h1; \ + else :; fi +-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status +- cd $(top_builddir) \ +- && CONFIG_FILES= CONFIG_HEADERS=config.h \ +- $(SHELL) ./config.status +- @echo timestamp > stamp-h 2> /dev/null +-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in +- @if test ! -f $@; then \ +- rm -f $(srcdir)/stamp-h.in; \ +- $(MAKE) $(srcdir)/stamp-h.in; \ +- else :; fi +-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOHEADER) +- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null +- +-mostlyclean-hdr: + +-clean-hdr: ++stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status ++ @rm -f stamp-h1 ++ cd $(top_builddir) && $(SHELL) ./config.status config.h ++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(top_srcdir) && $(AUTOHEADER) ++ rm -f stamp-h1 ++ touch $@ + + distclean-hdr: +- -rm -f config.h +- +-maintainer-clean-hdr: +- +-mostlyclean-binPROGRAMS: +- +-clean-binPROGRAMS: +- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +- +-distclean-binPROGRAMS: +- +-maintainer-clean-binPROGRAMS: +- ++ -rm -f config.h stamp-h1 + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(bindir) ++ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ +- if test -f $$p; then \ +- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ +- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ ++ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ ++ if test -f $$p \ ++ ; then \ ++ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ ++ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ ++ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + + uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) +- list='$(bin_PROGRAMS)'; for p in $$list; do \ +- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ ++ @list='$(bin_PROGRAMS)'; for p in $$list; do \ ++ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ ++ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +-.c.o: +- $(COMPILE) -c $< +- +-.s.o: +- $(COMPILE) -c $< +- +-.S.o: +- $(COMPILE) -c $< ++clean-binPROGRAMS: ++ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ++chrpath$(EXEEXT): $(chrpath_OBJECTS) $(chrpath_DEPENDENCIES) ++ @rm -f chrpath$(EXEEXT) ++ $(LINK) $(chrpath_LDFLAGS) $(chrpath_OBJECTS) $(chrpath_LDADD) $(LIBS) + + mostlyclean-compile: +- -rm -f *.o core *.core +- +-clean-compile: ++ -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c + +-maintainer-clean-compile: ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/chrpath.Po at am__quote@ ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/elf.Po at am__quote@ ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/killrpath.Po at am__quote@ ++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@ + +-chrpath: $(chrpath_OBJECTS) $(chrpath_DEPENDENCIES) +- @rm -f chrpath +- $(LINK) $(chrpath_LDFLAGS) $(chrpath_OBJECTS) $(chrpath_LDADD) $(LIBS) +- +-install-man1: +- $(mkinstalldirs) $(DESTDIR)$(man1dir) +- @list='$(man1_MANS)'; \ +- l2='$(man_MANS)'; for i in $$l2; do \ ++.c.o: ++ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ ++ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++ at am__fastdepCC_FALSE@ $(COMPILE) -c $< ++ ++.c.obj: ++ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ ++ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++ at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ++uninstall-info-am: ++install-man1: $(man1_MANS) $(man_MANS) ++ @$(NORMAL_INSTALL) ++ test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" ++ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ ++ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ ++ for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ +@@ -234,50 +329,53 @@ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ case "$$ext" in \ ++ 1*) ;; \ ++ *) ext='1' ;; \ ++ esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ +- echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ +- $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ ++ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ ++ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +- + uninstall-man1: +- @list='$(man1_MANS)'; \ +- l2='$(man_MANS)'; for i in $$l2; do \ ++ @$(NORMAL_UNINSTALL) ++ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ ++ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ ++ for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ case "$$ext" in \ ++ 1*) ;; \ ++ *) ext='1' ;; \ ++ esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ +- echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ +- rm -f $(DESTDIR)$(man1dir)/$$inst; \ ++ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ ++ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +-install-man: $(MANS) +- @$(NORMAL_INSTALL) +- $(MAKE) $(AM_MAKEFLAGS) install-man1 +-uninstall-man: +- @$(NORMAL_UNINSTALL) +- $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 +- + install-docDATA: $(doc_DATA) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(docdir) ++ test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" + @list='$(doc_DATA)'; for p in $$list; do \ +- if test -f $(srcdir)/$$p; then \ +- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p"; \ +- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p; \ +- else if test -f $$p; then \ +- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p"; \ +- $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p; \ +- fi; fi; \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ f="`echo $$p | sed -e 's|^.*/||'`"; \ ++ echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ ++ $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ + done + + uninstall-docDATA: + @$(NORMAL_UNINSTALL) +- list='$(doc_DATA)'; for p in $$list; do \ +- rm -f $(DESTDIR)$(docdir)/$$p; \ ++ @list='$(doc_DATA)'; for p in $$list; do \ ++ f="`echo $$p | sed -e 's|^.*/||'`"; \ ++ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(docdir)/$$f"; \ + done + + # This directory's subdirectories are mostly independent; you can cd +@@ -286,13 +384,8 @@ + # (1) if the variable is set in `config.status', edit `config.status' + # (which will cause the Makefiles to be regenerated when you run `make'); + # (2) otherwise, pass the desired values on the `make' command line. +- +- at SET_MAKE@ +- +-all-recursive install-data-recursive install-exec-recursive \ +-installdirs-recursive install-recursive uninstall-recursive \ +-check-recursive installcheck-recursive info-recursive dvi-recursive: +- @set fnord $(MAKEFLAGS); amf=$$2; \ ++$(RECURSIVE_TARGETS): ++ @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -312,13 +405,18 @@ + + mostlyclean-recursive clean-recursive distclean-recursive \ + maintainer-clean-recursive: +- @set fnord $(MAKEFLAGS); amf=$$2; \ ++ @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ +- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ +- rev="$$subdir $$rev"; \ +- test "$$subdir" = "." && dot_seen=yes; \ ++ case "$@" in \ ++ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ ++ *) list='$(SUBDIRS)' ;; \ ++ esac; \ ++ rev=''; for subdir in $$list; do \ ++ if test "$$subdir" = "."; then :; else \ ++ rev="$$subdir $$rev"; \ ++ fi; \ + done; \ +- test "$$dot_seen" = "no" && rev=". $$rev"; \ ++ rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ +@@ -334,189 +432,318 @@ + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done ++ctags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ ++ done + +-tags: TAGS +- +-ID: $(HEADERS) $(SOURCES) $(LISP) +- list='$(SOURCES) $(HEADERS)'; \ +- unique=`for i in $$list; do echo $$i; done | \ +- awk ' { files[$$0] = 1; } \ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ +- here=`pwd` && cd $(srcdir) \ +- && mkid -f$$here/ID $$unique $(LISP) ++ mkid -fID $$unique ++tags: TAGS + +-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) ++TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ ++ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ ++ include_option=--etags-include; \ ++ empty_fix=.; \ ++ else \ ++ include_option=--include; \ ++ empty_fix=; \ ++ fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +- if test "$$subdir" = .; then :; else \ +- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ +- fi; \ ++ if test "$$subdir" = .; then :; else \ ++ test ! -f $$subdir/TAGS || \ ++ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ ++ fi; \ + done; \ +- list='$(SOURCES) $(HEADERS)'; \ +- unique=`for i in $$list; do echo $$i; done | \ +- awk ' { files[$$0] = 1; } \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ +- test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) +- +-mostlyclean-tags: +- +-clean-tags: ++ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique; \ ++ fi ++ctags: CTAGS ++CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ test -z "$(CTAGS_ARGS)$$tags$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$tags $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && cd $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) $$here + + distclean-tags: +- -rm -f TAGS ID +- +-maintainer-clean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +-distdir = $(PACKAGE)-$(VERSION) +-top_distdir = $(distdir) +- +-# This target untars the dist file and tries a VPATH configuration. Then +-# it guarantees that the distribution is self-contained by making another +-# tarfile. +-distcheck: dist +- -rm -rf $(distdir) +- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz +- mkdir $(distdir)/=build +- mkdir $(distdir)/=inst +- dc_install_base=`cd $(distdir)/=inst && pwd`; \ +- cd $(distdir)/=build \ +- && ../configure --srcdir=.. --prefix=$$dc_install_base \ +- && $(MAKE) $(AM_MAKEFLAGS) \ +- && $(MAKE) $(AM_MAKEFLAGS) dvi \ +- && $(MAKE) $(AM_MAKEFLAGS) check \ +- && $(MAKE) $(AM_MAKEFLAGS) install \ +- && $(MAKE) $(AM_MAKEFLAGS) installcheck \ +- && $(MAKE) $(AM_MAKEFLAGS) dist +- -rm -rf $(distdir) +- @banner="$(distdir).tar.gz is ready for distribution"; \ +- dashes=`echo "$$banner" | sed s/./=/g`; \ +- echo "$$dashes"; \ +- echo "$$banner"; \ +- echo "$$dashes" +-dist: distdir +- -chmod -R a+r $(distdir) +- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) +- -rm -rf $(distdir) +-dist-all: distdir +- -chmod -R a+r $(distdir) +- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) +- -rm -rf $(distdir) + distdir: $(DISTFILES) +- -rm -rf $(distdir) ++ $(am__remove_distdir) + mkdir $(distdir) +- -chmod 777 $(distdir) +- @for file in $(DISTFILES); do \ +- d=$(srcdir); \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ++ list='$(DISTFILES)'; for file in $$list; do \ ++ case $$file in \ ++ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ++ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ++ esac; \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ++ dir="/$$dir"; \ ++ $(mkdir_p) "$(distdir)$$dir"; \ ++ else \ ++ dir=''; \ ++ fi; \ + if test -d $$d/$$file; then \ +- cp -pr $$d/$$file $(distdir)/$$file; \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ fi; \ ++ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +- || cp -p $$d/$$file $(distdir)/$$file || :; \ ++ || cp -p $$d/$$file $(distdir)/$$file \ ++ || exit 1; \ + fi; \ + done +- for subdir in $(SUBDIRS); do \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -d $(distdir)/$$subdir \ +- || mkdir $(distdir)/$$subdir \ ++ test -d "$(distdir)/$$subdir" \ ++ || mkdir "$(distdir)/$$subdir" \ + || exit 1; \ +- chmod 777 $(distdir)/$$subdir; \ +- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ ++ (cd $$subdir && \ ++ $(MAKE) $(AM_MAKEFLAGS) \ ++ top_distdir="../$(top_distdir)" \ ++ distdir="../$(distdir)/$$subdir" \ ++ distdir) \ + || exit 1; \ + fi; \ + done +-chrpath.o: chrpath.c config.h protos.h +-elf.o: elf.c config.h protos.h +-killrpath.o: killrpath.c config.h protos.h +-main.o: main.c config.h protos.h ++ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ++ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ++ || chmod -R a+r $(distdir) ++dist-gzip: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++dist-bzip2: distdir ++ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ++ $(am__remove_distdir) ++ ++dist-tarZ: distdir ++ $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z ++ $(am__remove_distdir) ++ ++dist-shar: distdir ++ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz ++ $(am__remove_distdir) ++ ++dist-zip: distdir ++ -rm -f $(distdir).zip ++ zip -rq $(distdir).zip $(distdir) ++ $(am__remove_distdir) ++ ++dist dist-all: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) + +-info-am: +-info: info-recursive +-dvi-am: +-dvi: dvi-recursive ++# This target untars the dist file and tries a VPATH configuration. Then ++# it guarantees that the distribution is self-contained by making another ++# tarfile. ++distcheck: dist ++ case '$(DIST_ARCHIVES)' in \ ++ *.tar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ ++ *.tar.bz2*) \ ++ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ ++ *.tar.Z*) \ ++ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ ++ *.shar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ ++ *.zip*) \ ++ unzip $(distdir).zip ;;\ ++ esac ++ chmod -R a-w $(distdir); chmod a+w $(distdir) ++ mkdir $(distdir)/_build ++ mkdir $(distdir)/_inst ++ chmod a-w $(distdir) ++ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ++ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ++ && cd $(distdir)/_build \ ++ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ++ $(DISTCHECK_CONFIGURE_FLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \ ++ && $(MAKE) $(AM_MAKEFLAGS) check \ ++ && $(MAKE) $(AM_MAKEFLAGS) install \ ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ++ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ++ distuninstallcheck \ ++ && chmod -R a-w "$$dc_install_base" \ ++ && ({ \ ++ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ++ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ++ } || { rm -rf "$$dc_destdir"; exit 1; }) \ ++ && rm -rf "$$dc_destdir" \ ++ && $(MAKE) $(AM_MAKEFLAGS) dist \ ++ && rm -rf $(DIST_ARCHIVES) \ ++ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ++ $(am__remove_distdir) ++ @(echo "$(distdir) archives ready for distribution: "; \ ++ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ ++ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' ++distuninstallcheck: ++ @cd $(distuninstallcheck_dir) \ ++ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ++ || { echo "ERROR: files left after uninstall:" ; \ ++ if test -n "$(DESTDIR)"; then \ ++ echo " (check DESTDIR support)"; \ ++ fi ; \ ++ $(distuninstallcheck_listfiles) ; \ ++ exit 1; } >&2 ++distcleancheck: distclean ++ @if test '$(srcdir)' = . ; then \ ++ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ++ exit 1 ; \ ++ fi ++ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ++ || { echo "ERROR: files left in build directory after distclean:" ; \ ++ $(distcleancheck_listfiles) ; \ ++ exit 1; } >&2 + check-am: all-am + check: check-recursive +-installcheck-am: +-installcheck: installcheck-recursive +-all-recursive-am: config.h +- $(MAKE) $(AM_MAKEFLAGS) all-recursive +- +-install-exec-am: install-binPROGRAMS ++all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h ++installdirs: installdirs-recursive ++installdirs-am: ++ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \ ++ test -z "$$dir" || $(mkdir_p) "$$dir"; \ ++ done ++install: install-recursive + install-exec: install-exec-recursive +- +-install-data-am: install-man install-docDATA + install-data: install-data-recursive ++uninstall: uninstall-recursive + + install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +-install: install-recursive +-uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-docDATA +-uninstall: uninstall-recursive +-all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h +-all-redirect: all-recursive-am +-install-strip: +- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +-installdirs: installdirs-recursive +-installdirs-am: +- $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 \ +- $(DESTDIR)$(docdir) +- + ++installcheck: installcheck-recursive ++install-strip: ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ `test -z '$(STRIP)' || \ ++ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + mostlyclean-generic: + + clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + + distclean-generic: +- -rm -f Makefile $(CONFIG_CLEAN_FILES) +- -rm -f config.cache config.log stamp-h stamp-h[0-9]* ++ -rm -f $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: +-mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ +- mostlyclean-compile mostlyclean-tags \ +- mostlyclean-generic ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++clean: clean-recursive + +-mostlyclean: mostlyclean-recursive ++clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +-clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ +- clean-generic mostlyclean-am ++distclean: distclean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-hdr distclean-tags + +-clean: clean-recursive ++dvi: dvi-recursive + +-distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ +- distclean-tags distclean-generic clean-am ++dvi-am: + +-distclean: distclean-recursive +- -rm -f config.status ++html: html-recursive + +-maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ +- maintainer-clean-compile maintainer-clean-tags \ +- maintainer-clean-generic distclean-am +- @echo "This command is intended for maintainers to use;" +- @echo "it deletes files that may require special tools to rebuild." ++info: info-recursive ++ ++info-am: ++ ++install-data-am: install-docDATA install-man ++ ++install-exec-am: install-binPROGRAMS ++ ++install-info: install-info-recursive ++ ++install-man: install-man1 ++ ++installcheck-am: + + maintainer-clean: maintainer-clean-recursive +- -rm -f config.status ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf $(top_srcdir)/autom4te.cache ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic + +-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +-mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +-mostlyclean-compile distclean-compile clean-compile \ +-maintainer-clean-compile install-man1 uninstall-man1 install-man \ +-uninstall-man uninstall-docDATA install-docDATA install-data-recursive \ +-uninstall-data-recursive install-exec-recursive \ +-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +-all-recursive check-recursive installcheck-recursive info-recursive \ +-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +-dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +-install-exec-am install-exec install-data-am install-data install-am \ +-install uninstall-am uninstall all-redirect all-am all installdirs-am \ +-installdirs mostlyclean-generic distclean-generic clean-generic \ +-maintainer-clean-generic clean mostlyclean distclean maintainer-clean ++mostlyclean: mostlyclean-recursive ++ ++mostlyclean-am: mostlyclean-compile mostlyclean-generic ++ ++pdf: pdf-recursive ++ ++pdf-am: ++ ++ps: ps-recursive ++ ++ps-am: ++ ++uninstall-am: uninstall-binPROGRAMS uninstall-docDATA \ ++ uninstall-info-am uninstall-man ++ ++uninstall-info: uninstall-info-recursive ++ ++uninstall-man: uninstall-man1 ++ ++.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ ++ check-am clean clean-binPROGRAMS clean-generic clean-recursive \ ++ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ ++ dist-shar dist-tarZ dist-zip distcheck distclean \ ++ distclean-compile distclean-generic distclean-hdr \ ++ distclean-recursive distclean-tags distcleancheck distdir \ ++ distuninstallcheck dvi dvi-am html html-am info info-am \ ++ install install-am install-binPROGRAMS install-data \ ++ install-data-am install-docDATA install-exec install-exec-am \ ++ install-info install-info-am install-man install-man1 \ ++ install-strip installcheck installcheck-am installdirs \ ++ installdirs-am maintainer-clean maintainer-clean-generic \ ++ maintainer-clean-recursive mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ ++ tags tags-recursive uninstall uninstall-am \ ++ uninstall-binPROGRAMS uninstall-docDATA uninstall-info-am \ ++ uninstall-man uninstall-man1 + + + debs: +@@ -526,7 +753,6 @@ + log: ChangeLog.usermap + $(CVS2CL) -b --gmt --log-opts "-d'2001-01-01< now'" --window 7200 \ + --usermap ChangeLog.usermap --ignore ChangeLog -f ChangeLog +- + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- chrpath-0.13.orig/acinclude.m4 ++++ chrpath-0.13/acinclude.m4 +@@ -22,7 +22,7 @@ + AC_DEFUN(CHRPATH_LDRPATH_OPTION, + [AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl + case "$target" in +- *-linux*) ++ *-linux*|*-gnu*|*-k*bsd*-gnu) + LDRPATH=-Wl,-rpath, + ;; + *-*-irix*|*-*-osf*) +--- chrpath-0.13.orig/aclocal.m4 ++++ chrpath-0.13/aclocal.m4 +@@ -1,115 +1,916 @@ +-dnl aclocal.m4 generated automatically by aclocal 1.4-p4 ++# generated automatically by aclocal 1.8.5 -*- Autoconf -*- + +-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +-dnl This file is free software; the Free Software Foundation +-dnl gives unlimited permission to copy and/or distribute it, +-dnl with or without modifications, as long as this notice is preserved. +- +-dnl This program is distributed in the hope that it will be useful, +-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +-dnl PARTICULAR PURPOSE. +- +-dnl +-dnl Add macros +-dnl JAPHAR_GREP_CFLAGS +-dnl +- +-dnl +-dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) +-dnl +-dnl From Japhar. Report changes to japhar at hungry.com +-dnl +-AC_DEFUN(JAPHAR_GREP_CFLAGS, +-[case "$CFLAGS" in +-"$1" | "$1 "* | *" $1" | *" $1 "* ) +- ifelse($#, 3, [$3], [:]) +- ;; +-*) +- $2 +- ;; +-esac +-]) +- +-AC_DEFUN(CHRPATH_LDRPATH_OPTION, +-[AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl +-case "$target" in +- *-linux*) +- LDRPATH=-Wl,-rpath, +- ;; +- *-*-irix*|*-*-osf*) +- LDRPATH="-rpath " +- ;; +- *-*-hpux*) +- # Hm, this seem to set runpath on ia64, not rpath +- LDRPATH="-Wl,+b," +- ;; +- *-*-darwin*) +- # No idea how to add rpath/runpath on Darwin +- LDRPATH="" +- ;; +- *) +- LDRPATH="-R " +- ;; +-esac +-AC_SUBST(LDRPATH) +-]) +- +-# Do all the work for Automake. This macro actually does too much -- +-# some checks are only needed if your package does certain things. +-# But this isn't really a big deal. ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ++# Free Software Foundation, Inc. ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++# -*- Autoconf -*- ++# Copyright (C) 2002, 2003 Free Software Foundation, Inc. ++# Generated from amversion.in; do not edit by hand. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ ++# AM_AUTOMAKE_VERSION(VERSION) ++# ---------------------------- ++# Automake X.Y traces this macro to ensure aclocal.m4 has been ++# generated from the m4 files accompanying Automake X.Y. ++AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) ++ ++# AM_SET_CURRENT_AUTOMAKE_VERSION ++# ------------------------------- ++# Call AM_AUTOMAKE_VERSION so it can be traced. ++# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. ++AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], ++ [AM_AUTOMAKE_VERSION([1.8.5])]) ++ ++# AM_AUX_DIR_EXPAND ++ ++# Copyright (C) 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets ++# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to ++# `$srcdir', `$srcdir/..', or `$srcdir/../..'. ++# ++# Of course, Automake must honor this variable whenever it calls a ++# tool from the auxiliary directory. The problem is that $srcdir (and ++# therefore $ac_aux_dir as well) can be either absolute or relative, ++# depending on how configure is run. This is pretty annoying, since ++# it makes $ac_aux_dir quite unusable in subdirectories: in the top ++# source directory, any form will work fine, but in subdirectories a ++# relative path needs to be adjusted first. ++# ++# $ac_aux_dir/missing ++# fails when called from a subdirectory if $ac_aux_dir is relative ++# $top_srcdir/$ac_aux_dir/missing ++# fails if $ac_aux_dir is absolute, ++# fails when called from a subdirectory in a VPATH build with ++# a relative $ac_aux_dir ++# ++# The reason of the latter failure is that $top_srcdir and $ac_aux_dir ++# are both prefixed by $srcdir. In an in-source build this is usually ++# harmless because $srcdir is `.', but things will broke when you ++# start a VPATH build or use an absolute $srcdir. ++# ++# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, ++# iff we strip the leading $srcdir from $ac_aux_dir. That would be: ++# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` ++# and then we would define $MISSING as ++# MISSING="\${SHELL} $am_aux_dir/missing" ++# This will work as long as MISSING is not called from configure, because ++# unfortunately $(top_srcdir) has no meaning in configure. ++# However there are other variables, like CC, which are often used in ++# configure, and could therefore not use this "fixed" $ac_aux_dir. ++# ++# Another solution, used here, is to always expand $ac_aux_dir to an ++# absolute PATH. The drawback is that using absolute paths prevent a ++# configured tree to be moved without reconfiguration. ++ ++AC_DEFUN([AM_AUX_DIR_EXPAND], ++[dnl Rely on autoconf to set up CDPATH properly. ++AC_PREREQ([2.50])dnl ++# expand $ac_aux_dir to an absolute path ++am_aux_dir=`cd $ac_aux_dir && pwd` ++]) ++ ++# AM_CONDITIONAL -*- Autoconf -*- ++ ++# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 6 ++ ++# AM_CONDITIONAL(NAME, SHELL-CONDITION) ++# ------------------------------------- ++# Define a conditional. ++AC_DEFUN([AM_CONDITIONAL], ++[AC_PREREQ(2.52)dnl ++ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ++ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ++AC_SUBST([$1_TRUE]) ++AC_SUBST([$1_FALSE]) ++if $2; then ++ $1_TRUE= ++ $1_FALSE='#' ++else ++ $1_TRUE='#' ++ $1_FALSE= ++fi ++AC_CONFIG_COMMANDS_PRE( ++[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ++ AC_MSG_ERROR([conditional "$1" was never defined. ++Usually this means the macro was only invoked conditionally.]) ++fi])]) ++ ++# serial 7 -*- Autoconf -*- ++ ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++ ++# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ++# written in clear, in which case automake, when reading aclocal.m4, ++# will think it sees a *use*, and therefore will trigger all it's ++# C support machinery. Also note that it means that autoscan, seeing ++# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + +-# serial 1 + +-dnl Usage: +-dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +-AC_DEFUN(AM_INIT_AUTOMAKE, +-[AC_REQUIRE([AC_PROG_INSTALL]) +-PACKAGE=[$1] +-AC_SUBST(PACKAGE) +-VERSION=[$2] +-AC_SUBST(VERSION) +-dnl test to see if srcdir already configured +-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ++# _AM_DEPENDENCIES(NAME) ++# ---------------------- ++# See how the compiler implements dependency checking. ++# NAME is "CC", "CXX", "GCJ", or "OBJC". ++# We try a few techniques and use that to set a single cache variable. ++# ++# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was ++# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular ++# dependency, and given that the user is not expected to run this macro, ++# just rely on AC_PROG_CC. ++AC_DEFUN([_AM_DEPENDENCIES], ++[AC_REQUIRE([AM_SET_DEPDIR])dnl ++AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl ++AC_REQUIRE([AM_MAKE_INCLUDE])dnl ++AC_REQUIRE([AM_DEP_TRACK])dnl ++ ++ifelse([$1], CC, [depcc="$CC" am_compiler_list=], ++ [$1], CXX, [depcc="$CXX" am_compiler_list=], ++ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], ++ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], ++ [depcc="$$1" am_compiler_list=]) ++ ++AC_CACHE_CHECK([dependency style of $depcc], ++ [am_cv_$1_dependencies_compiler_type], ++[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ++ # We make a subdir and do the tests there. Otherwise we can end up ++ # making bogus files that we don't know about and never remove. For ++ # instance it was reported that on HP-UX the gcc test will end up ++ # making a dummy file named `D' -- because `-MD' means `put the output ++ # in D'. ++ mkdir conftest.dir ++ # Copy depcomp to subdir because otherwise we won't find it if we're ++ # using a relative directory. ++ cp "$am_depcomp" conftest.dir ++ cd conftest.dir ++ # We will build objects and dependencies in a subdirectory because ++ # it helps to detect inapplicable dependency modes. For instance ++ # both Tru64's cc and ICC support -MD to output dependencies as a ++ # side effect of compilation, but ICC will put the dependencies in ++ # the current directory while Tru64 will put them in the object ++ # directory. ++ mkdir sub ++ ++ am_cv_$1_dependencies_compiler_type=none ++ if test "$am_compiler_list" = ""; then ++ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` ++ fi ++ for depmode in $am_compiler_list; do ++ # Setup a source with many dependencies, because some compilers ++ # like to wrap large dependency lists on column 80 (with \), and ++ # we should not choose a depcomp mode which is confused by this. ++ # ++ # We need to recreate these files for each test, as the compiler may ++ # overwrite some of them when testing with obscure command lines. ++ # This happens at least with the AIX C compiler. ++ : > sub/conftest.c ++ for i in 1 2 3 4 5 6; do ++ echo '#include "conftst'$i'.h"' >> sub/conftest.c ++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with ++ # Solaris 8's {/usr,}/bin/sh. ++ touch sub/conftst$i.h ++ done ++ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf ++ ++ case $depmode in ++ nosideeffect) ++ # after this tag, mechanisms are not by side-effect, so they'll ++ # only be used when explicitly requested ++ if test "x$enable_dependency_tracking" = xyes; then ++ continue ++ else ++ break ++ fi ++ ;; ++ none) break ;; ++ esac ++ # We check with `-c' and `-o' for the sake of the "dashmstdout" ++ # mode. It turns out that the SunPro C++ compiler does not properly ++ # handle `-M -o', and we need to detect this. ++ if depmode=$depmode \ ++ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ++ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ++ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ ++ >/dev/null 2>conftest.err && ++ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ++ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ++ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then ++ # icc doesn't choke on unknown options, it will just issue warnings ++ # or remarks (even with -Werror). So we grep stderr for any message ++ # that says an option was ignored or not supported. ++ # When given -MP, icc 7.0 and 7.1 complain thusly: ++ # icc: Command line warning: ignoring option '-M'; no argument required ++ # The diagnosis changed in icc 8.0: ++ # icc: Command line remark: option '-MP' not supported ++ if (grep 'ignoring option' conftest.err || ++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else ++ am_cv_$1_dependencies_compiler_type=$depmode ++ break ++ fi ++ fi ++ done ++ ++ cd .. ++ rm -rf conftest.dir ++else ++ am_cv_$1_dependencies_compiler_type=none ++fi ++]) ++AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) ++AM_CONDITIONAL([am__fastdep$1], [ ++ test "x$enable_dependency_tracking" != xno \ ++ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ++]) ++ ++ ++# AM_SET_DEPDIR ++# ------------- ++# Choose a directory name for dependency files. ++# This macro is AC_REQUIREd in _AM_DEPENDENCIES ++AC_DEFUN([AM_SET_DEPDIR], ++[AC_REQUIRE([AM_SET_LEADING_DOT])dnl ++AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ++]) ++ ++ ++# AM_DEP_TRACK ++# ------------ ++AC_DEFUN([AM_DEP_TRACK], ++[AC_ARG_ENABLE(dependency-tracking, ++[ --disable-dependency-tracking speeds up one-time build ++ --enable-dependency-tracking do not reject slow dependency extractors]) ++if test "x$enable_dependency_tracking" != xno; then ++ am_depcomp="$ac_aux_dir/depcomp" ++ AMDEPBACKSLASH='\' ++fi ++AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) ++AC_SUBST([AMDEPBACKSLASH]) ++]) ++ ++# Generate code to set up dependency tracking. -*- Autoconf -*- ++ ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++#serial 2 ++ ++# _AM_OUTPUT_DEPENDENCY_COMMANDS ++# ------------------------------ ++AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], ++[for mf in $CONFIG_FILES; do ++ # Strip MF so we end up with the name of the file. ++ mf=`echo "$mf" | sed -e 's/:.*$//'` ++ # Check whether this is an Automake generated Makefile or not. ++ # We used to match only the files named `Makefile.in', but ++ # some people rename them; so instead we look at the file content. ++ # Grep'ing the first line is not enough: some people post-process ++ # each Makefile.in and add a new line on top of each file to say so. ++ # So let's grep whole file. ++ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then ++ dirpart=`AS_DIRNAME("$mf")` ++ else ++ continue ++ fi ++ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue ++ # Extract the definition of DEP_FILES from the Makefile without ++ # running `make'. ++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` ++ test -z "$DEPDIR" && continue ++ # When using ansi2knr, U may be empty or an underscore; expand it ++ U=`sed -n 's/^U = //p' < "$mf"` ++ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" ++ # We invoke sed twice because it is the simplest approach to ++ # changing $(DEPDIR) to its actual value in the expansion. ++ for file in `sed -n ' ++ /^DEP_FILES = .*\\\\$/ { ++ s/^DEP_FILES = // ++ :loop ++ s/\\\\$// ++ p ++ n ++ /\\\\$/ b loop ++ p ++ } ++ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ ++ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do ++ # Make sure the directory exists. ++ test -f "$dirpart/$file" && continue ++ fdir=`AS_DIRNAME(["$file"])` ++ AS_MKDIR_P([$dirpart/$fdir]) ++ # echo "creating $dirpart/$file" ++ echo '# dummy' > "$dirpart/$file" ++ done ++done ++])# _AM_OUTPUT_DEPENDENCY_COMMANDS ++ ++ ++# AM_OUTPUT_DEPENDENCY_COMMANDS ++# ----------------------------- ++# This macro should only be invoked once -- use via AC_REQUIRE. ++# ++# This code is only required when automatic dependency tracking ++# is enabled. FIXME. This creates each `.P' file that we will ++# need in order to bootstrap the dependency handling code. ++AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ++[AC_CONFIG_COMMANDS([depfiles], ++ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], ++ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ++]) ++ ++# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- ++ ++# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 7 ++ ++# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. ++AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) ++ ++# Do all the work for Automake. -*- Autoconf -*- ++ ++# This macro actually does too much some checks are only needed if ++# your package does certain things. But this isn't really a big deal. ++ ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 11 ++ ++# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) ++# AM_INIT_AUTOMAKE([OPTIONS]) ++# ----------------------------------------------- ++# The call with PACKAGE and VERSION arguments is the old style ++# call (pre autoconf-2.50), which is being phased out. PACKAGE ++# and VERSION should now be passed to AC_INIT and removed from ++# the call to AM_INIT_AUTOMAKE. ++# We support both call styles for the transition. After ++# the next Automake release, Autoconf can make the AC_INIT ++# arguments mandatory, and then we can depend on a new Autoconf ++# release and drop the old call support. ++AC_DEFUN([AM_INIT_AUTOMAKE], ++[AC_PREREQ([2.58])dnl ++dnl Autoconf wants to disallow AM_ names. We explicitly allow ++dnl the ones we care about. ++m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl ++AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl ++AC_REQUIRE([AC_PROG_INSTALL])dnl ++# test to see if srcdir already configured ++if test "`cd $srcdir && pwd`" != "`pwd`" && ++ test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +-ifelse([$3],, +-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +-AC_REQUIRE([AM_SANITY_CHECK]) +-AC_REQUIRE([AC_ARG_PROGRAM]) +-dnl FIXME This is truly gross. +-missing_dir=`cd $ac_aux_dir && pwd` +-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +-AC_REQUIRE([AC_PROG_MAKE_SET])]) ++ ++# test whether we have cygpath ++if test -z "$CYGPATH_W"; then ++ if (cygpath --version) >/dev/null 2>/dev/null; then ++ CYGPATH_W='cygpath -w' ++ else ++ CYGPATH_W=echo ++ fi ++fi ++AC_SUBST([CYGPATH_W]) ++ ++# Define the identity of the package. ++dnl Distinguish between old-style and new-style calls. ++m4_ifval([$2], ++[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl ++ AC_SUBST([PACKAGE], [$1])dnl ++ AC_SUBST([VERSION], [$2])], ++[_AM_SET_OPTIONS([$1])dnl ++ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl ++ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl ++ ++_AM_IF_OPTION([no-define],, ++[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ++ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl ++ ++# Some tools Automake needs. ++AC_REQUIRE([AM_SANITY_CHECK])dnl ++AC_REQUIRE([AC_ARG_PROGRAM])dnl ++AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) ++AM_MISSING_PROG(AUTOCONF, autoconf) ++AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) ++AM_MISSING_PROG(AUTOHEADER, autoheader) ++AM_MISSING_PROG(MAKEINFO, makeinfo) ++AM_MISSING_PROG(AMTAR, tar) ++AM_PROG_INSTALL_SH ++AM_PROG_INSTALL_STRIP ++AC_REQUIRE([AM_PROG_MKDIR_P])dnl ++# We need awk for the "check" target. The system "awk" is bad on ++# some platforms. ++AC_REQUIRE([AC_PROG_AWK])dnl ++AC_REQUIRE([AC_PROG_MAKE_SET])dnl ++AC_REQUIRE([AM_SET_LEADING_DOT])dnl ++ ++_AM_IF_OPTION([no-dependencies],, ++[AC_PROVIDE_IFELSE([AC_PROG_CC], ++ [_AM_DEPENDENCIES(CC)], ++ [define([AC_PROG_CC], ++ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl ++AC_PROVIDE_IFELSE([AC_PROG_CXX], ++ [_AM_DEPENDENCIES(CXX)], ++ [define([AC_PROG_CXX], ++ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ++]) ++]) ++ ++ ++# When config.status generates a header, we must update the stamp-h file. ++# This file resides in the same directory as the config header ++# that is generated. The stamp files are numbered to have different names. ++ ++# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the ++# loop where config.status creates the headers, so we can generate ++# our stamp files there. ++AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], ++[# Compute $1's index in $config_headers. ++_am_stamp_count=1 ++for _am_header in $config_headers :; do ++ case $_am_header in ++ $1 | $1:* ) ++ break ;; ++ * ) ++ _am_stamp_count=`expr $_am_stamp_count + 1` ;; ++ esac ++done ++echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) ++ ++# AM_PROG_INSTALL_SH ++# ------------------ ++# Define $install_sh. ++ ++# Copyright (C) 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++AC_DEFUN([AM_PROG_INSTALL_SH], ++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ++install_sh=${install_sh-"$am_aux_dir/install-sh"} ++AC_SUBST(install_sh)]) ++ ++# -*- Autoconf -*- ++# Copyright (C) 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 1 ++ ++# Check whether the underlying file-system supports filenames ++# with a leading dot. For instance MS-DOS doesn't. ++AC_DEFUN([AM_SET_LEADING_DOT], ++[rm -rf .tst 2>/dev/null ++mkdir .tst 2>/dev/null ++if test -d .tst; then ++ am__leading_dot=. ++else ++ am__leading_dot=_ ++fi ++rmdir .tst 2>/dev/null ++AC_SUBST([am__leading_dot])]) ++ ++# Add --enable-maintainer-mode option to configure. ++# From Jim Meyering ++ ++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 3 ++ ++AC_DEFUN([AM_MAINTAINER_MODE], ++[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ++ dnl maintainer-mode is disabled by default ++ AC_ARG_ENABLE(maintainer-mode, ++[ --enable-maintainer-mode enable make rules and dependencies not useful ++ (and sometimes confusing) to the casual installer], ++ USE_MAINTAINER_MODE=$enableval, ++ USE_MAINTAINER_MODE=no) ++ AC_MSG_RESULT([$USE_MAINTAINER_MODE]) ++ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) ++ MAINT=$MAINTAINER_MODE_TRUE ++ AC_SUBST(MAINT)dnl ++] ++) ++ ++AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) ++ ++# Check to see how 'make' treats includes. -*- Autoconf -*- ++ ++# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 2 ++ ++# AM_MAKE_INCLUDE() ++# ----------------- ++# Check to see how make treats includes. ++AC_DEFUN([AM_MAKE_INCLUDE], ++[am_make=${MAKE-make} ++cat > confinc << 'END' ++am__doit: ++ @echo done ++.PHONY: am__doit ++END ++# If we don't find an include directive, just comment out the code. ++AC_MSG_CHECKING([for style of include used by $am_make]) ++am__include="#" ++am__quote= ++_am_result=none ++# First try GNU make style include. ++echo "include confinc" > confmf ++# We grep out `Entering directory' and `Leaving directory' ++# messages which can occur if `w' ends up in MAKEFLAGS. ++# In particular we don't look at `^make:' because GNU make might ++# be invoked under some other name (usually "gmake"), in which ++# case it prints its new name instead of `make'. ++if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then ++ am__include=include ++ am__quote= ++ _am_result=GNU ++fi ++# Now try BSD make style include. ++if test "$am__include" = "#"; then ++ echo '.include "confinc"' > confmf ++ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then ++ am__include=.include ++ am__quote="\"" ++ _am_result=BSD ++ fi ++fi ++AC_SUBST([am__include]) ++AC_SUBST([am__quote]) ++AC_MSG_RESULT([$_am_result]) ++rm -f confinc confmf ++]) ++ ++# -*- Autoconf -*- ++ ++ ++# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 3 ++ ++# AM_MISSING_PROG(NAME, PROGRAM) ++# ------------------------------ ++AC_DEFUN([AM_MISSING_PROG], ++[AC_REQUIRE([AM_MISSING_HAS_RUN]) ++$1=${$1-"${am_missing_run}$2"} ++AC_SUBST($1)]) ++ ++ ++# AM_MISSING_HAS_RUN ++# ------------------ ++# Define MISSING if not defined so far and test if it supports --run. ++# If it does, set am_missing_run to use it, otherwise, to nothing. ++AC_DEFUN([AM_MISSING_HAS_RUN], ++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ++test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" ++# Use eval to expand $SHELL ++if eval "$MISSING --run true"; then ++ am_missing_run="$MISSING --run " ++else ++ am_missing_run= ++ AC_MSG_WARN([`missing' script is too old or missing]) ++fi ++]) ++ ++# AM_PROG_MKDIR_P ++# --------------- ++# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. ++ ++# Copyright (C) 2003, 2004 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories ++# created by `make install' are always world readable, even if the ++# installer happens to have an overly restrictive umask (e.g. 077). ++# This was a mistake. There are at least two reasons why we must not ++# use `-m 0755': ++# - it causes special bits like SGID to be ignored, ++# - it may be too restrictive (some setups expect 775 directories). ++# ++# Do not use -m 0755 and let people choose whatever they expect by ++# setting umask. ++# ++# We cannot accept any implementation of `mkdir' that recognizes `-p'. ++# Some implementations (such as Solaris 8's) are not thread-safe: if a ++# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' ++# concurrently, both version can detect that a/ is missing, but only ++# one can create it and the other will error out. Consequently we ++# restrict ourselves to GNU make (using the --version option ensures ++# this.) ++AC_DEFUN([AM_PROG_MKDIR_P], ++[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then ++ # Keeping the `.' argument allows $(mkdir_p) to be used without ++ # argument. Indeed, we sometimes output rules like ++ # $(mkdir_p) $(somedir) ++ # where $(somedir) is conditionally defined. ++ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more ++ # expensive solution, as it forces Make to start a sub-shell.) ++ mkdir_p='mkdir -p -- .' ++else ++ # On NextStep and OpenStep, the `mkdir' command does not ++ # recognize any option. It will interpret all options as ++ # directories to create, and then abort because `.' already ++ # exists. ++ for d in ./-p ./--version; ++ do ++ test -d $d && rmdir $d ++ done ++ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. ++ if test -f "$ac_aux_dir/mkinstalldirs"; then ++ mkdir_p='$(mkinstalldirs)' ++ else ++ mkdir_p='$(install_sh) -d' ++ fi ++fi ++AC_SUBST([mkdir_p])]) ++ ++# Helper functions for option handling. -*- Autoconf -*- ++ ++# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 2 ++ ++# _AM_MANGLE_OPTION(NAME) ++# ----------------------- ++AC_DEFUN([_AM_MANGLE_OPTION], ++[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) ++ ++# _AM_SET_OPTION(NAME) ++# ------------------------------ ++# Set option NAME. Presently that only means defining a flag for this option. ++AC_DEFUN([_AM_SET_OPTION], ++[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) ++ ++# _AM_SET_OPTIONS(OPTIONS) ++# ---------------------------------- ++# OPTIONS is a space-separated list of Automake options. ++AC_DEFUN([_AM_SET_OPTIONS], ++[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) ++ ++# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) ++# ------------------------------------------- ++# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. ++AC_DEFUN([_AM_IF_OPTION], ++[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + + # + # Check to make sure that the build environment is sane. + # + +-AC_DEFUN(AM_SANITY_CHECK, ++# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# serial 3 ++ ++# AM_SANITY_CHECK ++# --------------- ++AC_DEFUN([AM_SANITY_CHECK], + [AC_MSG_CHECKING([whether build environment is sane]) + # Just in case + sleep 1 +-echo timestamp > conftestfile ++echo timestamp > conftest.file + # Do `set' in a subshell so we don't clobber the current shell's + # arguments. Must try -L first in case configure is actually a + # symlink; some systems play weird games with the mod time of symlinks + # (eg FreeBSD returns the mod time of the symlink's containing + # directory). + if ( +- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` +- if test "[$]*" = "X"; then ++ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` ++ if test "$[*]" = "X"; then + # -L didn't work. +- set X `ls -t $srcdir/configure conftestfile` ++ set X `ls -t $srcdir/configure conftest.file` + fi +- if test "[$]*" != "X $srcdir/configure conftestfile" \ +- && test "[$]*" != "X conftestfile $srcdir/configure"; then ++ rm -f conftest.file ++ if test "$[*]" != "X $srcdir/configure conftest.file" \ ++ && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a +@@ -119,7 +920,7 @@ + alias in your environment]) + fi + +- test "[$]2" = conftestfile ++ test "$[2]" = conftest.file + ) + then + # Ok. +@@ -128,78 +929,45 @@ + AC_MSG_ERROR([newly created file is older than distributed files! + Check your system clock]) + fi +-rm -f conftest* + AC_MSG_RESULT(yes)]) + +-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +-dnl The program must properly implement --version. +-AC_DEFUN(AM_MISSING_PROG, +-[AC_MSG_CHECKING(for working $2) +-# Run test in a subshell; some versions of sh will print an error if +-# an executable is not found, even if stderr is redirected. +-# Redirect stdin to placate older versions of autoconf. Sigh. +-if ($2 --version) < /dev/null > /dev/null 2>&1; then +- $1=$2 +- AC_MSG_RESULT(found) +-else +- $1="$3/missing $2" +- AC_MSG_RESULT(missing) +-fi +-AC_SUBST($1)]) ++# AM_PROG_INSTALL_STRIP + +-# Like AC_CONFIG_HEADER, but automatically create stamp file. +- +-AC_DEFUN(AM_CONFIG_HEADER, +-[AC_PREREQ([2.12]) +-AC_CONFIG_HEADER([$1]) +-dnl When config.status generates a header, we must update the stamp-h file. +-dnl This file resides in the same directory as the config header +-dnl that is generated. We must strip everything past the first ":", +-dnl and everything past the last "/". +-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +-<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +-<>; do +- case " <<$>>CONFIG_HEADERS " in +- *" <<$>>am_file "*<<)>> +- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx +- ;; +- esac +- am_indx=`expr "<<$>>am_indx" + 1` +-done<<>>dnl>>) +-changequote([,]))]) ++# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +-# Add --enable-maintainer-mode option to configure. +-# From Jim Meyering +- +-# serial 1 +- +-AC_DEFUN(AM_MAINTAINER_MODE, +-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) +- dnl maintainer-mode is disabled by default +- AC_ARG_ENABLE(maintainer-mode, +-[ --enable-maintainer-mode enable make rules and dependencies not useful +- (and sometimes confusing) to the casual installer], +- USE_MAINTAINER_MODE=$enableval, +- USE_MAINTAINER_MODE=no) +- AC_MSG_RESULT($USE_MAINTAINER_MODE) +- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) +- MAINT=$MAINTAINER_MODE_TRUE +- AC_SUBST(MAINT)dnl +-] +-) +- +-# Define a conditional. +- +-AC_DEFUN(AM_CONDITIONAL, +-[AC_SUBST($1_TRUE) +-AC_SUBST($1_FALSE) +-if $2; then +- $1_TRUE= +- $1_FALSE='#' +-else +- $1_TRUE='#' +- $1_FALSE= +-fi]) ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++# 02111-1307, USA. ++ ++# One issue with vendor `install' (even GNU) is that you can't ++# specify the program used to strip binaries. This is especially ++# annoying in cross-compiling environments, where the build's strip ++# is unlikely to handle the host's binaries. ++# Fortunately install-sh will honor a STRIPPROG variable, so we ++# always use install-sh in `make install-strip', and initialize ++# STRIPPROG with the value of the STRIP variable (set by the user). ++AC_DEFUN([AM_PROG_INSTALL_STRIP], ++[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl ++# Installed binaries are usually stripped using `strip' when the user ++# run `make install-strip'. However `strip' might not be the right ++# tool to use in cross-compilation environments, therefore Automake ++# will honor the `STRIP' environment variable to overrule this program. ++dnl Don't test for $cross_compiling = yes, because it might be `maybe'. ++if test "$cross_compiling" != no; then ++ AC_CHECK_TOOL([STRIP], [strip], :) ++fi ++INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" ++AC_SUBST([INSTALL_STRIP_PROGRAM])]) + ++m4_include([acinclude.m4]) +--- chrpath-0.13.orig/config.guess ++++ chrpath-0.13/config.guess +@@ -1,9 +1,9 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +-timestamp='2002-03-20' ++timestamp='2005-08-03' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -17,13 +17,15 @@ + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + ++ + # Originally written by Per Bothner . + # Please send patches to . Submit a context + # diff and a properly formatted ChangeLog entry. +@@ -53,7 +55,7 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO +@@ -66,11 +68,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -88,30 +90,42 @@ + exit 1 + fi + ++trap 'exit 1' 1 2 15 + +-dummy=dummy-$$ +-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 ++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a ++# compiler to aid in system detection is discouraged as it requires ++# temporary files to be created and, as you can see below, it is a ++# headache to deal with in a portable fashion. + +-# CC_FOR_BUILD -- compiler used by this script. + # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still + # use `HOST_CC' if defined, but it is deprecated. + +-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in +- ,,) echo "int dummy(){}" > $dummy.c ; ++# Portable tmp directory creation inspired by the Autoconf team. ++ ++set_cc_for_build=' ++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ++: ${TMPDIR=/tmp} ; ++ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ++dummy=$tmp/dummy ; ++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; ++case $CC_FOR_BUILD,$HOST_CC,$CC in ++ ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do +- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; +- if test $? = 0 ; then ++ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; +- rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac' ++esac ; set_cc_for_build= ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi at noc.rutgers.edu 1994-08-24) +@@ -142,6 +156,7 @@ + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in ++ armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; +@@ -167,141 +182,125 @@ + ;; + esac + # The OS release +- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ # Debian GNU/NetBSD machines have a different userland, and ++ # thus, need a distinct triplet. However, they do not need ++ # kernel version information, so it can be replaced with a ++ # suitable tag, in the style of linux-gnu. ++ case "${UNAME_VERSION}" in ++ Debian*) ++ release='-gnu' ++ ;; ++ *) ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ ;; ++ esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mipseb-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerppc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac ++ # According to Compaq, /usr/sbin/psrinfo has been available on ++ # OSF/1 and Tru64 systems produced since 1995. I hope that ++ # covers most systems running today. This code pipes the CPU ++ # types through head -n 1, so we only detect the type of CPU 0. ++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` ++ case "$ALPHA_CPU_TYPE" in ++ "EV4 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "EV4.5 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "LCA4 (21066/21068)") ++ UNAME_MACHINE="alpha" ;; ++ "EV5 (21164)") ++ UNAME_MACHINE="alphaev5" ;; ++ "EV5.6 (21164A)") ++ UNAME_MACHINE="alphaev56" ;; ++ "EV5.6 (21164PC)") ++ UNAME_MACHINE="alphapca56" ;; ++ "EV5.7 (21164PC)") ++ UNAME_MACHINE="alphapca57" ;; ++ "EV6 (21264)") ++ UNAME_MACHINE="alphaev6" ;; ++ "EV6.7 (21264A)") ++ UNAME_MACHINE="alphaev67" ;; ++ "EV6.8CB (21264C)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8AL (21264B)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8CX (21264D)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.9A (21264/EV69A)") ++ UNAME_MACHINE="alphaev69" ;; ++ "EV7 (21364)") ++ UNAME_MACHINE="alphaev7" ;; ++ "EV7.9 (21364A)") ++ UNAME_MACHINE="alphaev79" ;; ++ esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- cat <$dummy.s +- .data +-\$Lformat: +- .byte 37,100,45,37,120,10,0 # "%d-%x\n" +- +- .text +- .globl main +- .align 4 +- .ent main +-main: +- .frame \$30,16,\$26,0 +- ldgp \$29,0(\$27) +- .prologue 1 +- .long 0x47e03d80 # implver \$0 +- lda \$2,-1 +- .long 0x47e20c21 # amask \$2,\$1 +- lda \$16,\$Lformat +- mov \$0,\$17 +- not \$1,\$18 +- jsr \$26,printf +- ldgp \$29,0(\$26) +- mov 0,\$16 +- jsr \$26,exit +- .end main +-EOF +- eval $set_cc_for_build +- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null +- if test "$?" = 0 ; then +- case `./$dummy` in +- 0-0) +- UNAME_MACHINE="alpha" +- ;; +- 1-0) +- UNAME_MACHINE="alphaev5" +- ;; +- 1-1) +- UNAME_MACHINE="alphaev56" +- ;; +- 1-101) +- UNAME_MACHINE="alphapca56" +- ;; +- 2-303) +- UNAME_MACHINE="alphaev6" +- ;; +- 2-307) +- UNAME_MACHINE="alphaev67" +- ;; +- 2-1307) +- UNAME_MACHINE="alphaev68" +- ;; +- esac +- fi +- rm -f $dummy.s $dummy +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm:riscos:*:*|arm:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -309,25 +308,32 @@ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; ++ exit ;; ++ DRS?6000:unix:4.0:6*) ++ echo sparc-icl-nx6 ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) ++ case `/usr/bin/uname -p` in ++ sparc) echo sparc-icl-nx7; exit ;; ++ esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -336,10 +342,10 @@ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 +@@ -351,10 +357,10 @@ + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac +- exit 0 ;; ++ exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor +@@ -365,37 +371,40 @@ + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 +- exit 0 ;; ++ exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -419,27 +428,33 @@ + exit (-1); + } + EOF +- $CC_FOR_BUILD $dummy.c -o $dummy \ +- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && rm -f $dummy.c $dummy && exit 0 +- rm -f $dummy.c $dummy ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax +- exit 0 ;; ++ exit ;; ++ Motorola:*:4.3:PL8-*) ++ echo powerpc-harris-powermax ++ exit ;; ++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) ++ echo powerpc-harris-powermax ++ exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix +- exit 0 ;; ++ exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 +- exit 0 ;; ++ exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 +- exit 0 ;; ++ exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` +@@ -455,29 +470,29 @@ + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +- exit 0 ;; ++ exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 +- exit 0 ;; ++ exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd +- exit 0 ;; ++ exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` +- exit 0 ;; ++ exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. +- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id +- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix +- exit 0 ;; ++ exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` +@@ -485,7 +500,7 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build +@@ -500,15 +515,18 @@ + exit(0); + } + EOF +- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 +- rm -f $dummy.c $dummy +- echo rs6000-ibm-aix3.2.5 ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi +- exit 0 ;; ++ exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then +@@ -522,28 +540,28 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix +- exit 0 ;; ++ exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 +- exit 0 ;; ++ exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to +- exit 0 ;; # report: romp-ibm BSD 4.3 ++ exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx +- exit 0 ;; ++ exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 +- exit 0 ;; ++ exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd +- exit 0 ;; ++ exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 +- exit 0 ;; ++ exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in +@@ -599,17 +617,37 @@ + exit (0); + } + EOF +- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` +- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi +- rm -f $dummy.c $dummy @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Wed Apr 1 21:52:50 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Wed, 01 Apr 2009 19:52:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4132] csw/mgar/pkg/java/ajcdigester/trunk/Makefile Message-ID: Revision: 4132 http://gar.svn.sourceforge.net/gar/?rev=4132&view=rev Author: wbonnet Date: 2009-04-01 19:52:49 +0000 (Wed, 01 Apr 2009) Log Message: ----------- Remove dependencies to ajccollect Modified Paths: -------------- csw/mgar/pkg/java/ajcdigester/trunk/Makefile Modified: csw/mgar/pkg/java/ajcdigester/trunk/Makefile =================================================================== --- csw/mgar/pkg/java/ajcdigester/trunk/Makefile 2009-04-01 17:01:20 UTC (rev 4131) +++ csw/mgar/pkg/java/ajcdigester/trunk/Makefile 2009-04-01 19:52:49 UTC (rev 4132) @@ -25,7 +25,7 @@ SPKG_DESC_CSWajcdigesterdoc = $(DESCRIPTION) documentation package # Defines dependencies -REQUIRED_PKGS_CSWajcdigester = CSWajclogging CSWajccollect CSWajcbeanutils +REQUIRED_PKGS_CSWajcdigester = CSWajclogging CSWajcbeanutils # Defines package content PKGFILES_CSWajcdigester = $(prefix)/share/doc/$(GARNAME)/License.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 1 21:58:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 01 Apr 2009 19:58:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4133] csw/mgar/pkg/m4/trunk Message-ID: Revision: 4133 http://gar.svn.sourceforge.net/gar/?rev=4133&view=rev Author: dmichelsen Date: 2009-04-01 19:58:08 +0000 (Wed, 01 Apr 2009) Log Message: ----------- m4: Update tp 1.4.13, move to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/m4/trunk/Makefile csw/mgar/pkg/m4/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec Property Changed: ---------------- csw/mgar/pkg/m4/trunk/ Property changes on: csw/mgar/pkg/m4/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/m4/trunk/Makefile =================================================================== --- csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 19:52:49 UTC (rev 4132) +++ csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 19:58:08 UTC (rev 4133) @@ -1,5 +1,5 @@ GARNAME = m4 -GARVERSION = 1.4.11 +GARVERSION = 1.4.13 CATEGORIES = utils DESCRIPTION = GNU m4 Unix macro processor @@ -12,17 +12,19 @@ MASTER_SITES = ftp://ftp.gnu.org/gnu/m4/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWgm4,) +PACKAGE = CSWgm4 + +SPKG_SOURCEURL = http://www.gnu.org/software/m4/ + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +REQUIRED_PKGS = CSWlibsigsegv + CONFIGURE_ARGS = $(DIRPATHS) --program-prefix=g TEST_SCRIPTS = +EXTRA_MERGE_EXCLUDE_FILES = $(libdir)/charset.alias + include gar/category.mk - -post-install: - @rm -f $(DESTDIR)$(libdir)/charset.alias - @rm -f $(DESTDIR)$(sharedstatedir)/info/dir - @$(MAKECOOKIE) Modified: csw/mgar/pkg/m4/trunk/checksums =================================================================== --- csw/mgar/pkg/m4/trunk/checksums 2009-04-01 19:52:49 UTC (rev 4132) +++ csw/mgar/pkg/m4/trunk/checksums 2009-04-01 19:58:08 UTC (rev 4133) @@ -1,2 +1 @@ -988aa098326d5f2b5b5aa4b3efe8d528 download/m4-1.4.11.tar.gz -322e3b9fbcb90ab77c20c60d23757728 download/CSWgm4.gspec +e9e36108b5f9855a82ca4a07ebc0fd2e download/m4-1.4.13.tar.gz Deleted: csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec =================================================================== --- csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec 2009-04-01 19:52:49 UTC (rev 4132) +++ csw/mgar/pkg/m4/trunk/files/CSWgm4.gspec 2009-04-01 19:58:08 UTC (rev 4133) @@ -1,4 +0,0 @@ -%var bitname gm4 -%var pkgname CSWgm4 -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 1 22:23:29 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 01 Apr 2009 20:23:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4134] csw/mgar/pkg/m4/trunk/Makefile Message-ID: Revision: 4134 http://gar.svn.sourceforge.net/gar/?rev=4134&view=rev Author: dmichelsen Date: 2009-04-01 20:23:29 +0000 (Wed, 01 Apr 2009) Log Message: ----------- gm4: Fix package name Modified Paths: -------------- csw/mgar/pkg/m4/trunk/Makefile Modified: csw/mgar/pkg/m4/trunk/Makefile =================================================================== --- csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 19:58:08 UTC (rev 4133) +++ csw/mgar/pkg/m4/trunk/Makefile 2009-04-01 20:23:29 UTC (rev 4134) @@ -13,7 +13,7 @@ MASTER_SITES = ftp://ftp.gnu.org/gnu/m4/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PACKAGE = CSWgm4 +PACKAGES = CSWgm4 SPKG_SOURCEURL = http://www.gnu.org/software/m4/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:00:46 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:00:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4135] csw/mgar/pkg/python/trunk Message-ID: Revision: 4135 http://gar.svn.sourceforge.net/gar/?rev=4135&view=rev Author: valholla Date: 2009-04-01 21:00:45 +0000 (Wed, 01 Apr 2009) Log Message: ----------- bugfix 3510 and 3579 Modified Paths: -------------- csw/mgar/pkg/python/trunk/Makefile csw/mgar/pkg/python/trunk/checksums csw/mgar/pkg/python/trunk/files/modules.diff Modified: csw/mgar/pkg/python/trunk/Makefile =================================================================== --- csw/mgar/pkg/python/trunk/Makefile 2009-04-01 20:23:29 UTC (rev 4134) +++ csw/mgar/pkg/python/trunk/Makefile 2009-04-01 21:00:45 UTC (rev 4135) @@ -47,12 +47,15 @@ DEPENDS += lib/db DEPENDS += lib/gdbm +NOISALIST = 1 +LD_OPTIONS = -R/opt/csw/lib +export LD_OPTIONS CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-shared CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --enable-unicode=ucs4 CONFIGURE_ARGS += --with-fpectl -CONFIGURE_ARGS += LDFLAGS='-R/opt/csw/lib/\$ISALIST -R/opt/csw/lib -L/opt/csw/lib' +CONFIGURE_ARGS += LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib' PKGFILES_CSWidle = $(libdir)/python(\d+(?:\.\d+)*)/idlelib/.* PKGFILES_CSWidle += $(bindir)/idle Modified: csw/mgar/pkg/python/trunk/checksums =================================================================== --- csw/mgar/pkg/python/trunk/checksums 2009-04-01 20:23:29 UTC (rev 4134) +++ csw/mgar/pkg/python/trunk/checksums 2009-04-01 21:00:45 UTC (rev 4135) @@ -3,7 +3,7 @@ 5664b3970307d7d39d8d4061e7dccbb0 download/libpython2.5.so.1.0-isa-i386 42dd6523beb94a805d5764ae1276091c download/faqwiz.diff 33f4094ee46ce865d3973a197f3fb4a0 download/makesetup.diff -5bc782aa89e5bc218ec154c68aa6801b download/modules.diff +ff716b13c8b0965f92550732151e545a download/modules.diff 369c5593c0c0edda03f3c1844788dbee download/multiprocess.diff 05724da367b025ce525de2bb704af6e3 download/pyport.diff 296f46fb4a6a392093120cd86675309b download/setup.diff Modified: csw/mgar/pkg/python/trunk/files/modules.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-01 20:23:29 UTC (rev 4134) +++ csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-01 21:00:45 UTC (rev 4135) @@ -6,10 +6,10 @@ -#_curses _cursesmodule.c -lcurses -ltermcap +*shared* -+_curses _cursesmodule.c -lcurses -ltermcap ++_curses _cursesmodule.c -R/opt/csw/lib -L/opt/csw/lib -lncurses -lxtermcap # Wrapper for the panel library that's part of ncurses and SYSV curses. -#_curses_panel _curses_panel.c -lpanel -lncurses -+_curses_panel _curses_panel.c -lpanel -lcurses -ltermcap ++_curses_panel _curses_panel.c -R/opt/csw/lib -L/opt/csw/lib -lpanel -lncurses -lxtermcap # Generic (SunOS / SVR4) dynamic loading module. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:06:38 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:06:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4136] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4136 http://gar.svn.sourceforge.net/gar/?rev=4136&view=rev Author: valholla Date: 2009-04-01 21:06:38 +0000 (Wed, 01 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/checksums Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:00:45 UTC (rev 4135) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:06:38 UTC (rev 4136) @@ -20,15 +20,15 @@ php5_bin = $(php5_root)/bin php5_lib = $(php5_root)/lib -MASTER_SITES = http://us.php.net/distributions/ +MASTER_SITES = http://us.php.net/distributions/ SPKG_SOURCEURL = http://www.php.net/downloads.php -DISTFILES += $(GARNAME)-$(GARVERSION).tar.bz2 +DISTFILES += $(GARNAME)-$(GARVERSION).tar.bz2 -INSTALL_ENV += INSTALL_ROOT=$(DESTDIR) -PHP5ROOT = $(DESTDIR)$(prefix)/php5 +INSTALL_ENV += INSTALL_ROOT=$(DESTDIR) +PHP5ROOT = $(DESTDIR)$(prefix)/php5 -STRIP_DIRS += $(PHP5ROOT)/lib/php/extensions/*/ -STRIP_DIRS += $(PHP5ROOT)/bin +STRIP_DIRS += $(PHP5ROOT)/lib/php/extensions/*/ +STRIP_DIRS += $(PHP5ROOT)/bin # Auxilliary files DISTFILES += php.ini.CSW phpext pear.conf.CSW @@ -53,6 +53,7 @@ PKGFILES_CSWphp5devel += $(prefix)/php5/man/.* PATCHFILES += configure.diff +#PATCHFILES += php-bug-45557-fix.diff # PHP Extensions EXTDIRLIST = $(shell ls -d extensions/*) @@ -62,6 +63,7 @@ EXTRA_LIB += $(prefix)/bdb44/lib EXTRA_INC += $(prefix)/bdb44/lib +NOISALIST = 1 DISTFILES += fixme.sh CONFIGURE_ARGS += --prefix=$(prefix)/php5 Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:00:45 UTC (rev 4135) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:06:38 UTC (rev 4136) @@ -6,7 +6,8 @@ 89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh 8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall 41ec540885de7c34625768aa1fb9682b download/fixme.sh -ab08e2ba62667bf13fa236099e433e84 download/configure.diff +55567f364408f345f387a749fd73c09e download/configure.diff +a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff 2206431e47c2075c0b9c4a12de5cf791 download/odbc.diff 230126f76ee6400ccf225bb6a8243532 download/pdopgsql.diff 13db46097c9686302bebf160e2d26ed2 download/pgsql.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:07:39 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:07:39 +0000 Subject: [csw-devel] SF.net SVN: gar:[4137] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4137 http://gar.svn.sourceforge.net/gar/?rev=4137&view=rev Author: valholla Date: 2009-04-01 21:07:39 +0000 (Wed, 01 Apr 2009) Log Message: ----------- bugfix 3499 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:06:38 UTC (rev 4136) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:07:39 UTC (rev 4137) @@ -53,7 +53,7 @@ PKGFILES_CSWphp5devel += $(prefix)/php5/man/.* PATCHFILES += configure.diff -#PATCHFILES += php-bug-45557-fix.diff +PATCHFILES += php-bug-45557-fix.diff # PHP Extensions EXTDIRLIST = $(shell ls -d extensions/*) Added: csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff =================================================================== --- csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff (rev 0) +++ csw/mgar/pkg/php5/trunk/files/php-bug-45557-fix.diff 2009-04-01 21:07:39 UTC (rev 4137) @@ -0,0 +1,60 @@ +diff -up php-5.2.9/ext/libxml/libxml.c.visibility php-5.2.9/ext/libxml/libxml.c +--- php-5.2.9/ext/libxml/libxml.c.visibility 2008-01-30 16:31:42.000000000 +0100 ++++ php-5.2.9/ext/libxml/libxml.c 2008-07-18 20:23:14.000000000 +0200 +@@ -523,7 +523,7 @@ static void php_libxml_internal_error_ha + } + } + +-void php_libxml_ctx_error(void *ctx, const char *msg, ...) ++PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...) + { + va_list args; + va_start(args, msg); +@@ -531,7 +531,7 @@ void php_libxml_ctx_error(void *ctx, con + va_end(args); + } + +-void php_libxml_ctx_warning(void *ctx, const char *msg, ...) ++PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...) + { + va_list args; + va_start(args, msg); +@@ -974,7 +974,7 @@ PHP_LIBXML_API int php_libxml_decrement_ + return ret_refcount; + } + +-void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC) ++PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC) + { + if (!node) { + return; +@@ -1010,7 +1010,7 @@ void php_libxml_node_free_resource(xmlNo + } + } + +-void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC) ++PHP_LIBXML_API void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC) + { + int ret_refcount = -1; + xmlNodePtr nodep; +diff -up php-5.2.9/ext/libxml/php_libxml.h.visibility php-5.2.9/ext/libxml/php_libxml.h +--- php-5.2.9/ext/libxml/php_libxml.h.visibility 2008-01-30 12:31:47.000000000 +0100 ++++ php-5.2.9/ext/libxml/php_libxml.h 2008-07-18 20:23:01.000000000 +0200 +@@ -84,12 +84,12 @@ PHP_LIBXML_API int php_libxml_decrement_ + PHP_LIBXML_API xmlNodePtr php_libxml_import_node(zval *object TSRMLS_DC); + PHP_LIBXML_API int php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node export_function); + /* When an explicit freeing of node and children is required */ +-void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC); ++PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC); + /* When object dtor is called as node may still be referenced */ +-void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC); ++PHP_LIBXML_API void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC); + PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...); +-void php_libxml_ctx_warning(void *ctx, const char *msg, ...); +-void php_libxml_ctx_error(void *ctx, const char *msg, ...); ++PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...); ++PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...); + PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s); + PHP_LIBXML_API zval *php_libxml_switch_context(zval *context TSRMLS_DC); + PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg TSRMLS_DC); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:09:11 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:09:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4138] csw/mgar/pkg/php5/trunk/checksums Message-ID: Revision: 4138 http://gar.svn.sourceforge.net/gar/?rev=4138&view=rev Author: valholla Date: 2009-04-01 21:09:11 +0000 (Wed, 01 Apr 2009) Log Message: ----------- checksum file Modified Paths: -------------- csw/mgar/pkg/php5/trunk/checksums Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:07:39 UTC (rev 4137) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-01 21:09:11 UTC (rev 4138) @@ -6,7 +6,7 @@ 89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh 8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall 41ec540885de7c34625768aa1fb9682b download/fixme.sh -55567f364408f345f387a749fd73c09e download/configure.diff +ab08e2ba62667bf13fa236099e433e84 download/configure.diff a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff 2206431e47c2075c0b9c4a12de5cf791 download/odbc.diff 230126f76ee6400ccf225bb6a8243532 download/pdopgsql.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Wed Apr 1 23:10:54 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:10:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4139] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4139 http://gar.svn.sourceforge.net/gar/?rev=4139&view=rev Author: chninkel Date: 2009-04-01 21:10:52 +0000 (Wed, 01 Apr 2009) Log Message: ----------- cadaver: updated to 0.23.2 Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/Makefile csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Removed Paths: ------------- csw/mgar/pkg/cadaver/trunk/files/destdir.patch Property Changed: ---------------- csw/mgar/pkg/cadaver/trunk/ Property changes on: csw/mgar/pkg/cadaver/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cadaver/trunk/Makefile =================================================================== --- csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,5 +1,19 @@ +##################################################################### +# OpenCSW build recipe for cadaver +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = cadaver -GARVERSION = 0.22.5 +GARVERSION = 0.23.2 CATEGORIES = net DESCRIPTION = WebDAV commandline tool @@ -8,6 +22,14 @@ operations (copy/move), collection deletion/creation, property manipulation, and locking operations. endef +PACKAGES = CSWcadav + +REQUIRED_PKGS = CSWggettextrt CSWiconv CSWneon CSWosslrt CSWreadline CSWzlib CSWgcrypt CSWgnutls CSWgpgerr + + + +###### Upstream and opencsw files information ####### + MASTER_SITES = http://www.webdav.org/cadaver/ UPSTREAM_MASTER_SITES = http://www.webdav.org/cadaver/ @@ -15,15 +37,15 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWcadav,prototype depend) +DISTFILES += CSWcadav.prototype DISTFILES += changelog.CSW # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -# add destdir support to makefile -PATCHFILES = destdir.patch +##### Build and installation information ##### + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-nls @@ -31,6 +53,6 @@ include gar/category.mk -post-install: - @ginstall -D $(WORKDIR)/changelog.CSW $(DESTDIR)$(docdir)/$(GARNAME)/changelog.CSW +post-merge: + @ginstall -D $(DOWNLOADDIR)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,6 +1,3 @@ -e9fade983dd7b18d33230967051fcfe0 download/cadaver-0.22.5.tar.gz -e888b8bbd86f5b49d2e8b20b757d1acb download/CSWcadav.gspec +5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -73eefde72fd7d75082c96874f520e78d download/CSWcadav.depend -8fbd80b2a48a1341ced1b9d0919977c7 download/changelog.CSW -bb9626371527a54b88a01eaab55742cf download/destdir.patch +66c58979dc055ea9b233ec8530c41870 download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,3 +1,9 @@ +cadaver (0.23.2,REV=2009.03.30) unstable + + * New upstream version. + + -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 + cadaver (0.22.5,REV=2009.02.15) unstable * Changed gettext dependancy to follow gettext package split Deleted: csw/mgar/pkg/cadaver/trunk/files/destdir.patch =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/destdir.patch 2009-04-01 21:09:11 UTC (rev 4138) +++ csw/mgar/pkg/cadaver/trunk/files/destdir.patch 2009-04-01 21:10:52 UTC (rev 4139) @@ -1,20 +0,0 @@ -diff --speed-large-files --minimal -Nru cadaver-0.22.3.orig/Makefile.in cadaver-0.22.3/Makefile.in ---- cadaver-0.22.3.orig/Makefile.in 2005-12-31 07:57:37.000000000 -0500 -+++ cadaver-0.22.3/Makefile.in 2006-07-11 05:14:56.576413000 -0400 -@@ -71,12 +71,12 @@ - - install: $(TARGET) install-nls - @echo "Creating directories..." -- $(INSTALL) -d $(bindir) -- $(INSTALL) -d $(man1dir) -+ $(INSTALL) -d $(DESTDIR)/$(bindir) -+ $(INSTALL) -d $(DESTDIR)/$(man1dir) - @echo "Installing $(TARGET) executable..." -- $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) -+ $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)/$(bindir)/$(TARGET) - @echo "Installing man page..." -- $(INSTALL_DATA) $(top_srcdir)/doc/cadaver.1 $(man1dir)/cadaver.1 -+ $(INSTALL_DATA) $(top_srcdir)/doc/cadaver.1 $(DESTDIR)/$(man1dir)/cadaver.1 - - install-nls: - @cd po && $(MAKE) install This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:19:28 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:19:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4140] csw/mgar/pkg/mod_python/trunk/Makefile Message-ID: Revision: 4140 http://gar.svn.sourceforge.net/gar/?rev=4140&view=rev Author: valholla Date: 2009-04-01 21:19:28 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isalist fix Modified Paths: -------------- csw/mgar/pkg/mod_python/trunk/Makefile Modified: csw/mgar/pkg/mod_python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-01 21:10:52 UTC (rev 4139) +++ csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-01 21:19:28 UTC (rev 4140) @@ -30,6 +30,7 @@ CONFIGURE_ARGS += --with-flex=$(bindir)/flex-2.5.35 CONFIGURE_ARGS += --with-python-src=../python +NOISALIST = 1 include gar/category.mk DESTDOC = $(DESTDIR)$(docdir)/ap2_modpython This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:20:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:20:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4141] csw/mgar/pkg/cmake/trunk Message-ID: Revision: 4141 http://gar.svn.sourceforge.net/gar/?rev=4141&view=rev Author: valholla Date: 2009-04-01 21:20:21 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix and misc changes Modified Paths: -------------- csw/mgar/pkg/cmake/trunk/Makefile csw/mgar/pkg/cmake/trunk/checksums Property Changed: ---------------- csw/mgar/pkg/cmake/trunk/ Property changes on: csw/mgar/pkg/cmake/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cmake/trunk/Makefile =================================================================== --- csw/mgar/pkg/cmake/trunk/Makefile 2009-04-01 21:19:28 UTC (rev 4140) +++ csw/mgar/pkg/cmake/trunk/Makefile 2009-04-01 21:20:21 UTC (rev 4141) @@ -1,5 +1,5 @@ GARNAME = cmake -GARVERSION = 2.6.2 +GARVERSION = 2.6.3 CATEGORIES = devel DESCRIPTION = Cross-platform make @@ -15,19 +15,25 @@ UPSTREAM_MASTER_SITES = http://www.cmake.org/files/ MASTER_SITES = http://www.cmake.org/files/v2.6/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWcmake) -# We define upstream file regex so we can be notifed of new upstream software release +PACKAGES = CSWcmake +CATALOGNAME_CSWcmake = cmake +SPKG_DESC_CSWcmake = $(DESCRIPTION) + +REQUIRED_PKGS_CSWcmake = CSWcurlrt CSWexpat CSWlibidn CSWoldaprt +REQUIRED_PKGS_CSWcmake += CSWosslrt CSWxmlrpc-c CSWzlib + +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) datadir = /share/$(GARNAME)-$(GARVERSION) sharedstatedir = /share docdir = /share/doc/$(GARNAME)-$(GARVERSION) +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) --docdir=$(docdir) -SKIPTEST = 1 - include gar/category.mk FIXCONFIG_DIRS += $(DESTDIR)$(prefix)/share/$(GARNAME)-$(GARVERSION)/Modules @@ -40,12 +46,29 @@ @echo "Docdir: $(docdir)" # Do NOT include the CSW include pathes here (cd $(WORKSRC); /usr/bin/env \ - CFLAGS="$($(GARCOMPILER)_CC_$(GARFLAVOR))" \ - CXXFLAGS="$($(GARCOMPILER)_CXX_$(GARFLAVOR))" \ + CFLAGS="$($(GARCOMPILER)_CC_$(GARFLAVOR)) -I/opt/csw/include" \ + CXXFLAGS="$($(GARCOMPILER)_CXX_$(GARFLAVOR)) -I/opt/csw/include" \ + LDFLAGS="-L/opt/csw/lib -R/opt/csw/lib/$$ISALIST -R/opt/csw/lib" \ ./bootstrap \ --prefix=$(prefix) \ --datadir=$(datadir) \ --docdir=$(docdir) \ --mandir=/man \ + --system-libs \ ) @$(MAKECOOKIE) + +post-configure-modulated: + @(echo "==> Forcing use of system libraries") + @(echo "=====> curl, expat, xmlrpc, and zlib") + @(perl -i -plne 's/USE_SYSTEM_CURL:BOOL=OFF/USE_SYSTEM_CURL:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @(perl -i -plne 's/USE_SYSTEM_EXPAT:BOOL=OFF/USE_SYSTEM_EXPAT:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @(perl -i -plne 's/USE_SYSTEM_XMLRPC:BOOL=OFF/USE_SYSTEM_XMLRPC:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @(perl -i -plne 's/USE_SYSTEM_ZLIB:BOOL=OFF/USE_SYSTEM_ZLIB:BOOL=ON/' \ + $(WORKSRC)/CMakeCache.txt) + @$(MAKECOOKIE) + + Modified: csw/mgar/pkg/cmake/trunk/checksums =================================================================== --- csw/mgar/pkg/cmake/trunk/checksums 2009-04-01 21:19:28 UTC (rev 4140) +++ csw/mgar/pkg/cmake/trunk/checksums 2009-04-01 21:20:21 UTC (rev 4141) @@ -1,2 +1,2 @@ -9e82aa3beb991aa8e5797cf330618d42 download/cmake-2.6.2.tar.gz +5ba47a94ce276f326abca1fd72a7e7c6 download/cmake-2.6.3.tar.gz 871d267960a850d05e99246f5c438e62 download/CSWcmake.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:20:47 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:20:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4142] csw/mgar/pkg/gd/trunk/Makefile Message-ID: Revision: 4142 http://gar.svn.sourceforge.net/gar/?rev=4142&view=rev Author: valholla Date: 2009-04-01 21:20:47 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gd/trunk/Makefile Modified: csw/mgar/pkg/gd/trunk/Makefile =================================================================== --- csw/mgar/pkg/gd/trunk/Makefile 2009-04-01 21:20:21 UTC (rev 4141) +++ csw/mgar/pkg/gd/trunk/Makefile 2009-04-01 21:20:47 UTC (rev 4142) @@ -25,11 +25,12 @@ REQUIRED_PKGS_CSWgd = CSWexpat CSWfconfig CSWftype2 CSWiconv REQUIRED_PKGS_CSWgd += CSWjpeg CSWpng CSWxpm CSWzlib -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 BUILD64 = 1 -NO_ISAEXEC = 1 +NO_ISAEXEC = 0 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-libiconv-prefix=$(prefix) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:21:07 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:21:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4143] csw/mgar/pkg/gnupg/trunk/Makefile Message-ID: Revision: 4143 http://gar.svn.sourceforge.net/gar/?rev=4143&view=rev Author: valholla Date: 2009-04-01 21:21:07 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gnupg/trunk/Makefile Modified: csw/mgar/pkg/gnupg/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg/trunk/Makefile 2009-04-01 21:20:47 UTC (rev 4142) +++ csw/mgar/pkg/gnupg/trunk/Makefile 2009-04-01 21:21:07 UTC (rev 4143) @@ -19,6 +19,7 @@ # new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +RUNPATHQUOTE = 1 BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:21:34 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:21:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4144] csw/mgar/pkg/gnupg2/trunk/Makefile Message-ID: Revision: 4144 http://gar.svn.sourceforge.net/gar/?rev=4144&view=rev Author: valholla Date: 2009-04-01 21:21:33 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gnupg2/trunk/Makefile Modified: csw/mgar/pkg/gnupg2/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-01 21:21:07 UTC (rev 4143) +++ csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-01 21:21:33 UTC (rev 4144) @@ -25,6 +25,7 @@ # new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +RUNPATHQUOTE = 1 BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) @@ -40,7 +41,7 @@ # Needed for nanosleep() EXTRA_LINKER_FLAGS += -lrt -REQUIRED_PKGS = CSWlibksba CSWgpgerr CSWgcrypt CSWlibassuan +REQUIRED_PKGS = CSWlibksba CSWgpgerr CSWgcrypt REQUIRED_PKGS += CSWcurlrt CSWoldaprt CSWzlib CSWpth CSWlibidn REQUIRED_PKGS += CSWbzip2 CSWreadline CSWggettextrt CSWiconv CSWosslrt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:22:04 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:22:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4145] csw/mgar/pkg/gnupg_minimal/trunk/Makefile Message-ID: Revision: 4145 http://gar.svn.sourceforge.net/gar/?rev=4145&view=rev Author: valholla Date: 2009-04-01 21:22:04 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isafix Modified Paths: -------------- csw/mgar/pkg/gnupg_minimal/trunk/Makefile Modified: csw/mgar/pkg/gnupg_minimal/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg_minimal/trunk/Makefile 2009-04-01 21:21:33 UTC (rev 4144) +++ csw/mgar/pkg/gnupg_minimal/trunk/Makefile 2009-04-01 21:22:04 UTC (rev 4145) @@ -14,7 +14,7 @@ PACKAGES = CSWgnupgminimal CATALOGNAME_CSWgnupgminimal = gnupg_minimal SPKG_DESC_CSWgnupgminimal = $(DESCRIPTION) -#PKGFILES_CSWgnupgminimal = .*/bin/.* +PKGFILES_CSWgnupgminimal = .*/bin/.* REQUIRED_PKGS_CSWgnupgminimal = CSWbzip2 CSWcurlrt CSWggettextrt CSWiconv REQUIRED_PKGS_CSWgnupgminimal += CSWoldaprt CSWreadline CSWzlib @@ -57,6 +57,7 @@ CONFIGURE_ARGS += --disable-dns-pka CONFIGURE_ARGS += --disable-dns-cert +RUNPATHQUOTE = 1 TEST_TARGET = check include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Wed Apr 1 23:43:58 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:43:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4146] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4146 http://gar.svn.sourceforge.net/gar/?rev=4146&view=rev Author: chninkel Date: 2009-04-01 21:43:58 +0000 (Wed, 01 Apr 2009) Log Message: ----------- cadaver: updated changelog Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:22:04 UTC (rev 4145) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-01 21:43:58 UTC (rev 4146) @@ -1,3 +1,3 @@ 5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -66c58979dc055ea9b233ec8530c41870 download/changelog.CSW +af240ee7947d504a6b3e517352d0d883 download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:22:04 UTC (rev 4145) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-01 21:43:58 UTC (rev 4146) @@ -1,6 +1,7 @@ -cadaver (0.23.2,REV=2009.03.30) unstable +cadaver (0.23.2,REV=2009.04.01) unstable * New upstream version. + * Dropped destdir.patch as DESTDIR support has been added upstream. -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:52:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:52:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4147] csw/mgar/pkg/mysql-python/trunk/Makefile Message-ID: Revision: 4147 http://gar.svn.sourceforge.net/gar/?rev=4147&view=rev Author: valholla Date: 2009-04-01 21:52:31 +0000 (Wed, 01 Apr 2009) Log Message: ----------- isalist Modified Paths: -------------- csw/mgar/pkg/mysql-python/trunk/Makefile Modified: csw/mgar/pkg/mysql-python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-01 21:43:58 UTC (rev 4146) +++ csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-01 21:52:31 UTC (rev 4147) @@ -33,7 +33,9 @@ mysql_prefix = $(prefix)/mysql5 mysql_bindir = $(mysql_prefix)/bin -LD_OPTIONS := -R/opt/csw/mysql5/lib/mysql/\$$ISALIST $(LD_OPTIONS) +NOISALIST = 1 +LD_OPTIONS := -R/opt/csw/mysql5/lib/mysql/\$$ISALIST:/opt/csw/lib/\$$ISALIST PATH := $(mysql_bindir):$(PATH) -export LD_OPTIONS PATH +LDFLAGS = +export LD_OPTIONS PATH LDFLAGS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:54:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:54:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4148] csw/mgar/pkg/pysetuptools/trunk/Makefile Message-ID: Revision: 4148 http://gar.svn.sourceforge.net/gar/?rev=4148&view=rev Author: valholla Date: 2009-04-01 21:54:18 +0000 (Wed, 01 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/pysetuptools/trunk/Makefile Modified: csw/mgar/pkg/pysetuptools/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-01 21:52:31 UTC (rev 4147) +++ csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-01 21:54:18 UTC (rev 4148) @@ -3,7 +3,8 @@ CATEGORIES = lang SPKG_SOURCEURL = http://peak.telecommunity.com/DevCenter/setuptools - +PYSETUPTOOLS_VERSION := $(shell echo $(GARVERSION) | sed -e 's/[a-z].*//') +PYSETUPTOOLS_RELEASE := $(shell echo $(GARVERSION) | sed -e 's/^[0-9].[0-9]*//') DESCRIPTION = Distribution Utiltiies for Python define BLURB Distribution Utilities for Python @@ -34,3 +35,6 @@ include gar/category.mk +SPKG_VERSION := $(PYSETUPTOOLS_VERSION) +SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(PYSETUPTOOLS_RELEASE) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:55:22 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:55:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4149] csw/mgar/pkg/pysqlite/trunk/Makefile Message-ID: Revision: 4149 http://gar.svn.sourceforge.net/gar/?rev=4149&view=rev Author: valholla Date: 2009-04-01 21:55:22 +0000 (Wed, 01 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/pysqlite/trunk/Makefile Modified: csw/mgar/pkg/pysqlite/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-01 21:54:18 UTC (rev 4148) +++ csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-01 21:55:22 UTC (rev 4149) @@ -2,6 +2,9 @@ GARVERSION = 1.1.8a CATEGORIES = lang +PYSQLITE_VERSION := $(shell echo $(GARVERSION) | sed -e 's/[a-z]//g') +PYSQLITE_RELEASE := $(shell echo $(GARVERSION) | sed -e 's/[^a-z]//g') + DESCRIPTION = SQLite 1.x support for Python define BLURB SQLite support for Python @@ -21,6 +24,7 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) +NOISALIST = 1 CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = @@ -31,3 +35,6 @@ include gar/category.mk +SPKG_VERSION := $(PYSQLITE_VERSION) +SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(PYSQLITE_RELEASE) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 1 23:57:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 21:57:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4150] csw/mgar/pkg/xchat/trunk/Makefile Message-ID: Revision: 4150 http://gar.svn.sourceforge.net/gar/?rev=4150&view=rev Author: valholla Date: 2009-04-01 21:57:21 +0000 (Wed, 01 Apr 2009) Log Message: ----------- housekeeping Modified Paths: -------------- csw/mgar/pkg/xchat/trunk/Makefile Modified: csw/mgar/pkg/xchat/trunk/Makefile =================================================================== --- csw/mgar/pkg/xchat/trunk/Makefile 2009-04-01 21:55:22 UTC (rev 4149) +++ csw/mgar/pkg/xchat/trunk/Makefile 2009-04-01 21:57:21 UTC (rev 4150) @@ -25,9 +25,12 @@ REQUIRED_PKGS_CSWxchat += CSWggettextrt CSWglib2 CSWgtk2 CSWiconv CSWlibatk REQUIRED_PKGS_CSWxchat += CSWlibcairo CSWlibdbus CSWlibxft2 CSWlibxrender REQUIRED_PKGS_CSWxchat += CSWosslrt CSWpango CSWpng CSWsunmath CSWzlib -REQUIRED_PKGS_CSWxchat-pl = CSWxchat CSWperl -REQUIRED_PKGS_CSWxchat-py = CSWxchat CSWpython -REQUIRED_PKGS_CSWxchat-tcl = CSWxchat CSWtcl +REQUIRED_PKGS_CSWxchat-pl = CSWxchat CSWperl CSWosslrt CSWglib2 +REQUIRED_PKGS_CSWxchat-pl += CSWggettextrt CSWlibntlm +REQUIRED_PKGS_CSWxchat-py = CSWxchat CSWpython CSWosslrt CSWglib2 +REQUIRED_PKGS_CSWxchat-py += CSWggettextrt CSWlibntlm +REQUIRED_PKGS_CSWxchat-tcl = CSWxchat CSWtcl CSWosslrt CSWglib2 +REQUIRED_PKGS_CSWxchat-tcl += CSWggettextrt CSWlibntlm PKGFILES_CSWxchat-pl = $(libdir)/.*/perl.so PKGFILES_CSWxchat-py = $(libdir)/.*/python.so PKGFILES_CSWxchat-tcl = $(libdir)/.*/tcl.so @@ -40,6 +43,8 @@ PATCHFILES = xc286-smallfixes.diff PATCHFILES += xchat26-compiletime.diff +LDFLAGS = +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-openssl=$(prefix) CONFIGURE_ARGS += --enable-threads=solaris This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 00:11:59 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 01 Apr 2009 22:11:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4151] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4151 http://gar.svn.sourceforge.net/gar/?rev=4151&view=rev Author: valholla Date: 2009-04-01 22:11:59 +0000 (Wed, 01 Apr 2009) Log Message: ----------- curses fix Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 21:57:21 UTC (rev 4150) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-01 22:11:59 UTC (rev 4151) @@ -61,7 +61,8 @@ # BerkeleyDB EXTRA_LIB += $(prefix)/bdb44/lib -EXTRA_INC += $(prefix)/bdb44/lib +EXTRA_INC += $(prefix)/bdb44/include +EXTRA_CFLAGS = $(prefix)/include/ncursesw NOISALIST = 1 DISTFILES += fixme.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 03:43:51 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 01:43:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4152] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4152 http://gar.svn.sourceforge.net/gar/?rev=4152&view=rev Author: valholla Date: 2009-04-02 01:43:50 +0000 (Thu, 02 Apr 2009) Log Message: ----------- admin scripts Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-bcmath=shared PKGFILES_CSWphp5bcmath = .*/lib/php/extensions/.*/bcmath.* + +define CSWphp5bcmath_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling bcmath extension" + +perl -i -plne 's|;extension=bcmath.so|extension=bcmath.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5bcmath_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling bcmath extension" + +perl -i -plne 's|extension=bcmath.so|;extension=bcmath.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-bz2=shared,$(prefix) PKGFILES_CSWphp5bz2 = .*/lib/php/extensions/.*/bz2.* + +define CSWphp5bz2_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling bz2 extension" + +perl -i -plne 's|;extension=bz2.so|extension=bz2.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5bz2_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling bz2 extension" + +perl -i -plne 's|extension=bz2.so|;extension=bz2.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-calendar=shared PKGFILES_CSWphp5calendar = .*/lib/php/extensions/.*/calendar.* + +define CSWphp5calendar_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling calendar extension" + +perl -i -plne 's|;extension=calendar.so|extension=calendar.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5calendar_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling calendar extension" + +perl -i -plne 's|extension=calendar.so|;extension=calendar.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-ctype=shared PKGFILES_CSWphp5ctype = .*/lib/php/extensions/.*/ctype.* + +define CSWphp5ctype_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ctype extension" + +perl -i -plne 's|;extension=ctype.so|extension=ctype.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ctype_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ctype extension" + +perl -i -plne 's|extension=ctype.so|;extension=ctype.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-curlwrappers PKGFILES_CSWphp5curl = .*/lib/php/extensions/.*/curl.* + +define CSWphp5curl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling curl extension" + +perl -i -plne 's|;extension=curl.so|extension=curl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5curl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling curl extension" + +perl -i -plne 's|extension=curl.so|;extension=curl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -14,3 +14,30 @@ PKGFILES_CSWphp5dba = .*/lib/php/extensions/.*/dba\.so PKGFILES_CSWphp5dba += .*/lib/php/extensions/.*/dba\.a + +define CSWphp5dba_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling dba extension" + +perl -i -plne 's|;extension=dba.so|extension=dba.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5dba_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling dba extension" + +perl -i -plne 's|extension=dba.so|;extension=dba.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-dbase=shared PKGFILES_CSWphp5dbase = .*/lib/php/extensions/.*/dbase.* + +define CSWphp5dbase_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling dbase extension" + +perl -i -plne 's|;extension=dbase.so|extension=dbase.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5dbase_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling dbase extension" + +perl -i -plne 's|extension=dbase.so|;extension=dbase.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5dom = .*/lib/php/extensions/.*/dom.* + +define CSWphp5dom_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling dom extension" + +perl -i -plne 's|;extension=dom.so|extension=dom.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5dom_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling dom extension" + +perl -i -plne 's|extension=dom.so|;extension=dom.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -12,3 +12,30 @@ export CPPFLAGS PKGFILES_CSWphp5exif = .*/lib/php/extensions/.*/exif.* + +define CSWphp5exif_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling exif extension" + +perl -i -plne 's|;extension=exif.so|extension=exif.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5exif_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling exif extension" + +perl -i -plne 's|extension=exif.so|;extension=exif.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-pcre-dir=$(prefix) PKGFILES_CSWphp5filter = .*/lib/php/extensions/.*/filter.* + +define CSWphp5filter_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling filter extension" + +perl -i -plne 's|;extension=filter.so|extension=filter.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5filter_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling filter extension" + +perl -i -plne 's|extension=filter.so|;extension=filter.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-ftp=shared PKGFILES_CSWphp5ftp = .*/lib/php/extensions/.*/ftp.* + +define CSWphp5ftp_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ftp extension" + +perl -i -plne 's|;extension=ftp.so|extension=ftp.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ftp_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ftp extension" + +perl -i -plne 's|extension=ftp.so|;extension=ftp.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -20,3 +20,30 @@ CONFIGURE_ARGS += --enable-gd-jis-conv PKGFILES_CSWphp5gd = .*/lib/php/extensions/.*/gd.* + +define CSWphp5gd_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling gd extension" + +perl -i -plne 's|;extension=gd.so|extension=gd.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5gd_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling gd extension" + +perl -i -plne 's|extension=gd.so|;extension=gd.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-gettext=shared,$(prefix) PKGFILES_CSWphp5gettext = .*/lib/php/extensions/.*/gettext.* + +define CSWphp5gettext_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling gettext extension" + +perl -i -plne 's|;extension=gettext.so|extension=gettext.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5gettext_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling gettext extension" + +perl -i -plne 's|extension=gettext.so|;extension=gettext.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-gmp=shared,$(prefix) PKGFILES_CSWphp5gmp = .*/lib/php/extensions/.*/gmp.* + +define CSWphp5gmp_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling gmp extension" + +perl -i -plne 's|;extension=gmp.so|extension=gmp.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5gmp_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling gmp extension" + +perl -i -plne 's|extension=gmp.so|;extension=gmp.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-hash=shared PKGFILES_CSWphp5hash = .*/lib/php/extensions/.*/hash.* + +define CSWphp5hash_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling hash extension" + +perl -i -plne 's|;extension=hash.so|extension=hash.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5hash_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling hash extension" + +perl -i -plne 's|extension=hash.so|;extension=hash.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -16,3 +16,30 @@ #PATCHFILES += iconv.diff PKGFILES_CSWphp5iconv = .*/lib/php/extensions/.*/iconv.* + +define CSWphp5iconv_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling iconv extension" + +perl -i -plne 's|;extension=iconv.so|extension=iconv.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5iconv_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling iconv extension" + +perl -i -plne 's|extension=iconv.so|;extension=iconv.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-imap-ssl=$(prefix) PKGFILES_CSWphp5imap = .*/lib/php/extensions/.*/imap.* + +define CSWphp5imap_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling imap extension" + +perl -i -plne 's|;extension=imap.so|extension=imap.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5imap_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling imap extension" + +perl -i -plne 's|extension=imap.so|;extension=imap.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-json=shared PKGFILES_CSWphp5json = .*/lib/php/extensions/.*/json.* + +define CSWphp5json_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling json extension" + +perl -i -plne 's|;extension=json.so|extension=json.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5json_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling json extension" + +perl -i -plne 's|extension=json.so|;extension=json.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,31 @@ CONFIGURE_ARGS += --with-ldap-sasl=$(prefix) PKGFILES_CSWphp5ldap = .*/lib/php/extensions/.*/ldap.* + + +define CSWphp5ldap_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ldap extension" + +perl -i -plne 's|;extension=ldap.so|extension=ldap.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ldap_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ldap extension" + +perl -i -plne 's|extension=ldap.so|;extension=ldap.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --enable-mbregex=shared PKGFILES_CSWphp5mbstring = .*/lib/php/extensions/.*/mbstring.* + +define CSWphp5mbstring_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mbstring extension" + +perl -i -plne 's|;extension=mbstring.so|extension=mbstring.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mbstring_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mbstring extension" + +perl -i -plne 's|extension=mbstring.so|;extension=mbstring.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mcrypt=shared,$(prefix) PKGFILES_CSWphp5mcrypt = .*/lib/php/extensions/.*/mcrypt.* + +define CSWphp5mcrypt_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mcrypt extension" + +perl -i -plne 's|;extension=mcrypt.so|extension=mcrypt.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mcrypt_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mcrypt extension" + +perl -i -plne 's|extension=mcrypt.so|;extension=mcrypt.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mhash=shared,$(prefix) PKGFILES_CSWphp5mhash = .*/lib/php/extensions/.*/mhash.* + +define CSWphp5mhash_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mhash extension" + +perl -i -plne 's|;extension=mhash.so|extension=mhash.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mhash_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mhash extension" + +perl -i -plne 's|extension=mhash.so|;extension=mhash.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mime-magic=shared PKGFILES_CSWphp5mimemagic = .*/lib/php/extensions/.*/mime_magic.* + +define CSWphp5mimemagic_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mime_magic extension" + +perl -i -plne 's|;extension=mime_magic.so|extension=mime_magic.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mimemagic_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mime_magic extension" + +perl -i -plne 's|extension=mime_magic.so|;extension=mime_magic.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mssql=shared,$(prefix) PKGFILES_CSWphp5mssql = .*/lib/php/extensions/.*/mssql.* + +define CSWphp5mssql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mssql extension" + +perl -i -plne 's|;extension=mssql.so|extension=mssql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mssql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mssql extension" + +perl -i -plne 's|extension=mssql.so|;extension=mssql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ PKGFILES_CSWphp5mysql = .*/lib/php/extensions/.*/mysql\.so PKGFILES_CSWphp5mysql += .*/lib/php/extensions/.*/mysql\.a + +define CSWphp5mysql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mysql extension" + +perl -i -plne 's|;extension=mysql.so|extension=mysql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mysql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mysql extension" + +perl -i -plne 's|extension=mysql.so|;extension=mysql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-mysqli=shared,$(bindir)/mysql_config PKGFILES_CSWphp5mysqli = .*/lib/php/extensions/.*/mysqli.* + +define CSWphp5mysqli_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling mysqli extension" + +perl -i -plne 's|;extension=mysqli.so|extension=mysqli.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5mysqli_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling mysqli extension" + +perl -i -plne 's|extension=mysqli.so|;extension=mysqli.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-ncurses=shared,$(prefix) PKGFILES_CSWphp5ncurses = .*/lib/php/extensions/.*/ncurses.* + +define CSWphp5ncurses_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling ncurses extension" + +perl -i -plne 's|;extension=ncurses.so|extension=ncurses.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5ncurses_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling ncurses extension" + +perl -i -plne 's|extension=ncurses.so|;extension=ncurses.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-unixODBC=shared,$(prefix) PKGFILES_CSWphp5odbc = .*/lib/php/extensions/.*/odbc.* + +define CSWphp5odbc_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling odbc extension" + +perl -i -plne 's|;extension=odbc.so|extension=odbc.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5odbc_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling odbc extension" + +perl -i -plne 's|extension=odbc.so|;extension=odbc.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-openssl=shared,$(prefix) PKGFILES_CSWphp5openssl = .*/lib/php/extensions/.*/openssl.* + +define CSWphp5openssl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling openssl extension" + +perl -i -plne 's|;extension=openssl.so|extension=openssl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5openssl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling openssl extension" + +perl -i -plne 's|extension=openssl.so|;extension=openssl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-pcntl=shared PKGFILES_CSWphp5pcntl = .*/lib/php/extensions/.*/pcntl.* + +define CSWphp5pcntl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pcntl extension" + +perl -i -plne 's|;extension=pcntl.so|extension=pcntl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pcntl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pcntl extension" + +perl -i -plne 's|extension=pcntl.so|;extension=pcntl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-zlib-dir=$(prefix) PKGFILES_CSWphp5pdomysql = .*/lib/php/extensions/.*/pdo_mysql.* + +define CSWphp5pdomysql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_mysql extension" + +perl -i -plne 's|;extension=pdo_mysql.so|extension=pdo_mysql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdomysql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_mysql extension" + +perl -i -plne 's|extension=pdo_mysql.so|;extension=pdo_mysql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) PKGFILES_CSWphp5pdoodbc = .*/lib/php/extensions/.*/pdo_odbc.* + +define CSWphp5pdoodbc_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_odbc extension" + +perl -i -plne 's|;extension=pdo_odbc.so|extension=pdo_odbc.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdoodbc_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_odbc extension" + +perl -i -plne 's|extension=pdo_odbc.so|;extension=pdo_odbc.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-pdo-pgsql=shared,$(prefix)/postgresql PKGFILES_CSWphp5pdopgsql = .*/lib/php/extensions/.*/pdo_pgsql.* + +define CSWphp5pdopgsql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_pgsql extension" + +perl -i -plne 's|;extension=pdo_pgsql.so|extension=pdo_pgsql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdopgsql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_pgsql extension" + +perl -i -plne 's|extension=pdo_pgsql.so|;extension=pdo_pgsql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-pdo-sqlite=shared PKGFILES_CSWphp5pdosqlite = .*/lib/php/extensions/.*/pdo_sqlite.* + +define CSWphp5pdosqlite_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo_sqlite extension" + +perl -i -plne 's|;extension=pdo_sqlite.so|extension=pdo_sqlite.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pdosqlite_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo_sqlite extension" + +perl -i -plne 's|extension=pdo_sqlite.so|;extension=pdo_sqlite.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-pgsql=shared,$(prefix)/postgresql PKGFILES_CSWphp5pgsql = .*/lib/php/extensions/.*/pgsql.* + +define CSWphp5pgsql_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pgsql extension" + +perl -i -plne 's|;extension=pgsql.so|extension=pgsql.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pgsql_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pgsql extension" + +perl -i -plne 's|extension=pgsql.so|;extension=pgsql.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-posix=shared PKGFILES_CSWphp5posix = .*/lib/php/extensions/.*/posix.* + +define CSWphp5posix_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling posix extension" + +perl -i -plne 's|;extension=posix.so|extension=posix.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5posix_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling posix extension" + +perl -i -plne 's|extension=posix.so|;extension=posix.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-pspell=shared,$(prefix) PKGFILES_CSWphp5pspell = .*/lib/php/extensions/.*/pspell.* + +define CSWphp5pspell_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pspell extension" + +perl -i -plne 's|;extension=pspell.so|extension=pspell.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5pspell_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pspell extension" + +perl -i -plne 's|extension=pspell.so|;extension=pspell.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-readline=shared,/opt/csw PKGFILES_CSWphp5readline = .*/lib/php/extensions/.*/readline.* + +define CSWphp5readline_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling readline extension" + +perl -i -plne 's|;extension=readline.so|extension=readline.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5readline_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling readline extension" + +perl -i -plne 's|extension=readline.so|;extension=readline.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-session=shared PKGFILES_CSWphp5session = .*/lib/php/extensions/.*/session.* + +define CSWphp5session_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling session extension" + +perl -i -plne 's|;extension=session.so|extension=session.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5session_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling session extension" + +perl -i -plne 's|extension=session.so|;extension=session.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-shmop=shared PKGFILES_CSWphp5shmop = .*/lib/php/extensions/.*/shmop.* + +define CSWphp5shmop_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling shmop extension" + +perl -i -plne 's|;extension=shmop.so|extension=shmop.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5shmop_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling shmop extension" + +perl -i -plne 's|extension=shmop.so|;extension=shmop.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -6,3 +6,29 @@ CONFIGURE_ARGS += --enable-simplexml CONFIGURE_ARGS += --with-libxml-dir=$(prefix) +define CSWphp5simplexml_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling simplexml extension" + +perl -i -plne 's|;extension=simplexml.so|extension=simplexml.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5simplexml_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling simplexml extension" + +perl -i -plne 's|extension=simplexml.so|;extension=simplexml.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-snmp=shared,$(prefix) PKGFILES_CSWphp5snmp = .*/lib/php/extensions/.*/snmp.* + +define CSWphp5snmp_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling snmp extension" + +perl -i -plne 's|;extension=snmp.so|extension=snmp.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5snmp_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling snmp extension" + +perl -i -plne 's|extension=snmp.so|;extension=snmp.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5soap = .*/lib/php/extensions/.*/soap.* + +define CSWphp5soap_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling soap extension" + +perl -i -plne 's|;extension=soap.so|extension=soap.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5soap_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling soap extension" + +perl -i -plne 's|extension=soap.so|;extension=soap.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sockets=shared PKGFILES_CSWphp5sockets = .*/lib/php/extensions/.*/sockets.* + +define CSWphp5sockets_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sockets extension" + +perl -i -plne 's|;extension=sockets.so|extension=sockets.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sockets_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sockets extension" + +perl -i -plne 's|extension=sockets.so|;extension=sockets.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --enable-sqlite-utf8 PKGFILES_CSWphp5sqlite = .*/lib/php/extensions/.*/sqlite.* + +define CSWphp5sqlite_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sqlite extension" + +perl -i -plne 's|;extension=sqlite.so|extension=sqlite.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sqlite_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sqlite extension" + +perl -i -plne 's|extension=sqlite.so|;extension=sqlite.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sysvsem=shared PKGFILES_CSWphp5sysvmsg = .*/lib/php/extensions/.*/sysvmsg.* + +define CSWphp5sysvmsg_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sysvmsg extension" + +perl -i -plne 's|;extension=sysvmsg.so|extension=sysvmsg.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sysvmsg_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sysvmsg extension" + +perl -i -plne 's|extension=sysvmsg.so|;extension=sysvmsg.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sysvsem=shared PKGFILES_CSWphp5sysvsem = .*/lib/php/extensions/.*/sysvsem.* + +define CSWphp5sysvsem_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sysvsem extension" + +perl -i -plne 's|;extension=sysvsem.so|extension=sysvsem.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sysvsem_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sysvsem extension" + +perl -i -plne 's|extension=sysvsem.so|;extension=sysvsem.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-sysvshm=shared PKGFILES_CSWphp5sysvshm = .*/lib/php/extensions/.*/sysvshm.* + +define CSWphp5sysvshm_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling sysvshm extension" + +perl -i -plne 's|;extension=sysvshm.so|extension=sysvshm.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5sysvshm_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling sysvshm extension" + +perl -i -plne 's|extension=sysvshm.so|;extension=sysvshm.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --with-tidy=shared,$(prefix) PKGFILES_CSWphp5tidy = .*/lib/php/extensions/.*/tidy.* + +define CSWphp5tidy_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling tidy extension" + +perl -i -plne 's|;extension=tidy.so|extension=tidy.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5tidy_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling tidy extension" + +perl -i -plne 's|extension=tidy.so|;extension=tidy.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -9,3 +9,30 @@ CONFIGURE_ARGS += --enable-tokenizer=shared PKGFILES_CSWphp5tokenizer = .*/lib/php/extensions/.*/tokenizer.* + +define CSWphp5tokenizer_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling tokenizer extension" + +perl -i -plne 's|;extension=tokenizer.so|extension=tokenizer.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5tokenizer_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling tokenizer extension" + +perl -i -plne 's|extension=tokenizer.so|;extension=tokenizer.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -11,3 +11,30 @@ CONFIGURE_ARGS += --with-libexpat-dir=$(prefix) PKGFILES_CSWphp5wddx = .*/lib/php/extensions/.*/wddx.* + +define CSWphp5wddx_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling wddx extension" + +perl -i -plne 's|;extension=wddx.so|extension=wddx.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5wddx_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling wddx extension" + +perl -i -plne 's|extension=wddx.so|;extension=wddx.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -3,3 +3,4 @@ CONFIGURE_ARGS += --enable-xml CONFIGURE_ARGS += --with-libxml-dir=$(prefix) CONFIGURE_ARGS += --with-libexpat-dir=$(prefix) + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5xmlreader = .*/lib/php/extensions/.*/xmlreader.* + +define CSWphp5xmlreader_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xmlreader extension" + +perl -i -plne 's|;extension=xmlreader.so|extension=xmlreader.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xmlreader_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xmlreader extension" + +perl -i -plne 's|extension=xmlreader.so|;extension=xmlreader.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -12,3 +12,30 @@ CONFIGURE_ARGS += --with-libexpat-dir=$(prefix) PKGFILES_CSWphp5xmlrpc = .*/lib/php/extensions/.*/xmlrpc.* + +define CSWphp5xmlrpc_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xmlrpc extension" + +perl -i -plne 's|;extension=xmlrpc.so|extension=xmlrpc.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xmlrpc_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xmlrpc extension" + +perl -i -plne 's|extension=xmlrpc.so|;extension=xmlrpc.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-libxml-dir=$(prefix) PKGFILES_CSWphp5xmlwriter = .*/lib/php/extensions/.*/xmlwriter.* + +define CSWphp5xmlwriter_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xmlwriter extension" + +perl -i -plne 's|;extension=xmlwriter.so|extension=xmlwriter.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xmlwriter_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xmlwriter extension" + +perl -i -plne 's|extension=xmlwriter.so|;extension=xmlwriter.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-xsl=shared,$(prefix) PKGFILES_CSWphp5xsl = .*/lib/php/extensions/.*/xsl.* + +define CSWphp5xsl_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling xsl extension" + +perl -i -plne 's|;extension=xsl.so|extension=xsl.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5xsl_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling xsl extension" + +perl -i -plne 's|extension=xsl.so|;extension=xsl.so|' ${PHP_INI} + +exit 0 +endef + Modified: csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-01 22:11:59 UTC (rev 4151) +++ csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-02 01:43:50 UTC (rev 4152) @@ -10,3 +10,30 @@ CONFIGURE_ARGS += --with-zlib-dir=$(prefix) PKGFILES_CSWphp5zip = .*/lib/php/extensions/.*/zip.* + +define CSWphp5zip_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling zip extension" + +perl -i -plne 's|;extension=zip.so|extension=zip.so|' ${PHP_INI} + +exit 0 +endef + +define CSWphp5zip_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling zip extension" + +perl -i -plne 's|extension=zip.so|;extension=zip.so|' ${PHP_INI} + +exit 0 +endef + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 07:10:53 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 05:10:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4153] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4153 http://gar.svn.sourceforge.net/gar/?rev=4153&view=rev Author: valholla Date: 2009-04-02 05:10:51 +0000 (Thu, 02 Apr 2009) Log Message: ----------- isalist Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-02 01:43:50 UTC (rev 4152) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-02 05:10:51 UTC (rev 4153) @@ -85,6 +85,8 @@ EXTRA_INC += $(JDK)/include SVNLIB = $(prefix)/lib/svn +NOISALIST = 1 +LDFLAGS = CONFIGURE_ARGS = $(DIRPATHS) --libdir=$(SVNLIB) --libexecdir=$(SVNLIB) CONFIGURE_ARGS += --with-gnu-ld=yes CONFIGURE_ARGS += --with-apr=$(prefix)/apache2/bin/apr-config This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 08:26:32 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 06:26:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4154] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4154 http://gar.svn.sourceforge.net/gar/?rev=4154&view=rev Author: valholla Date: 2009-04-02 06:26:31 +0000 (Thu, 02 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/checksums csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile csw/mgar/pkg/php5/trunk/files/php.ini.CSW Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -62,7 +62,7 @@ # BerkeleyDB EXTRA_LIB += $(prefix)/bdb44/lib EXTRA_INC += $(prefix)/bdb44/include -EXTRA_CFLAGS = $(prefix)/include/ncursesw +EXTRA_CFLAGS = -I$(prefix)/include/ncursesw NOISALIST = 1 DISTFILES += fixme.sh Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-02 06:26:31 UTC (rev 4154) @@ -1,5 +1,5 @@ 280d6cda7f72a4fc6de42fda21ac2db7 download/php-5.2.9.tar.bz2 -72e4984625252fc0a0c2199a820b7563 download/php.ini.CSW +160963de6006c558963e5bc37584bf15 download/php.ini.CSW 90ae3cef3692d7e566c47d89fe39c43d download/phpext d4c93751890b989c5a7b04acb5845fd9 download/pear.conf.CSW de56d3571f4484284d106af158bffc38 download/CSWphp5_ext_enable.sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling bcmath extension" -perl -i -plne 's|;extension=bcmath.so|extension=bcmath.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"bcmath\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=bcmath.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=bcmath.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=bcmath.so|extension=bcmath.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=bcmath.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"bcmath\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling bcmath extension" -perl -i -plne 's|extension=bcmath.so|;extension=bcmath.so|' ${PHP_INI} +perl -i -plne 's|extension=bcmath.so|;extension=bcmath.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"bcmath\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling bz2 extension" -perl -i -plne 's|;extension=bz2.so|extension=bz2.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"bz2\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=bz2.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=bz2.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=bz2.so|extension=bz2.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=bz2.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"bz2\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling bz2 extension" -perl -i -plne 's|extension=bz2.so|;extension=bz2.so|' ${PHP_INI} +perl -i -plne 's|extension=bz2.so|;extension=bz2.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"bz2\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling calendar extension" -perl -i -plne 's|;extension=calendar.so|extension=calendar.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"calendar\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=calendar.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=calendar.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=calendar.so|extension=calendar.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=calendar.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"calendar\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling calendar extension" -perl -i -plne 's|extension=calendar.so|;extension=calendar.so|' ${PHP_INI} +perl -i -plne 's|extension=calendar.so|;extension=calendar.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"calendar\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ctype extension" -perl -i -plne 's|;extension=ctype.so|extension=ctype.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ctype\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ctype.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ctype.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ctype.so|extension=ctype.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ctype.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ctype\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ctype extension" -perl -i -plne 's|extension=ctype.so|;extension=ctype.so|' ${PHP_INI} +perl -i -plne 's|extension=ctype.so|;extension=ctype.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ctype\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling curl extension" -perl -i -plne 's|;extension=curl.so|extension=curl.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"curl\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=curl.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=curl.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=curl.so|extension=curl.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=curl.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"curl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling curl extension" -perl -i -plne 's|extension=curl.so|;extension=curl.so|' ${PHP_INI} +perl -i -plne 's|extension=curl.so|;extension=curl.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"curl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -23,8 +23,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling dba extension" -perl -i -plne 's|;extension=dba.so|extension=dba.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"dba\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=dba.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=dba.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=dba.so|extension=dba.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=dba.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"dba\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -36,8 +66,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling dba extension" -perl -i -plne 's|extension=dba.so|;extension=dba.so|' ${PHP_INI} +perl -i -plne 's|extension=dba.so|;extension=dba.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"dba\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling dbase extension" -perl -i -plne 's|;extension=dbase.so|extension=dbase.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"dbase\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=dbase.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=dbase.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=dbase.so|extension=dbase.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=dbase.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"dbase\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling dbase extension" -perl -i -plne 's|extension=dbase.so|;extension=dbase.so|' ${PHP_INI} +perl -i -plne 's|extension=dbase.so|;extension=dbase.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"dbase\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling dom extension" -perl -i -plne 's|;extension=dom.so|extension=dom.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"dom\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=dom.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=dom.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=dom.so|extension=dom.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=dom.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"dom\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling dom extension" -perl -i -plne 's|extension=dom.so|;extension=dom.so|' ${PHP_INI} +perl -i -plne 's|extension=dom.so|;extension=dom.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"dom\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -21,8 +21,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling exif extension" -perl -i -plne 's|;extension=exif.so|extension=exif.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"exif\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=exif.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=exif.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=exif.so|extension=exif.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=exif.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"exif\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -34,8 +64,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling exif extension" -perl -i -plne 's|extension=exif.so|;extension=exif.so|' ${PHP_INI} +perl -i -plne 's|extension=exif.so|;extension=exif.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"exif\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_filter/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -1,39 +1,5 @@ PHP5EXT_NAME = filter -PACKAGES += CSWphp5filter - -CATALOGNAME_CSWphp5filter = php5_filter -SPKG_DESC_CSWphp5filter = filter Extention for PHP5 -REQUIRED_PKGS_CSWphp5filter = CSWphp5 CSWpcrert - CONFIGURE_ARGS += --enable-filter=shared CONFIGURE_ARGS += --with-pcre-dir=$(prefix) -PKGFILES_CSWphp5filter = .*/lib/php/extensions/.*/filter.* - -define CSWphp5filter_postinstall -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Post Install <===]" -echo " ===> Enabling filter extension" - -perl -i -plne 's|;extension=filter.so|extension=filter.so|' ${PHP_INI} - -exit 0 -endef - -define CSWphp5filter_preremove -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Pre Remove <===]" -echo " ===> Disabling filter extension" - -perl -i -plne 's|extension=filter.so|;extension=filter.so|' ${PHP_INI} - -exit 0 -endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ftp extension" -perl -i -plne 's|;extension=ftp.so|extension=ftp.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ftp\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ftp.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ftp.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ftp.so|extension=ftp.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ftp.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ftp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ftp extension" -perl -i -plne 's|extension=ftp.so|;extension=ftp.so|' ${PHP_INI} +perl -i -plne 's|extension=ftp.so|;extension=ftp.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ftp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -29,8 +29,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling gd extension" -perl -i -plne 's|;extension=gd.so|extension=gd.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"gd\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=gd.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=gd.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=gd.so|extension=gd.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=gd.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"gd\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -42,8 +72,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling gd extension" -perl -i -plne 's|extension=gd.so|;extension=gd.so|' ${PHP_INI} +perl -i -plne 's|extension=gd.so|;extension=gd.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"gd\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling gettext extension" -perl -i -plne 's|;extension=gettext.so|extension=gettext.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"gettext\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=gettext.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=gettext.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=gettext.so|extension=gettext.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=gettext.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"gettext\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling gettext extension" -perl -i -plne 's|extension=gettext.so|;extension=gettext.so|' ${PHP_INI} +perl -i -plne 's|extension=gettext.so|;extension=gettext.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"gettext\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling gmp extension" -perl -i -plne 's|;extension=gmp.so|extension=gmp.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"gmp\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=gmp.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=gmp.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=gmp.so|extension=gmp.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=gmp.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"gmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling gmp extension" -perl -i -plne 's|extension=gmp.so|;extension=gmp.so|' ${PHP_INI} +perl -i -plne 's|extension=gmp.so|;extension=gmp.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"gmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling hash extension" -perl -i -plne 's|;extension=hash.so|extension=hash.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"hash\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=hash.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=hash.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=hash.so|extension=hash.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=hash.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"hash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling hash extension" -perl -i -plne 's|extension=hash.so|;extension=hash.so|' ${PHP_INI} +perl -i -plne 's|extension=hash.so|;extension=hash.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"hash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -25,8 +25,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling iconv extension" -perl -i -plne 's|;extension=iconv.so|extension=iconv.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"iconv\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=iconv.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=iconv.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=iconv.so|extension=iconv.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=iconv.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"iconv\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -38,8 +68,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling iconv extension" -perl -i -plne 's|extension=iconv.so|;extension=iconv.so|' ${PHP_INI} +perl -i -plne 's|extension=iconv.so|;extension=iconv.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"iconv\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling imap extension" -perl -i -plne 's|;extension=imap.so|extension=imap.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"imap\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=imap.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=imap.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=imap.so|extension=imap.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=imap.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"imap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling imap extension" -perl -i -plne 's|extension=imap.so|;extension=imap.so|' ${PHP_INI} +perl -i -plne 's|extension=imap.so|;extension=imap.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"imap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling json extension" -perl -i -plne 's|;extension=json.so|extension=json.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"json\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=json.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=json.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=json.so|extension=json.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=json.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"json\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling json extension" -perl -i -plne 's|extension=json.so|;extension=json.so|' ${PHP_INI} +perl -i -plne 's|extension=json.so|;extension=json.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"json\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ldap extension" -perl -i -plne 's|;extension=ldap.so|extension=ldap.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ldap\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ldap.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ldap.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ldap.so|extension=ldap.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ldap.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ldap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ldap extension" -perl -i -plne 's|extension=ldap.so|;extension=ldap.so|' ${PHP_INI} +perl -i -plne 's|extension=ldap.so|;extension=ldap.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ldap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mbstring extension" -perl -i -plne 's|;extension=mbstring.so|extension=mbstring.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mbstring\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mbstring.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mbstring.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mbstring.so|extension=mbstring.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mbstring.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mbstring\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mbstring extension" -perl -i -plne 's|extension=mbstring.so|;extension=mbstring.so|' ${PHP_INI} +perl -i -plne 's|extension=mbstring.so|;extension=mbstring.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mbstring\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mcrypt extension" -perl -i -plne 's|;extension=mcrypt.so|extension=mcrypt.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mcrypt\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mcrypt.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mcrypt.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mcrypt.so|extension=mcrypt.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mcrypt.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mcrypt\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mcrypt extension" -perl -i -plne 's|extension=mcrypt.so|;extension=mcrypt.so|' ${PHP_INI} +perl -i -plne 's|extension=mcrypt.so|;extension=mcrypt.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mcrypt\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mhash extension" -perl -i -plne 's|;extension=mhash.so|extension=mhash.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mhash\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mhash.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mhash.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mhash.so|extension=mhash.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mhash.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mhash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mhash extension" -perl -i -plne 's|extension=mhash.so|;extension=mhash.so|' ${PHP_INI} +perl -i -plne 's|extension=mhash.so|;extension=mhash.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mhash\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -10,7 +10,7 @@ PKGFILES_CSWphp5mimemagic = .*/lib/php/extensions/.*/mime_magic.* -define CSWphp5mimemagic_postinstall +define CSWphp5mime_magic_postinstall #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini @@ -18,12 +18,42 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mime_magic extension" -perl -i -plne 's|;extension=mime_magic.so|extension=mime_magic.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mime_magic\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mime_magic.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mime_magic.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mime_magic.so|extension=mime_magic.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mime_magic.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mime_magic\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef -define CSWphp5mimemagic_preremove +define CSWphp5mime_magic_preremove #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mime_magic extension" -perl -i -plne 's|extension=mime_magic.so|;extension=mime_magic.so|' ${PHP_INI} +perl -i -plne 's|extension=mime_magic.so|;extension=mime_magic.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mime_magic\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mssql extension" -perl -i -plne 's|;extension=mssql.so|extension=mssql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mssql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mssql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mssql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mssql.so|extension=mssql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mssql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mssql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mssql extension" -perl -i -plne 's|extension=mssql.so|;extension=mssql.so|' ${PHP_INI} +perl -i -plne 's|extension=mssql.so|;extension=mssql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mssql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mysql extension" -perl -i -plne 's|;extension=mysql.so|extension=mysql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mysql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mysql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mysql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mysql.so|extension=mysql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mysql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mysql extension" -perl -i -plne 's|extension=mysql.so|;extension=mysql.so|' ${PHP_INI} +perl -i -plne 's|extension=mysql.so|;extension=mysql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling mysqli extension" -perl -i -plne 's|;extension=mysqli.so|extension=mysqli.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"mysqli\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=mysqli.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=mysqli.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=mysqli.so|extension=mysqli.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=mysqli.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"mysqli\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling mysqli extension" -perl -i -plne 's|extension=mysqli.so|;extension=mysqli.so|' ${PHP_INI} +perl -i -plne 's|extension=mysqli.so|;extension=mysqli.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"mysqli\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling ncurses extension" -perl -i -plne 's|;extension=ncurses.so|extension=ncurses.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"ncurses\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=ncurses.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=ncurses.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=ncurses.so|extension=ncurses.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=ncurses.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"ncurses\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling ncurses extension" -perl -i -plne 's|extension=ncurses.so|;extension=ncurses.so|' ${PHP_INI} +perl -i -plne 's|extension=ncurses.so|;extension=ncurses.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"ncurses\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling odbc extension" -perl -i -plne 's|;extension=odbc.so|extension=odbc.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"odbc\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=odbc.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=odbc.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=odbc.so|extension=odbc.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=odbc.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"odbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling odbc extension" -perl -i -plne 's|extension=odbc.so|;extension=odbc.so|' ${PHP_INI} +perl -i -plne 's|extension=odbc.so|;extension=odbc.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"odbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling openssl extension" -perl -i -plne 's|;extension=openssl.so|extension=openssl.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"openssl\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=openssl.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=openssl.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=openssl.so|extension=openssl.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=openssl.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"openssl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling openssl extension" -perl -i -plne 's|extension=openssl.so|;extension=openssl.so|' ${PHP_INI} +perl -i -plne 's|extension=openssl.so|;extension=openssl.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"openssl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling pcntl extension" -perl -i -plne 's|;extension=pcntl.so|extension=pcntl.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pcntl\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pcntl.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pcntl.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pcntl.so|extension=pcntl.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pcntl.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pcntl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling pcntl extension" -perl -i -plne 's|extension=pcntl.so|;extension=pcntl.so|' ${PHP_INI} +perl -i -plne 's|extension=pcntl.so|;extension=pcntl.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pcntl\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -17,10 +17,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_mysql extension" +echo " ===> Enabling pdomysql extension" -perl -i -plne 's|;extension=pdo_mysql.so|extension=pdo_mysql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdomysql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdomysql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdomysql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdomysql.so|extension=pdomysql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdomysql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdomysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -30,10 +60,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_mysql extension" +echo " ===> Disabling pdomysql extension" -perl -i -plne 's|extension=pdo_mysql.so|;extension=pdo_mysql.so|' ${PHP_INI} +perl -i -plne 's|extension=pdomysql.so|;extension=pdomysql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdomysql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -16,10 +16,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_odbc extension" +echo " ===> Enabling pdoodbc extension" -perl -i -plne 's|;extension=pdo_odbc.so|extension=pdo_odbc.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdoodbc\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdoodbc.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdoodbc.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdoodbc.so|extension=pdoodbc.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdoodbc.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdoodbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -29,10 +59,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_odbc extension" +echo " ===> Disabling pdoodbc extension" -perl -i -plne 's|extension=pdo_odbc.so|;extension=pdo_odbc.so|' ${PHP_INI} +perl -i -plne 's|extension=pdoodbc.so|;extension=pdoodbc.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdoodbc\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,10 +18,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_pgsql extension" +echo " ===> Enabling pdopgsql extension" -perl -i -plne 's|;extension=pdo_pgsql.so|extension=pdo_pgsql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdopgsql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdopgsql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdopgsql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdopgsql.so|extension=pdopgsql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdopgsql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdopgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,10 +61,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_pgsql extension" +echo " ===> Disabling pdopgsql extension" -perl -i -plne 's|extension=pdo_pgsql.so|;extension=pdo_pgsql.so|' ${PHP_INI} +perl -i -plne 's|extension=pdopgsql.so|;extension=pdopgsql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdopgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -16,10 +16,40 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdo_sqlite extension" +echo " ===> Enabling pdosqlite extension" -perl -i -plne 's|;extension=pdo_sqlite.so|extension=pdo_sqlite.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pdosqlite\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdosqlite.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pdosqlite.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdosqlite.so|extension=pdosqlite.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdosqlite.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pdosqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -29,10 +59,18 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdo_sqlite extension" +echo " ===> Disabling pdosqlite extension" -perl -i -plne 's|extension=pdo_sqlite.so|;extension=pdo_sqlite.so|' ${PHP_INI} +perl -i -plne 's|extension=pdosqlite.so|;extension=pdosqlite.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pdosqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -20,8 +20,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling pgsql extension" -perl -i -plne 's|;extension=pgsql.so|extension=pgsql.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pgsql\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pgsql.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pgsql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pgsql.so|extension=pgsql.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pgsql.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -33,8 +63,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling pgsql extension" -perl -i -plne 's|extension=pgsql.so|;extension=pgsql.so|' ${PHP_INI} +perl -i -plne 's|extension=pgsql.so|;extension=pgsql.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pgsql\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling posix extension" -perl -i -plne 's|;extension=posix.so|extension=posix.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"posix\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=posix.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=posix.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=posix.so|extension=posix.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=posix.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"posix\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling posix extension" -perl -i -plne 's|extension=posix.so|;extension=posix.so|' ${PHP_INI} +perl -i -plne 's|extension=posix.so|;extension=posix.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"posix\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling pspell extension" -perl -i -plne 's|;extension=pspell.so|extension=pspell.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"pspell\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pspell.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=pspell.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pspell.so|extension=pspell.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pspell.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"pspell\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling pspell extension" -perl -i -plne 's|extension=pspell.so|;extension=pspell.so|' ${PHP_INI} +perl -i -plne 's|extension=pspell.so|;extension=pspell.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"pspell\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling readline extension" -perl -i -plne 's|;extension=readline.so|extension=readline.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"readline\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=readline.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=readline.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=readline.so|extension=readline.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=readline.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"readline\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling readline extension" -perl -i -plne 's|extension=readline.so|;extension=readline.so|' ${PHP_INI} +perl -i -plne 's|extension=readline.so|;extension=readline.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"readline\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -1 +1,65 @@ @ ( echo "==> Not configuring recode see README in extensions/php5_recode" ) +define CSWphp5recode_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling recode extension" + +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"recode\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=recode.so +****************************************************************************** +_EOF_ +exit 0 +fi + +if grep 'extension=recode.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=recode.so|extension=recode.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=recode.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"recode\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + +exit 0 +endef + +define CSWphp5recode_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling recode extension" + +perl -i -plne 's|extension=recode.so|;extension=recode.so|' $${PHP_INI} + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"recode\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + +exit 0 +endef Modified: csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling session extension" -perl -i -plne 's|;extension=session.so|extension=session.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"session\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=session.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=session.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=session.so|extension=session.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=session.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"session\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling session extension" -perl -i -plne 's|extension=session.so|;extension=session.so|' ${PHP_INI} +perl -i -plne 's|extension=session.so|;extension=session.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"session\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling shmop extension" -perl -i -plne 's|;extension=shmop.so|extension=shmop.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"shmop\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=shmop.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=shmop.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=shmop.so|extension=shmop.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=shmop.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"shmop\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling shmop extension" -perl -i -plne 's|extension=shmop.so|;extension=shmop.so|' ${PHP_INI} +perl -i -plne 's|extension=shmop.so|;extension=shmop.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"shmop\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -14,8 +14,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling simplexml extension" -perl -i -plne 's|;extension=simplexml.so|extension=simplexml.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"simplexml\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=simplexml.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=simplexml.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=simplexml.so|extension=simplexml.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=simplexml.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"simplexml\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -27,8 +57,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling simplexml extension" -perl -i -plne 's|extension=simplexml.so|;extension=simplexml.so|' ${PHP_INI} +perl -i -plne 's|extension=simplexml.so|;extension=simplexml.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"simplexml\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling snmp extension" -perl -i -plne 's|;extension=snmp.so|extension=snmp.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"snmp\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=snmp.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=snmp.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=snmp.so|extension=snmp.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=snmp.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"snmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling snmp extension" -perl -i -plne 's|extension=snmp.so|;extension=snmp.so|' ${PHP_INI} +perl -i -plne 's|extension=snmp.so|;extension=snmp.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"snmp\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling soap extension" -perl -i -plne 's|;extension=soap.so|extension=soap.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"soap\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=soap.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=soap.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=soap.so|extension=soap.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=soap.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"soap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling soap extension" -perl -i -plne 's|extension=soap.so|;extension=soap.so|' ${PHP_INI} +perl -i -plne 's|extension=soap.so|;extension=soap.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"soap\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -18,8 +18,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling sockets extension" -perl -i -plne 's|;extension=sockets.so|extension=sockets.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"sockets\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=sockets.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=sockets.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=sockets.so|extension=sockets.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=sockets.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"sockets\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -31,8 +61,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling sockets extension" -perl -i -plne 's|extension=sockets.so|;extension=sockets.so|' ${PHP_INI} +perl -i -plne 's|extension=sockets.so|;extension=sockets.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"sockets\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 05:10:51 UTC (rev 4153) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 06:26:31 UTC (rev 4154) @@ -19,8 +19,38 @@ echo "[===> Running Post Install <===]" echo " ===> Enabling sqlite extension" -perl -i -plne 's|;extension=sqlite.so|extension=sqlite.so|' ${PHP_INI} +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension \"sqlite\" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=sqlite.so +****************************************************************************** +_EOF_ +exit 0 +fi +if grep 'extension=sqlite.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=sqlite.so|extension=sqlite.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=sqlite.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension \"sqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + exit 0 endef @@ -32,8 +62,16 @@ echo "[===> Running Pre Remove <===]" echo " ===> Disabling sqlite extension" -perl -i -plne 's|extension=sqlite.so|;extension=sqlite.so|' ${PHP_INI} +perl -i -plne 's|extension=sqlite.so|;extension=sqlite.so|' $${PHP_INI} +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension \"sqlite\" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + exit 0 endef - Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 10:57:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 08:57:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4155] csw/mgar/pkg/figlet/trunk Message-ID: Revision: 4155 http://gar.svn.sourceforge.net/gar/?rev=4155&view=rev Author: dmichelsen Date: 2009-04-02 08:57:40 +0000 (Thu, 02 Apr 2009) Log Message: ----------- figlet: Make sure GAR CFLAGS are used, dynamic gspec Modified Paths: -------------- csw/mgar/pkg/figlet/trunk/Makefile csw/mgar/pkg/figlet/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec Property Changed: ---------------- csw/mgar/pkg/figlet/trunk/ Property changes on: csw/mgar/pkg/figlet/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/figlet/trunk/Makefile =================================================================== --- csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 08:57:40 UTC (rev 4155) @@ -17,8 +17,11 @@ MASTER_SITES += ftp://ftp.figlet.org/pub/figlet/fonts/ # ours.tar.gz is already in the figlet distribution DISTFILES += contributed.tar.gz international.tar.gz ms-dos.tar.gz -DISTFILES += $(call admfiles,CSWfiglet) +SPKG_SOURCEURL = http://www.figlet.org + +LICENSE = LICENSE + DISTNAME = $(GARNAME)$(RELEASE) # We define upstream file regex so we can be notifed of new upstream software release @@ -30,7 +33,7 @@ APPDIR = $(sharedstatedir)/$(GARNAME) DEFAULTFONTDIR = $(APPDIR)/fonts -BUILD_OVERRIDE_DIRS = CC DEFAULTFONTDIR +BUILD_OVERRIDE_DIRS = CC CFLAGS DEFAULTFONTDIR # FIGlet doesn't have tests TEST_SCRIPTS = Modified: csw/mgar/pkg/figlet/trunk/checksums =================================================================== --- csw/mgar/pkg/figlet/trunk/checksums 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/figlet/trunk/checksums 2009-04-02 08:57:40 UTC (rev 4155) @@ -1,5 +1,4 @@ -9fcf4f1651b8e6d3f56f1ef665285b2e download/figlet222.tar.gz +5f84ad52d092d5db4ad5916df767646b download/figlet222.tar.gz 6e2dec4499f7a7fe178522e02e0b6cd1 download/contributed.tar.gz b2d53f7e251014adcdb4d407c47f90ef download/international.tar.gz 49aa57ab989e8d952be037414b0bbbe4 download/ms-dos.tar.gz -8ccf6bb63ce609750b65ba1e74aa2ca2 download/CSWfiglet.gspec Deleted: csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec =================================================================== --- csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/figlet/trunk/files/CSWfiglet.gspec 2009-04-02 08:57:40 UTC (rev 4155) @@ -1,4 +0,0 @@ -%var bitname figlet -%var pkgname CSWfiglet -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 10:58:46 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 08:58:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4156] csw/mgar/gar/v2/gar.lib.mk Message-ID: Revision: 4156 http://gar.svn.sourceforge.net/gar/?rev=4156&view=rev Author: dmichelsen Date: 2009-04-02 08:58:46 +0000 (Thu, 02 Apr 2009) Log Message: ----------- mGAR v2: Increase wget timeout to honour slow FTP sites Modified Paths: -------------- csw/mgar/gar/v2/gar.lib.mk Modified: csw/mgar/gar/v2/gar.lib.mk =================================================================== --- csw/mgar/gar/v2/gar.lib.mk 2009-04-02 08:57:40 UTC (rev 4155) +++ csw/mgar/gar/v2/gar.lib.mk 2009-04-02 08:58:46 UTC (rev 4156) @@ -90,16 +90,16 @@ # download an http URL (colons omitted) http//%: - @wget $(WGET_OPTS) -T 10 -c -P $(PARTIALDIR) http://$* + @wget $(WGET_OPTS) -T 30 -c -P $(PARTIALDIR) http://$* https//%: - @wget $(WGET_OPTS) -T 10 -c -P $(PARTIALDIR) https://$* + @wget $(WGET_OPTS) -T 30 -c -P $(PARTIALDIR) https://$* # download an ftp URL (colons omitted) #ftp//%: -# @wget -T 10 -c --passive-ftp -P $(PARTIALDIR) ftp://$* +# @wget -T 30 -c --passive-ftp -P $(PARTIALDIR) ftp://$* ftp//%: - @wget $(WGET_OPTS) -T 10 -c -P $(PARTIALDIR) ftp://$* + @wget $(WGET_OPTS) -T 30 -c -P $(PARTIALDIR) ftp://$* # link to a local copy of the file # (absolute path) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 13:26:02 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 11:26:02 +0000 Subject: [csw-devel] SF.net SVN: gar:[4157] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4157 http://gar.svn.sourceforge.net/gar/?rev=4157&view=rev Author: dmichelsen Date: 2009-04-02 11:26:02 +0000 (Thu, 02 Apr 2009) Log Message: ----------- mGAR v2: Rewrote passing of runtime linker path via LD_OPTIONS instead of LDFLAGS Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-02 08:58:46 UTC (rev 4156) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-02 11:26:02 UTC (rev 4157) @@ -442,31 +442,25 @@ # however not expanded during compilation, so linker-pathes must directly be accessible # without expansion and needs to be differentiated between 32 and 64 bit, therefore # the links 32 and 64. -ifndef NORUNPATH -_ADD_RUNPATH = 1 -endif -ifeq ($(origin LINKER_FLAGS), undefined) -ifdef NOISALIST -LINKER_FLAGS = $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))$(if $(_ADD_RUNPATH), -R$(abspath $(ELIB)/$(MM_LIBDIR)))) $(EXTRA_LINKER_FLAGS) -else +ifndef NORUNPATH # If we use $ISALIST it is a good idea to also add $MM_LIBDIR as there # may not be a subdirectory for the 32-bit standard case (this would normally # be a symlink of the form lib/sparcv8 -> . and lib/i386 -> .). This is most likely # the case for libraries in $(EXTRA_LIBS) for which no links generated in CSWcommon. -# The quoting of $ISALIST is unfortunately dependend on how often the linker flags -# are expanded until execution. The definition here is suitable for autotools. -# For other buildtools it may be suitable to add definitions with other quotings. -RUNPATHQUOTE ?= 2 -ifeq ($(RUNPATHQUOTE),1) - _Q = \\\$$\$$ -else - _Q = \\\\\\\$$\$$ +RUNPATH_DIRS ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_DIRS) + +ifndef NOISALIST +RUNPATH_ISALIST ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_ISALIST) endif -LINKER_FLAGS = $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))$(if $(_ADD_RUNPATH), -R$(ELIB)/$(_Q)ISALIST -R$(abspath $(ELIB)/$(MM_LIBDIR)))) $(EXTRA_LINKER_FLAGS) + +# Iterate over all directories in RUNPATH_DIRS, prefix each directory with one +# with $ISALIST if it exists in RUNPATH_ISALIST, then append remaining dirs from RUNPATH_ISALIST +RUNPATH_LINKER_FLAGS ?= $(foreach D,$(RUNPATH_DIRS),$(addprefix -R,$(addsuffix /\$$ISALIST,$(filter $D,$(RUNPATH_ISALIST))) $D)) $(addprefix -R,$(filter-out $(RUNPATH_DIRS),$(RUNPATH_ISALIST))) $(EXTRA_RUNPATH_LINKER_FLAGS) endif -endif +LINKER_FLAGS ?= $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))) $(EXTRA_LINKER_FLAGS) + CC_HOME = $($(GARCOMPILER)_CC_HOME) CC = $($(GARCOMPILER)_CC) CXX = $($(GARCOMPILER)_CXX) @@ -477,12 +471,12 @@ ASFLAGS ?= $(strip $($(GARCOMPILER)_AS_FLAGS) $(EXTRA_ASFLAGS)) OPTFLAGS ?= $(strip $($(GARCOMPILER)_CC_FLAGS) $(EXTRA_OPTFLAGS)) -#GCC3_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) -#GCC4_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) -#SOS11_LD_OPTIONS = $(strip $(EXTRA_SOS11_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) -#SOS12_LD_OPTIONS = $(strip $(EXTRA_SOS12_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) +GCC3_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +GCC4_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +SOS11_LD_OPTIONS = $(strip $(EXTRA_SOS11_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) +SOS12_LD_OPTIONS = $(strip $(EXTRA_SOS12_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) -#LD_OPTIONS = $($(GARCOMPILER)_LD_OPTIONS) +LD_OPTIONS ?= $($(GARCOMPILER)_LD_OPTIONS) $(RUNPATH_LINKER_FLAGS) # LD_OPTIONS considered harmful. Disable for the moment. #LDOPT_LIBS ?= $(libdir) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 14:15:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 12:15:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4158] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4158 http://gar.svn.sourceforge.net/gar/?rev=4158&view=rev Author: dmichelsen Date: 2009-04-02 12:15:19 +0000 (Thu, 02 Apr 2009) Log Message: ----------- mGAR v2: Apply MM_LIBDIR as late as possible Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-02 11:26:02 UTC (rev 4157) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-02 12:15:19 UTC (rev 4158) @@ -448,15 +448,15 @@ # may not be a subdirectory for the 32-bit standard case (this would normally # be a symlink of the form lib/sparcv8 -> . and lib/i386 -> .). This is most likely # the case for libraries in $(EXTRA_LIBS) for which no links generated in CSWcommon. -RUNPATH_DIRS ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_DIRS) +RUNPATH_DIRS ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_DIRS) ifndef NOISALIST -RUNPATH_ISALIST ?= $(foreach D,$(libdir_install) $(EXTRA_LIB),$(abspath $D/$(MM_LIBDIR))) $(EXTRA_RUNPATH_ISALIST) +RUNPATH_ISALIST ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_ISALIST) endif # Iterate over all directories in RUNPATH_DIRS, prefix each directory with one # with $ISALIST if it exists in RUNPATH_ISALIST, then append remaining dirs from RUNPATH_ISALIST -RUNPATH_LINKER_FLAGS ?= $(foreach D,$(RUNPATH_DIRS),$(addprefix -R,$(addsuffix /\$$ISALIST,$(filter $D,$(RUNPATH_ISALIST))) $D)) $(addprefix -R,$(filter-out $(RUNPATH_DIRS),$(RUNPATH_ISALIST))) $(EXTRA_RUNPATH_LINKER_FLAGS) +RUNPATH_LINKER_FLAGS ?= $(foreach D,$(RUNPATH_DIRS),$(addprefix -R,$(addsuffix /\$$ISALIST,$(filter $D,$(RUNPATH_ISALIST))) $(abspath $D/$(MM_LIBDIR)))) $(addprefix -R,$(filter-out $(RUNPATH_DIRS),$(RUNPATH_ISALIST))) $(EXTRA_RUNPATH_LINKER_FLAGS) endif LINKER_FLAGS ?= $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))) $(EXTRA_LINKER_FLAGS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:06:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:06:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4159] csw/mgar/pkg/figlet/trunk/Makefile Message-ID: Revision: 4159 http://gar.svn.sourceforge.net/gar/?rev=4159&view=rev Author: dmichelsen Date: 2009-04-02 13:06:50 +0000 (Thu, 02 Apr 2009) Log Message: ----------- figlet: Don't include any runtime linker path Modified Paths: -------------- csw/mgar/pkg/figlet/trunk/Makefile Modified: csw/mgar/pkg/figlet/trunk/Makefile =================================================================== --- csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 12:15:19 UTC (rev 4158) +++ csw/mgar/pkg/figlet/trunk/Makefile 2009-04-02 13:06:50 UTC (rev 4159) @@ -40,6 +40,8 @@ INSTALL_SCRIPTS = custom +NORUNPATH = 1 + include gar/category.mk # The install part from the Makefile is completely unrelocatable :-( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:23:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:23:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4160] csw/mgar/pkg/flex_new/trunk/Makefile Message-ID: Revision: 4160 http://gar.svn.sourceforge.net/gar/?rev=4160&view=rev Author: dmichelsen Date: 2009-04-02 13:23:59 +0000 (Thu, 02 Apr 2009) Log Message: ----------- flex_new: Don't use ISALIST in runtime linker path Modified Paths: -------------- csw/mgar/pkg/flex_new/trunk/Makefile Modified: csw/mgar/pkg/flex_new/trunk/Makefile =================================================================== --- csw/mgar/pkg/flex_new/trunk/Makefile 2009-04-02 13:06:50 UTC (rev 4159) +++ csw/mgar/pkg/flex_new/trunk/Makefile 2009-04-02 13:23:59 UTC (rev 4160) @@ -23,6 +23,7 @@ REQUIRED_PKGS = CSWggettextrt CSWiconv +NOISALIST = 1 CONFIGURE_ARGS = --prefix=$(libexecdir)/$(GARNAME)-$(GARVERSION) TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:30:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:30:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4161] csw/mgar/pkg/less/trunk/Makefile Message-ID: Revision: 4161 http://gar.svn.sourceforge.net/gar/?rev=4161&view=rev Author: dmichelsen Date: 2009-04-02 13:30:34 +0000 (Thu, 02 Apr 2009) Log Message: ----------- less: Don't use ISALIST in runtime linker path Modified Paths: -------------- csw/mgar/pkg/less/trunk/Makefile Modified: csw/mgar/pkg/less/trunk/Makefile =================================================================== --- csw/mgar/pkg/less/trunk/Makefile 2009-04-02 13:23:59 UTC (rev 4160) +++ csw/mgar/pkg/less/trunk/Makefile 2009-04-02 13:30:34 UTC (rev 4161) @@ -18,6 +18,7 @@ REQUIRED_PKGS = CSWncurses CSWggettextrt +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) TEST_TARGET = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 2 15:38:56 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 02 Apr 2009 13:38:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4162] csw/mgar/pkg/gtar/trunk/Makefile Message-ID: Revision: 4162 http://gar.svn.sourceforge.net/gar/?rev=4162&view=rev Author: dmichelsen Date: 2009-04-02 13:38:56 +0000 (Thu, 02 Apr 2009) Log Message: ----------- gtar: Don't use ISALIST in runtime linker path Modified Paths: -------------- csw/mgar/pkg/gtar/trunk/Makefile Modified: csw/mgar/pkg/gtar/trunk/Makefile =================================================================== --- csw/mgar/pkg/gtar/trunk/Makefile 2009-04-02 13:30:34 UTC (rev 4161) +++ csw/mgar/pkg/gtar/trunk/Makefile 2009-04-02 13:38:56 UTC (rev 4162) @@ -26,6 +26,7 @@ REQUIRED_PKGS = CSWggettextrt CSWiconv +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) --program-prefix=g TEST_SCRIPTS = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 2 16:28:44 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 02 Apr 2009 14:28:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4163] csw/mgar/pkg/cvsps/trunk/Makefile Message-ID: Revision: 4163 http://gar.svn.sourceforge.net/gar/?rev=4163&view=rev Author: bdwalton Date: 2009-04-02 14:28:44 +0000 (Thu, 02 Apr 2009) Log Message: ----------- remove RUNPATHQUOTE setting now that LD_OPTIONS is used Modified Paths: -------------- csw/mgar/pkg/cvsps/trunk/Makefile Modified: csw/mgar/pkg/cvsps/trunk/Makefile =================================================================== --- csw/mgar/pkg/cvsps/trunk/Makefile 2009-04-02 13:38:56 UTC (rev 4162) +++ csw/mgar/pkg/cvsps/trunk/Makefile 2009-04-02 14:28:44 UTC (rev 4163) @@ -32,9 +32,6 @@ TEST_SCRIPTS = -# to fix mantis bug #3528 -RUNPATHQUOTE = 1 - CONFIGURE_ARGS = $(DIRPATHS) --with-zlib=/opt/csw include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From ggunselm at emporia.edu Thu Apr 2 17:22:44 2009 From: ggunselm at emporia.edu (Glen Gunselman) Date: Thu, 02 Apr 2009 10:22:44 -0500 Subject: [csw-devel] Orca and friends packages In-Reply-To: <625385e30903201821y4f2e219o772856b94a260f86@mail.gmail.com> References: <49BF8E3F.CC54.005D.3@emporia.edu> <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> <49BFE579.CC54.005D.3@emporia.edu> <91D22A54-32E7-40FF-A6D1-BE3252D91D92@opencsw.org> <49C3F3E8.CC54.005D.3@emporia.edu> <625385e30903201821y4f2e219o772856b94a260f86@mail.gmail.com> Message-ID: <49D491F4.CC54.005D.3@emporia.edu> Peter, Thanks, pkgutil was able to install package. Glen >>> Peter Bonivart 3/20/2009 8:21 PM >>> 2009/3/21 Glen Gunselman : > Is this a symptom of using "test packages" and I need to manually install > the dependancies, or have I missed a step or two, or is there some work on > your end that I need to wait for? There's another way of installing mentioned on that page: pkgutil -t http://mirror.opencsw.org/opencsw/testing/`uname -p`/`uname -r` -i Have you tried that? -- /peter _______________________________________________ devel mailing list devel at lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdwalton at users.sourceforge.net Thu Apr 2 18:50:22 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 02 Apr 2009 16:50:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4164] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4164 http://gar.svn.sourceforge.net/gar/?rev=4164&view=rev Author: bdwalton Date: 2009-04-02 16:50:17 +0000 (Thu, 02 Apr 2009) Log Message: ----------- remove RUNPATHQUOTE now that LD_OPTIONS is doing the -R bits. Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-02 14:28:44 UTC (rev 4163) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-02 16:50:17 UTC (rev 4164) @@ -94,9 +94,6 @@ # software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -# properly quote RPATH to address mantis bug #3539 -RUNPATHQUOTE = 1 - CONFIGURE_ARGS = $(DIRPATHS) --with-shell=$(bindir)/bash CONFIGURE_ARGS += --with-perl=$(bindir)/perl CONFIGURE_ARGS += --with-tcltk=$(bindir)/wish This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 2 21:55:35 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 02 Apr 2009 19:55:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4165] csw/mgar/pkg/xmlto/trunk/Makefile Message-ID: Revision: 4165 http://gar.svn.sourceforge.net/gar/?rev=4165&view=rev Author: bdwalton Date: 2009-04-02 19:55:35 +0000 (Thu, 02 Apr 2009) Log Message: ----------- disable runpath; add missing dependency on bash Modified Paths: -------------- csw/mgar/pkg/xmlto/trunk/Makefile Modified: csw/mgar/pkg/xmlto/trunk/Makefile =================================================================== --- csw/mgar/pkg/xmlto/trunk/Makefile 2009-04-02 16:50:17 UTC (rev 4164) +++ csw/mgar/pkg/xmlto/trunk/Makefile 2009-04-02 19:55:35 UTC (rev 4165) @@ -7,7 +7,7 @@ REQUIRED_PKGS = CSWsgmlcommon CSWxmlcommon CSWlibxml2 CSWdocbookdtds REQUIRED_PKGS += CSWdocbookxsl CSWlibxslt CSWflex CSWw3m CSWmktemp -REQUIRED_PKGS += CSWggetopt +REQUIRED_PKGS += CSWggetopt CSWbash DESCRIPTION = An XSL toolchain front end. define BLURB @@ -24,6 +24,9 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 +# we don't link to anything besides libc and libm. +NORUNPATH = 1 + pre-configure: @(cd $(WORKSRC); \ touch doc/xmlto.xml doc/xmlif.xml ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 2 22:01:17 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 02 Apr 2009 20:01:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4166] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4166 http://gar.svn.sourceforge.net/gar/?rev=4166&view=rev Author: valholla Date: 2009-04-02 20:01:16 +0000 (Thu, 02 Apr 2009) Log Message: ----------- fix for bugs 3587,3479,and 3499 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdo/files/ Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -111,5 +111,8 @@ pre-fetch: $(foreach F,$(EXTFILES),$(shell cp $(F) $(DOWNLOADDIR))) +post-merge-modulated: + @(grm -fr $(DESTDIR)/.[a-z]*) + # System Rules/Configuration include gar/category.mk Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bcmath/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"bcmath\" +* WARNING: Could not enable Extension "bcmath" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"bcmath\" +* NOTICE: Successfully Enabled Extension "bcmath" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"bcmath\" +* NOTICE: Successfully Disabled Extension "bcmath" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_bz2/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"bz2\" +* WARNING: Could not enable Extension "bz2" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"bz2\" +* NOTICE: Successfully Enabled Extension "bz2" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"bz2\" +* NOTICE: Successfully Disabled Extension "bz2" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_calendar/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"calendar\" +* WARNING: Could not enable Extension "calendar" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"calendar\" +* NOTICE: Successfully Enabled Extension "calendar" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"calendar\" +* NOTICE: Successfully Disabled Extension "calendar" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ctype/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ctype\" +* WARNING: Could not enable Extension "ctype" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ctype\" +* NOTICE: Successfully Enabled Extension "ctype" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ctype\" +* NOTICE: Successfully Disabled Extension "ctype" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_curl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"curl\" +* WARNING: Could not enable Extension "curl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"curl\" +* NOTICE: Successfully Enabled Extension "curl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"curl\" +* NOTICE: Successfully Disabled Extension "curl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -28,7 +28,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"dba\" +* WARNING: Could not enable Extension "dba" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -47,7 +47,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"dba\" +* NOTICE: Successfully Enabled Extension "dba" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -70,7 +70,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"dba\" +* NOTICE: Successfully Disabled Extension "dba" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dbase/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"dbase\" +* WARNING: Could not enable Extension "dbase" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"dbase\" +* NOTICE: Successfully Enabled Extension "dbase" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"dbase\" +* NOTICE: Successfully Disabled Extension "dbase" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dom/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"dom\" +* WARNING: Could not enable Extension "dom" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"dom\" +* NOTICE: Successfully Enabled Extension "dom" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"dom\" +* NOTICE: Successfully Disabled Extension "dom" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_exif/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -26,7 +26,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"exif\" +* WARNING: Could not enable Extension "exif" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -45,7 +45,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"exif\" +* NOTICE: Successfully Enabled Extension "exif" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -68,7 +68,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"exif\" +* NOTICE: Successfully Disabled Extension "exif" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ftp/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ftp\" +* WARNING: Could not enable Extension "ftp" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ftp\" +* NOTICE: Successfully Enabled Extension "ftp" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ftp\" +* NOTICE: Successfully Disabled Extension "ftp" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gd/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -34,7 +34,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"gd\" +* WARNING: Could not enable Extension "gd" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -53,7 +53,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"gd\" +* NOTICE: Successfully Enabled Extension "gd" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -76,7 +76,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"gd\" +* NOTICE: Successfully Disabled Extension "gd" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gettext/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"gettext\" +* WARNING: Could not enable Extension "gettext" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"gettext\" +* NOTICE: Successfully Enabled Extension "gettext" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"gettext\" +* NOTICE: Successfully Disabled Extension "gettext" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_gmp/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"gmp\" +* WARNING: Could not enable Extension "gmp" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"gmp\" +* NOTICE: Successfully Enabled Extension "gmp" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"gmp\" +* NOTICE: Successfully Disabled Extension "gmp" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_hash/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"hash\" +* WARNING: Could not enable Extension "hash" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"hash\" +* NOTICE: Successfully Enabled Extension "hash" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"hash\" +* NOTICE: Successfully Disabled Extension "hash" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_iconv/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -30,7 +30,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"iconv\" +* WARNING: Could not enable Extension "iconv" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -49,7 +49,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"iconv\" +* NOTICE: Successfully Enabled Extension "iconv" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -72,7 +72,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"iconv\" +* NOTICE: Successfully Disabled Extension "iconv" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_imap/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"imap\" +* WARNING: Could not enable Extension "imap" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"imap\" +* NOTICE: Successfully Enabled Extension "imap" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"imap\" +* NOTICE: Successfully Disabled Extension "imap" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_json/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"json\" +* WARNING: Could not enable Extension "json" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"json\" +* NOTICE: Successfully Enabled Extension "json" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"json\" +* NOTICE: Successfully Disabled Extension "json" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ldap/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ldap\" +* WARNING: Could not enable Extension "ldap" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ldap\" +* NOTICE: Successfully Enabled Extension "ldap" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ldap\" +* NOTICE: Successfully Disabled Extension "ldap" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mbstring/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mbstring\" +* WARNING: Could not enable Extension "mbstring" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mbstring\" +* NOTICE: Successfully Enabled Extension "mbstring" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mbstring\" +* NOTICE: Successfully Disabled Extension "mbstring" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mcrypt/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mcrypt\" +* WARNING: Could not enable Extension "mcrypt" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mcrypt\" +* NOTICE: Successfully Enabled Extension "mcrypt" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mcrypt\" +* NOTICE: Successfully Disabled Extension "mcrypt" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mhash/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mhash\" +* WARNING: Could not enable Extension "mhash" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mhash\" +* NOTICE: Successfully Enabled Extension "mhash" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mhash\" +* NOTICE: Successfully Disabled Extension "mhash" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mime_magic\" +* WARNING: Could not enable Extension "mime_magic" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mime_magic\" +* NOTICE: Successfully Enabled Extension "mime_magic" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mime_magic\" +* NOTICE: Successfully Disabled Extension "mime_magic" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mssql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mssql\" +* WARNING: Could not enable Extension "mssql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mssql\" +* NOTICE: Successfully Enabled Extension "mssql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mssql\" +* NOTICE: Successfully Disabled Extension "mssql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mysql\" +* WARNING: Could not enable Extension "mysql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mysql\" +* NOTICE: Successfully Enabled Extension "mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mysql\" +* NOTICE: Successfully Disabled Extension "mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysqli/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"mysqli\" +* WARNING: Could not enable Extension "mysqli" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"mysqli\" +* NOTICE: Successfully Enabled Extension "mysqli" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"mysqli\" +* NOTICE: Successfully Disabled Extension "mysqli" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_ncurses/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"ncurses\" +* WARNING: Could not enable Extension "ncurses" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"ncurses\" +* NOTICE: Successfully Enabled Extension "ncurses" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"ncurses\" +* NOTICE: Successfully Disabled Extension "ncurses" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_odbc/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"odbc\" +* WARNING: Could not enable Extension "odbc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"odbc\" +* NOTICE: Successfully Enabled Extension "odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"odbc\" +* NOTICE: Successfully Disabled Extension "odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_openssl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"openssl\" +* WARNING: Could not enable Extension "openssl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"openssl\" +* NOTICE: Successfully Enabled Extension "openssl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"openssl\" +* NOTICE: Successfully Disabled Extension "openssl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pcntl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pcntl\" +* WARNING: Could not enable Extension "pcntl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pcntl\" +* NOTICE: Successfully Enabled Extension "pcntl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pcntl\" +* NOTICE: Successfully Disabled Extension "pcntl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Added: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -0,0 +1,75 @@ +PHP5EXT_NAME = pdo + +PACKAGES += CSWphp5pdo + +CATALOGNAME_CSWphp5pdo = php5_pdo +SPKG_DESC_CSWphp5pdo = pdo Extention for PHP5 +REQUIRED_PKGS_CSWphp5pdo = CSWphp5 + +PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* +PKGFILES_CSWphp5pdo += .*/lib/php/extensions/.*/pdo\.a* + +define CSWphp5pdo_postinstall +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Post Install <===]" +echo " ===> Enabling pdo extension" + +if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then + /bin/true +else + cat << _EOF_ +****************************************************************************** +* WARNING: Could not enable Extension "pdo" +* You will need to enable it by hand as follows: +* +* open $${PHP_INI} in your favorite text editor +* Add the following line to the file, save, and restart your web server +* extension=pdo.so +****************************************************************************** +_EOF_ +exit 0 +fi + +if grep 'extension=pdo.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo.so|extension=pdo.so|' $${PHP_INI} +else + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo.so|' $${PHP_INI} + fi + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Enabled Extension "pdo" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the install +****************************************************************************** +_EOF_ + + +exit 0 +endef + +define CSWphp5pdo_preremove +#!/bin/sh + +PHP_INI=/opt/csw/php5/lib/php.ini + +echo "[===> Running Pre Remove <===]" +echo " ===> Disabling pdo extension" + +perl -i -plne 's|extension=pdo.so|;extension=pdo.so|' $${PHP_INI} + +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully Disabled Extension "pdo" +* in $${PHP_INI} +* +* You will need to restart your web server to finish the removal +****************************************************************************** +_EOF_ + +exit 0 +endef Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdomysql = php5_pdomysql SPKG_DESC_CSWphp5pdomysql = pdomysql Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib +REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib CSWphp5pdo CONFIGURE_ARGS += --with-pdo-mysql=shared,$(prefix) CONFIGURE_ARGS += --with-zlib-dir=$(prefix) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdomysql\" +* WARNING: Could not enable Extension "pdomysql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdomysql\" +* NOTICE: Successfully Enabled Extension "pdomysql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdomysql\" +* NOTICE: Successfully Disabled Extension "pdomysql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdoodbc = php5_pdoodbc SPKG_DESC_CSWphp5pdoodbc = pdoodbc Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc +REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc CSWphp5pdo CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdoodbc\" +* WARNING: Could not enable Extension "pdoodbc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdoodbc\" +* NOTICE: Successfully Enabled Extension "pdoodbc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdoodbc\" +* NOTICE: Successfully Disabled Extension "pdoodbc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdopgsql = php5_pdopgsql SPKG_DESC_CSWphp5pdopgsql = pdopgsql Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq +REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq CSWphp5pdo PATCHFILES += pdopgsql.diff @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdopgsql\" +* WARNING: Could not enable Extension "pdopgsql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdopgsql\" +* NOTICE: Successfully Enabled Extension "pdopgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdopgsql\" +* NOTICE: Successfully Disabled Extension "pdopgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite SPKG_DESC_CSWphp5pdosqlite = pdosqlite Extention for PHP5 -REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 +REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pdosqlite\" +* WARNING: Could not enable Extension "pdosqlite" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pdosqlite\" +* NOTICE: Successfully Enabled Extension "pdosqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pdosqlite\" +* NOTICE: Successfully Disabled Extension "pdosqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pgsql\" +* WARNING: Could not enable Extension "pgsql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pgsql\" +* NOTICE: Successfully Enabled Extension "pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pgsql\" +* NOTICE: Successfully Disabled Extension "pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_posix/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"posix\" +* WARNING: Could not enable Extension "posix" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"posix\" +* NOTICE: Successfully Enabled Extension "posix" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"posix\" +* NOTICE: Successfully Disabled Extension "posix" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pspell/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"pspell\" +* WARNING: Could not enable Extension "pspell" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"pspell\" +* NOTICE: Successfully Enabled Extension "pspell" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"pspell\" +* NOTICE: Successfully Disabled Extension "pspell" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"readline\" +* WARNING: Could not enable Extension "readline" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"readline\" +* NOTICE: Successfully Enabled Extension "readline" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"readline\" +* NOTICE: Successfully Disabled Extension "readline" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -12,7 +12,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"recode\" +* WARNING: Could not enable Extension "recode" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -31,7 +31,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"recode\" +* NOTICE: Successfully Enabled Extension "recode" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -54,7 +54,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"recode\" +* NOTICE: Successfully Disabled Extension "recode" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_session/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"session\" +* WARNING: Could not enable Extension "session" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"session\" +* NOTICE: Successfully Enabled Extension "session" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"session\" +* NOTICE: Successfully Disabled Extension "session" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_shmop/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"shmop\" +* WARNING: Could not enable Extension "shmop" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"shmop\" +* NOTICE: Successfully Enabled Extension "shmop" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"shmop\" +* NOTICE: Successfully Disabled Extension "shmop" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_simplexml/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -19,7 +19,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"simplexml\" +* WARNING: Could not enable Extension "simplexml" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -38,7 +38,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"simplexml\" +* NOTICE: Successfully Enabled Extension "simplexml" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -61,7 +61,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"simplexml\" +* NOTICE: Successfully Disabled Extension "simplexml" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_snmp/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"snmp\" +* WARNING: Could not enable Extension "snmp" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"snmp\" +* NOTICE: Successfully Enabled Extension "snmp" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"snmp\" +* NOTICE: Successfully Disabled Extension "snmp" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_soap/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"soap\" +* WARNING: Could not enable Extension "soap" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"soap\" +* NOTICE: Successfully Enabled Extension "soap" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"soap\" +* NOTICE: Successfully Disabled Extension "soap" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sockets/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sockets\" +* WARNING: Could not enable Extension "sockets" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sockets\" +* NOTICE: Successfully Enabled Extension "sockets" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sockets\" +* NOTICE: Successfully Disabled Extension "sockets" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sqlite/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sqlite\" +* WARNING: Could not enable Extension "sqlite" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sqlite\" +* NOTICE: Successfully Enabled Extension "sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sqlite\" +* NOTICE: Successfully Disabled Extension "sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sysvmsg\" +* WARNING: Could not enable Extension "sysvmsg" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sysvmsg\" +* NOTICE: Successfully Enabled Extension "sysvmsg" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sysvmsg\" +* NOTICE: Successfully Disabled Extension "sysvmsg" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvsem/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sysvsem\" +* WARNING: Could not enable Extension "sysvsem" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sysvsem\" +* NOTICE: Successfully Enabled Extension "sysvsem" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sysvsem\" +* NOTICE: Successfully Disabled Extension "sysvsem" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvshm/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"sysvshm\" +* WARNING: Could not enable Extension "sysvshm" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"sysvshm\" +* NOTICE: Successfully Enabled Extension "sysvshm" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"sysvshm\" +* NOTICE: Successfully Disabled Extension "sysvshm" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tidy/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"tidy\" +* WARNING: Could not enable Extension "tidy" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"tidy\" +* NOTICE: Successfully Enabled Extension "tidy" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"tidy\" +* NOTICE: Successfully Disabled Extension "tidy" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_tokenizer/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -23,7 +23,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"tokenizer\" +* WARNING: Could not enable Extension "tokenizer" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -42,7 +42,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"tokenizer\" +* NOTICE: Successfully Enabled Extension "tokenizer" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -65,7 +65,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"tokenizer\" +* NOTICE: Successfully Disabled Extension "tokenizer" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_wddx/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -25,7 +25,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"wddx\" +* WARNING: Could not enable Extension "wddx" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -44,7 +44,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"wddx\" +* NOTICE: Successfully Enabled Extension "wddx" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -67,7 +67,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"wddx\" +* NOTICE: Successfully Disabled Extension "wddx" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xml/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -17,7 +17,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xml\" +* WARNING: Could not enable Extension "xml" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -36,7 +36,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xml\" +* NOTICE: Successfully Enabled Extension "xml" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -59,7 +59,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xml\" +* NOTICE: Successfully Disabled Extension "xml" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlreader/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xmlreader\" +* WARNING: Could not enable Extension "xmlreader" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xmlreader\" +* NOTICE: Successfully Enabled Extension "xmlreader" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xmlreader\" +* NOTICE: Successfully Disabled Extension "xmlreader" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlrpc/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -26,7 +26,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xmlrpc\" +* WARNING: Could not enable Extension "xmlrpc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -45,7 +45,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xmlrpc\" +* NOTICE: Successfully Enabled Extension "xmlrpc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -68,7 +68,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xmlrpc\" +* NOTICE: Successfully Disabled Extension "xmlrpc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xmlwriter/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xmlwriter\" +* WARNING: Could not enable Extension "xmlwriter" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xmlwriter\" +* NOTICE: Successfully Enabled Extension "xmlwriter" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xmlwriter\" +* NOTICE: Successfully Disabled Extension "xmlwriter" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_xsl/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"xsl\" +* WARNING: Could not enable Extension "xsl" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"xsl\" +* NOTICE: Successfully Enabled Extension "xsl" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"xsl\" +* NOTICE: Successfully Disabled Extension "xsl" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_zip/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -24,7 +24,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"zip\" +* WARNING: Could not enable Extension "zip" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -43,7 +43,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"zip\" +* NOTICE: Successfully Enabled Extension "zip" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -66,7 +66,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"zip\" +* NOTICE: Successfully Disabled Extension "zip" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile 2009-04-02 19:55:35 UTC (rev 4165) +++ csw/mgar/pkg/php5/trunk/extensions/php5_zlib/Makefile 2009-04-02 20:01:16 UTC (rev 4166) @@ -16,7 +16,7 @@ else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension \"zlib\" +* WARNING: Could not enable Extension "zlib" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor @@ -35,7 +35,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension \"zlib\" +* NOTICE: Successfully Enabled Extension "zlib" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -58,7 +58,7 @@ cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension \"zlib\" +* NOTICE: Successfully Disabled Extension "zlib" * in $${PHP_INI} * * You will need to restart your web server to finish the removal This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 2 22:26:54 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 02 Apr 2009 20:26:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4167] csw/mgar/pkg/apache2/trunk Message-ID: Revision: 4167 http://gar.svn.sourceforge.net/gar/?rev=4167&view=rev Author: idogan23 Date: 2009-04-02 20:26:54 +0000 (Thu, 02 Apr 2009) Log Message: ----------- apache2_manual: fixed packaging bug in prototype file Modified Paths: -------------- csw/mgar/pkg/apache2/trunk/checksums csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype Modified: csw/mgar/pkg/apache2/trunk/checksums =================================================================== --- csw/mgar/pkg/apache2/trunk/checksums 2009-04-02 20:01:16 UTC (rev 4166) +++ csw/mgar/pkg/apache2/trunk/checksums 2009-04-02 20:26:54 UTC (rev 4167) @@ -19,7 +19,7 @@ 405bc4df4662e9faebe34f9b6a093d14 download/CSWap2suexec.postinstall 36128341749fa79f9942f4156b85f5b6 download/CSWap2suexec.preremove cb25d4b9c4e32f9e308c84824a4ca8f3 download/CSWapache2-manual.gspec -b189b99501543416dec017d0ba555f9c download/CSWapache2-manual.prototype +03d560ad0cd320ead33dc6fa2e72ad4c download/CSWapache2-manual.prototype 020f593630a0d59a4e398814e0e02c0f download/CSWapache2-devel.gspec 557c1d7fea8d6cd6674be399c0ab10d5 download/CSWapache2-devel.prototype 61b6b11aa70677da9386e90c3b5ba21c download/CSWapache2.killproc Modified: csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype =================================================================== --- csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype 2009-04-02 20:01:16 UTC (rev 4166) +++ csw/mgar/pkg/apache2/trunk/files/CSWapache2-manual.prototype 2009-04-02 20:26:54 UTC (rev 4167) @@ -658,7 +658,7 @@ f none /opt/csw/apache2/share/manual/rewrite/index.html 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_tech.html.en 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/index.html.en 0644 root bin -f none opt/csw/apache2/share/manual/rewrite/rewrite_flags.html 0644 root bin +f none /opt/csw/apache2/share/manual/rewrite/rewrite_flags.html 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_guide_advanced.html.en 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_guide.html.en 0644 root bin f none /opt/csw/apache2/share/manual/rewrite/rewrite_flags.html.en 0644 root bin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 02:13:00 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 00:13:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4168] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4168 http://gar.svn.sourceforge.net/gar/?rev=4168&view=rev Author: valholla Date: 2009-04-03 00:13:00 +0000 (Fri, 03 Apr 2009) Log Message: ----------- remove extra paths Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-02 20:26:54 UTC (rev 4167) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-03 00:13:00 UTC (rev 4168) @@ -83,6 +83,7 @@ # Disable Tests (report submitted to PHP QA) SKIPTEST = 1 +ENABLE_CHECK = 0 # SAPI Specific Rules STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec @@ -100,6 +101,8 @@ ginstall -m 0644 \ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc + @(grm -fr $(DESTDIR)/.[a-z]*) + @(grm -fr $(DESTDIR)/$(php5_lib)/.[a-z]*) @$(MAKECOOKIE) post-configure-modulated: @@ -111,8 +114,5 @@ pre-fetch: $(foreach F,$(EXTFILES),$(shell cp $(F) $(DOWNLOADDIR))) -post-merge-modulated: - @(grm -fr $(DESTDIR)/.[a-z]*) - # System Rules/Configuration include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 02:40:44 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 00:40:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4169] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4169 http://gar.svn.sourceforge.net/gar/?rev=4169&view=rev Author: valholla Date: 2009-04-03 00:40:43 +0000 (Fri, 03 Apr 2009) Log Message: ----------- typo in sysvmsg module Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-03 00:13:00 UTC (rev 4168) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-03 00:40:43 UTC (rev 4169) @@ -102,7 +102,6 @@ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc @(grm -fr $(DESTDIR)/.[a-z]*) - @(grm -fr $(DESTDIR)/$(php5_lib)/.[a-z]*) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-03 00:13:00 UTC (rev 4168) +++ csw/mgar/pkg/php5/trunk/extensions/php5_sysvmsg/Makefile 2009-04-03 00:40:43 UTC (rev 4169) @@ -6,7 +6,7 @@ SPKG_DESC_CSWphp5sysvmsg = sysvmsg Extention for PHP5 REQUIRED_PKGS_CSWphp5sysvmsg = CSWphp5 -CONFIGURE_ARGS += --enable-sysvsem=shared +CONFIGURE_ARGS += --enable-sysvmsg=shared PKGFILES_CSWphp5sysvmsg = .*/lib/php/extensions/.*/sysvmsg.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 03:32:44 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 01:32:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4170] csw/mgar/pkg/mod_python/trunk Message-ID: Revision: 4170 http://gar.svn.sourceforge.net/gar/?rev=4170&view=rev Author: valholla Date: 2009-04-03 01:32:44 +0000 (Fri, 03 Apr 2009) Log Message: ----------- isalist Modified Paths: -------------- csw/mgar/pkg/mod_python/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/mod_python/trunk/files/fixme.sh Modified: csw/mgar/pkg/mod_python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-03 00:40:43 UTC (rev 4169) +++ csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-03 01:32:44 UTC (rev 4170) @@ -24,17 +24,26 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +LD_OPTIONS = +LDFLAGS = -L/opt/csw/lib +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-apxs=$(prefix)/apache2/sbin/apxs CONFIGURE_ARGS += --with-python=$(bindir)/python CONFIGURE_ARGS += --with-flex=$(bindir)/flex-2.5.35 CONFIGURE_ARGS += --with-python-src=../python -NOISALIST = 1 include gar/category.mk DESTDOC = $(DESTDIR)$(docdir)/ap2_modpython +DISTFILES += fixme.sh +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + + post-install-modulated: @install -d $(DESTDOC) @for file in COPYRIGHT CREDITS LICENSE NEWS NOTICE README ; do \ Copied: csw/mgar/pkg/mod_python/trunk/files/fixme.sh (from rev 3986, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/mod_python/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/mod_python/trunk/files/fixme.sh 2009-04-03 01:32:44 UTC (rev 4170) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 04:18:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 02:18:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4171] csw/mgar/pkg/python/trunk Message-ID: Revision: 4171 http://gar.svn.sourceforge.net/gar/?rev=4171&view=rev Author: valholla Date: 2009-04-03 02:18:31 +0000 (Fri, 03 Apr 2009) Log Message: ----------- various fixes Modified Paths: -------------- csw/mgar/pkg/python/trunk/checksums csw/mgar/pkg/python/trunk/files/modules.diff csw/mgar/pkg/python/trunk/files/python-config-in.diff csw/mgar/pkg/python/trunk/files/site.diff Modified: csw/mgar/pkg/python/trunk/checksums =================================================================== --- csw/mgar/pkg/python/trunk/checksums 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/checksums 2009-04-03 02:18:31 UTC (rev 4171) @@ -3,10 +3,10 @@ 5664b3970307d7d39d8d4061e7dccbb0 download/libpython2.5.so.1.0-isa-i386 42dd6523beb94a805d5764ae1276091c download/faqwiz.diff 33f4094ee46ce865d3973a197f3fb4a0 download/makesetup.diff -ff716b13c8b0965f92550732151e545a download/modules.diff +b389061e5a556feab6b20a08dad7ea23 download/modules.diff 369c5593c0c0edda03f3c1844788dbee download/multiprocess.diff 05724da367b025ce525de2bb704af6e3 download/pyport.diff 296f46fb4a6a392093120cd86675309b download/setup.diff -e1cb8bf39625613272c210c71274b1e0 download/site.diff +918c25923436792b353fac29acc88c22 download/site.diff 9b45df21739387380ba2f5737a443170 download/configure.diff -fae0bb9b9a5a21d755c971d2fce9b592 download/python-config-in.diff +60ffb8b1ad45d337f57b94c5a703e62a download/python-config-in.diff Modified: csw/mgar/pkg/python/trunk/files/modules.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/files/modules.diff 2009-04-03 02:18:31 UTC (rev 4171) @@ -6,10 +6,10 @@ -#_curses _cursesmodule.c -lcurses -ltermcap +*shared* -+_curses _cursesmodule.c -R/opt/csw/lib -L/opt/csw/lib -lncurses -lxtermcap ++_curses _cursesmodule.c -R/opt/csw/lib -L/opt/csw/lib -lncursesw -lxtermcap # Wrapper for the panel library that's part of ncurses and SYSV curses. -#_curses_panel _curses_panel.c -lpanel -lncurses -+_curses_panel _curses_panel.c -R/opt/csw/lib -L/opt/csw/lib -lpanel -lncurses -lxtermcap ++_curses_panel _curses_panel.c -R/opt/csw/lib -L/opt/csw/lib -lpanel -lncursesw -lxtermcap # Generic (SunOS / SVR4) dynamic loading module. Modified: csw/mgar/pkg/python/trunk/files/python-config-in.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/python-config-in.diff 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/files/python-config-in.diff 2009-04-03 02:18:31 UTC (rev 4171) @@ -5,6 +5,6 @@ if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) + if opt == '--ldflags': -+ libs.insert(0, '-L/opt/csw/lib -R/opt/csw/lib/$ISALIST') ++ libs.insert(0, '-R/opt/csw/lib -L/opt/csw/lib') print ' '.join(libs) Modified: csw/mgar/pkg/python/trunk/files/site.diff =================================================================== --- csw/mgar/pkg/python/trunk/files/site.diff 2009-04-03 01:32:44 UTC (rev 4170) +++ csw/mgar/pkg/python/trunk/files/site.diff 2009-04-03 02:18:31 UTC (rev 4171) @@ -10,16 +10,16 @@ + "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", + "python2.5", -+ "site-python")) ++ "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", + "python2.3", -+ "site-python")) ++ "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", + "python2.1", -+ "site-python")) ++ "site-packages")) + sitedirs.append(os.path.join(prefix, "lib", -+ "site-python", -+ "site-python")) ++ "python", ++ "site-packages")) else: sitedirs.append(prefix) sitedirs.append(os.path.join(prefix, "lib", "site-packages")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wahwah at users.sourceforge.net Fri Apr 3 08:32:57 2009 From: wahwah at users.sourceforge.net (wahwah at users.sourceforge.net) Date: Fri, 03 Apr 2009 06:32:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4172] csw/mgar/pkg Message-ID: Revision: 4172 http://gar.svn.sourceforge.net/gar/?rev=4172&view=rev Author: wahwah Date: 2009-04-03 06:32:57 +0000 (Fri, 03 Apr 2009) Log Message: ----------- Adding PyYAML library Modified Paths: -------------- csw/mgar/pkg/pyyaml/trunk/Makefile csw/mgar/pkg/pyyaml/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pyyaml/ Property Changed: ---------------- csw/mgar/pkg/pyyaml/trunk/ csw/mgar/pkg/pyyaml/trunk/Makefile Property changes on: csw/mgar/pkg/pyyaml/trunk ___________________________________________________________________ Modified: svn:ignore - cookies download work + cookies download work Modified: csw/mgar/pkg/pyyaml/trunk/Makefile =================================================================== --- csw/mgar/pkg/template/trunk/Makefile 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/pyyaml/trunk/Makefile 2009-04-03 06:32:57 UTC (rev 4172) @@ -1,24 +1,51 @@ -GARNAME = mypkg -GARVERSION = 1.0 +# Copyright 2009 OpenCSW +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +GARNAME = pyyaml +GARVERSION = 3.08 CATEGORIES = lib -DESCRIPTION = This is a useful library +PROJ_NAME = PyYAML + +DESCRIPTION = YAML parser and emitter for Python define BLURB - It does stuff with things + PyYAML is a YAML parser and emitter for the Python programming language. + + PyYAML features: + + * a complete YAML 1.1 parser. In particular, PyYAML can parse all examples + from the specification. The parsing algorithm is simple enough to be a + reference for YAML parser implementors. + * Unicode support including UTF-8/UTF-16 input/output and \u escape + sequences. + * low-level event-based parser and emitter API (like SAX). + * high-level API for serializing and deserializing native Python + objects (like DOM or pickle). + * support for all types from the YAML types repository. A + simple extension API is provided. + * both pure-Python and fast LibYAML-based parsers and + emitters. + * relatively sensible error messages. endef -MASTER_SITES = -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +MASTER_SITES = http://pyyaml.org/download/pyyaml/ +DISTFILES = $(PROJ_NAME)-$(GARVERSION).tar.gz +WORKSRC = $(WORKDIR)/$(PROJ_NAME)-$(GARVERSION) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -CONFIGURE_ARGS = $(DIRPATHS) +ARCHALL = 1 +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = pyyaml +TEST_SCRIPTS = +INSTALL_SCRIPTS = pyyaml -# Remove the following rules and uncomment the -# include before building. -all: .DEFAULT -.DEFAULT: - @true +build-pyyaml: + (cd $(WORKSRC); python setup.py build) -#include gar/category.mk +install-pyyaml: + (cd $(WORKSRC); python setup.py install --root=$(DESTDIR)) + +include gar/category.mk Property changes on: csw/mgar/pkg/pyyaml/trunk/Makefile ___________________________________________________________________ Added: svn:keywords + Id Header Modified: csw/mgar/pkg/pyyaml/trunk/checksums =================================================================== --- csw/mgar/pkg/template/trunk/checksums 2009-04-02 06:26:31 UTC (rev 4154) +++ csw/mgar/pkg/pyyaml/trunk/checksums 2009-04-03 06:32:57 UTC (rev 4172) @@ -0,0 +1 @@ +a4163a2017fa57f448c66815511fa555 download/PyYAML-3.08.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 3 18:17:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 03 Apr 2009 16:17:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4173] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4173 http://gar.svn.sourceforge.net/gar/?rev=4173&view=rev Author: valholla Date: 2009-04-03 16:17:12 +0000 (Fri, 03 Apr 2009) Log Message: ----------- fix extension install admin scripts Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mime_magic/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -10,7 +10,7 @@ PKGFILES_CSWphp5mimemagic = .*/lib/php/extensions/.*/mime_magic.* -define CSWphp5mime_magic_postinstall +define CSWphp5mimemagic_postinstall #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini @@ -53,7 +53,7 @@ exit 0 endef -define CSWphp5mime_magic_preremove +define CSWphp5mimemagic_preremove #!/bin/sh PHP_INI=/opt/csw/php5/lib/php.ini Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -17,33 +17,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdomysql extension" +echo " ===> Enabling pdo_mysql extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdomysql" +* WARNING: Could not enable Extension "pdo_mysql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdomysql.so +* extension=pdo_mysql.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdomysql.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdomysql.so|extension=pdomysql.so|' $${PHP_INI} +if grep 'extension=pdo_mysql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_mysql.so|extension=pdo_mysql.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdomysql.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_mysql.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdomysql" +* NOTICE: Successfully Enabled Extension "pdo_mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -60,13 +60,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdomysql extension" +echo " ===> Disabling pdo_mysql extension" -perl -i -plne 's|extension=pdomysql.so|;extension=pdomysql.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_mysql.so|;extension=pdo_mysql.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdomysql" +* NOTICE: Successfully Disabled Extension "pdo_mysql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -16,33 +16,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdoodbc extension" +echo " ===> Enabling pdo_odbc extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdoodbc" +* WARNING: Could not enable Extension "pdo_odbc" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdoodbc.so +* extension=pdo_odbc.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdoodbc.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdoodbc.so|extension=pdoodbc.so|' $${PHP_INI} +if grep 'extension=pdo_odbc.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_odbc.so|extension=pdo_odbc.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdoodbc.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_odbc.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdoodbc" +* NOTICE: Successfully Enabled Extension "pdo_odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -59,13 +59,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdoodbc extension" +echo " ===> Disabling pdo_odbc extension" -perl -i -plne 's|extension=pdoodbc.so|;extension=pdoodbc.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_odbc.so|;extension=pdo_odbc.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdoodbc" +* NOTICE: Successfully Disabled Extension "pdo_odbc" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -18,33 +18,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdopgsql extension" +echo " ===> Enabling pdo_pgsql extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdopgsql" +* WARNING: Could not enable Extension "pdo_pgsql" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdopgsql.so +* extension=pdo_pgsql.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdopgsql.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdopgsql.so|extension=pdopgsql.so|' $${PHP_INI} +if grep 'extension=pdo_pgsql.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_pgsql.so|extension=pdo_pgsql.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdopgsql.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_pgsql.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdopgsql" +* NOTICE: Successfully Enabled Extension "pdo_pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -61,13 +61,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdopgsql extension" +echo " ===> Disabling pdo_pgsql extension" -perl -i -plne 's|extension=pdopgsql.so|;extension=pdopgsql.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_pgsql.so|;extension=pdo_pgsql.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdopgsql" +* NOTICE: Successfully Disabled Extension "pdo_pgsql" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -16,33 +16,33 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Post Install <===]" -echo " ===> Enabling pdosqlite extension" +echo " ===> Enabling pdo_sqlite extension" if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then /bin/true else cat << _EOF_ ****************************************************************************** -* WARNING: Could not enable Extension "pdosqlite" +* WARNING: Could not enable Extension "pdo_sqlite" * You will need to enable it by hand as follows: * * open $${PHP_INI} in your favorite text editor * Add the following line to the file, save, and restart your web server -* extension=pdosqlite.so +* extension=pdo_sqlite.so ****************************************************************************** _EOF_ exit 0 fi -if grep 'extension=pdosqlite.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=pdosqlite.so|extension=pdosqlite.so|' $${PHP_INI} +if grep 'extension=pdo_sqlite.so' $${PHP_INI} >/dev/null 2>&1; then + perl -i -plne 's|;extension=pdo_sqlite.so|extension=pdo_sqlite.so|' $${PHP_INI} else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdosqlite.so|' $${PHP_INI} + perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=pdo_sqlite.so|' $${PHP_INI} fi cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Enabled Extension "pdosqlite" +* NOTICE: Successfully Enabled Extension "pdo_sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the install @@ -59,13 +59,13 @@ PHP_INI=/opt/csw/php5/lib/php.ini echo "[===> Running Pre Remove <===]" -echo " ===> Disabling pdosqlite extension" +echo " ===> Disabling pdo_sqlite extension" -perl -i -plne 's|extension=pdosqlite.so|;extension=pdosqlite.so|' $${PHP_INI} +perl -i -plne 's|extension=pdo_sqlite.so|;extension=pdo_sqlite.so|' $${PHP_INI} cat << _EOF_ ****************************************************************************** -* NOTICE: Successfully Disabled Extension "pdosqlite" +* NOTICE: Successfully Disabled Extension "pdo_sqlite" * in $${PHP_INI} * * You will need to restart your web server to finish the removal Modified: csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-03 06:32:57 UTC (rev 4172) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/Makefile 2009-04-03 16:17:12 UTC (rev 4173) @@ -1,65 +1 @@ @ ( echo "==> Not configuring recode see README in extensions/php5_recode" ) -define CSWphp5recode_postinstall -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Post Install <===]" -echo " ===> Enabling recode extension" - -if grep 'CSW Extensions' $${PHP_INI} >/dev/null 2>&1; then - /bin/true -else - cat << _EOF_ -****************************************************************************** -* WARNING: Could not enable Extension "recode" -* You will need to enable it by hand as follows: -* -* open $${PHP_INI} in your favorite text editor -* Add the following line to the file, save, and restart your web server -* extension=recode.so -****************************************************************************** -_EOF_ -exit 0 -fi - -if grep 'extension=recode.so' $${PHP_INI} >/dev/null 2>&1; then - perl -i -plne 's|;extension=recode.so|extension=recode.so|' $${PHP_INI} -else - perl -i -pe 's|.*CSW Extensions|; CSW Extensions\nextension=recode.so|' $${PHP_INI} - fi - -cat << _EOF_ -****************************************************************************** -* NOTICE: Successfully Enabled Extension "recode" -* in $${PHP_INI} -* -* You will need to restart your web server to finish the install -****************************************************************************** -_EOF_ - - -exit 0 -endef - -define CSWphp5recode_preremove -#!/bin/sh - -PHP_INI=/opt/csw/php5/lib/php.ini - -echo "[===> Running Pre Remove <===]" -echo " ===> Disabling recode extension" - -perl -i -plne 's|extension=recode.so|;extension=recode.so|' $${PHP_INI} - -cat << _EOF_ -****************************************************************************** -* NOTICE: Successfully Disabled Extension "recode" -* in $${PHP_INI} -* -* You will need to restart your web server to finish the removal -****************************************************************************** -_EOF_ - -exit 0 -endef This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 00:43:32 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Fri, 03 Apr 2009 22:43:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4174] csw/mgar/pkg/exiftool/trunk Message-ID: Revision: 4174 http://gar.svn.sourceforge.net/gar/?rev=4174&view=rev Author: hson Date: 2009-04-03 22:43:32 +0000 (Fri, 03 Apr 2009) Log Message: ----------- exiftool: Upgrade to 7.73 Modified Paths: -------------- csw/mgar/pkg/exiftool/trunk/Makefile csw/mgar/pkg/exiftool/trunk/checksums Modified: csw/mgar/pkg/exiftool/trunk/Makefile =================================================================== --- csw/mgar/pkg/exiftool/trunk/Makefile 2009-04-03 16:17:12 UTC (rev 4173) +++ csw/mgar/pkg/exiftool/trunk/Makefile 2009-04-03 22:43:32 UTC (rev 4174) @@ -1,5 +1,5 @@ GARNAME = exiftool -GARVERSION = 7.69 +GARVERSION = 7.73 CATEGORIES = cpan DESCRIPTION = Read, Write and Edit Image File Meta Information Modified: csw/mgar/pkg/exiftool/trunk/checksums =================================================================== --- csw/mgar/pkg/exiftool/trunk/checksums 2009-04-03 16:17:12 UTC (rev 4173) +++ csw/mgar/pkg/exiftool/trunk/checksums 2009-04-03 22:43:32 UTC (rev 4174) @@ -1,2 +1,2 @@ -a20279271732877dd967ed2caa697882 download/Image-ExifTool-7.69.tar.gz +427d0107f6b40b0110757aaefd7cd8c8 download/Image-ExifTool-7.73.tar.gz 13f9aae615a5de5e3c145b374950a75c download/CSWexiftool.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Sat Apr 4 02:42:48 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Sat, 04 Apr 2009 00:42:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4175] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4175 http://gar.svn.sourceforge.net/gar/?rev=4175&view=rev Author: bdwalton Date: 2009-04-04 00:42:48 +0000 (Sat, 04 Apr 2009) Log Message: ----------- add missing perl dependency. Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-03 22:43:32 UTC (rev 4174) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-04 00:42:48 UTC (rev 4175) @@ -29,6 +29,7 @@ REQUIRED_PKGS_CSWgit = CSWzlib CSWperl CSWrsync CSWcurlrt CSWosslrt REQUIRED_PKGS_CSWgit += CSWossh CSWiconv CSWexpat CSWbash CSWpmerror +REQUIRED_PKGS_CSWgit += CSWpmtermreadkey REQUIRED_PKGS_CSWgitk = CSWgit CSWtk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 4 05:29:16 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 04 Apr 2009 03:29:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4176] csw/mgar/pkg/pth/trunk Message-ID: Revision: 4176 http://gar.svn.sourceforge.net/gar/?rev=4176&view=rev Author: valholla Date: 2009-04-04 03:29:16 +0000 (Sat, 04 Apr 2009) Log Message: ----------- checkin patch Modified Paths: -------------- csw/mgar/pkg/pth/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff Modified: csw/mgar/pkg/pth/trunk/checksums =================================================================== --- csw/mgar/pkg/pth/trunk/checksums 2009-04-04 00:42:48 UTC (rev 4175) +++ csw/mgar/pkg/pth/trunk/checksums 2009-04-04 03:29:16 UTC (rev 4176) @@ -1,3 +1,3 @@ 9cb4a25331a4c4db866a31cbe507c793 download/pth-2.0.7.tar.gz 0969fbb8ae032c8c1a08ff1c839a8c1c download/CSWpth.gspec -d7abc5f4f304d19371e3667de4810e48 download/patch_pth_fdsetsize64.diff +58bbe7bfde0cf264c073b5a3d5d3845f download/patch_pth_fdsetsize64.diff Added: csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff =================================================================== --- csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff (rev 0) +++ csw/mgar/pkg/pth/trunk/files/patch_pth_fdsetsize64.diff 2009-04-04 03:29:16 UTC (rev 4176) @@ -0,0 +1,39 @@ +--- pth-2.0.7/configure.o 2009-04-03 21:48:07.888815157 -0500 ++++ pth-2.0.7/configure 2009-04-03 21:50:45.969836100 -0500 +@@ -19603,7 +19603,7 @@ + echo $ECHO_N "checking for default value of FD_SETSIZE... $ECHO_C" >&6 + cross_compiling=no + if test "$cross_compiling" = yes; then +- ac_fdsetsize=1024 ++ ac_fdsetsize=65536 + + else + cat >conftest.$ac_ext <<_ACEOF +@@ -19652,7 +19652,7 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) +-ac_fdsetsize=1024 ++ac_fdsetsize=65536 + fi + rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +@@ -19666,12 +19666,13 @@ + if test "${with_fdsetsize+set}" = set; then + withval="$with_fdsetsize" + +-case $withval in +- [1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]) PTH_FDSETSIZE=$withval ;; +- * ) { { echo "$as_me:$LINENO: error: invalid FD_SETSIZE specified -- allowed: 10-9999" >&5 ++ if test $withval -ge 10 -a test $withval -le 65536; then ++ PTH_FDSETSIZE=$withval ++ else ++ { { echo "$as_me:$LINENO: error: invalid FD_SETSIZE specified -- allowed: 10-9999" >&5 + echo "$as_me: error: invalid FD_SETSIZE specified -- allowed: 10-9999" >&2;} +- { (exit 1); exit 1; }; } ;; +-esac ++ { (exit 1); exit 1; }; } ++fi + CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PTH_FDSETSIZE" + echo "$as_me:$LINENO: checking for overridden FD_SETSIZE value" >&5 + echo $ECHO_N "checking for overridden FD_SETSIZE value... $ECHO_C" >&6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sat Apr 4 16:11:09 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 04 Apr 2009 14:11:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4177] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4177 http://gar.svn.sourceforge.net/gar/?rev=4177&view=rev Author: chninkel Date: 2009-04-04 14:11:08 +0000 (Sat, 04 Apr 2009) Log Message: ----------- cadaver: updated changelog Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-04 03:29:16 UTC (rev 4176) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-04 14:11:08 UTC (rev 4177) @@ -1,3 +1,3 @@ 5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -af240ee7947d504a6b3e517352d0d883 download/changelog.CSW +9deb0d89879fd18151fdd8a5472f194d download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-04 03:29:16 UTC (rev 4176) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-04 14:11:08 UTC (rev 4177) @@ -1,4 +1,4 @@ -cadaver (0.23.2,REV=2009.04.01) unstable +cadaver (0.23.2,REV=2009.04.04) unstable * New upstream version. * Dropped destdir.patch as DESTDIR support has been added upstream. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 4 17:51:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 04 Apr 2009 15:51:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4178] csw/mgar/pkg/pysqlite/trunk/Makefile Message-ID: Revision: 4178 http://gar.svn.sourceforge.net/gar/?rev=4178&view=rev Author: valholla Date: 2009-04-04 15:51:06 +0000 (Sat, 04 Apr 2009) Log Message: ----------- ISALIST fix Modified Paths: -------------- csw/mgar/pkg/pysqlite/trunk/Makefile Modified: csw/mgar/pkg/pysqlite/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-04 14:11:08 UTC (rev 4177) +++ csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-04 15:51:06 UTC (rev 4178) @@ -17,19 +17,20 @@ PACKAGES = CSWpysqlite CATALOGNAME_CSWpysqlite = pysqlite SPKG_DESC_CSWpysqlite = SQLite 1.x support for Python -REQUIRED_PKGS_CSWpysqlite = CSWpython CSWsqlite3 +REQUIRED_PKGS_CSWpysqlite = CSWpython CSWsqlite3rt # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=54058 UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -NOISALIST = 1 +EXTRA_CPPFLAGS = -I/opt/csw/include CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = INSTALL_SCRIPTS = $(WORKSRC)/setup.py + INSTALL_ARGS = --root=$(DESTDIR) INSTALL_ARGS += --prefix=$(prefix) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 4 17:51:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 04 Apr 2009 15:51:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4179] csw/mgar/pkg/pysqlite2/trunk/Makefile Message-ID: Revision: 4179 http://gar.svn.sourceforge.net/gar/?rev=4179&view=rev Author: valholla Date: 2009-04-04 15:51:23 +0000 (Sat, 04 Apr 2009) Log Message: ----------- ISALIST fix Modified Paths: -------------- csw/mgar/pkg/pysqlite2/trunk/Makefile Modified: csw/mgar/pkg/pysqlite2/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-04 15:51:06 UTC (rev 4178) +++ csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-04 15:51:23 UTC (rev 4179) @@ -11,7 +11,7 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpysqlite2 -REQUIRED_PKGS_CSWpysqlite2 = CSWpython CSWsqlite3 +REQUIRED_PKGS_CSWpysqlite2 = CSWpython CSWsqlite3rt CATALOGNAME_CSWpysqlite2 = pysqlite2 SPKG_DESC_CSWpysqlite2 = SQLite3 support for Python This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From jake_goerzen at users.sourceforge.net Sat Apr 4 20:01:29 2009 From: jake_goerzen at users.sourceforge.net (jake_goerzen at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:01:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4180] csw/mgar/pkg/libsdl/trunk Message-ID: Revision: 4180 http://gar.svn.sourceforge.net/gar/?rev=4180&view=rev Author: jake_goerzen Date: 2009-04-04 18:01:29 +0000 (Sat, 04 Apr 2009) Log Message: ----------- update to mGAR v2 Modified Paths: -------------- csw/mgar/pkg/libsdl/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype Property Changed: ---------------- csw/mgar/pkg/libsdl/trunk/ Property changes on: csw/mgar/pkg/libsdl/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/libsdl/trunk/Makefile =================================================================== --- csw/mgar/pkg/libsdl/trunk/Makefile 2009-04-04 15:51:23 UTC (rev 4179) +++ csw/mgar/pkg/libsdl/trunk/Makefile 2009-04-04 18:01:29 UTC (rev 4180) @@ -10,9 +10,11 @@ endef MASTER_SITES = http://www.libsdl.org/release/ -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibsdl, prototype) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += $(call admfiles,CSWlibsdl) +REQUIRED_PKGS = CSWiconv + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Deleted: csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype =================================================================== --- csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype 2009-04-04 15:51:23 UTC (rev 4179) +++ csw/mgar/pkg/libsdl/trunk/files/CSWlibsdl.prototype 2009-04-04 18:01:29 UTC (rev 4180) @@ -1,222 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sdl-config 0755 root bin -d none /opt/csw/include/SDL 0755 root bin -f none /opt/csw/include/SDL/SDL.h 0644 root bin -f none /opt/csw/include/SDL/SDL_active.h 0644 root bin -f none /opt/csw/include/SDL/SDL_audio.h 0644 root bin -f none /opt/csw/include/SDL/SDL_byteorder.h 0644 root bin -f none /opt/csw/include/SDL/SDL_cdrom.h 0644 root bin -f none /opt/csw/include/SDL/SDL_config.h 0644 root bin -f none /opt/csw/include/SDL/SDL_cpuinfo.h 0644 root bin -f none /opt/csw/include/SDL/SDL_endian.h 0644 root bin -f none /opt/csw/include/SDL/SDL_error.h 0644 root bin -f none /opt/csw/include/SDL/SDL_events.h 0644 root bin -f none /opt/csw/include/SDL/SDL_getenv.h 0644 root bin -f none /opt/csw/include/SDL/SDL_joystick.h 0644 root bin -f none /opt/csw/include/SDL/SDL_keyboard.h 0644 root bin -f none /opt/csw/include/SDL/SDL_keysym.h 0644 root bin -f none /opt/csw/include/SDL/SDL_loadso.h 0644 root bin -f none /opt/csw/include/SDL/SDL_main.h 0644 root bin -f none /opt/csw/include/SDL/SDL_mouse.h 0644 root bin -f none /opt/csw/include/SDL/SDL_mutex.h 0644 root bin -f none /opt/csw/include/SDL/SDL_name.h 0644 root bin -f none /opt/csw/include/SDL/SDL_opengl.h 0644 root bin -f none /opt/csw/include/SDL/SDL_platform.h 0644 root bin -f none /opt/csw/include/SDL/SDL_quit.h 0644 root bin -f none /opt/csw/include/SDL/SDL_rwops.h 0644 root bin -f none /opt/csw/include/SDL/SDL_stdinc.h 0644 root bin -f none /opt/csw/include/SDL/SDL_syswm.h 0644 root bin -f none /opt/csw/include/SDL/SDL_thread.h 0644 root bin -f none /opt/csw/include/SDL/SDL_timer.h 0644 root bin -f none /opt/csw/include/SDL/SDL_types.h 0644 root bin -f none /opt/csw/include/SDL/SDL_version.h 0644 root bin -f none /opt/csw/include/SDL/SDL_video.h 0644 root bin -f none /opt/csw/include/SDL/begin_code.h 0644 root bin -f none /opt/csw/include/SDL/close_code.h 0644 root bin -d none /opt/csw/lib 0755 root bin -f none /opt/csw/lib/libSDL-1.2.so.0.11.2 0755 root bin -s none /opt/csw/lib/libSDL-1.2.so.0=libSDL-1.2.so.0.11.2 -s none /opt/csw/lib/libSDL.so=libSDL-1.2.so.0.11.2 -d none /opt/csw/lib/pkgconfig 0755 root bin -f none /opt/csw/lib/pkgconfig/sdl.pc 0644 root bin -d none /opt/csw/share 0755 root bin -d none /opt/csw/share/aclocal 0755 root bin -f none /opt/csw/share/aclocal/sdl.m4 0644 root bin -d none /opt/csw/share/man/man3 0755 root bin -f none /opt/csw/share/man/man3/SDLKey.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ActiveEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_AddTimer.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_AudioCVT.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_AudioSpec.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_BlitSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_BuildAudioCVT.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CD.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDClose.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDEject.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDNumDrives.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDOpen.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDPause.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDPlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDPlayTracks.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDResume.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDStatus.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDStop.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CDtrack.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CloseAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Color.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondBroadcast.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondSignal.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondWait.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CondWaitTimeout.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ConvertAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ConvertSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateCond.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateMutex.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateRGBSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateRGBSurfaceFrom.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateSemaphore.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateThread.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_CreateYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Delay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DestroyCond.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DestroyMutex.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DestroySemaphore.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DisplayFormat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DisplayFormatAlpha.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_DisplayYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_EnableKeyRepeat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_EnableUNICODE.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Event.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_EventState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ExposeEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FillRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Flip.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeWAV.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_FreeYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_GetAttribute.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_GetProcAddress.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_LoadLibrary.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_SetAttribute.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GL_SwapBuffers.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GLattr.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetAppState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetAudioStatus.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetClipRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetError.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetEventFilter.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetGamma.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetGammaRamp.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetKeyName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetKeyState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetModState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetMouseState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetRGB.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetRGBA.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetRelativeMouseState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetThreadID.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetTicks.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetVideoInfo.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_GetVideoSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Init.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_InitSubSystem.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyAxisEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyBallEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyButtonEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoyHatEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickClose.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickEventState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetAxis.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetBall.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetButton.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickGetHat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickIndex.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumAxes.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumBalls.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumButtons.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickNumHats.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickOpen.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickOpened.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_JoystickUpdate.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_KeyboardEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_KillThread.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ListModes.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LoadBMP.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LoadWAV.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LockAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LockSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_LockYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MapRGB.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MapRGBA.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MixAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MouseButtonEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_MouseMotionEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_NumJoysticks.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_OpenAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Overlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Palette.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PauseAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PeepEvents.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PixelFormat.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PollEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PumpEvents.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_PushEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Quit.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_QuitEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_QuitSubSystem.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_RWFromFile.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Rect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_RemoveTimer.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ResizeEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SaveBMP.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemPost.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemTryWait.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemValue.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemWait.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SemWaitTimeout.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetAlpha.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetClipRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetColorKey.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetColors.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetEventFilter.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetGamma.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetGammaRamp.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetModState.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetPalette.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetTimer.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SetVideoMode.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ShowCursor.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_Surface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_SysWMEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_ThreadID.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UnlockAudio.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UnlockSurface.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UnlockYUVOverlay.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UpdateRect.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UpdateRects.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_UserEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_VideoDriverName.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_VideoInfo.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_VideoModeOK.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_GetCaption.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_GrabInput.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_IconifyWindow.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_SetCaption.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_SetIcon.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WM_ToggleFullScreen.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WaitEvent.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WaitThread.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WarpMouse.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_WasInit.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_keysym.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_mutexP.3 0644 root bin -f none /opt/csw/share/man/man3/SDL_mutexV.3 0644 root bin -i copyright=CSWlibsdl.copyright -i depend=CSWlibsdl.depend -i pkginfo=CSWlibsdl.pkginfo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:02:21 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:02:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4181] csw/mgar/pkg/libnids/trunk Message-ID: Revision: 4181 http://gar.svn.sourceforge.net/gar/?rev=4181&view=rev Author: hson Date: 2009-04-04 18:02:20 +0000 (Sat, 04 Apr 2009) Log Message: ----------- libnids: Patch configure when not using LD_OPTIONS, split other patches into their own files Modified Paths: -------------- csw/mgar/pkg/libnids/trunk/Makefile csw/mgar/pkg/libnids/trunk/checksums Added Paths: ----------- csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff csw/mgar/pkg/libnids/trunk/files/checksum.c.diff csw/mgar/pkg/libnids/trunk/files/configure.diff csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff csw/mgar/pkg/libnids/trunk/files/utils.c.diff Removed Paths: ------------- csw/mgar/pkg/libnids/trunk/files/mainpatch Modified: csw/mgar/pkg/libnids/trunk/Makefile =================================================================== --- csw/mgar/pkg/libnids/trunk/Makefile 2009-04-04 18:01:29 UTC (rev 4180) +++ csw/mgar/pkg/libnids/trunk/Makefile 2009-04-04 18:02:20 UTC (rev 4181) @@ -4,7 +4,11 @@ DESCRIPTION = implementation of an e-component of network intrusion detection define BLURB - Long description + Libnids is a library that provides a functionality of one of NIDS + (Network Intrusion Detection System) components, namely E-component. It means + that libnids code watches all local network traffic, cooks received datagrams + a bit (quite a bit ;)), and provides convenient information on them to + analyzing modules of NIDS. endef SF_PROJ = $(GARNAME) @@ -20,14 +24,12 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = +PATCHFILES = Makfile.in.diff +PATCHFILES += checksum.c.diff +PATCHFILES += configure.diff +PATCHFILES += ip_options.c.diff +PATCHFILES += utils.c.diff -#GARCOMPILER = GCC3 - -PATCHFILES = mainpatch - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-shared Modified: csw/mgar/pkg/libnids/trunk/checksums =================================================================== --- csw/mgar/pkg/libnids/trunk/checksums 2009-04-04 18:01:29 UTC (rev 4180) +++ csw/mgar/pkg/libnids/trunk/checksums 2009-04-04 18:02:20 UTC (rev 4181) @@ -1,2 +1,6 @@ af35e8ef403a0ca95df2da94db856428 download/libnids-1.23.tar.gz -eded3e75e8a25acf7922ba0e7593ecb1 download/mainpatch +5c4890d30fb6d8666f8aa8987d6b4b24 download/Makfile.in.diff +1eb0e1c82b9855f7526d63323741aec6 download/checksum.c.diff +875c511f86f39a0b13131f4d3246a35a download/configure.diff +d98069814fe6b17ea8c07aecc76e4386 download/ip_options.c.diff +276ccbd2caeab913432fe749d6a0c020 download/utils.c.diff Added: csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/Makfile.in.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,75 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/Makefile.in libnids-1.23/src/Makefile.in +--- libnids-1.23.orig/src/Makefile.in 2008-02-21 11:40:19.000000000 +0100 ++++ libnids-1.23/src/Makefile.in 2009-03-11 00:03:28.000000000 +0100 +@@ -16,7 +16,7 @@ + LIBSHARED = libnids.so.1.23 + + CC = @CC@ +-CFLAGS = @CFLAGS@ -W -Wall -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ ++CFLAGS = @CFLAGS@ -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ + LDFLAGS = @LDFLAGS@ + + PCAP_CFLAGS = @PCAP_CFLAGS@ +@@ -40,43 +40,43 @@ + # How to write the following rules compactly and portably ? + # gmake accepts "%_pic.o: %.c", bsd make does not. + checksum_pic.o: checksum.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ + ip_fragment_pic.o: ip_fragment.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ + ip_options_pic.o: ip_options.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ + killtcp_pic.o: killtcp.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ + libnids_pic.o: libnids.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ + scan_pic.o: scan.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ + tcp_pic.o: tcp.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ + util_pic.o: util.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ + allpromisc_pic.o: allpromisc.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ + hash_pic.o: hash.c +- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ ++ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ + + + $(LIBSTATIC): $(OBJS) + ar -cr $@ $(OBJS) + $(RANLIB) $@ + $(LIBSHARED): $(OBJS_SHARED) +- $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) ++ $(LD) -G -h $(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) + + _install install: $(LIBSTATIC) +- ../mkinstalldirs $(install_prefix)$(libdir) +- ../mkinstalldirs $(install_prefix)$(includedir) +- ../mkinstalldirs $(install_prefix)$(mandir)/man3 +- $(INSTALL) -c -m 644 libnids.a $(install_prefix)$(libdir) +- $(INSTALL) -c -m 644 nids.h $(install_prefix)$(includedir) +- $(INSTALL) -c -m 644 libnids.3 $(install_prefix)$(mandir)/man3 ++ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(libdir) ++ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(includedir) ++ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(mandir)/man3 ++ $(INSTALL) -c -m 644 libnids.a $(DESTDIR)$(install_prefix)$(libdir) ++ $(INSTALL) -c -m 644 nids.h $(DESTDIR)$(install_prefix)$(includedir) ++ $(INSTALL) -c -m 644 libnids.3 $(DESTDIR)$(install_prefix)$(mandir)/man3 + _installshared installshared: install $(LIBSHARED) +- $(INSTALL) -c -m 755 $(LIBSHARED) $(install_prefix)$(libdir) +- ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.so ++ $(INSTALL) -c -m 755 $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir) ++ ln -s -f $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir)/libnids.so + + clean: + rm -f *.o *~ $(LIBSTATIC) $(LIBSHARED) Added: csw/mgar/pkg/libnids/trunk/files/checksum.c.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/checksum.c.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/checksum.c.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,46 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/checksum.c libnids-1.23/src/checksum.c +--- libnids-1.23.orig/src/checksum.c 2005-02-08 16:46:11.000000000 +0100 ++++ libnids-1.23/src/checksum.c 2009-03-11 12:38:07.808047165 +0100 +@@ -25,7 +25,7 @@ + return 0; + } + +-#if ( __i386__ || __i386 ) ++#if ( __i386__ || __i386 ) && __GNUC__ + // all asm procedures are copied from Linux 2.0.36 and 2.2.10 kernels + + /* +@@ -120,7 +120,7 @@ + By Jorge Cwik , adapted for linux by Arnt + Gulbrandsen. + */ +-inline u_short ip_fast_csum(u_char * iph, u_int ihl) ++u_short ip_fast_csum(u_char * iph, u_int ihl) + { + u_int sum; + if (dontchksum(((struct ip*)iph)->ip_src.s_addr)) +@@ -191,13 +191,13 @@ + this routine is used for miscellaneous IP-like checksums, mainly in + icmp.c + */ +-inline u_short ++u_short + ip_compute_csum(u_char * buff, int len) + { + return (csum_fold(csum_partial(buff, len, 0))); + } + +-inline u_short ++u_short + my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr) + { + if (dontchksum(saddr)) +@@ -205,7 +205,7 @@ + return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP, + csum_partial((char *)th, len, 0)); + } +-inline u_short ++u_short + my_udp_check(void *u, int len, u_int saddr, u_int daddr) + { + if (dontchksum(saddr)) Added: csw/mgar/pkg/libnids/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/configure.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/configure.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,20 @@ +--- ../build-global/libnids-1.23/configure 2006-05-01 19:14:51.000000000 +0200 ++++ libnids-1.23/configure 2009-04-04 19:03:29.185337901 +0200 +@@ -4288,7 +4288,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lgthread-2.0 $GTHREAD_LIBS $LIBS" ++LIBS="$LIBS $GTHREAD_LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -4350,7 +4350,7 @@ + #define HAVE_LIBGTHREAD_2_0 1 + _ACEOF + +- LIBS="-lgthread-2.0 $LIBS" ++ LIBS="$LIBS $GTHREAD_LIBS" + + fi + Added: csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/ip_options.c.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/ip_options.c libnids-1.23/src/ip_options.c +--- libnids-1.23.orig/src/ip_options.c 2002-08-10 21:07:45.000000000 +0200 ++++ libnids-1.23/src/ip_options.c 2009-03-11 00:03:28.000000000 +0100 +@@ -69,7 +69,7 @@ + unsigned char __pad1; + unsigned char __pad2; + unsigned char __pad3; +- unsigned char __data[0]; ++ unsigned char __data[]; + }; + + struct iphdr { Deleted: csw/mgar/pkg/libnids/trunk/files/mainpatch =================================================================== --- csw/mgar/pkg/libnids/trunk/files/mainpatch 2009-04-04 18:01:29 UTC (rev 4180) +++ csw/mgar/pkg/libnids/trunk/files/mainpatch 2009-04-04 18:02:20 UTC (rev 4181) @@ -1,152 +0,0 @@ -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/Makefile.in libnids-1.23/src/Makefile.in ---- libnids-1.23.orig/src/Makefile.in 2008-02-21 11:40:19.000000000 +0100 -+++ libnids-1.23/src/Makefile.in 2009-03-11 00:03:28.000000000 +0100 -@@ -16,7 +16,7 @@ - LIBSHARED = libnids.so.1.23 - - CC = @CC@ --CFLAGS = @CFLAGS@ -W -Wall -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ -+CFLAGS = @CFLAGS@ -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ - LDFLAGS = @LDFLAGS@ - - PCAP_CFLAGS = @PCAP_CFLAGS@ -@@ -40,43 +40,43 @@ - # How to write the following rules compactly and portably ? - # gmake accepts "%_pic.o: %.c", bsd make does not. - checksum_pic.o: checksum.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c checksum.c -o $@ - ip_fragment_pic.o: ip_fragment.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_fragment.c -o $@ - ip_options_pic.o: ip_options.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c ip_options.c -o $@ - killtcp_pic.o: killtcp.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c killtcp.c -o $@ - libnids_pic.o: libnids.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c libnids.c -o $@ - scan_pic.o: scan.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c scan.c -o $@ - tcp_pic.o: tcp.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c tcp.c -o $@ - util_pic.o: util.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c util.c -o $@ - allpromisc_pic.o: allpromisc.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c allpromisc.c -o $@ - hash_pic.o: hash.c -- $(CC) -fPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ -+ $(CC) -KPIC $(CFLAGS) -I. $(LIBS_CFLAGS) -c hash.c -o $@ - - - $(LIBSTATIC): $(OBJS) - ar -cr $@ $(OBJS) - $(RANLIB) $@ - $(LIBSHARED): $(OBJS_SHARED) -- $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) -+ $(LD) -G -h $(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) - - _install install: $(LIBSTATIC) -- ../mkinstalldirs $(install_prefix)$(libdir) -- ../mkinstalldirs $(install_prefix)$(includedir) -- ../mkinstalldirs $(install_prefix)$(mandir)/man3 -- $(INSTALL) -c -m 644 libnids.a $(install_prefix)$(libdir) -- $(INSTALL) -c -m 644 nids.h $(install_prefix)$(includedir) -- $(INSTALL) -c -m 644 libnids.3 $(install_prefix)$(mandir)/man3 -+ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(libdir) -+ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(includedir) -+ ../mkinstalldirs $(DESTDIR)$(install_prefix)$(mandir)/man3 -+ $(INSTALL) -c -m 644 libnids.a $(DESTDIR)$(install_prefix)$(libdir) -+ $(INSTALL) -c -m 644 nids.h $(DESTDIR)$(install_prefix)$(includedir) -+ $(INSTALL) -c -m 644 libnids.3 $(DESTDIR)$(install_prefix)$(mandir)/man3 - _installshared installshared: install $(LIBSHARED) -- $(INSTALL) -c -m 755 $(LIBSHARED) $(install_prefix)$(libdir) -- ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.so -+ $(INSTALL) -c -m 755 $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir) -+ ln -s -f $(LIBSHARED) $(DESTDIR)$(install_prefix)$(libdir)/libnids.so - - clean: - rm -f *.o *~ $(LIBSTATIC) $(LIBSHARED) -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/checksum.c libnids-1.23/src/checksum.c ---- libnids-1.23.orig/src/checksum.c 2005-02-08 16:46:11.000000000 +0100 -+++ libnids-1.23/src/checksum.c 2009-03-11 12:38:07.808047165 +0100 -@@ -25,7 +25,7 @@ - return 0; - } - --#if ( __i386__ || __i386 ) -+#if ( __i386__ || __i386 ) && __GNUC__ - // all asm procedures are copied from Linux 2.0.36 and 2.2.10 kernels - - /* -@@ -120,7 +120,7 @@ - By Jorge Cwik , adapted for linux by Arnt - Gulbrandsen. - */ --inline u_short ip_fast_csum(u_char * iph, u_int ihl) -+u_short ip_fast_csum(u_char * iph, u_int ihl) - { - u_int sum; - if (dontchksum(((struct ip*)iph)->ip_src.s_addr)) -@@ -191,13 +191,13 @@ - this routine is used for miscellaneous IP-like checksums, mainly in - icmp.c - */ --inline u_short -+u_short - ip_compute_csum(u_char * buff, int len) - { - return (csum_fold(csum_partial(buff, len, 0))); - } - --inline u_short -+u_short - my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr) - { - if (dontchksum(saddr)) -@@ -205,7 +205,7 @@ - return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP, - csum_partial((char *)th, len, 0)); - } --inline u_short -+u_short - my_udp_check(void *u, int len, u_int saddr, u_int daddr) - { - if (dontchksum(saddr)) -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/ip_options.c libnids-1.23/src/ip_options.c ---- libnids-1.23.orig/src/ip_options.c 2002-08-10 21:07:45.000000000 +0200 -+++ libnids-1.23/src/ip_options.c 2009-03-11 00:03:28.000000000 +0100 -@@ -69,7 +69,7 @@ - unsigned char __pad1; - unsigned char __pad2; - unsigned char __pad3; -- unsigned char __data[0]; -+ unsigned char __data[]; - }; - - struct iphdr { -diff --speed-large-files --minimal -ru libnids-1.23.orig/src/util.c libnids-1.23/src/util.c ---- libnids-1.23.orig/src/util.c 2006-05-01 18:58:48.000000000 +0200 -+++ libnids-1.23/src/util.c 2009-03-11 00:48:59.000000000 +0100 -@@ -29,13 +29,13 @@ - return ret; - } - --inline int -+int - before(u_int seq1, u_int seq2) - { - return ((int)(seq1 - seq2) < 0); - } - --inline int -+int - after(u_int seq1, u_int seq2) - { - return ((int)(seq2 - seq1) < 0); Added: csw/mgar/pkg/libnids/trunk/files/utils.c.diff =================================================================== --- csw/mgar/pkg/libnids/trunk/files/utils.c.diff (rev 0) +++ csw/mgar/pkg/libnids/trunk/files/utils.c.diff 2009-04-04 18:02:20 UTC (rev 4181) @@ -0,0 +1,19 @@ +diff --speed-large-files --minimal -ru libnids-1.23.orig/src/util.c libnids-1.23/src/util.c +--- libnids-1.23.orig/src/util.c 2006-05-01 18:58:48.000000000 +0200 ++++ libnids-1.23/src/util.c 2009-03-11 00:48:59.000000000 +0100 +@@ -29,13 +29,13 @@ + return ret; + } + +-inline int ++int + before(u_int seq1, u_int seq2) + { + return ((int)(seq1 - seq2) < 0); + } + +-inline int ++int + after(u_int seq1, u_int seq2) + { + return ((int)(seq2 - seq1) < 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:08:40 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:08:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4182] csw/mgar/pkg/ImageMagick/trunk Message-ID: Revision: 4182 http://gar.svn.sourceforge.net/gar/?rev=4182&view=rev Author: hson Date: 2009-04-04 18:08:40 +0000 (Sat, 04 Apr 2009) Log Message: ----------- imagemagick: Use fixme to patch libtool, rename compare to compare2 due to conflict with CSWschilyutils Modified Paths: -------------- csw/mgar/pkg/ImageMagick/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh Modified: csw/mgar/pkg/ImageMagick/trunk/Makefile =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-04 18:02:20 UTC (rev 4181) +++ csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-04 18:08:40 UTC (rev 4182) @@ -24,6 +24,7 @@ REQUIRED_PKGS += CSWglib2 CSWgs CSWgtk2 CSWilmbase CSWjasper CSWjbigkit REQUIRED_PKGS += CSWjpeg CSWlcms CSWlibcairo CSWlibfpx CSWlibrsvg CSWlibxml2 REQUIRED_PKGS += CSWopenexr CSWperl CSWpng CSWsunmath CSWtiff CSWwmf CSWzlib +REQUIRED_PKGS += CSWlibtoolrt # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = ImageMagick-((\d+(?:\.\d+)*)-(\d+)?).tar.bz2 @@ -47,6 +48,11 @@ include gar/category.mk +post-configure-$(MODULATION): + @(echo "~~~ Fixing Libtool ~~~") + @$(FILEDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + post-install-isa-sparcv8: @cp $(FILEDIR)/libMagick.so.10.0.4.s $(INSTALLISADIR)$(libdir)/libMagick.so.10.0.4 @cp $(FILEDIR)/libWand.so.10.0.4.s $(INSTALLISADIR)$(libdir)/libWand.so.10.0.4 @@ -57,6 +63,8 @@ @ln -s ImageMagick-$(GARVERSION) $(INSTALLISADIR)$(docdir)/ImageMagick echo $(DESTDIR) @( cd $(INSTALLISADIR)$(libdir) ; gzip -dc $(DESTDIR)/../../$(FILEDIR)/lib_6.2.9_s.tar.gz |tar xf -) + @mv $(INSTALLISADIR)$(mandir)/man1/compare.1 $(INSTALLISADIR)$(mandir)/man1/compare2.1 + @mv $(INSTALLISADIR)$(bindir)/compare $(INSTALLISADIR)$(bindir)/compare2 @$(MAKECOOKIE) post-install-isa-i386: @@ -69,4 +77,6 @@ @ln -s ImageMagick-$(GARVERSION) $(INSTALLISADIR)$(docdir)/ImageMagick echo $(DESTDIR) @( cd $(INSTALLISADIR)$(libdir) ; gzip -dc $(DESTDIR)/../../$(FILEDIR)/lib_6.2.9_i.tar.gz |tar xf -) + @mv $(INSTALLISADIR)$(mandir)/man1/compare.1 $(INSTALLISADIR)$(mandir)/man1/compare2.1 + @mv $(INSTALLISADIR)$(bindir)/compare $(INSTALLISADIR)$(bindir)/compare2 @$(MAKECOOKIE) Added: csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh 2009-04-04 18:08:40 UTC (rev 4182) @@ -0,0 +1,49 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} +done + +LTMAIN=$(gfind ${BASEPATH} -name ltmain.sh -print) +if [ -f ${LTMAIN} ]; then + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} +fi + Property changes on: csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:33:29 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:33:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4183] csw/mgar/pkg/librsvg/trunk Message-ID: Revision: 4183 http://gar.svn.sourceforge.net/gar/?rev=4183&view=rev Author: hson Date: 2009-04-04 18:33:28 +0000 (Sat, 04 Apr 2009) Log Message: ----------- librsvg: Use fixme to fix libtool problem Modified Paths: -------------- csw/mgar/pkg/librsvg/trunk/Makefile csw/mgar/pkg/librsvg/trunk/checksums Added Paths: ----------- csw/mgar/pkg/librsvg/trunk/files/fixme.sh Modified: csw/mgar/pkg/librsvg/trunk/Makefile =================================================================== --- csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:08:40 UTC (rev 4182) +++ csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:33:28 UTC (rev 4183) @@ -19,6 +19,7 @@ MASTER_SITES = http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION).$(GARSUBREV).tar.bz2 +DISTFILES += fixme.sh DISTNAME = $(GARNAME)-$(GARVERSION).$(GARSUBREV) @@ -50,6 +51,11 @@ include gar/category.mk +post-configure-modulated: + @(echo "~~~ Fixing Libtool ~~~") + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + $(DONADA) + post-install-isa-sparcv8: @cp $(FILEDIR)/librsvg-2.so.2.15.90.s $(INSTALLISADIR)/opt/csw/lib/librsvg-2.so.2.15.90 Modified: csw/mgar/pkg/librsvg/trunk/checksums =================================================================== --- csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:08:40 UTC (rev 4182) +++ csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:33:28 UTC (rev 4183) @@ -1,7 +1,5 @@ c4ec4fdb2b1842e221ca39127e85682d download/librsvg-2.22.3.tar.bz2 -300ffe1b2413261b5ce5e451c8c7d0eb download/librsvg-2.so.2.15.90.i -5e90964c1f99f46100f71cdb3d549fcc download/librsvg-2.so.2.15.90.s -d2491b9b8f422321a88f0414f5e78196 download/CSWlibrsvg.gspec +70771682427d524354d50482371edca5 download/fixme.sh 5b0c0387946c3b7ca7feb913de436936 download/pdiff.patch 8a26f6d0d0cf1cfce1a1e0365c6624ce download/perceptualdiff.patch 803a5d10e3e9c9a561b397aade043024 download/test_makefiles.patch Added: csw/mgar/pkg/librsvg/trunk/files/fixme.sh =================================================================== --- csw/mgar/pkg/librsvg/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/librsvg/trunk/files/fixme.sh 2009-04-04 18:33:28 UTC (rev 4183) @@ -0,0 +1,49 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + sed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} +done + +LTMAIN=$(gfind ${BASEPATH} -name ltmain.sh -print) +if [ -f ${LTMAIN} ]; then + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} +fi + Property changes on: csw/mgar/pkg/librsvg/trunk/files/fixme.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:34:36 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:34:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4184] csw/mgar/pkg/wmf/trunk Message-ID: Revision: 4184 http://gar.svn.sourceforge.net/gar/?rev=4184&view=rev Author: hson Date: 2009-04-04 18:34:36 +0000 (Sat, 04 Apr 2009) Log Message: ----------- wmf: Use fixme to fix libtool problem Modified Paths: -------------- csw/mgar/pkg/wmf/trunk/Makefile csw/mgar/pkg/wmf/trunk/checksums Added Paths: ----------- csw/mgar/pkg/wmf/trunk/files/fixme.sh Modified: csw/mgar/pkg/wmf/trunk/Makefile =================================================================== --- csw/mgar/pkg/wmf/trunk/Makefile 2009-04-04 18:33:28 UTC (rev 4183) +++ csw/mgar/pkg/wmf/trunk/Makefile 2009-04-04 18:34:36 UTC (rev 4184) @@ -28,11 +28,13 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = - CONFIGURE_ARGS = $(DIRPATHS) TEST_TARGET = check + include gar/category.mk + +post-configure-modulated: + @(echo "~~~ Fixing Libtool ~~~") + @$(FILEDIR)/fixme.sh $(WORKSRC) + $(DONADA) Modified: csw/mgar/pkg/wmf/trunk/checksums =================================================================== --- csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:33:28 UTC (rev 4183) +++ csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:34:36 UTC (rev 4184) @@ -1 +1,2 @@ d1177739bf1ceb07f57421f0cee191e0 download/libwmf-0.2.8.4.tar.gz +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh Added: csw/mgar/pkg/wmf/trunk/files/fixme.sh =================================================================== --- csw/mgar/pkg/wmf/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/wmf/trunk/files/fixme.sh 2009-04-04 18:34:36 UTC (rev 4184) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + Property changes on: csw/mgar/pkg/wmf/trunk/files/fixme.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:36:03 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:36:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4185] csw/mgar/pkg/wmf/trunk/checksums Message-ID: Revision: 4185 http://gar.svn.sourceforge.net/gar/?rev=4185&view=rev Author: hson Date: 2009-04-04 18:36:02 +0000 (Sat, 04 Apr 2009) Log Message: ----------- wmf: fixme dont have to be in DISTFILES Modified Paths: -------------- csw/mgar/pkg/wmf/trunk/checksums Modified: csw/mgar/pkg/wmf/trunk/checksums =================================================================== --- csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:34:36 UTC (rev 4184) +++ csw/mgar/pkg/wmf/trunk/checksums 2009-04-04 18:36:02 UTC (rev 4185) @@ -1,2 +1 @@ d1177739bf1ceb07f57421f0cee191e0 download/libwmf-0.2.8.4.tar.gz -34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 20:36:20 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 18:36:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4186] csw/mgar/pkg/librsvg/trunk Message-ID: Revision: 4186 http://gar.svn.sourceforge.net/gar/?rev=4186&view=rev Author: hson Date: 2009-04-04 18:36:20 +0000 (Sat, 04 Apr 2009) Log Message: ----------- librsvg: fixme dont have to be in DISTFILES Modified Paths: -------------- csw/mgar/pkg/librsvg/trunk/Makefile csw/mgar/pkg/librsvg/trunk/checksums Modified: csw/mgar/pkg/librsvg/trunk/Makefile =================================================================== --- csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:36:02 UTC (rev 4185) +++ csw/mgar/pkg/librsvg/trunk/Makefile 2009-04-04 18:36:20 UTC (rev 4186) @@ -19,7 +19,6 @@ MASTER_SITES = http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION).$(GARSUBREV).tar.bz2 -DISTFILES += fixme.sh DISTNAME = $(GARNAME)-$(GARVERSION).$(GARSUBREV) @@ -53,7 +52,7 @@ post-configure-modulated: @(echo "~~~ Fixing Libtool ~~~") - @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(FILEDIR)/fixme.sh $(WORKSRC) $(DONADA) post-install-isa-sparcv8: Modified: csw/mgar/pkg/librsvg/trunk/checksums =================================================================== --- csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:36:02 UTC (rev 4185) +++ csw/mgar/pkg/librsvg/trunk/checksums 2009-04-04 18:36:20 UTC (rev 4186) @@ -1,5 +1,4 @@ c4ec4fdb2b1842e221ca39127e85682d download/librsvg-2.22.3.tar.bz2 -70771682427d524354d50482371edca5 download/fixme.sh 5b0c0387946c3b7ca7feb913de436936 download/pdiff.patch 8a26f6d0d0cf1cfce1a1e0365c6624ce download/perceptualdiff.patch 803a5d10e3e9c9a561b397aade043024 download/test_makefiles.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sat Apr 4 23:01:36 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 21:01:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4187] csw/mgar/pkg/wput/trunk Message-ID: Revision: 4187 http://gar.svn.sourceforge.net/gar/?rev=4187&view=rev Author: hson Date: 2009-04-04 21:01:36 +0000 (Sat, 04 Apr 2009) Log Message: ----------- wput: gnutls_devel required, gzipped manpages wont work Modified Paths: -------------- csw/mgar/pkg/wput/trunk/Makefile csw/mgar/pkg/wput/trunk/checksums csw/mgar/pkg/wput/trunk/files/Makefile.in.diff Modified: csw/mgar/pkg/wput/trunk/Makefile =================================================================== --- csw/mgar/pkg/wput/trunk/Makefile 2009-04-04 18:36:20 UTC (rev 4186) +++ csw/mgar/pkg/wput/trunk/Makefile 2009-04-04 21:01:36 UTC (rev 4187) @@ -15,8 +15,10 @@ LICENSE = COPYING -REQUIRED_PKGS = CSWggettextrt +PREREQUISITE_PKGS = CSWgnutlsdevel +REQUIRED_PKGS = CSWggettextrt CSWgnutls + # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=141519 UPSTREAM_USE_SF = 1 Modified: csw/mgar/pkg/wput/trunk/checksums =================================================================== --- csw/mgar/pkg/wput/trunk/checksums 2009-04-04 18:36:20 UTC (rev 4186) +++ csw/mgar/pkg/wput/trunk/checksums 2009-04-04 21:01:36 UTC (rev 4187) @@ -1,4 +1,4 @@ a14c4c13d91d04d6119bdc977e8a8bdf download/wput-0.6.2.tgz 90369c3a9dbb27432bdb5ae2611b6a96 download/configure.diff -066a65a869f312afc0e0a4d89e8b8710 download/Makefile.in.diff +b9f350b039a04e6ad5af3c4151d06b31 download/Makefile.in.diff e6e15f2a2fdac44f31ad4e3403993ff3 download/Makefile.in.src.diff Modified: csw/mgar/pkg/wput/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/wput/trunk/files/Makefile.in.diff 2009-04-04 18:36:20 UTC (rev 4186) +++ csw/mgar/pkg/wput/trunk/files/Makefile.in.diff 2009-04-04 21:01:36 UTC (rev 4187) @@ -1,7 +1,6 @@ -diff -ru ../build-global/wput-0.6.2/Makefile.in wput-0.6.2/Makefile.in --- ../build-global/wput-0.6.2/Makefile.in 2008-09-27 12:31:23.000000000 +0200 -+++ wput-0.6.2/Makefile.in 2009-03-29 18:25:34.366444523 +0200 -@@ -16,12 +16,12 @@ ++++ wput-0.6.2/Makefile.in 2009-04-04 22:04:33.828472735 +0200 +@@ -16,12 +16,14 @@ install: all cd po && $(MAKE) $(MAKEDEFS) $@ @@ -15,12 +14,14 @@ + mkdir -p $(DESTDIR)$(mandir) + ginstall -m0755 wput $(DESTDIR)$(bindir) + ginstall -m0644 doc/wput.1.gz $(DESTDIR)$(mandir) ++ gzip -d $(DESTDIR)$(mandir)/wput.1.gz + ln -s $(bindir)/wput $(DESTDIR)$(bindir)/wdel + ginstall -m0644 doc/wdel.1.gz $(DESTDIR)$(mandir) ++ gzip -d $(DESTDIR)$(mandir)/wdel.1.gz @echo "----------------" @echo "Wput and Wdel installed. See 'wput/wdel -h' or 'man wput/wdel' for" @echo "usage information." -@@ -30,6 +30,7 @@ +@@ -30,6 +32,7 @@ @echo "Wput is not perfect, so please report any bugs you notice (see BUGS-section" @echo "in the manpage)." @echo "----------------" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 00:55:42 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sat, 04 Apr 2009 22:55:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4188] csw/mgar/pkg/zlib/trunk Message-ID: Revision: 4188 http://gar.svn.sourceforge.net/gar/?rev=4188&view=rev Author: hson Date: 2009-04-04 22:55:42 +0000 (Sat, 04 Apr 2009) Log Message: ----------- zlib: Patch configure to build shared lib on amd64 Modified Paths: -------------- csw/mgar/pkg/zlib/trunk/Makefile csw/mgar/pkg/zlib/trunk/checksums csw/mgar/pkg/zlib/trunk/files/configure.diff Modified: csw/mgar/pkg/zlib/trunk/Makefile =================================================================== --- csw/mgar/pkg/zlib/trunk/Makefile 2009-04-04 21:01:36 UTC (rev 4187) +++ csw/mgar/pkg/zlib/trunk/Makefile 2009-04-04 22:55:42 UTC (rev 4188) @@ -30,7 +30,7 @@ PATCHFILES += configure.diff BUILD64 = 1 -NO_ISAEXEC = 1 +#NO_ISAEXEC = 1 CONFIGURE_ARGS = --prefix=$(prefix) --exec_prefix=$(exec_prefix) CONFIGURE_ARGS += --libdir=$(libdir) --includedir=$(includedir) --shared Modified: csw/mgar/pkg/zlib/trunk/checksums =================================================================== --- csw/mgar/pkg/zlib/trunk/checksums 2009-04-04 21:01:36 UTC (rev 4187) +++ csw/mgar/pkg/zlib/trunk/checksums 2009-04-04 22:55:42 UTC (rev 4188) @@ -1,3 +1,3 @@ dee233bf288ee795ac96a98cc2e369b6 download/zlib-1.2.3.tar.bz2 f1b6f2e9b6ce5902d2e7d83728233532 download/Makefile.in.diff -59755e3443f9a9c0374febf39663bf5f download/configure.diff +95c0edba1d5160ed41b871f2c83e813a download/configure.diff Modified: csw/mgar/pkg/zlib/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/zlib/trunk/files/configure.diff 2009-04-04 21:01:36 UTC (rev 4187) +++ csw/mgar/pkg/zlib/trunk/files/configure.diff 2009-04-04 22:55:42 UTC (rev 4188) @@ -1,5 +1,14 @@ --- ../build-global/zlib-1.2.3/configure 2005-07-11 22:11:57.000000000 +0200 -+++ zlib-1.2.3/configure 2009-03-23 08:21:07.639754073 +0100 ++++ zlib-1.2.3/configure 2009-04-01 00:31:48.271327549 +0200 +@@ -19,7 +19,7 @@ + # an error. + + LIBS=libz.a +-LDFLAGS="-L. ${LIBS}" ++#LDFLAGS="-L. ${LIBS}" + VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` + VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` + VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` @@ -29,7 +29,7 @@ exec_prefix=${exec_prefix-'${prefix}'} libdir=${libdir-'${exec_prefix}/lib'} @@ -9,3 +18,23 @@ shared_ext='.so' shared=0 gcc=0 +@@ -132,9 +132,9 @@ + SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} + CFLAGS=${CFLAGS-"-O3"} + LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; +- SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} ++ SunOS\ 5*) SFLAGS="-KPIC $CFLAGS" + CFLAGS=${CFLAGS-"-fast -xcg89"} +- LDSHARED=${LDSHARED-"cc -G"};; ++ LDSHARED=${LDSHARED-"cc -G $LDFLAGS"};; + SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} + CFLAGS=${CFLAGS-"-O2"} + LDSHARED=${LDSHARED-"ld"};; +@@ -187,6 +187,7 @@ + if test $shared -eq 0; then + LDSHARED="$CC" + echo Building static library $LIBS version $VER with $CC. ++ LDFLAGS="-L. ${LIBS}" + else + LDFLAGS="-L. ${SHAREDLIBV}" + fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 02:07:49 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 00:07:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4189] csw/mgar/pkg/wput/trunk Message-ID: Revision: 4189 http://gar.svn.sourceforge.net/gar/?rev=4189&view=rev Author: hson Date: 2009-04-05 00:07:48 +0000 (Sun, 05 Apr 2009) Log Message: ----------- wput: Patches for gnutls Modified Paths: -------------- csw/mgar/pkg/wput/trunk/Makefile csw/mgar/pkg/wput/trunk/checksums csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff csw/mgar/pkg/wput/trunk/files/configure.diff Modified: csw/mgar/pkg/wput/trunk/Makefile =================================================================== --- csw/mgar/pkg/wput/trunk/Makefile 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/Makefile 2009-04-05 00:07:48 UTC (rev 4189) @@ -17,7 +17,7 @@ PREREQUISITE_PKGS = CSWgnutlsdevel -REQUIRED_PKGS = CSWggettextrt CSWgnutls +REQUIRED_PKGS = CSWggettextrt CSWgnutls CSWgcrypt # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=141519 Modified: csw/mgar/pkg/wput/trunk/checksums =================================================================== --- csw/mgar/pkg/wput/trunk/checksums 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/checksums 2009-04-05 00:07:48 UTC (rev 4189) @@ -1,4 +1,4 @@ a14c4c13d91d04d6119bdc977e8a8bdf download/wput-0.6.2.tgz -90369c3a9dbb27432bdb5ae2611b6a96 download/configure.diff +424b62a6981cd7372281eb5b143e516d download/configure.diff b9f350b039a04e6ad5af3c4151d06b31 download/Makefile.in.diff -e6e15f2a2fdac44f31ad4e3403993ff3 download/Makefile.in.src.diff +ad2fee9c34f44b2c812ba300823eafe0 download/Makefile.in.src.diff Modified: csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff =================================================================== --- csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/files/Makefile.in.src.diff 2009-04-05 00:07:48 UTC (rev 4189) @@ -1,12 +1,11 @@ -diff -ru ../build-global/wput-0.6.2/src/Makefile.in wput-0.6.2/src/Makefile.in --- ../build-global/wput-0.6.2/src/Makefile.in 2008-09-27 12:31:23.000000000 +0200 -+++ wput-0.6.2/src/Makefile.in 2009-03-29 18:24:32.132443546 +0200 ++++ wput-0.6.2/src/Makefile.in 2009-04-05 01:53:24.184186828 +0200 @@ -6,7 +6,7 @@ localedir=$(prefix)/share/locale CC=@CC@ CFLAGS= @CFLAGS@ -DLOCALEDIR=\"$(localedir)\" @GNUTLS_CFLAGS@ -LIBS=@LIBINTL@ @LIBS@ @GNUTLS_LIBS@ -+LIBS=@LIBINTL@ @LIBS@ @GNUTLS_LIBS@ -lsocket -lnsl ++LIBS=@LDFLAGS@ @LIBINTL@ @LIBS@ @GNUTLS_LIBS@ -lsocket -lnsl EXE=../wput GETOPT=@GETOPT@ MEMDBG=@MEMDBG@ Modified: csw/mgar/pkg/wput/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/wput/trunk/files/configure.diff 2009-04-04 22:55:42 UTC (rev 4188) +++ csw/mgar/pkg/wput/trunk/files/configure.diff 2009-04-05 00:07:48 UTC (rev 4189) @@ -1,6 +1,5 @@ -diff -ru ../build-global/wput-0.6.2/configure wput-0.6.2/configure --- ../build-global/wput-0.6.2/configure 2008-09-27 12:31:23.000000000 +0200 -+++ wput-0.6.2/configure 2009-03-29 18:17:59.596861076 +0200 ++++ wput-0.6.2/configure 2009-04-05 02:02:56.976236308 +0200 @@ -1736,7 +1736,7 @@ @@ -10,3 +9,21 @@ PACKAGE="wput" VERSION="0.6.2" +@@ -6632,7 +6632,7 @@ + CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes" + + +-for ac_header in gnutls/gnutls.h, gnutls/openssl.h ++for ac_header in gnutls/gnutls.h gnutls/openssl.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +@@ -6879,7 +6879,7 @@ + _ACEOF + + msg_gnutls="GNUTLS" +- GNUTLS_LIBS="$with_gnutls_libs -lgnutls-openssl" ++ GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt -lgnutls-openssl" + + with_ssl="yes" + else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From jake_goerzen at users.sourceforge.net Sun Apr 5 06:43:44 2009 From: jake_goerzen at users.sourceforge.net (jake_goerzen at users.sourceforge.net) Date: Sun, 05 Apr 2009 04:43:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4190] csw/mgar/pkg/fltk/trunk Message-ID: Revision: 4190 http://gar.svn.sourceforge.net/gar/?rev=4190&view=rev Author: jake_goerzen Date: 2009-04-05 04:43:44 +0000 (Sun, 05 Apr 2009) Log Message: ----------- switch to mGAR v2 Modified Paths: -------------- csw/mgar/pkg/fltk/trunk/Makefile csw/mgar/pkg/fltk/trunk/checksums Added Paths: ----------- csw/mgar/pkg/fltk/trunk/files/Makefile.diff Property Changed: ---------------- csw/mgar/pkg/fltk/trunk/ Property changes on: csw/mgar/pkg/fltk/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/fltk/trunk/Makefile =================================================================== --- csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 00:07:48 UTC (rev 4189) +++ csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 04:43:44 UTC (rev 4190) @@ -10,19 +10,20 @@ MASTER_SITES = http://ftp.easysw.com/pub/fltk/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION)-source.tar.gz -DISTFILES += $(call admfiles,CSWfltk, prototype) +DISTFILES += $(call admfiles,CSWfltk) -UFILES_REGEX = (\d+(?:\.\d+)*) +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -PATCHFILES = makeinclude.in.diff +PATCHFILES = makeinclude.in.diff Makefile.diff -CONFIGURE_ARGS = $(DIRPATHS) LDFLAGS='-L/opt/csw/lib -L../lib' +CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --mandir=/opt/csw/share/man CONFIGURE_ARGS += --disable-localpng CONFIGURE_ARGS += --disable-localjpeg CONFIGURE_ARGS += --disable-localzlib CONFIGURE_ARGS += --enable-threads CONFIGURE_ARGS += --enable-largefile +CONFIGURE_ARGS += --disable-static CONFIGURE_ARGS += --enable-shared include gar/category.mk Modified: csw/mgar/pkg/fltk/trunk/checksums =================================================================== --- csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 00:07:48 UTC (rev 4189) +++ csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 04:43:44 UTC (rev 4190) @@ -1,4 +1,4 @@ d3c76db1b6cebce7a009429bbd125470 download/fltk-1.1.9-source.tar.gz 5b35d77bcd4cb9dbb8a68eab89b358c8 download/CSWfltk.gspec -72ba3eb7711deeaad9d44004da12cc63 download/CSWfltk.prototype 1c51238fcb309cc77681874450d1bb28 download/makeinclude.in.diff +3c8162474dca50e2a8def66fc76f890d download/Makefile.diff Added: csw/mgar/pkg/fltk/trunk/files/Makefile.diff =================================================================== --- csw/mgar/pkg/fltk/trunk/files/Makefile.diff (rev 0) +++ csw/mgar/pkg/fltk/trunk/files/Makefile.diff 2009-04-05 04:43:44 UTC (rev 4190) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru fltk-1.1.9.orig/fluid/Makefile fltk-1.1.9/fluid/Makefile +--- fltk-1.1.9.orig/fluid/Makefile 2008-02-26 16:26:08.000000000 +0100 ++++ fltk-1.1.9/fluid/Makefile 2009-04-05 06:25:12.680119819 +0200 +@@ -64,7 +64,7 @@ + fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \ + ../src/$(IMGDSONAME) + echo Linking $@... +- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDLIBS) ++ $(CXX) $(ARCHFLAGS) -L../src $(LDFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDLIBS) + $(POSTBUILD) $@ ../FL/mac.r + + clean: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From jake_goerzen at users.sourceforge.net Sun Apr 5 07:09:56 2009 From: jake_goerzen at users.sourceforge.net (jake_goerzen at users.sourceforge.net) Date: Sun, 05 Apr 2009 05:09:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4191] csw/mgar/pkg/fltk/trunk Message-ID: Revision: 4191 http://gar.svn.sourceforge.net/gar/?rev=4191&view=rev Author: jake_goerzen Date: 2009-04-05 05:09:56 +0000 (Sun, 05 Apr 2009) Log Message: ----------- add depend file Modified Paths: -------------- csw/mgar/pkg/fltk/trunk/Makefile csw/mgar/pkg/fltk/trunk/checksums Added Paths: ----------- csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend Removed Paths: ------------- csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype Modified: csw/mgar/pkg/fltk/trunk/Makefile =================================================================== --- csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 04:43:44 UTC (rev 4190) +++ csw/mgar/pkg/fltk/trunk/Makefile 2009-04-05 05:09:56 UTC (rev 4191) @@ -10,7 +10,7 @@ MASTER_SITES = http://ftp.easysw.com/pub/fltk/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION)-source.tar.gz -DISTFILES += $(call admfiles,CSWfltk) +DISTFILES += $(call admfiles,CSWfltk, depend) UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/fltk/trunk/checksums =================================================================== --- csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 04:43:44 UTC (rev 4190) +++ csw/mgar/pkg/fltk/trunk/checksums 2009-04-05 05:09:56 UTC (rev 4191) @@ -1,4 +1,5 @@ d3c76db1b6cebce7a009429bbd125470 download/fltk-1.1.9-source.tar.gz 5b35d77bcd4cb9dbb8a68eab89b358c8 download/CSWfltk.gspec +043fee4145d49b611961c22859edc4ec download/CSWfltk.depend 1c51238fcb309cc77681874450d1bb28 download/makeinclude.in.diff 3c8162474dca50e2a8def66fc76f890d download/Makefile.diff Added: csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend =================================================================== --- csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend (rev 0) +++ csw/mgar/pkg/fltk/trunk/files/CSWfltk.depend 2009-04-05 05:09:56 UTC (rev 4191) @@ -0,0 +1,4 @@ +P CSWcommon +P CSWjpeg +P CSWpng +P CSWzlib Deleted: csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype =================================================================== --- csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype 2009-04-05 04:43:44 UTC (rev 4190) +++ csw/mgar/pkg/fltk/trunk/files/CSWfltk.prototype 2009-04-05 05:09:56 UTC (rev 4191) @@ -1,581 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/fltk-config 0755 root bin -f none /opt/csw/bin/fluid 0755 root bin -d none /opt/csw/include 0755 root bin -d none /opt/csw/include/FL 0755 root bin -f none /opt/csw/include/FL/Enumerations.H 0644 root bin -s none /opt/csw/include/FL/Enumerations.h=Enumerations.H -f none /opt/csw/include/FL/Fl.H 0644 root bin -s none /opt/csw/include/FL/Fl.h=Fl.H -f none /opt/csw/include/FL/Fl_Adjuster.H 0644 root bin -s none /opt/csw/include/FL/Fl_Adjuster.h=Fl_Adjuster.H -f none /opt/csw/include/FL/Fl_BMP_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_BMP_Image.h=Fl_BMP_Image.H -f none /opt/csw/include/FL/Fl_Bitmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_Bitmap.h=Fl_Bitmap.H -f none /opt/csw/include/FL/Fl_Box.H 0644 root bin -s none /opt/csw/include/FL/Fl_Box.h=Fl_Box.H -f none /opt/csw/include/FL/Fl_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Browser.h=Fl_Browser.H -f none /opt/csw/include/FL/Fl_Browser_.H 0644 root bin -s none /opt/csw/include/FL/Fl_Browser_.h=Fl_Browser_.H -f none /opt/csw/include/FL/Fl_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Button.h=Fl_Button.H -f none /opt/csw/include/FL/Fl_Chart.H 0644 root bin -s none /opt/csw/include/FL/Fl_Chart.h=Fl_Chart.H -f none /opt/csw/include/FL/Fl_Check_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Check_Browser.h=Fl_Check_Browser.H -f none /opt/csw/include/FL/Fl_Check_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Check_Button.h=Fl_Check_Button.H -f none /opt/csw/include/FL/Fl_Choice.H 0644 root bin -s none /opt/csw/include/FL/Fl_Choice.h=Fl_Choice.H -f none /opt/csw/include/FL/Fl_Clock.H 0644 root bin -s none /opt/csw/include/FL/Fl_Clock.h=Fl_Clock.H -f none /opt/csw/include/FL/Fl_Color_Chooser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Color_Chooser.h=Fl_Color_Chooser.H -f none /opt/csw/include/FL/Fl_Counter.H 0644 root bin -s none /opt/csw/include/FL/Fl_Counter.h=Fl_Counter.H -f none /opt/csw/include/FL/Fl_Dial.H 0644 root bin -s none /opt/csw/include/FL/Fl_Dial.h=Fl_Dial.H -f none /opt/csw/include/FL/Fl_Double_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Double_Window.h=Fl_Double_Window.H -f none /opt/csw/include/FL/Fl_Export.H 0644 root bin -s none /opt/csw/include/FL/Fl_Export.h=Fl_Export.H -f none /opt/csw/include/FL/Fl_File_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Browser.h=Fl_File_Browser.H -f none /opt/csw/include/FL/Fl_File_Chooser.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Chooser.h=Fl_File_Chooser.H -f none /opt/csw/include/FL/Fl_File_Icon.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Icon.h=Fl_File_Icon.H -f none /opt/csw/include/FL/Fl_File_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_File_Input.h=Fl_File_Input.H -f none /opt/csw/include/FL/Fl_Fill_Dial.H 0644 root bin -s none /opt/csw/include/FL/Fl_Fill_Dial.h=Fl_Fill_Dial.H -f none /opt/csw/include/FL/Fl_Fill_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Fill_Slider.h=Fl_Fill_Slider.H -f none /opt/csw/include/FL/Fl_Float_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Float_Input.h=Fl_Float_Input.H -f none /opt/csw/include/FL/Fl_FormsBitmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_FormsBitmap.h=Fl_FormsBitmap.H -f none /opt/csw/include/FL/Fl_FormsPixmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_FormsPixmap.h=Fl_FormsPixmap.H -f none /opt/csw/include/FL/Fl_Free.H 0644 root bin -s none /opt/csw/include/FL/Fl_Free.h=Fl_Free.H -f none /opt/csw/include/FL/Fl_GIF_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_GIF_Image.h=Fl_GIF_Image.H -f none /opt/csw/include/FL/Fl_Gl_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Gl_Window.h=Fl_Gl_Window.H -f none /opt/csw/include/FL/Fl_Group.H 0644 root bin -s none /opt/csw/include/FL/Fl_Group.h=Fl_Group.H -f none /opt/csw/include/FL/Fl_Help_Dialog.H 0644 root bin -s none /opt/csw/include/FL/Fl_Help_Dialog.h=Fl_Help_Dialog.H -f none /opt/csw/include/FL/Fl_Help_View.H 0644 root bin -s none /opt/csw/include/FL/Fl_Help_View.h=Fl_Help_View.H -f none /opt/csw/include/FL/Fl_Hold_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hold_Browser.h=Fl_Hold_Browser.H -f none /opt/csw/include/FL/Fl_Hor_Fill_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Fill_Slider.h=Fl_Hor_Fill_Slider.H -f none /opt/csw/include/FL/Fl_Hor_Nice_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Nice_Slider.h=Fl_Hor_Nice_Slider.H -f none /opt/csw/include/FL/Fl_Hor_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Slider.h=Fl_Hor_Slider.H -f none /opt/csw/include/FL/Fl_Hor_Value_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Hor_Value_Slider.h=Fl_Hor_Value_Slider.H -f none /opt/csw/include/FL/Fl_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_Image.h=Fl_Image.H -f none /opt/csw/include/FL/Fl_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Input.h=Fl_Input.H -f none /opt/csw/include/FL/Fl_Input_.H 0644 root bin -s none /opt/csw/include/FL/Fl_Input_.h=Fl_Input_.H -f none /opt/csw/include/FL/Fl_Input_Choice.H 0644 root bin -s none /opt/csw/include/FL/Fl_Input_Choice.h=Fl_Input_Choice.H -f none /opt/csw/include/FL/Fl_Int_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Int_Input.h=Fl_Int_Input.H -f none /opt/csw/include/FL/Fl_JPEG_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_JPEG_Image.h=Fl_JPEG_Image.H -f none /opt/csw/include/FL/Fl_Light_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Light_Button.h=Fl_Light_Button.H -f none /opt/csw/include/FL/Fl_Line_Dial.H 0644 root bin -s none /opt/csw/include/FL/Fl_Line_Dial.h=Fl_Line_Dial.H -f none /opt/csw/include/FL/Fl_Menu.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu.h=Fl_Menu.H -f none /opt/csw/include/FL/Fl_Menu_.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_.h=Fl_Menu_.H -f none /opt/csw/include/FL/Fl_Menu_Bar.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Bar.h=Fl_Menu_Bar.H -f none /opt/csw/include/FL/Fl_Menu_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Button.h=Fl_Menu_Button.H -f none /opt/csw/include/FL/Fl_Menu_Item.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Item.h=Fl_Menu_Item.H -f none /opt/csw/include/FL/Fl_Menu_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Menu_Window.h=Fl_Menu_Window.H -f none /opt/csw/include/FL/Fl_Multi_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multi_Browser.h=Fl_Multi_Browser.H -f none /opt/csw/include/FL/Fl_Multi_Label.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multi_Label.h=Fl_Multi_Label.H -f none /opt/csw/include/FL/Fl_Multiline_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multiline_Input.h=Fl_Multiline_Input.H -f none /opt/csw/include/FL/Fl_Multiline_Output.H 0644 root bin -s none /opt/csw/include/FL/Fl_Multiline_Output.h=Fl_Multiline_Output.H -f none /opt/csw/include/FL/Fl_Nice_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Nice_Slider.h=Fl_Nice_Slider.H -f none /opt/csw/include/FL/Fl_Object.H 0644 root bin -s none /opt/csw/include/FL/Fl_Object.h=Fl_Object.H -f none /opt/csw/include/FL/Fl_Output.H 0644 root bin -s none /opt/csw/include/FL/Fl_Output.h=Fl_Output.H -f none /opt/csw/include/FL/Fl_Overlay_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Overlay_Window.h=Fl_Overlay_Window.H -f none /opt/csw/include/FL/Fl_PNG_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_PNG_Image.h=Fl_PNG_Image.H -f none /opt/csw/include/FL/Fl_PNM_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_PNM_Image.h=Fl_PNM_Image.H -f none /opt/csw/include/FL/Fl_Pack.H 0644 root bin -s none /opt/csw/include/FL/Fl_Pack.h=Fl_Pack.H -f none /opt/csw/include/FL/Fl_Pixmap.H 0644 root bin -s none /opt/csw/include/FL/Fl_Pixmap.h=Fl_Pixmap.H -f none /opt/csw/include/FL/Fl_Positioner.H 0644 root bin -s none /opt/csw/include/FL/Fl_Positioner.h=Fl_Positioner.H -f none /opt/csw/include/FL/Fl_Preferences.H 0644 root bin -s none /opt/csw/include/FL/Fl_Preferences.h=Fl_Preferences.H -f none /opt/csw/include/FL/Fl_Progress.H 0644 root bin -s none /opt/csw/include/FL/Fl_Progress.h=Fl_Progress.H -f none /opt/csw/include/FL/Fl_RGB_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_RGB_Image.h=Fl_RGB_Image.H -f none /opt/csw/include/FL/Fl_Radio_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Radio_Button.h=Fl_Radio_Button.H -f none /opt/csw/include/FL/Fl_Radio_Light_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Radio_Light_Button.h=Fl_Radio_Light_Button.H -f none /opt/csw/include/FL/Fl_Radio_Round_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Radio_Round_Button.h=Fl_Radio_Round_Button.H -f none /opt/csw/include/FL/Fl_Repeat_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Repeat_Button.h=Fl_Repeat_Button.H -f none /opt/csw/include/FL/Fl_Return_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Return_Button.h=Fl_Return_Button.H -f none /opt/csw/include/FL/Fl_Roller.H 0644 root bin -s none /opt/csw/include/FL/Fl_Roller.h=Fl_Roller.H -f none /opt/csw/include/FL/Fl_Round_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Round_Button.h=Fl_Round_Button.H -f none /opt/csw/include/FL/Fl_Round_Clock.H 0644 root bin -s none /opt/csw/include/FL/Fl_Round_Clock.h=Fl_Round_Clock.H -f none /opt/csw/include/FL/Fl_Scroll.H 0644 root bin -s none /opt/csw/include/FL/Fl_Scroll.h=Fl_Scroll.H -f none /opt/csw/include/FL/Fl_Scrollbar.H 0644 root bin -s none /opt/csw/include/FL/Fl_Scrollbar.h=Fl_Scrollbar.H -f none /opt/csw/include/FL/Fl_Secret_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Secret_Input.h=Fl_Secret_Input.H -f none /opt/csw/include/FL/Fl_Select_Browser.H 0644 root bin -s none /opt/csw/include/FL/Fl_Select_Browser.h=Fl_Select_Browser.H -f none /opt/csw/include/FL/Fl_Shared_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_Shared_Image.h=Fl_Shared_Image.H -f none /opt/csw/include/FL/Fl_Simple_Counter.H 0644 root bin -s none /opt/csw/include/FL/Fl_Simple_Counter.h=Fl_Simple_Counter.H -f none /opt/csw/include/FL/Fl_Single_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Single_Window.h=Fl_Single_Window.H -f none /opt/csw/include/FL/Fl_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Slider.h=Fl_Slider.H -f none /opt/csw/include/FL/Fl_Spinner.H 0644 root bin -s none /opt/csw/include/FL/Fl_Spinner.h=Fl_Spinner.H -f none /opt/csw/include/FL/Fl_Sys_Menu_Bar.H 0644 root bin -s none /opt/csw/include/FL/Fl_Sys_Menu_Bar.h=Fl_Sys_Menu_Bar.H -f none /opt/csw/include/FL/Fl_Tabs.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tabs.h=Fl_Tabs.H -f none /opt/csw/include/FL/Fl_Text_Buffer.H 0644 root bin -s none /opt/csw/include/FL/Fl_Text_Buffer.h=Fl_Text_Buffer.H -f none /opt/csw/include/FL/Fl_Text_Display.H 0644 root bin -s none /opt/csw/include/FL/Fl_Text_Display.h=Fl_Text_Display.H -f none /opt/csw/include/FL/Fl_Text_Editor.H 0644 root bin -s none /opt/csw/include/FL/Fl_Text_Editor.h=Fl_Text_Editor.H -f none /opt/csw/include/FL/Fl_Tile.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tile.h=Fl_Tile.H -f none /opt/csw/include/FL/Fl_Tiled_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tiled_Image.h=Fl_Tiled_Image.H -f none /opt/csw/include/FL/Fl_Timer.H 0644 root bin -s none /opt/csw/include/FL/Fl_Timer.h=Fl_Timer.H -f none /opt/csw/include/FL/Fl_Toggle_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Toggle_Button.h=Fl_Toggle_Button.H -f none /opt/csw/include/FL/Fl_Toggle_Light_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Toggle_Light_Button.h=Fl_Toggle_Light_Button.H -f none /opt/csw/include/FL/Fl_Toggle_Round_Button.H 0644 root bin -s none /opt/csw/include/FL/Fl_Toggle_Round_Button.h=Fl_Toggle_Round_Button.H -f none /opt/csw/include/FL/Fl_Tooltip.H 0644 root bin -s none /opt/csw/include/FL/Fl_Tooltip.h=Fl_Tooltip.H -f none /opt/csw/include/FL/Fl_Valuator.H 0644 root bin -s none /opt/csw/include/FL/Fl_Valuator.h=Fl_Valuator.H -f none /opt/csw/include/FL/Fl_Value_Input.H 0644 root bin -s none /opt/csw/include/FL/Fl_Value_Input.h=Fl_Value_Input.H -f none /opt/csw/include/FL/Fl_Value_Output.H 0644 root bin -s none /opt/csw/include/FL/Fl_Value_Output.h=Fl_Value_Output.H -f none /opt/csw/include/FL/Fl_Value_Slider.H 0644 root bin -s none /opt/csw/include/FL/Fl_Value_Slider.h=Fl_Value_Slider.H -f none /opt/csw/include/FL/Fl_Widget.H 0644 root bin -s none /opt/csw/include/FL/Fl_Widget.h=Fl_Widget.H -f none /opt/csw/include/FL/Fl_Window.H 0644 root bin -s none /opt/csw/include/FL/Fl_Window.h=Fl_Window.H -f none /opt/csw/include/FL/Fl_Wizard.H 0644 root bin -s none /opt/csw/include/FL/Fl_Wizard.h=Fl_Wizard.H -f none /opt/csw/include/FL/Fl_XBM_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_XBM_Image.h=Fl_XBM_Image.H -f none /opt/csw/include/FL/Fl_XPM_Image.H 0644 root bin -s none /opt/csw/include/FL/Fl_XPM_Image.h=Fl_XPM_Image.H -f none /opt/csw/include/FL/dirent.h 0644 root bin -f none /opt/csw/include/FL/filename.H 0644 root bin -s none /opt/csw/include/FL/filename.h=filename.H -f none /opt/csw/include/FL/fl_ask.H 0644 root bin -s none /opt/csw/include/FL/fl_ask.h=fl_ask.H -f none /opt/csw/include/FL/fl_draw.H 0644 root bin -s none /opt/csw/include/FL/fl_draw.h=fl_draw.H -s none /opt/csw/include/FL/fl_file_chooser.H=Fl_File_Chooser.H -s none /opt/csw/include/FL/fl_file_chooser.h=Fl_File_Chooser.H -f none /opt/csw/include/FL/fl_message.H 0644 root bin -s none /opt/csw/include/FL/fl_message.h=fl_message.H -f none /opt/csw/include/FL/fl_show_colormap.H 0644 root bin -s none /opt/csw/include/FL/fl_show_colormap.h=fl_show_colormap.H -f none /opt/csw/include/FL/fl_show_input.H 0644 root bin -s none /opt/csw/include/FL/fl_show_input.h=fl_show_input.H -f none /opt/csw/include/FL/forms.H 0644 root bin -s none /opt/csw/include/FL/forms.h=forms.H -f none /opt/csw/include/FL/gl.h 0644 root bin -f none /opt/csw/include/FL/gl2opengl.h 0644 root bin -f none /opt/csw/include/FL/gl_draw.H 0644 root bin -s none /opt/csw/include/FL/gl_draw.h=gl_draw.H -f none /opt/csw/include/FL/glu.h 0644 root bin -f none /opt/csw/include/FL/glut.H 0644 root bin -s none /opt/csw/include/FL/glut.h=glut.H -f none /opt/csw/include/FL/mac.H 0644 root bin -s none /opt/csw/include/FL/mac.h=mac.H -f none /opt/csw/include/FL/mac.r 0644 root bin -f none /opt/csw/include/FL/math.h 0644 root bin -f none /opt/csw/include/FL/names.h 0644 root bin -f none /opt/csw/include/FL/win32.H 0644 root bin -s none /opt/csw/include/FL/win32.h=win32.H -f none /opt/csw/include/FL/x.H 0644 root bin -s none /opt/csw/include/FL/x.h=x.H -s none /opt/csw/include/Fl=FL -d none /opt/csw/lib 0755 root bin -f none /opt/csw/lib/libfltk.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk.so=libfltk.so.1.1 -f none /opt/csw/lib/libfltk_forms.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk_forms.so=libfltk_forms.so.1.1 -f none /opt/csw/lib/libfltk_gl.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk_gl.so=libfltk_gl.so.1.1 -f none /opt/csw/lib/libfltk_images.so.1.1 0755 root bin -s none /opt/csw/lib/libfltk_images.so=libfltk_images.so.1.1 -d none /opt/csw/share/doc/fltk 0755 root bin -f none /opt/csw/share/doc/fltk/FL.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Adjuster.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_BMP_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Bitmap.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Box.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Browser_.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Chart.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Check_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Check_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Check_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Choice.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Clock.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Clock_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Color_Chooser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Counter.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Dial.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Double_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_End.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Chooser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Chooser.jpg 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Icon.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Input.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_File_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Float_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Free.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_GIF_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Gl_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Group.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Help_Dialog.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Help_Dialog.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Help_View.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Hold_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Input_.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Input_Choice.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Int_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_JPEG_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Light_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Light_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Bar.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Item.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Menu_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Multi_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Multiline_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Multiline_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Overlay_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_PNG_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_PNM_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Pack.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Pixmap.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Positioner.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Preferences.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Progress.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_RGB_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Repeat_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Return_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Return_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Roller.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Roller.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Round_Button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Round_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Scroll.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Scroll.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Scrollbar.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Secret_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Select_Browser.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Shared_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Single_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Slider.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Spinner.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tabs.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Text_Buffer.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Text_Display.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Text_Editor.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tile.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tile.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tiled_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Timer.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Toggle_Button.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Tooltip.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Valuator.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Input.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Input.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Output.gif 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Output.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Value_Slider.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Widget.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Window.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_Wizard.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_XBM_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/Fl_XPM_Image.html 0644 root bin -f none /opt/csw/share/doc/fltk/adjuster1.gif 0644 root bin -f none /opt/csw/share/doc/fltk/advanced.html 0644 root bin -f none /opt/csw/share/doc/fltk/basics.html 0644 root bin -f none /opt/csw/share/doc/fltk/boxtypes.gif 0644 root bin -f none /opt/csw/share/doc/fltk/buttons.gif 0644 root bin -f none /opt/csw/share/doc/fltk/charts.gif 0644 root bin -f none /opt/csw/share/doc/fltk/choice.gif 0644 root bin -f none /opt/csw/share/doc/fltk/clock.gif 0644 root bin -f none /opt/csw/share/doc/fltk/common.html 0644 root bin -f none /opt/csw/share/doc/fltk/counter.gif 0644 root bin -f none /opt/csw/share/doc/fltk/cubeview.gif 0644 root bin -f none /opt/csw/share/doc/fltk/dial.gif 0644 root bin -f none /opt/csw/share/doc/fltk/drawing.html 0644 root bin -f none /opt/csw/share/doc/fltk/editor-replace.gif 0644 root bin -f none /opt/csw/share/doc/fltk/editor.gif 0644 root bin -f none /opt/csw/share/doc/fltk/editor.html 0644 root bin -f none /opt/csw/share/doc/fltk/enumerations.html 0644 root bin -f none /opt/csw/share/doc/fltk/events.html 0644 root bin -d none /opt/csw/share/doc/fltk/examples 0755 root bin -f none /opt/csw/share/doc/fltk/examples.html 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeMain.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeView.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeView.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeViewUI.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeViewUI.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/CubeViewUI.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/adjuster.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/arc.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/ask.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/bitmap.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/blocks.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/boxtype.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/browser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/button.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/buttons.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/checkers.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/clock.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/colbrowser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/color_chooser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/connect.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/cube.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/cursor.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/curve.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/demo.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/demo.menu 0644 root bin -f none /opt/csw/share/doc/fltk/examples/doublebuffer.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/editor.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fast_slow.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fast_slow.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fast_slow.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/file_chooser.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fl_jpeg_image.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fonts.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/forms.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fractals.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fracviewer.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fracviewer.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/fullscreen.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/gl_overlay.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/glpuzzle.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/hello.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/help.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/iconize.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/image.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/inactive.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/inactive.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/inactive.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/input.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/input_choice.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard_ui.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard_ui.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/keyboard_ui.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/label.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/line_style.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/list_visuals.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot_ui.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot_ui.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/mandelbrot_ui.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/menubar.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/message.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/minimum.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/navigation.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/output.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/overlay.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pack.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmap.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmap_browser.cxx 0644 root bin -d none /opt/csw/share/doc/fltk/examples/pixmaps 0755 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/black_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blackking_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blast.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blue.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/blue_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/cyan.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/cyan_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/gray.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/gray_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/green.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/green_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/magenta.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/magenta_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/porsche.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/porsche1.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/red.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/red_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/srs.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/sudoku.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/tile.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/white_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_1.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_2.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_3.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/whiteking_4.xbm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/yellow.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/pixmaps/yellow_bomb.xpm 0644 root bin -f none /opt/csw/share/doc/fltk/examples/preferences.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/preferences.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/preferences.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/radio.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/radio.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/radio.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resize.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resize.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resize.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/resizebox.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/scroll.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/shape.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/subwindow.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/sudoku.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/sudokurc.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/symbols.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tabs.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tabs.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tabs.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/threads.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/threads.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tile.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/tiled_image.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/trackball.h 0644 root bin -f none /opt/csw/share/doc/fltk/examples/unittests.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/valuators.cxx 0644 root bin -f none /opt/csw/share/doc/fltk/examples/valuators.fl 0644 root bin -f none /opt/csw/share/doc/fltk/examples/valuators.h 0644 root bin -f none /opt/csw/share/doc/fltk/fl_alert.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_ask.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_choice.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_color_chooser.jpg 0644 root bin -f none /opt/csw/share/doc/fltk/fl_input.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_message.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_password.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fl_show_colormap.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid-catgets.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid-gettext.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid-org.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid.html 0644 root bin -f none /opt/csw/share/doc/fltk/fluid1.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid2.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid3-cxx.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid3-gui.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid3-style.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid4.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_prefs.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_widget_cxx.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_widget_gui.gif 0644 root bin -f none /opt/csw/share/doc/fltk/fluid_widget_style.gif 0644 root bin -f none /opt/csw/share/doc/fltk/forms.html 0644 root bin -f none /opt/csw/share/doc/fltk/functions.html 0644 root bin -f none /opt/csw/share/doc/fltk/glut.html 0644 root bin -f none /opt/csw/share/doc/fltk/hello.C.gif 0644 root bin -f none /opt/csw/share/doc/fltk/index.html 0644 root bin -f none /opt/csw/share/doc/fltk/input_choice.jpg 0644 root bin -f none /opt/csw/share/doc/fltk/intro.html 0644 root bin -f none /opt/csw/share/doc/fltk/license.html 0644 root bin -f none /opt/csw/share/doc/fltk/menu.gif 0644 root bin -f none /opt/csw/share/doc/fltk/menu_button.gif 0644 root bin -f none /opt/csw/share/doc/fltk/menubar.gif 0644 root bin -f none /opt/csw/share/doc/fltk/migration.html 0644 root bin -f none /opt/csw/share/doc/fltk/opengl.html 0644 root bin -f none /opt/csw/share/doc/fltk/osissues.html 0644 root bin -f none /opt/csw/share/doc/fltk/positioner.gif 0644 root bin -f none /opt/csw/share/doc/fltk/preface.html 0644 root bin -f none /opt/csw/share/doc/fltk/resizebox1.gif 0644 root bin -f none /opt/csw/share/doc/fltk/resizebox2.gif 0644 root bin -f none /opt/csw/share/doc/fltk/round_clock.gif 0644 root bin -f none /opt/csw/share/doc/fltk/scrollbar.gif 0644 root bin -f none /opt/csw/share/doc/fltk/slider.gif 0644 root bin -f none /opt/csw/share/doc/fltk/subclassing.html 0644 root bin -f none /opt/csw/share/doc/fltk/symbols.gif 0644 root bin -f none /opt/csw/share/doc/fltk/tabs.gif 0644 root bin -f none /opt/csw/share/doc/fltk/text.gif 0644 root bin -f none /opt/csw/share/doc/fltk/valuators.gif 0644 root bin -f none /opt/csw/share/doc/fltk/value_slider.gif 0644 root bin -f none /opt/csw/share/doc/fltk/widgets.html 0644 root bin -d none /opt/csw/share/man/cat1 0755 root bin -f none /opt/csw/share/man/cat1/fltk-config.1 0644 root bin -f none /opt/csw/share/man/cat1/fluid.1 0644 root bin -d none /opt/csw/share/man/cat3 0755 root bin -f none /opt/csw/share/man/cat3/fltk.3 0644 root bin -d none /opt/csw/share/man/man1 0755 root bin -f none /opt/csw/share/man/man1/fltk-config.1 0644 root bin -f none /opt/csw/share/man/man1/fluid.1 0644 root bin -d none /opt/csw/share/man/man3 0755 root bin -f none /opt/csw/share/man/man3/fltk.3 0644 root bin -i copyright=CSWfltk.copyright -i depend=CSWfltk.depend -i pkginfo=CSWfltk.pkginfo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From j_arndt at users.sourceforge.net Sun Apr 5 09:14:47 2009 From: j_arndt at users.sourceforge.net (j_arndt at users.sourceforge.net) Date: Sun, 05 Apr 2009 07:14:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4192] csw/mgar/pkg/nsca/trunk/Makefile Message-ID: Revision: 4192 http://gar.svn.sourceforge.net/gar/?rev=4192&view=rev Author: j_arndt Date: 2009-04-05 07:14:47 +0000 (Sun, 05 Apr 2009) Log Message: ----------- nsca: fix for #3568 and #3591 Modified Paths: -------------- csw/mgar/pkg/nsca/trunk/Makefile Modified: csw/mgar/pkg/nsca/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsca/trunk/Makefile 2009-04-05 05:09:56 UTC (rev 4191) +++ csw/mgar/pkg/nsca/trunk/Makefile 2009-04-05 07:14:47 UTC (rev 4192) @@ -23,6 +23,8 @@ SPKG_CLASSES_CSWnsca = none cswpreserveconf cswinitsmf SPKG_CLASSES_CSWsendnsca = none cswpreserveconf +NOISALIST = 1 + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-nsca-port=5667 CONFIGURE_ARGS += --localstatedir=/opt/csw/nagios/var This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From j_arndt at users.sourceforge.net Sun Apr 5 09:34:25 2009 From: j_arndt at users.sourceforge.net (j_arndt at users.sourceforge.net) Date: Sun, 05 Apr 2009 07:34:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4193] csw/mgar/pkg/nrpe/trunk/Makefile Message-ID: Revision: 4193 http://gar.svn.sourceforge.net/gar/?rev=4193&view=rev Author: j_arndt Date: 2009-04-05 07:34:24 +0000 (Sun, 05 Apr 2009) Log Message: ----------- fix for #3567 and #3566 Modified Paths: -------------- csw/mgar/pkg/nrpe/trunk/Makefile Modified: csw/mgar/pkg/nrpe/trunk/Makefile =================================================================== --- csw/mgar/pkg/nrpe/trunk/Makefile 2009-04-05 07:14:47 UTC (rev 4192) +++ csw/mgar/pkg/nrpe/trunk/Makefile 2009-04-05 07:34:24 UTC (rev 4193) @@ -21,6 +21,8 @@ SPKG_CLASSES_CSWnrpe = none cswpreserveconf cswinitsmf +NOISALIST = 1 + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl-lib=/opt/csw/lib CONFIGURE_ARGS += --with-ssl-inc=/opt/csw/include This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 11:16:26 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 09:16:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4194] csw/mgar/pkg/zlib/trunk Message-ID: Revision: 4194 http://gar.svn.sourceforge.net/gar/?rev=4194&view=rev Author: hson Date: 2009-04-05 09:16:25 +0000 (Sun, 05 Apr 2009) Log Message: ----------- zlib: Set SONAME Modified Paths: -------------- csw/mgar/pkg/zlib/trunk/checksums csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff Modified: csw/mgar/pkg/zlib/trunk/checksums =================================================================== --- csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 07:34:24 UTC (rev 4193) +++ csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 09:16:25 UTC (rev 4194) @@ -1,3 +1,3 @@ dee233bf288ee795ac96a98cc2e369b6 download/zlib-1.2.3.tar.bz2 -f1b6f2e9b6ce5902d2e7d83728233532 download/Makefile.in.diff +fc375b4e1b10b7946d3b872720154e63 download/Makefile.in.diff 95c0edba1d5160ed41b871f2c83e813a download/configure.diff Modified: csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 07:34:24 UTC (rev 4193) +++ csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 09:16:25 UTC (rev 4194) @@ -1,5 +1,25 @@ --- ../build-global/zlib-1.2.3/Makefile.in 2005-07-18 04:25:21.000000000 +0200 -+++ zlib-1.2.3/Makefile.in 2009-03-23 08:05:49.549504439 +0100 ++++ zlib-1.2.3/Makefile.in 2009-04-05 11:06:51.418782054 +0200 +@@ -24,15 +24,15 @@ + #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + # -Wstrict-prototypes -Wmissing-prototypes + +-LDFLAGS=libz.a +-LDSHARED=$(CC) +-CPP=$(CC) -E +- + LIBS=libz.a + SHAREDLIB=libz.so + SHAREDLIBV=libz.so.1.2.3 + SHAREDLIBM=libz.so.1 + ++LDFLAGS=libz.a ++LDSHARED=$(CC) -h $(SHAREDLIBM) ++CPP=$(CC) -E ++ + AR=ar rc + RANLIB=ranlib + TAR=tar @@ -43,7 +43,7 @@ exec_prefix = ${prefix} libdir = ${exec_prefix}/lib This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 11:29:04 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 09:29:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4195] csw/mgar/pkg/zlib/trunk Message-ID: Revision: 4195 http://gar.svn.sourceforge.net/gar/?rev=4195&view=rev Author: hson Date: 2009-04-05 09:29:04 +0000 (Sun, 05 Apr 2009) Log Message: ----------- zlib: SONAME fix Modified Paths: -------------- csw/mgar/pkg/zlib/trunk/checksums csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff Modified: csw/mgar/pkg/zlib/trunk/checksums =================================================================== --- csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 09:16:25 UTC (rev 4194) +++ csw/mgar/pkg/zlib/trunk/checksums 2009-04-05 09:29:04 UTC (rev 4195) @@ -1,3 +1,3 @@ dee233bf288ee795ac96a98cc2e369b6 download/zlib-1.2.3.tar.bz2 -fc375b4e1b10b7946d3b872720154e63 download/Makefile.in.diff +7e6ff59ded76dd7d90a5dc10ff25e20a download/Makefile.in.diff 95c0edba1d5160ed41b871f2c83e813a download/configure.diff Modified: csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 09:16:25 UTC (rev 4194) +++ csw/mgar/pkg/zlib/trunk/files/Makefile.in.diff 2009-04-05 09:29:04 UTC (rev 4195) @@ -1,25 +1,5 @@ --- ../build-global/zlib-1.2.3/Makefile.in 2005-07-18 04:25:21.000000000 +0200 -+++ zlib-1.2.3/Makefile.in 2009-04-05 11:06:51.418782054 +0200 -@@ -24,15 +24,15 @@ - #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - # -Wstrict-prototypes -Wmissing-prototypes - --LDFLAGS=libz.a --LDSHARED=$(CC) --CPP=$(CC) -E -- - LIBS=libz.a - SHAREDLIB=libz.so - SHAREDLIBV=libz.so.1.2.3 - SHAREDLIBM=libz.so.1 - -+LDFLAGS=libz.a -+LDSHARED=$(CC) -h $(SHAREDLIBM) -+CPP=$(CC) -E -+ - AR=ar rc - RANLIB=ranlib - TAR=tar ++++ zlib-1.2.3/Makefile.in 2009-04-05 11:24:56.336506142 +0200 @@ -43,7 +43,7 @@ exec_prefix = ${prefix} libdir = ${exec_prefix}/lib @@ -29,6 +9,15 @@ man3dir = ${mandir}/man3 OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ +@@ -78,7 +78,7 @@ + rm -f _match.s + + $(SHAREDLIBV): $(OBJS) +- $(LDSHARED) -o $@ $(OBJS) ++ $(LDSHARED) -h $(SHAREDLIBM) -o $@ $(OBJS) + rm -f $(SHAREDLIB) $(SHAREDLIBM) + ln -s $@ $(SHAREDLIB) + ln -s $@ $(SHAREDLIBM) @@ -90,23 +90,23 @@ $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 5 15:48:44 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 05 Apr 2009 13:48:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4196] csw/mgar/pkg/bash_completion/trunk Message-ID: Revision: 4196 http://gar.svn.sourceforge.net/gar/?rev=4196&view=rev Author: chninkel Date: 2009-04-05 13:48:44 +0000 (Sun, 05 Apr 2009) Log Message: ----------- bash_completion: updated to 1.0 bash_completion: switched to gar v2 Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/Makefile csw/mgar/pkg/bash_completion/trunk/checksums Added Paths: ----------- csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch Removed Paths: ------------- csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch Property Changed: ---------------- csw/mgar/pkg/bash_completion/trunk/ Property changes on: csw/mgar/pkg/bash_completion/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/bash_completion/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash_completion/trunk/Makefile 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/Makefile 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,5 +1,19 @@ +##################################################################### +# OpenCSW build recipe for bash-completion +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = bash_completion -GARVERSION = 20060301 +GARVERSION = 1.0 CATEGORIES = xtra DESCRIPTION = Programmable completion for bash @@ -7,38 +21,59 @@ Since v2.04, bash has allowed you to intelligently program and extend its standard completion behavior to achieve complex command lines with just a few keystrokes. Imagine typing ssh [Tab] and being able to complete on hosts from your ~/.ssh/known_hosts files. Or typing man 3 str [Tab] and getting a list of all string handling functions in the UNIX manual. mount system: [Tab] would complete on all exported file-systems from the host called system, while make [Tab] would complete on all targets in Makefile. This project was conceived to produce programmable completion routines for the most common Linux/UNIX commands, reducing the amount of typing sysadmins and programmers need to do on a daily basis. endef -MASTER_SITES = http://www.caliban.org/files/bash/ +ARCHALL=1 +PACKAGES = CSWbashcmplt +CATALOGNAME_CSWbashcmplt = bash_completion + + +###### Upstream and OpenCSW files information ####### + +MASTER_SITES = http://bash-completion.alioth.debian.org/files/ + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(shell echo $(GARNAME) | tr '_' '-')-(\d+).tar.gz -DISTFILES = $(shell echo $(GARNAME) | tr '_' '-')-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWbash_completion,) +DISTNAME = $(shell echo $(GARNAME) | tr '_' '-')-$(GARVERSION) + +DISTFILES = $(DISTNAME).tar.gz +# we automatically include all DISTFILES += $(shell cd files; for FILE in *.completion; do echo $$FILE; done) -# add blastwave paths -PATCHFILES = blastwave.patch +DISTFILES += changelog.CSW -WORKSRC = $(WORKDIR)/$(GARNAME) +# change the paths to use opencsw ones +PATCHFILES = opencsw_paths.patch -# no configure/Makefile -CONFIGURE_SCRIPTS = -BUILD_SCRIPTS = -INSTALL_SCRIPTS = manual + +##### Build and installation information ##### + +# the configure script doesn't seem to take in account the prefix +# env variable defined automatically by GAR +CONFIGURE_ARGS += --prefix $(prefix) + +# no test script in bash_completion TEST_SCRIPTS = -install-manual: - @ginstall -d $(DESTDIR)$(sysconfdir) - @ginstall -d $(DESTDIR)$(sysconfdir)/bash_completion.d - @ginstall -D $(WORKSRC)/bash_completion $(DESTDIR)$(sysconfdir)/bash_completion +post-merge: merge-opencsw-completion merge-additional-docs merge-changelog + +# we add some completion scripts for Solaris +merge-opencsw-completion: @( for FILE in $(WORKDIR)/*.completion; do \ - NFILE="`basename $$FILE | sed -e 's/\.completion$$//'`"; \ - ginstall -D $$FILE $(DESTDIR)$(sysconfdir)/bash_completion.d/$$NFILE; \ + NFILE="`basename $$FILE | sed -e 's/\.completion$$//'`"; \ + ginstall -D $$FILE $(PKGROOT)$(sysconfdir)/bash_completion.d/$$NFILE; \ done ) - @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) - @( for FILE in BUGS README TODO Changelog; do \ - ginstall -D $(WORKSRC)/$$FILE $(DESTDIR)$(docdir)/$(GARNAME)/$$FILE; \ + @$(MAKECOOKIE) + + +merge-additional-docs: + @( for FILE in AUTHORS README TODO CHANGES; do \ + ginstall -D "$(WORKSRC_FIRSTMOD)/$$FILE" "$(PKGROOT)$(docdir)/$(GARNAME)/$$FILE"; \ done ) + @$(MAKECOOKIE) +merge-changelog: + ginstall -D "$(WORKDIR)/changelog.CSW" "$(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW" + @$(MAKECOOKIE) include gar/category.mk Modified: csw/mgar/pkg/bash_completion/trunk/checksums =================================================================== --- csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,7 +1,7 @@ -9bca1cf97e8f8c73e3ef560cc9dead21 download/bash-completion-20060301.tar.gz -2de14c97d596cf5ac0da21ea34ea93aa download/CSWbash_completion.gspec +cd1c5648272917fbe0eef4ba30bb93f4 download/bash-completion-1.0.tar.gz 2acb33dad8ee4ea46b02f2cd86ced5e1 download/pkg-get.completion 0fcc270cda377374a9637d24c8b689b3 download/pkgadd.completion 7d304567cc880dd42e8ea277c991017f download/pkgrm.completion cc213a6d8dd2d484f2bce4f7905437f8 download/smf.completion -152cc17cbfe6875b15d9216f63bed3f9 download/blastwave.patch +1745e51815578a18384ff36a449e0002 download/changelog.CSW +d0c0d867babf351bca9ee97e03be550d download/opencsw_paths.patch Deleted: csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/files/CSWbash_completion.gspec 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,4 +0,0 @@ -%var bitname bash_completion -%var pkgname CSWbashcmplt -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING Deleted: csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch 2009-04-05 09:29:04 UTC (rev 4195) +++ csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch 2009-04-05 13:48:44 UTC (rev 4196) @@ -1,23 +0,0 @@ -diff --speed-large-files --minimal -Nru bash_completion.orig/bash_completion bash_completion/bash_completion ---- bash_completion.orig/bash_completion 2006-05-01 21:23:54.827097000 -0400 -+++ bash_completion/bash_completion 2006-05-01 21:23:49.947089000 -0400 -@@ -32,8 +32,8 @@ - { - # These declarations must go within braces in order to be able to silence - # readonly variable errors. -- BASH_COMPLETION="${BASH_COMPLETION:-/etc/bash_completion}" -- BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/etc/bash_completion.d}" -+ BASH_COMPLETION="${BASH_COMPLETION:-/opt/csw/etc/bash_completion}" -+ BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/opt/csw/etc/bash_completion.d}" - } 2>/dev/null || : - readonly BASH_COMPLETION BASH_COMPLETION_DIR - -@@ -163,7 +163,7 @@ - have() - { - unset -v have -- PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && -+ PATH=$PATH:/opt/csw/sbin:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && - have="yes" - } - Added: csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW (rev 0) +++ csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW 2009-04-05 13:48:44 UTC (rev 4196) @@ -0,0 +1,6 @@ +bash_completion (1.0,REV=2009.04.05) + + * New upstream version. + * Switched to gar v2. + + -- Yann Rouillard Sun, 05 Apr 2009 15:32:52 +0200 Copied: csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch (from rev 4177, csw/mgar/pkg/bash_completion/trunk/files/blastwave.patch) =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch (rev 0) +++ csw/mgar/pkg/bash_completion/trunk/files/opencsw_paths.patch 2009-04-05 13:48:44 UTC (rev 4196) @@ -0,0 +1,45 @@ +--- bash-completion-1.0/bash_completion 2009-04-02 22:01:39.000000000 +0200 ++++ bash-completion-1.0/bash_completion.new 2009-04-04 19:21:58.156466726 +0200 +@@ -42,8 +42,8 @@ + + # Alter the following to reflect the location of this file. + # +-[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/etc/bash_completion +-[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/etc/bash_completion.d ++[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/opt/csw/etc/bash_completion ++[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/opt/csw/etc/bash_completion.d + readonly BASH_COMPLETION BASH_COMPLETION_DIR + + # Set a couple of useful vars +@@ -2657,6 +2657,8 @@ + [ -r "$configfile" ] && + config=( "${config[@]}" "$configfile" ) + else ++ [ -r /opt/csw/etc/ssh/ssh_config ] && ++ config=( "${config[@]}" "/opt/csw/etc/ssh/ssh_config" ) + [ -r /etc/ssh/ssh_config ] && + config=( "${config[@]}" "/etc/ssh/ssh_config" ) + [ -r "${HOME}/.ssh/config" ] && +@@ -2676,6 +2678,8 @@ + [ -r "$global_kh" ] && + kh=( "${kh[@]}" "$global_kh" ) + if [ -z "$configfile" ]; then ++ [ -r /opt/csw/etc/ssh/ssh_known_hosts ] && ++ kh=( "${kh[@]}" /opt/csw/etc/ssh/ssh_known_hosts ) + [ -r /etc/ssh/ssh_known_hosts ] && + kh=( "${kh[@]}" /etc/ssh/ssh_known_hosts ) + [ -r /etc/ssh/ssh_known_hosts2 ] && +--- bash-completion-1.0/bash_completion.sh 2009-04-02 22:01:42.000000000 +0200 ++++ bash-completion-1.0/bash_completion.sh.new 2009-04-04 19:22:33.430034421 +0200 +@@ -4,9 +4,9 @@ + # Check for recent enough version of bash. + bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} + if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then +- if [ -r /etc/bash_completion ]; then ++ if [ -r /opt/csw/etc/bash_completion ]; then + # Source completion code. +- . /etc/bash_completion ++ . /opt/csw/etc/bash_completion + fi + fi + unset bash bminor bmajor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 5 17:54:10 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 05 Apr 2009 15:54:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4197] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4197 http://gar.svn.sourceforge.net/gar/?rev=4197&view=rev Author: valholla Date: 2009-04-05 15:54:10 +0000 (Sun, 05 Apr 2009) Log Message: ----------- switch from Sun Studio to gcc Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/gar_override.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 15:54:10 UTC (rev 4197) @@ -19,8 +19,8 @@ ## The following patches address bug 29442 ## http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29442 ## Patch to Reenable alloca() on non-GCC compilers -PATCHFILES = re-enable-alloc.diff -PATCHFILES += split-insn-attrtab.diff +#PATCHFILES = re-enable-alloc.diff +#PATCHFILES += split-insn-attrtab.diff ## build options CONFIGURE_ARGS = --prefix=$(BUILD_PREFIX)/gcc4 @@ -41,7 +41,7 @@ CONFIGURE_ARGS += --enable-objc-gc CONFIGURE_ARGS += --enable-threads=posix CONFIGURE_ARGS += --enable-stage1-languages=c -CONFIGURE_ARGS += --enable-languages=c,c++,fortran,java,objc +CONFIGURE_ARGS += --enable-languages=ada,c,c++,fortran,java,objc ## For cleanliness I split the Configuration into separate files include files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 15:54:10 UTC (rev 4197) @@ -14,7 +14,6 @@ AMD_MERGE_TARGETS = merge-dirs-amd AMD_MERGE_TARGETS += merge-i386-files AMD_MERGE_TARGETS += merge-amd64-files -AMD_MERGE_TARGETS += merge-strip-amd merge-amd: $(AMD_MERGE_TARGETS) $(_DBG)$(MAKECOOKIE) @@ -45,13 +44,6 @@ $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/libexec $(PKGROOT)) $(_DBG)$(MAKECOOKIE) -merge-strip-amd: - @(echo "[===== Stripping Merged Binaries =====]") - $(_DBG)(stripbin $(PPREFIX)/bin/i386) - $(_DBG)(stripbin $(PPREFIX)/bin/amd64) - $(_DBG)(stripbin $(PPREFIX)/bin) - $(_DBG)$(MAKECOOKIE) - ifeq ($(shell uname -p), i386) ISAEXEC_DIRS = /opt/csw/gcc4/bin ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc Modified: csw/mgar/pkg/gcc4/trunk/files/gar_override.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-05 15:54:10 UTC (rev 4197) @@ -1,34 +1,31 @@ -COOKIEDIR = $(COOKIEROOTDIR)/$(MODULATION)-$(GAROSREL)-$(GARCH) -WORKDIR = $(WORKROOTDIR)/build-$(MODULATION)-$(GAROSREL)-$(GARCH) -PATCHDIR = $(WORKDIR)/$(GARNAME)-$(GARVERSION) +COOKIEDIR = $(COOKIEROOTDIR)/$(MODULATION)-$(GAROSREL)-$(GARCH) +WORKDIR = $(WORKROOTDIR)/build-$(MODULATION)-$(GAROSREL)-$(GARCH) +PATCHDIR = $(WORKDIR)/$(GARNAME)-$(GARVERSION) INSTALLISADIR = $(WORKROOTDIR)/install-$(MODULATION)-$(GAROSREL)-$(GARCH) -PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GARCH)) -OBJECT_DIR = $(WORKDIR)/objdir -WORKSRC = $(OBJECT_DIR) -DIRPATHS = -OPTFLAGS = - -CONFIG_SHELL = /bin/ksh -GARCOMPILER = SOS11 -SOS11_CC = /opt/studio/SOS11/SUNWspro/bin/cc -xO3 -xarch=v8 -CFLAGS = -I/opt/csw/include -CPPFLAGS = -I/opt/csw/include -CXXFLAGS = -I/opt/csw/include -LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib -BOOT_CFLAGS = -I/opt/csw/include -mcpu=v8 -g -O2 -pipe +PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GARCH)) +OBJECT_DIR = $(WORKDIR)/objdir +WORKSRC = $(OBJECT_DIR) +DIRPATHS = +OPTFLAGS = +CONFIG_SHELL = /bin/bash +GARCOMPILER = GCC3 +GCC3_CC = /opt/csw/gcc3/bin/gcc -g -O2 -mcpu=v8 -pipe +CFLAGS = -I/opt/csw/include +CPPFLAGS = -I/opt/csw/include +CXXFLAGS = -I/opt/csw/include +LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib +BOOT_CFLAGS = -I/opt/csw/include -mcpu=v8 -g -O2 -pipe BOOT_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib ifeq ($(shell uname -p),i386) ifeq ($(shell uname -r),5.10) - GARCOMPILER = SOS12 - SOS12_CC = /opt/studio/SOS12/SUNWspro/bin/cc - BOOT_CFLAGS = -I/opt/csw/include -g -O2 -pipe + GCC3_CC = /opt/csw/gcc3/bin/gcc -g -O2 -pipe + BOOT_CFLAGS = -I/opt/csw/include -g -O2 -pipe BOOT_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib else - GARCOMPILER = SOS11 - SOS11_CC = /opt/studio/SOS11/SUNWspro/bin/cc -xarch=386 - BOOT_CFLAGS = -I/opt/csw/include -m32 -march=i386 -g -O2 -pipe + GCC3_CC = /opt/csw/gcc3/bin/gcc -march=i386 -g -O2 -pipe + BOOT_CFLAGS = -I/opt/csw/include -m32 -march=i386 -g -O2 -pipe BOOT_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib endif endif @@ -36,14 +33,13 @@ export CONFIG_SHELL CFLAGS CPPFLAGS CXXFLAGS export LDFLAGS BOOT_CFLAGS BOOT_LDFLAGS -FIXCONFIG_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/lib -STRIP_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/bin - -CONFIGURE_SCRIPTS = objdir -TEST_SCRIPTS = skip +FIXCONFIG_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/lib +STRIP_DIRS += $(DESTDIR)$(BUILD_PREFIX)/gcc4/bin +CONFIGURE_SCRIPTS = objdir +TEST_SCRIPTS = skip post-configure-modulated: fix-bootflags -MERGE_SCRIPTS_isa-i386 = amd +MERGE_SCRIPTS_isa-i386 = amd ## Run checkpkg Manually -ENABLE_CHECK = 0 +ENABLE_CHECK = 0 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 13:48:44 UTC (rev 4196) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 15:54:10 UTC (rev 4197) @@ -4,6 +4,8 @@ PACKAGES += CSWgcc4objc CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt ## Define Package Catalog Names +CATALOGNAME_CSWgcc4ada = gcc4ada +CATALOGNAME_CSWgcc4adart = gcc4adart CATALOGNAME_CSWgcc4core = gcc4core CATALOGNAME_CSWgcc4corert = gcc4corert CATALOGNAME_CSWgcc4g++ = gcc4g++ @@ -16,6 +18,8 @@ CATALOGNAME_CSWgcc4objcrt = gcc4objcrt ## Source URLs +SPKG_SOURCEURL_CSWgcc4ada = http://gcc.gnu.org +SPKG_SOURCEURL_CSWgcc4adart = http://gcc.gnu.org SPKG_SOURCEURL_CSWgcc4core = http://gcc.gnu.org SPKG_SOURCEURL_CSWgcc4corert = http://gcc.gnu.org SPKG_SOURCEURL_CSWgcc4g++ = http://gcc.gnu.org @@ -28,6 +32,8 @@ SPKG_SOURCEURL_CSWgcc4objcrt = http://gcc.gnu.org ## Copyright File +LICENSE_CSWgcc4ada = COPYING3 +LICENSE_CSWgcc4adart = COPYING3 LICENSE_CSWgcc4core = COPYING3 LICENSE_CSWgcc4corert = COPYING3 LICENSE_CSWgcc4g++ = COPYING3 @@ -40,6 +46,8 @@ LICENSE_CSWgcc4objcrt = COPYING3 ## Define Package Descriptions +SPKG_DESC_CSWgcc4ada = GNU C ADA Compiler +SPKG_DESC_CSWgcc4adart = GNU C ADA Compiler Run Time SPKG_DESC_CSWgcc4core = GNU C Compiler SPKG_DESC_CSWgcc4corert = GNU C Compiler Run Time SPKG_DESC_CSWgcc4g++ = GNU C++ Compiler @@ -53,6 +61,8 @@ ## Define Dependencies COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr +REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4ada = CSWgcc4adart $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv @@ -67,6 +77,13 @@ ## Define the Contents of the Packages +## gcc4ada Definitions +PKGFILES_CSWgcc4ada = .*/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/adalib/.* +PKGFILES_CSWgcc4ada += .*/adainclude/.* +PKGFILES_CSWgcc4ada += .*/info/.*gnat.* +PKGFILES_CSWgcc4ada += .*/bin/gnat.* + ## gcc4gfortran Definitions PKGFILES_CSWgcc4gfortran = .*/bin/.*gfortran PKGFILES_CSWgcc4gfortran += .*/libexec/.*f951 @@ -133,6 +150,10 @@ ####### RunTime Packages +## gcc4adart +PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* +PKGFILES_CSWgcc4adart = .*/lib/.*libgnarl.* + ## gcc4corert PKGFILES_CSWgcc4corert = .*/lib/.*libgcc_s.* PKGFILES_CSWgcc4corert += .*/lib/.*libgomp.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 5 17:56:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 05 Apr 2009 15:56:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4198] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4198 http://gar.svn.sourceforge.net/gar/?rev=4198&view=rev Author: valholla Date: 2009-04-05 15:56:57 +0000 (Sun, 05 Apr 2009) Log Message: ----------- add ada package Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 15:54:10 UTC (rev 4197) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 15:56:57 UTC (rev 4198) @@ -1,7 +1,7 @@ ### Package Section ### -PACKAGES = CSWgcc4core CSWgcc4corert CSWgcc4gfortran -PACKAGES += CSWgcc4gfortranrt CSWgcc4java CSWgcc4javart -PACKAGES += CSWgcc4objc CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt +PACKAGES = CSWgcc4ada CSWgcc4adart CSWgcc4core CSWgcc4corert CSWgcc4gfortran +PACKAGES += CSWgcc4gfortranrt CSWgcc4java CSWgcc4javart CSWgcc4objc +PACKAGES += CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt ## Define Package Catalog Names CATALOGNAME_CSWgcc4ada = gcc4ada This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 5 18:30:09 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 05 Apr 2009 16:30:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4199] csw/mgar/pkg/bash_completion/trunk/files Message-ID: Revision: 4199 http://gar.svn.sourceforge.net/gar/?rev=4199&view=rev Author: chninkel Date: 2009-04-05 16:30:09 +0000 (Sun, 05 Apr 2009) Log Message: ----------- bash_completion: updated pkg-get completion with new options Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion csw/mgar/pkg/bash_completion/trunk/files/smf.completion Modified: csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -68,7 +68,7 @@ fi if [[ ${cur} == -* ]] ; then - local opts="-c -d -D -f -i -l -s -u -U" + local opts="-c -d -D -f -i -l -s -S -u -U -v" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 else Modified: csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/pkgadd.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is Modified: csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/pkgrm.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is Modified: csw/mgar/pkg/bash_completion/trunk/files/smf.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/smf.completion 2009-04-05 15:56:57 UTC (rev 4198) +++ csw/mgar/pkg/bash_completion/trunk/files/smf.completion 2009-04-05 16:30:09 UTC (rev 4199) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 5 18:31:11 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 05 Apr 2009 16:31:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4200] csw/mgar/pkg/bash_completion/trunk/files/pkg-get. completion Message-ID: Revision: 4200 http://gar.svn.sourceforge.net/gar/?rev=4200&view=rev Author: chninkel Date: 2009-04-05 16:31:11 +0000 (Sun, 05 Apr 2009) Log Message: ----------- bash_completion: some blastwave -> opencsw Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion Modified: csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 16:30:09 UTC (rev 4199) +++ csw/mgar/pkg/bash_completion/trunk/files/pkg-get.completion 2009-04-05 16:31:11 UTC (rev 4200) @@ -1,5 +1,5 @@ # -# Copyright 2006 Yann Rouillard +# Copyright 2006 Yann Rouillard # All rights reserved. Use is subject to license terms. # # Redistribution and/or use, with or without modification, is @@ -7,7 +7,7 @@ # author(s) shall not be liable in the event that use of the # software causes damage. # -# pkg-get.completion - bash completion for blastwave pkg-get +# pkg-get.completion - bash completion for opencsw pkg-get # have pkg-get && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 21:24:29 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 19:24:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4201] csw/mgar/pkg/libfaac/trunk Message-ID: Revision: 4201 http://gar.svn.sourceforge.net/gar/?rev=4201&view=rev Author: hson Date: 2009-04-05 19:24:29 +0000 (Sun, 05 Apr 2009) Log Message: ----------- libfaac: Several patches to get compiling to work Modified Paths: -------------- csw/mgar/pkg/libfaac/trunk/Makefile csw/mgar/pkg/libfaac/trunk/checksums csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff Added Paths: ----------- csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff csw/mgar/pkg/libfaac/trunk/files/configure.diff Modified: csw/mgar/pkg/libfaac/trunk/Makefile =================================================================== --- csw/mgar/pkg/libfaac/trunk/Makefile 2009-04-05 16:31:11 UTC (rev 4200) +++ csw/mgar/pkg/libfaac/trunk/Makefile 2009-04-05 19:24:29 UTC (rev 4201) @@ -19,9 +19,11 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(SF_PROJ)-(\d+(?:\.\d+)*).tar.bz2 -PATCHFILES += Makefile.am.diff Makefile.in.diff Makefile.in.frontend.diff +#PATCHFILES += Makefile.am.diff Makefile.in.diff Makefile.in.frontend.diff +PATCHFILES += Makefile.in.frontend.diff Makefile.in.common.mp4v2.diff PATCHFILES += aacquant.c.diff aacquant.h.diff config.h.in.diff -PATCHFILES += configure.in.diff faac.h.diff faaccfg.h.diff frame.h.diff +#PATCHFILES += configure.in.diff faac.h.diff faaccfg.h.diff frame.h.diff +PATCHFILES += configure.diff faac.h.diff faaccfg.h.diff frame.h.diff PATCHFILES += input.c.diff ltp.c.diff mp4property.h.diff mp4util.h.diff PATCHFILES += mpeg4ip.h.diff psych.h.diff Modified: csw/mgar/pkg/libfaac/trunk/checksums =================================================================== --- csw/mgar/pkg/libfaac/trunk/checksums 2009-04-05 16:31:11 UTC (rev 4200) +++ csw/mgar/pkg/libfaac/trunk/checksums 2009-04-05 19:24:29 UTC (rev 4201) @@ -1,11 +1,10 @@ c5dde68840cefe46532089c9392d1df0 download/faac-1.28.tar.bz2 -dcfdb7a011ce03ea536ddb92cc7ee8e4 download/Makefile.am.diff -62ba5e8b03a5c551ad17b149aa86e0c2 download/Makefile.in.diff eb7e2cee261c71ac4a8d718b5498777e download/Makefile.in.frontend.diff +3d7c0f7936dcc1c4833d693860720adf download/Makefile.in.common.mp4v2.diff 19f2eebe3df5300ab4a1a16e43593663 download/aacquant.c.diff 2af64ce38f023774fb0c8f691b98c564 download/aacquant.h.diff -86598bb0fb18acdf27557f65baf05f66 download/config.h.in.diff -ffb37b75a68dd524aa3d87dc38b4b971 download/configure.in.diff +ea8508703521e663e637382231d4c13b download/config.h.in.diff +027ebf052052128c67f0749e610f4acb download/configure.diff 56f2c5e28e1177e3b6956aaf83a10e13 download/faac.h.diff 268d60a6a1304fa1758a962a20731c1c download/faaccfg.h.diff 29fe6485d9ebe7fd0892c18ed450bac5 download/frame.h.diff Added: csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff =================================================================== --- csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff (rev 0) +++ csw/mgar/pkg/libfaac/trunk/files/Makefile.in.common.mp4v2.diff 2009-04-05 19:24:29 UTC (rev 4201) @@ -0,0 +1,13 @@ +--- ../build-global/faac-1.28/common/mp4v2/Makefile.in 2009-02-10 09:37:00.000000000 +0100 ++++ faac-1.28/common/mp4v2/Makefile.in 2009-04-05 20:42:49.571593147 +0200 +@@ -205,8 +205,8 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-INCLUDES = -I$(top_srcdir)/include +-AM_CXXFLAGS = -Wall ++INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4v2 ++AM_CXXFLAGS = $(CXXFLAGS) + noinst_LIBRARIES = libmp4v2.a + noinst_HEADERS = mp4.h mpeg4ip.h mpeg4ip_version.h mpeg4ip_config.h + libmp4v2_a_SOURCES = \ Modified: csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff =================================================================== --- csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff 2009-04-05 16:31:11 UTC (rev 4200) +++ csw/mgar/pkg/libfaac/trunk/files/config.h.in.diff 2009-04-05 19:24:29 UTC (rev 4201) @@ -1,7 +1,6 @@ -diff --speed-large-files --minimal -ru ../build-global/faac-1.28/config.h.in faac-1.28/config.h.in --- ../build-global/faac-1.28/config.h.in 2009-02-10 09:36:59.000000000 +0100 -+++ faac-1.28/config.h.in 2009-03-20 05:55:21.041828651 +0100 -@@ -1,5 +1,26 @@ ++++ faac-1.28/config.h.in 2009-04-05 18:56:29.025432723 +0200 +@@ -1,5 +1,25 @@ /* config.h.in. Generated from configure.in by autoheader. */ +#ifndef __FAAC_CONFIG_H @@ -9,7 +8,6 @@ + +#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) +#include -+#include + +typedef uint8_t u_int8_t; +typedef uint16_t u_int16_t; @@ -28,7 +26,7 @@ /* Define if you want to encode for DRM */ #undef DRM -@@ -131,3 +152,5 @@ +@@ -131,3 +151,5 @@ /* Define to `long int' if does not define. */ #undef off_t Added: csw/mgar/pkg/libfaac/trunk/files/configure.diff =================================================================== --- csw/mgar/pkg/libfaac/trunk/files/configure.diff (rev 0) +++ csw/mgar/pkg/libfaac/trunk/files/configure.diff 2009-04-05 19:24:29 UTC (rev 4201) @@ -0,0 +1,20 @@ +--- ../build-global/faac-1.28/configure 2009-02-10 09:36:58.000000000 +0100 ++++ faac-1.28/configure 2009-04-05 20:17:04.647262929 +0200 +@@ -19731,7 +19731,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lmp4v2 -lstdc++ $LIBS" ++LIBS="-lmp4v2 -lCrun -lCstd $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -19864,7 +19864,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lmp4v2 -lstdc++ $LIBS" ++LIBS="-lmp4v2 -lCrun -lCstd $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 21:39:25 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 19:39:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4202] csw/mgar/pkg/libgoffice/trunk Message-ID: Revision: 4202 http://gar.svn.sourceforge.net/gar/?rev=4202&view=rev Author: hson Date: 2009-04-05 19:39:25 +0000 (Sun, 05 Apr 2009) Log Message: ----------- libgoffice: Revert back to 0.6.6 since gnumeric wont work with 0.7.x Modified Paths: -------------- csw/mgar/pkg/libgoffice/trunk/Makefile csw/mgar/pkg/libgoffice/trunk/checksums Modified: csw/mgar/pkg/libgoffice/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 19:24:29 UTC (rev 4201) +++ csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 19:39:25 UTC (rev 4202) @@ -1,5 +1,5 @@ GARNAME = libgoffice -GARVERSION = 0.7.3 +GARVERSION = 0.6.6 CATEGORIES = gnome DESCRIPTION = Document centric objects library @@ -8,13 +8,16 @@ top of GLib and Gtk+. endef -MASTER_SITES = $(GNOME_MIRROR) +MASTER_SITES = $(GNOME_ROOT)/goffice/$(GNOME_SUBV)/ DISTFILES = goffice-$(GARVERSION).tar.gz DISTNAME = goffice-$(GARVERSION) REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib +REQUIRED_PKGS += CSWbonobo2 CSWgnomekeyring CSWgnomevfs2 CSWlibart +REQUIRED_PKGS += CSWlibbonoboui CSWlibgnome CSWlibgnomecanvas CSWlibgnomeui +REQUIRED_PKGS += CSWlibpopt CSWorbit2 # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = goffice-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/libgoffice/trunk/checksums =================================================================== --- csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 19:24:29 UTC (rev 4201) +++ csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 19:39:25 UTC (rev 4202) @@ -1 +1 @@ -515bf59321337fe432c8c9bb4835fc52 download/goffice-0.7.3.tar.gz +e689b21b892768af9ef2c08f2b6ee94e download/goffice-0.6.6.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 5 23:20:49 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 21:20:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4203] csw/mgar/pkg/netsnmp/trunk/Makefile Message-ID: Revision: 4203 http://gar.svn.sourceforge.net/gar/?rev=4203&view=rev Author: hson Date: 2009-04-05 21:20:49 +0000 (Sun, 05 Apr 2009) Log Message: ----------- netsnmp: LD_OPTIONS workaround not needed anymore Modified Paths: -------------- csw/mgar/pkg/netsnmp/trunk/Makefile Modified: csw/mgar/pkg/netsnmp/trunk/Makefile =================================================================== --- csw/mgar/pkg/netsnmp/trunk/Makefile 2009-04-05 19:39:25 UTC (rev 4202) +++ csw/mgar/pkg/netsnmp/trunk/Makefile 2009-04-05 21:20:49 UTC (rev 4203) @@ -24,10 +24,6 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = (\d+(?:\.\d+)*) -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-default-snmp-version=1 CONFIGURE_ARGS += --with-sys-contact=unknown @@ -47,8 +43,8 @@ # Patch for python module PATCHFILES += Makefile.in.diff -LD_OPTIONS = -EXTRA_COMMON_EXPORTS = LD_OPTIONS +#LD_OPTIONS = +#EXTRA_COMMON_EXPORTS = LD_OPTIONS EXTRA_MERGE_EXCLUDE_FILES = .*/perllocal.pod This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 6 00:36:59 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 05 Apr 2009 22:36:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4204] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4204 http://gar.svn.sourceforge.net/gar/?rev=4204&view=rev Author: valholla Date: 2009-04-05 22:36:59 +0000 (Sun, 05 Apr 2009) Log Message: ----------- test-results Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk Added Paths: ----------- csw/mgar/pkg/gcc4/trunk/files/test-results/ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 21:20:49 UTC (rev 4203) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-05 22:36:59 UTC (rev 4204) @@ -16,12 +16,6 @@ # of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -## The following patches address bug 29442 -## http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29442 -## Patch to Reenable alloca() on non-GCC compilers -#PATCHFILES = re-enable-alloc.diff -#PATCHFILES += split-insn-attrtab.diff - ## build options CONFIGURE_ARGS = --prefix=$(BUILD_PREFIX)/gcc4 CONFIGURE_ARGS += --exec-prefix=$(BUILD_PREFIX)/gcc4 Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 21:20:49 UTC (rev 4203) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-05 22:36:59 UTC (rev 4204) @@ -24,14 +24,6 @@ $(_DBG)(ginstall -d $(PPREFIX)/bin/i386) $(_DBG)$(MAKECOOKIE) -merge-amd64-files: - @echo "[===== Merging isa-amd64 =====]" - $(_DBG)(cd $(AMD_BASE); for dir in `gfind . -name "*solaris2\.10*" -type d` ; do \ - /usr/bin/pax -rw $$dir $(PKGROOT); done ) - $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw $(MPREFIX)/lib/amd64 $(PKGROOT)) - $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw * $(PPREFIX)/bin/amd64) - $(_DBG)$(MAKECOOKIE) - merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/bin $(PKGROOT)) @@ -44,6 +36,15 @@ $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/libexec $(PKGROOT)) $(_DBG)$(MAKECOOKIE) +merge-amd64-files: + @echo "[===== Merging isa-amd64 =====]" + $(_DBG)(cd $(AMD_BASE); \ + for dir in `gfind . -name "*solaris2\.10*" -type d` ; do \ + /usr/bin/pax -rw $$dir $(PKGROOT); done ) + $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw $(MPREFIX)/lib/amd64 $(PKGROOT)) + $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw * $(PPREFIX)/bin/amd64) + $(_DBG)$(MAKECOOKIE) + ifeq ($(shell uname -p), i386) ISAEXEC_DIRS = /opt/csw/gcc4/bin ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc @@ -73,4 +74,18 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gjar ISAEXEC_FILES += /opt/csw/gcc4/bin/gorbd ISAEXEC_FILES += /opt/csw/gcc4/bin/gtnameserv +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnat +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbl +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatmake +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref endif Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 21:20:49 UTC (rev 4203) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-05 22:36:59 UTC (rev 4204) @@ -151,8 +151,8 @@ ####### RunTime Packages ## gcc4adart -PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* -PKGFILES_CSWgcc4adart = .*/lib/.*libgnarl.* +PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* +PKGFILES_CSWgcc4adart += .*/lib/.*libgnarl.* ## gcc4corert PKGFILES_CSWgcc4corert = .*/lib/.*libgcc_s.* Added: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd 2009-04-05 22:36:59 UTC (rev 4204) @@ -0,0 +1,397 @@ +$ make check +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gcc || mkdir testsuite/gcc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gcc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 01:17:49 2009 +Native configuration is i386-pc-solaris2.10 + + === gcc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... +FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 +FAIL: gcc.c-torture/execute/990127-2.c execution, -Os +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... + +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... +XPASS: gcc.dg/ucnid-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-3.c (test for excess errors) +XPASS: gcc.dg/ucnid-4.c (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... +FAIL: gcc.target/i386/sse-13.c (test for excess errors) +FAIL: gcc.target/i386/sse-14.c (test for excess errors) +FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable +FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... +skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined + + === gcc Summary === + +# of expected passes 48837 +# of unexpected failures 6 +# of unexpected successes 3 +# of expected failures 176 +# of untested testcases 42 +# of unsupported tests 314 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gcc] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' + === acats configuration === +target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/ +Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/specs Target: i386-pc-solaris2.10 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) +host=i386-pc-solaris2.8 +target=i386-pc-solaris2.10 +gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/gnatmake + + === acats support === +Generating support files... done. +Compiling support files... done. + + === acats tests === +Running chapter a ... +Running chapter c2 ... +Running chapter c3 ... +Running chapter c4 ... +Running chapter c5 ... +Running chapter c6 ... +Running chapter c7 ... +Running chapter c8 ... +Running chapter c9 ... +Running chapter ca ... +Running chapter cb ... +Running chapter cc ... +Running chapter cd ... +Running chapter ce ... +Running chapter cxa ... +Running chapter cxb ... +Running chapter cxf ... +Running chapter cxg ... +Running chapter cxh ... +Running chapter cz ... +Running chapter d ... +Running chapter e ... +Running chapter gcc ... +Running chapter l ... + === acats Summary === +# of expected passes 2315 +# of unexpected failures 0 +test -d testsuite || mkdir testsuite +test -d testsuite/gnat || mkdir testsuite/gnat +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gnat; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 05:27:21 2009 +Native configuration is i386-pc-solaris2.10 + + === gnat tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... + + === gnat Summary === + +# of expected passes 374 +# of expected failures 1 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/g++ || mkdir testsuite/g++ +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/g++; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 05:31:24 2009 +Native configuration is i386-pc-solaris2.10 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... +XPASS: g++.dg/other/ucnid-1.C (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... +XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) +XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) +XPASS: g++.old-deja/g++.other/init19.C execution test + + === g++ Summary === + +# of expected passes 17496 +# of unexpected successes 4 +# of expected failures 83 +# of unsupported tests 172 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) + +gmake[1]: [check-parallel-g++] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gfortran || mkdir testsuite/gfortran +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gfortran; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 06:21:32 2009 +Native configuration is i386-pc-solaris2.10 + + === gfortran tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... +FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/array_constructor_23.f -O3 -g execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... + + === gfortran Summary === + +# of expected passes 25233 +# of unexpected failures 4 +# of expected failures 3 +# of unsupported tests 32 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gfortran] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/objc || mkdir testsuite/objc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/objc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 08:04:18 2009 +Native configuration is i386-pc-solaris2.10 + + === objc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... + + === objc Summary === + +# of expected passes 1812 +# of expected failures 7 +# of unsupported tests 24 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + Added: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 2009-04-05 22:36:59 UTC (rev 4204) @@ -0,0 +1,512 @@ +$ make check +Making a new config file... +echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite" >> ./tmp0 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gcc || mkdir testsuite/gcc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gcc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 10:07:08 2009 +Native configuration is i386-pc-solaris2.8 + + === gcc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... +FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 +FAIL: gcc.c-torture/execute/990127-2.c execution, -Os +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... + +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... +FAIL: gcc.dg/builtins-8.c execution test +FAIL: gcc.dg/pr36584.c execution test +FAIL: gcc.dg/pthread-init-1.c (test for excess errors) +FAIL: gcc.dg/pthread-init-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-3.c (test for excess errors) +XPASS: gcc.dg/ucnid-4.c (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... +FAIL: largefile.c -O0 -g (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O0 -g assembly comparison +FAIL: largefile.c -O0 (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O0 assembly comparison +FAIL: largefile.c -O1 (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O1 assembly comparison +FAIL: largefile.c -O2 (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O2 assembly comparison +FAIL: largefile.c -O3 -fomit-frame-pointer (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O3 -fomit-frame-pointer assembly comparison +FAIL: largefile.c -O3 -g (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -O3 -g assembly comparison +FAIL: largefile.c -Os (test for excess errors) +FAIL: gcc.dg/pch/largefile.c -Os assembly comparison +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... +FAIL: gcc.dg/torture/complex-alias-1.c -O0 execution test +FAIL: gcc.dg/torture/complex-alias-1.c -O1 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... +XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized "link_error" 0 +FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "converted loop nest to perfect loop nest" 1 +FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-4.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-5.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-6.c scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gcc.dg/tree-ssa/ltrans-8.c scan-tree-dump-times ltrans "transformed loop" 1 +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... +FAIL: gcc.dg/vect/pr36493.c execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... +FAIL: gcc.target/i386/20060512-1.c execution test +FAIL: gcc.target/i386/20060512-3.c execution test +FAIL: gcc.target/i386/abi-1.c scan-assembler xmm0 +FAIL: gcc.target/i386/asm-2.c (internal compiler error) +FAIL: gcc.target/i386/asm-2.c (test for excess errors) +FAIL: gcc.target/i386/fastcall-sseregparm.c execution test +FAIL: gcc.target/i386/fpprec-1.c execution test +FAIL: gcc.target/i386/pr13685.c execution test +FAIL: gcc.target/i386/pr37191.c (test for excess errors) +FAIL: gcc.target/i386/reload-1.c (test for excess errors) +ERROR: gcc.target/i386/reload-1.c: error executing dg-final: no files matched glob pattern "reload-1.c.[0-9][0-9][0-9]r.csa" +FAIL: gcc.target/i386/sse-10.c execution test +FAIL: gcc.target/i386/sse-11.c execution test +FAIL: gcc.target/i386/sse-13.c (test for excess errors) +FAIL: gcc.target/i386/sse-14.c (test for excess errors) +FAIL: gcc.target/i386/sse-17.c execution test +FAIL: gcc.target/i386/sse-18.c execution test +FAIL: gcc.target/i386/sse-3.c execution test +FAIL: gcc.target/i386/sse-6.c execution test +FAIL: gcc.target/i386/sse-recip-vec.c execution test +FAIL: gcc.target/i386/sse-recip.c execution test +FAIL: gcc.target/i386/sse2-lrint-vec.c execution test +FAIL: gcc.target/i386/sse2-lrintf-vec.c execution test +FAIL: gcc.target/i386/sse2-vec-1.c execution test +FAIL: gcc.target/i386/sse2-vec-2.c execution test +FAIL: gcc.target/i386/sse2-vec-3.c execution test +FAIL: gcc.target/i386/sse2-vec-4.c execution test +FAIL: gcc.target/i386/sse2-vec-5.c execution test +FAIL: gcc.target/i386/sse2-vec-6.c execution test +FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable +FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) +WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... +skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined + + === gcc Summary === + +# of expected passes 48710 +# of unexpected failures 59 +# of unexpected successes 4 +# of expected failures 168 +# of unresolved testcases 1 +# of untested testcases 35 +# of unsupported tests 340 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gcc] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' + === acats configuration === +target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/ +Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/specs Target: i386-pc-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) +host=i386-pc-solaris2.8 +target=i386-pc-solaris2.8 +gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/gnatmake + + === acats support === +Generating support files... done. +Compiling support files... done. + + === acats tests === +Running chapter a ... +Running chapter c2 ... +Running chapter c3 ... +Running chapter c4 ... +Running chapter c5 ... +Running chapter c6 ... +Running chapter c7 ... +Running chapter c8 ... +Running chapter c9 ... +Running chapter ca ... +Running chapter cb ... +Running chapter cc ... +Running chapter cd ... +Running chapter ce ... +Running chapter cxa ... +Running chapter cxb ... +Running chapter cxf ... +Running chapter cxg ... +Running chapter cxh ... +Running chapter cz ... +Running chapter d ... +Running chapter e ... +Running chapter gcc ... +Running chapter l ... + === acats Summary === +# of expected passes 2315 +# of unexpected failures 0 +test -d testsuite || mkdir testsuite +test -d testsuite/gnat || mkdir testsuite/gnat +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gnat; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 14:20:14 2009 +Native configuration is i386-pc-solaris2.8 + + === gnat tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... + + === gnat Summary === + +# of expected passes 374 +# of expected failures 1 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/g++ || mkdir testsuite/g++ +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/g++; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 14:24:10 2009 +Native configuration is i386-pc-solaris2.8 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... +FAIL: g++.dg/other/i386-1.C execution test +XPASS: g++.dg/other/ucnid-1.C (test for excess errors) +FAIL: g++.dg/warn/miss-format-1.C printf attribute warning (test for warnings, line 15) +FAIL: g++.dg/warn/miss-format-1.C printf attribute warning 2 (test for warnings, line 40) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... +FAIL: g++.dg/torture/pr34099.C -O0 execution test +FAIL: g++.dg/torture/pr34099.C -O1 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... +FAIL: g++.old-deja/g++.brendan/complex1.C execution test +XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) +XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) +FAIL: g++.old-deja/g++.other/headers1.C (test for excess errors) +WARNING: g++.old-deja/g++.other/headers1.C compilation failed to produce executable +XPASS: g++.old-deja/g++.other/init19.C execution test + + === g++ Summary === + +# of expected passes 17488 +# of unexpected failures 7 +# of unexpected successes 4 +# of expected failures 84 +# of unsupported tests 172 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) + +gmake[1]: [check-parallel-g++] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gfortran || mkdir testsuite/gfortran +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gfortran; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 15:18:21 2009 +Native configuration is i386-pc-solaris2.8 + + === gfortran tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... +FAIL: gfortran.dg/c_by_val_1.f -O0 execution test +FAIL: gfortran.dg/c_by_val_1.f -O1 execution test +FAIL: gfortran.dg/c_by_val_1.f -O2 execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/c_by_val_1.f -O3 -g execution test +FAIL: gfortran.dg/c_by_val_1.f -Os execution test +FAIL: gfortran.dg/f2c_2.f90 -O0 execution test +FAIL: gfortran.dg/f2c_2.f90 -O1 execution test +FAIL: gfortran.dg/f2c_2.f90 -O2 execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/f2c_2.f90 -O3 -g execution test +FAIL: gfortran.dg/f2c_2.f90 -Os execution test +FAIL: gfortran.dg/ltrans-7.f90 -O scan-tree-dump-times ltrans "transformed loop" 1 +FAIL: gfortran.dg/specifics_1.f90 -O0 execution test +FAIL: gfortran.dg/specifics_1.f90 -O1 execution test +FAIL: gfortran.dg/specifics_1.f90 -O2 execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/specifics_1.f90 -O3 -g execution test +FAIL: gfortran.dg/specifics_1.f90 -Os execution test +FAIL: gfortran.dg/value_4.f90 -O0 execution test +FAIL: gfortran.dg/value_4.f90 -O1 execution test +FAIL: gfortran.dg/value_4.f90 -O2 execution test +FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer execution test +FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-loops execution test +FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test +FAIL: gfortran.dg/value_4.f90 -O3 -g execution test +FAIL: gfortran.dg/value_4.f90 -Os execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... +FAIL: gfortran.dg/vect/vect-5.f90 -O execution test +FAIL: gfortran.dg/vect/fast-math-pr33299.f90 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... +FAIL: gfortran.fortran-torture/execute/common.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/common_size.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/forall_4.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/forall_5.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/seq_io.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O0 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O1 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions -funroll-loops +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fbounds-check +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O3 -g +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -Os +FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/stack_varsize.f90 execution, -O2 -ftree-vectorize -msse2 +FAIL: gfortran.fortran-torture/execute/where_2.f90 execution, -O2 -ftree-vectorize -msse2 + + === gfortran Summary === + +# of expected passes 24969 +# of unexpected failures 52 +# of expected failures 3 +# of unsupported tests 136 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gfortran] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/objc || mkdir testsuite/objc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/objc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sun Apr 5 17:01:58 2009 +Native configuration is i386-pc-solaris2.8 + + === objc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... + + === objc Summary === + +# of expected passes 1812 +# of expected failures 7 +# of unsupported tests 24 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) + Added: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc 2009-04-05 22:36:59 UTC (rev 4204) @@ -0,0 +1,410 @@ +$ make check +Making a new config file... +echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite" >> ./tmp0 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gcc || mkdir testsuite/gcc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gcc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 13:48:45 2009 +Native configuration is sparc-sun-solaris2.8 + + === gcc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... + +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... +WARNING: program timed out. +FAIL: gcc.dg/pr28796-2.c execution test +FAIL: gcc.dg/pthread-init-1.c (test for excess errors) +FAIL: gcc.dg/pthread-init-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-2.c (test for excess errors) +XPASS: gcc.dg/ucnid-3.c (test for excess errors) +XPASS: gcc.dg/ucnid-4.c (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... +FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 +FAIL: gcc.dg/vect/vect-35.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-iv-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-multitypes-5.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-multitypes-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 +FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "zero step in outer loop." 1 +FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 +FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "zero step in outer loop." 1 +FAIL: gcc.dg/vect/vect-vfa-slp.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/slp-15.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 +FAIL: gcc.dg/vect/slp-25.c scan-tree-dump-times vect "Alignment of access forced using peeling" 2 +FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorized 3 loops" 1 +FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorizing stmts using SLP" 3 +FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 0 loops" 2 +FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 1 loops" 1 +FAIL: gcc.dg/vect/no-vfa-vect-depend-1.c scan-tree-dump-times vect "vectorized 1 loops" 1 +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... +skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined + + === gcc Summary === + +# of expected passes 46968 +# of unexpected failures 21 +# of unexpected successes 3 +# of expected failures 192 +# of untested testcases 35 +# of unsupported tests 531 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gcc] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' + === acats configuration === +target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/ +Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/specs Target: sparc-sun-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) +host=sparc-sun-solaris2.8 +target=sparc-sun-solaris2.8 +gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/gnatmake + + === acats support === +Generating support files... done. +Compiling support files... done. + + === acats tests === +Running chapter a ... +Running chapter c2 ... +Running chapter c3 ... +Running chapter c4 ... +Running chapter c5 ... +Running chapter c6 ... +Running chapter c7 ... +Running chapter c8 ... +Running chapter c9 ... +Running chapter ca ... +Running chapter cb ... +Running chapter cc ... +Running chapter cd ... +Running chapter ce ... +Running chapter cxa ... +Running chapter cxb ... +Running chapter cxf ... +Running chapter cxg ... +Running chapter cxh ... +Running chapter cz ... +Running chapter d ... +Running chapter e ... +Running chapter gcc ... +Running chapter l ... + === acats Summary === +# of expected passes 2315 +# of unexpected failures 0 +test -d testsuite || mkdir testsuite +test -d testsuite/gnat || mkdir testsuite/gnat +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gnat; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 18:48:17 2009 +Native configuration is sparc-sun-solaris2.8 + + === gnat tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... + + === gnat Summary === + +# of expected passes 375 +# of expected failures 1 +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/g++ || mkdir testsuite/g++ +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/g++; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 18:52:36 2009 +Native configuration is sparc-sun-solaris2.8 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... +FAIL: g++.dg/opt/anchor1.C execution test +XPASS: g++.dg/other/ucnid-1.C (test for excess errors) +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... +XPASS: g++.old-deja/g++.other/init19.C execution test + + === g++ Summary === + +# of expected passes 17327 +# of unexpected failures 1 +# of unexpected successes 2 +# of expected failures 84 +# of unsupported tests 227 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) + +gmake[1]: [check-parallel-g++] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/gfortran || mkdir testsuite/gfortran +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/gfortran; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + runtestflags= ; \ + if [ -n "" ] ; then \ + runtestflags=""; \ + elif [ -n "" ] ; then \ + parts="`echo ' ' \ + | sed 's/=[^ ]* / /g'`"; \ + for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ + part=`basename $part` ; \ + case " $parts $runtestflags " in \ + *" $part "*) ;; \ + *) runtestflags="$runtestflags $part" ;; \ + esac ; \ + done ; \ + fi ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 19:59:55 2009 +Native configuration is sparc-sun-solaris2.8 + + === gfortran tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... +FAIL: gfortran.dg/nint_2.f90 -O0 execution test +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... + + === gfortran Summary === + +# of expected passes 24901 +# of unexpected failures 1 +# of expected failures 5 +# of unsupported tests 171 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) + +gmake[1]: [check-parallel-gfortran] Error 1 (ignored) +gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' +test -d testsuite || mkdir testsuite +test -d testsuite/objc || mkdir testsuite/objc +(rootme=`${PWDCMD-pwd}`; export rootme; \ + srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ + cd testsuite/objc; \ + rm -f tmp-site.exp; \ + sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ + < ../../site.exp > tmp-site.exp; \ + /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ + EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ + if [ -f ${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ + export TCL_LIBRARY ; fi ; \ + GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ + `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) +WARNING: Couldn't find the global config file. +Test Run By mwatters on Sat Apr 4 22:13:33 2009 +Native configuration is sparc-sun-solaris2.8 + + === objc tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... + + === objc Summary === + +# of expected passes 1812 +# of expected failures 7 +# of unsupported tests 24 +/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 01:03:35 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 05 Apr 2009 23:03:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4205] csw/mgar/pkg/libgoffice/trunk Message-ID: Revision: 4205 http://gar.svn.sourceforge.net/gar/?rev=4205&view=rev Author: hson Date: 2009-04-05 23:03:35 +0000 (Sun, 05 Apr 2009) Log Message: ----------- libgoffice: Update to 0.7.4 Modified Paths: -------------- csw/mgar/pkg/libgoffice/trunk/Makefile csw/mgar/pkg/libgoffice/trunk/checksums Modified: csw/mgar/pkg/libgoffice/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 22:36:59 UTC (rev 4204) +++ csw/mgar/pkg/libgoffice/trunk/Makefile 2009-04-05 23:03:35 UTC (rev 4205) @@ -1,5 +1,5 @@ GARNAME = libgoffice -GARVERSION = 0.6.6 +GARVERSION = 0.7.4 CATEGORIES = gnome DESCRIPTION = Document centric objects library Modified: csw/mgar/pkg/libgoffice/trunk/checksums =================================================================== --- csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 22:36:59 UTC (rev 4204) +++ csw/mgar/pkg/libgoffice/trunk/checksums 2009-04-05 23:03:35 UTC (rev 4205) @@ -1 +1 @@ -e689b21b892768af9ef2c08f2b6ee94e download/goffice-0.6.6.tar.gz +efb34403af04315c0ae1b55f89a24b3d download/goffice-0.7.4.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 02:08:13 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Mon, 06 Apr 2009 00:08:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4206] csw/mgar/pkg Message-ID: Revision: 4206 http://gar.svn.sourceforge.net/gar/?rev=4206&view=rev Author: hson Date: 2009-04-06 00:08:13 +0000 (Mon, 06 Apr 2009) Log Message: ----------- libgnomedb: Initial commit Added Paths: ----------- csw/mgar/pkg/libgnomedb/ csw/mgar/pkg/libgnomedb/branches/ csw/mgar/pkg/libgnomedb/tags/ csw/mgar/pkg/libgnomedb/trunk/ csw/mgar/pkg/libgnomedb/trunk/Makefile csw/mgar/pkg/libgnomedb/trunk/checksums csw/mgar/pkg/libgnomedb/trunk/files/ Property changes on: csw/mgar/pkg/libgnomedb/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libgnomedb/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgnomedb/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libgnomedb/trunk/Makefile 2009-04-06 00:08:13 UTC (rev 4206) @@ -0,0 +1,31 @@ +GARNAME = libgnomedb +GARVERSION = 3.99.7 +CATEGORIES = gnome + +DESCRIPTION = The libgnomedb library +define BLURB + libgnomedb provides data-bound UI widgets, using GTK+ and libgda. + + The libgnomedb library is released under the terms of the LGPL license, which + allows for commercial applications to be developed based on libgnomedb. The + accompanying tools are under the GPL. +endef + +MASTER_SITES = $(GNOME_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 +DISTNAME = $(GARNAME)-$(GARVERSION) + +#REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk +#REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender +#REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +CONFIGURE_ARGS = $(DIRPATHS) + +#TEST_TARGET = + +include gar/category.mk + +PATH :=/opt/csw/bin:/opt/csw/gnu:$(PATH) Added: csw/mgar/pkg/libgnomedb/trunk/checksums =================================================================== --- csw/mgar/pkg/libgnomedb/trunk/checksums (rev 0) +++ csw/mgar/pkg/libgnomedb/trunk/checksums 2009-04-06 00:08:13 UTC (rev 4206) @@ -0,0 +1 @@ +5d6c77c6c156230ad624cdae190c9d52 download/libgnomedb-3.99.7.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 02:08:43 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Mon, 06 Apr 2009 00:08:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4207] csw/mgar/pkg Message-ID: Revision: 4207 http://gar.svn.sourceforge.net/gar/?rev=4207&view=rev Author: hson Date: 2009-04-06 00:08:42 +0000 (Mon, 06 Apr 2009) Log Message: ----------- libgda: Initial commit Added Paths: ----------- csw/mgar/pkg/libgda/ csw/mgar/pkg/libgda/branches/ csw/mgar/pkg/libgda/tags/ csw/mgar/pkg/libgda/trunk/ csw/mgar/pkg/libgda/trunk/Makefile csw/mgar/pkg/libgda/trunk/checksums csw/mgar/pkg/libgda/trunk/files/ Property changes on: csw/mgar/pkg/libgda/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libgda/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgda/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libgda/trunk/Makefile 2009-04-06 00:08:42 UTC (rev 4207) @@ -0,0 +1,32 @@ +GARNAME = libgda +GARVERSION = 3.99.14 +CATEGORIES = gnome + +DESCRIPTION = GNU Data Access +define BLURB + GNU Data Access (GDA) is an attempt to provide uniform access to different + kinds of data sources (databases, information servers, mail spools, etc). + It is a complete architecture that provides all you need to access your data. + It is defined by a set of plugin APIs as generic as possible + (but very powerful at the same time) so that any kind of data source + can be accessed through them. +endef + +MASTER_SITES = $(GNOME_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 +DISTNAME = $(GARNAME)-$(GARVERSION) + +#REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk +#REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender +#REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +CONFIGURE_ARGS = $(DIRPATHS) + +#TEST_TARGET = + +include gar/category.mk + +PATH :=/opt/csw/bin:/opt/csw/gnu:$(PATH) Added: csw/mgar/pkg/libgda/trunk/checksums =================================================================== --- csw/mgar/pkg/libgda/trunk/checksums (rev 0) +++ csw/mgar/pkg/libgda/trunk/checksums 2009-04-06 00:08:42 UTC (rev 4207) @@ -0,0 +1 @@ +c7cf44e50dee4336cb79311f85ad948e download/libgda-3.99.14.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 6 04:17:49 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 06 Apr 2009 02:17:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4208] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4208 http://gar.svn.sourceforge.net/gar/?rev=4208&view=rev Author: bdwalton Date: 2009-04-06 02:17:49 +0000 (Mon, 06 Apr 2009) Log Message: ----------- Correct the LD_OPTIONS that are set when GARCOMPILER is either GCC3 or GCC4. Previously, -R/lib being added. Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-06 00:08:42 UTC (rev 4207) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-06 02:17:49 UTC (rev 4208) @@ -471,8 +471,8 @@ ASFLAGS ?= $(strip $($(GARCOMPILER)_AS_FLAGS) $(EXTRA_ASFLAGS)) OPTFLAGS ?= $(strip $($(GARCOMPILER)_CC_FLAGS) $(EXTRA_OPTFLAGS)) -GCC3_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) -GCC4_LD_OPTIONS = -R$(GNU_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +GCC3_LD_OPTIONS = -R$(GCC3_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) +GCC4_LD_OPTIONS = -R$(GCC4_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS) $(EXTRA_LD_OPTIONS) SOS11_LD_OPTIONS = $(strip $(EXTRA_SOS11_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) SOS12_LD_OPTIONS = $(strip $(EXTRA_SOS12_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS) $(EXTRA_LD_OPTIONS)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 6 04:22:24 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 06 Apr 2009 02:22:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4209] csw/mgar/pkg/ruby/trunk/Makefile Message-ID: Revision: 4209 http://gar.svn.sourceforge.net/gar/?rev=4209&view=rev Author: bdwalton Date: 2009-04-06 02:22:24 +0000 (Mon, 06 Apr 2009) Log Message: ----------- As per Mantis #3623, allow libruby.so to be pulled into CSWruby instead of CSWrubydev. Modified Paths: -------------- csw/mgar/pkg/ruby/trunk/Makefile Modified: csw/mgar/pkg/ruby/trunk/Makefile =================================================================== --- csw/mgar/pkg/ruby/trunk/Makefile 2009-04-06 02:17:49 UTC (rev 4208) +++ csw/mgar/pkg/ruby/trunk/Makefile 2009-04-06 02:22:24 UTC (rev 4209) @@ -44,7 +44,6 @@ PKGFILES_CSWrubytk = $(libdir)/.*/tcl.* $(libdir)/.*/tk.* $(libdir)/.*-tk.rb PKGFILES_CSWrubydev = $(libdir)/.*\.h $(libdir)/.*/mkmf.rb $(libdir)/.*static.a -PKGFILES_CSWrubydev += $(libdir)/libruby.so MASTER_SITES = ftp://ftp.ruby-lang.org/pub/ruby/ MASTER_SITES += ftp://www.ibiblio.org/pub/languages/ruby/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 6 16:52:57 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 06 Apr 2009 14:52:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4210] csw/mgar/pkg/ncurses/trunk/Makefile Message-ID: Revision: 4210 http://gar.svn.sourceforge.net/gar/?rev=4210&view=rev Author: dmichelsen Date: 2009-04-06 14:52:54 +0000 (Mon, 06 Apr 2009) Log Message: ----------- ncurses: Add both includes for ncurses and ncursesw Modified Paths: -------------- csw/mgar/pkg/ncurses/trunk/Makefile Modified: csw/mgar/pkg/ncurses/trunk/Makefile =================================================================== --- csw/mgar/pkg/ncurses/trunk/Makefile 2009-04-06 02:22:24 UTC (rev 4209) +++ csw/mgar/pkg/ncurses/trunk/Makefile 2009-04-06 14:52:54 UTC (rev 4210) @@ -50,7 +50,7 @@ CONFIGURE_ARGS += --without-xterm-new MERGE_SCRIPTS_isa-sparcv8-widec-disable = copy-only copy-config-only - MERGE_DIRS_isa-sparcv8-widec-disable = $(libdir) + MERGE_DIRS_isa-sparcv8-widec-disable = $(libdir) $(includedir) MERGE_SCRIPTS_isa-sparcv9-widec-disable = copy-relocated-only copy-config-only MERGE_DIRS_isa-sparcv9-widec-disable = $(libdir) @@ -59,7 +59,7 @@ MERGE_DIRS_isa-sparcv9-widec-enable = $(libdir) MERGE_SCRIPTS_isa-i386-widec-disable = copy-only copy-config-only - MERGE_DIRS_isa-i386-widec-disable = $(libdir) + MERGE_DIRS_isa-i386-widec-disable = $(libdir) $(includedir) MERGE_SCRIPTS_isa-amd64-widec-disable = copy-relocated-only copy-config-only MERGE_DIRS_isa-amd64-widec-disable = $(libdir) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Mon Apr 6 16:57:25 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Mon, 06 Apr 2009 14:57:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4211] csw/mgar/pkg/gnumeric/trunk Message-ID: Revision: 4211 http://gar.svn.sourceforge.net/gar/?rev=4211&view=rev Author: hson Date: 2009-04-06 14:57:25 +0000 (Mon, 06 Apr 2009) Log Message: ----------- gnumeric: Update to 1.9.5 Modified Paths: -------------- csw/mgar/pkg/gnumeric/trunk/Makefile csw/mgar/pkg/gnumeric/trunk/checksums csw/mgar/pkg/gnumeric/trunk/files/mainpatch Modified: csw/mgar/pkg/gnumeric/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-06 14:52:54 UTC (rev 4210) +++ csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-06 14:57:25 UTC (rev 4211) @@ -1,10 +1,10 @@ GARNAME = gnumeric -GARVERSION = 1.8.3 +GARVERSION = 1.9.5 CATEGORIES = gnome -DESCRIPTION = Brief description +DESCRIPTION = GNOME spreadsheet program define BLURB - Long description + The project aims to become a drop in replacement for proprietary spreadsheets. endef MASTER_SITES = $(GNOME_MIRROR) @@ -19,8 +19,10 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -PATCHFILES = mainpatch +#PATCHFILES = mainpatch CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk + +PATH := /opt/csw/gnu:$(PATH) Modified: csw/mgar/pkg/gnumeric/trunk/checksums =================================================================== --- csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-06 14:52:54 UTC (rev 4210) +++ csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-06 14:57:25 UTC (rev 4211) @@ -1,2 +1 @@ -64721d3c0d48ffeb5bf721315682cdcd download/gnumeric-1.8.3.tar.gz -cf9ffd8f1b23eec556cd949af385b972 download/mainpatch +4bc2ca7b90e953934b086c931238fd04 download/gnumeric-1.9.5.tar.gz Modified: csw/mgar/pkg/gnumeric/trunk/files/mainpatch =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-06 14:52:54 UTC (rev 4210) +++ csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-06 14:57:25 UTC (rev 4211) @@ -1,68 +1,3 @@ -Only in gnumeric-1.8.3: Makefile -Only in gnumeric-1.8.3: config.log -Only in gnumeric-1.8.3: config.status -Only in gnumeric-1.8.3: config.status.lineno -Only in gnumeric-1.8.3/doc/C: Makefile -Only in gnumeric-1.8.3/doc/C/figures: Makefile -Only in gnumeric-1.8.3/doc/C/figures/icons: Makefile -Only in gnumeric-1.8.3/doc/C: gnumeric-C.omf.out -Only in gnumeric-1.8.3/doc/C: omf_timestamp -Only in gnumeric-1.8.3/doc: Makefile -Only in gnumeric-1.8.3/doc/developer: Makefile -Only in gnumeric-1.8.3: gnumeric-config.h -Only in gnumeric-1.8.3: gnumeric-features.h -Only in gnumeric-1.8.3: gnumeric.desktop -Only in gnumeric-1.8.3/icons: Makefile -Only in gnumeric-1.8.3: intltool-extract -Only in gnumeric-1.8.3: intltool-merge -Only in gnumeric-1.8.3: intltool-update -Only in gnumeric-1.8.3: libspreadsheet-1.8.pc -Only in gnumeric-1.8.3: libspreadsheet.pc -Only in gnumeric-1.8.3: libtool -Only in gnumeric-1.8.3/plugins: Makefile -Only in gnumeric-1.8.3/plugins/applix: .deps -Only in gnumeric-1.8.3/plugins/applix: .libs -Only in gnumeric-1.8.3/plugins/applix: Makefile -Only in gnumeric-1.8.3/plugins/applix: applix-read.lo -Only in gnumeric-1.8.3/plugins/applix: applix-write.lo -Only in gnumeric-1.8.3/plugins/applix: applix.la -Only in gnumeric-1.8.3/plugins/applix: boot.lo -Only in gnumeric-1.8.3/plugins/applix: plugin.xml -Only in gnumeric-1.8.3/plugins/corba: .deps -Only in gnumeric-1.8.3/plugins/corba: .libs -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-common.c -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-common.lo -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-skels.c -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-skels.lo -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-stubs.c -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric-stubs.lo -Only in gnumeric-1.8.3/plugins/corba: GNOME_Gnumeric.h -Only in gnumeric-1.8.3/plugins/corba: Makefile -Only in gnumeric-1.8.3/plugins/corba: corba-application.lo -Only in gnumeric-1.8.3/plugins/corba: corba-sheet.lo -Only in gnumeric-1.8.3/plugins/corba: corba-workbook.lo -Only in gnumeric-1.8.3/plugins/corba: corba.la -Only in gnumeric-1.8.3/plugins/corba: plugin.xml -Only in gnumeric-1.8.3/plugins/corba: stamp_Gnumeric_idl -Only in gnumeric-1.8.3/plugins/derivatives: .deps -Only in gnumeric-1.8.3/plugins/derivatives: .libs -Only in gnumeric-1.8.3/plugins/derivatives: Makefile -Only in gnumeric-1.8.3/plugins/derivatives: derivatives.la -Only in gnumeric-1.8.3/plugins/derivatives: options.lo -Only in gnumeric-1.8.3/plugins/derivatives: plugin.xml -Only in gnumeric-1.8.3/plugins/dif: .deps -Only in gnumeric-1.8.3/plugins/dif: .libs -Only in gnumeric-1.8.3/plugins/dif: Makefile -Only in gnumeric-1.8.3/plugins/dif: dif.la -Only in gnumeric-1.8.3/plugins/dif: dif.lo -Only in gnumeric-1.8.3/plugins/dif: plugin.xml -Only in gnumeric-1.8.3/plugins/excel: .deps -Only in gnumeric-1.8.3/plugins/excel: .libs -Only in gnumeric-1.8.3/plugins/excel: Makefile -Only in gnumeric-1.8.3/plugins/excel: boot.lo -Only in gnumeric-1.8.3/plugins/excel: crypt-md4.lo -Only in gnumeric-1.8.3/plugins/excel: excel-xml-read.lo -Only in gnumeric-1.8.3/plugins/excel: excel.la diff -ru gnumeric-1.8.3.orig/plugins/excel/md5.h gnumeric-1.8.3/plugins/excel/md5.h --- gnumeric-1.8.3.orig/plugins/excel/md5.h 2008-01-15 00:55:11.000000000 +0100 +++ gnumeric-1.8.3/plugins/excel/md5.h 2009-03-17 00:23:02.110582251 +0100 @@ -78,150 +13,6 @@ #define MD5_DIGEST_SIZE 16 #define MD5_BLOCK_SIZE 64 -Only in gnumeric-1.8.3/plugins/excel: md5.lo -Only in gnumeric-1.8.3/plugins/excel: ms-biff.lo -Only in gnumeric-1.8.3/plugins/excel: ms-chart.lo -Only in gnumeric-1.8.3/plugins/excel: ms-container.lo -Only in gnumeric-1.8.3/plugins/excel: ms-escher.lo -Only in gnumeric-1.8.3/plugins/excel: ms-excel-read.lo -Only in gnumeric-1.8.3/plugins/excel: ms-excel-util.lo -Only in gnumeric-1.8.3/plugins/excel: ms-excel-write.lo -Only in gnumeric-1.8.3/plugins/excel: ms-formula-read.lo -Only in gnumeric-1.8.3/plugins/excel: ms-formula-write.lo -Only in gnumeric-1.8.3/plugins/excel: ms-obj.lo -Only in gnumeric-1.8.3/plugins/excel: ms-pivot.lo -Only in gnumeric-1.8.3/plugins/excel: plugin.xml -Only in gnumeric-1.8.3/plugins/excel: rc4.lo -Only in gnumeric-1.8.3/plugins/excel: xlsx-read.lo -Only in gnumeric-1.8.3/plugins/excel: xlsx-utils.lo -Only in gnumeric-1.8.3/plugins/excel: xlsx-write.lo -Only in gnumeric-1.8.3/plugins/fn-complex: .deps -Only in gnumeric-1.8.3/plugins/fn-complex: .libs -Only in gnumeric-1.8.3/plugins/fn-complex: Makefile -Only in gnumeric-1.8.3/plugins/fn-complex: functions.lo -Only in gnumeric-1.8.3/plugins/fn-complex: gsl-complex.lo -Only in gnumeric-1.8.3/plugins/fn-complex: plugin.la -Only in gnumeric-1.8.3/plugins/fn-complex: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-database: .deps -Only in gnumeric-1.8.3/plugins/fn-database: .libs -Only in gnumeric-1.8.3/plugins/fn-database: Makefile -Only in gnumeric-1.8.3/plugins/fn-database: functions.lo -Only in gnumeric-1.8.3/plugins/fn-database: plugin.la -Only in gnumeric-1.8.3/plugins/fn-database: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-date: .deps -Only in gnumeric-1.8.3/plugins/fn-date: .libs -Only in gnumeric-1.8.3/plugins/fn-date: Makefile -Only in gnumeric-1.8.3/plugins/fn-date: functions.lo -Only in gnumeric-1.8.3/plugins/fn-date: plugin.la -Only in gnumeric-1.8.3/plugins/fn-date: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-eng: .deps -Only in gnumeric-1.8.3/plugins/fn-eng: .libs -Only in gnumeric-1.8.3/plugins/fn-eng: Makefile -Only in gnumeric-1.8.3/plugins/fn-eng: functions.lo -Only in gnumeric-1.8.3/plugins/fn-eng: plugin.la -Only in gnumeric-1.8.3/plugins/fn-eng: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-erlang: .deps -Only in gnumeric-1.8.3/plugins/fn-erlang: .libs -Only in gnumeric-1.8.3/plugins/fn-erlang: Makefile -Only in gnumeric-1.8.3/plugins/fn-erlang: erlang.la -Only in gnumeric-1.8.3/plugins/fn-erlang: functions.lo -Only in gnumeric-1.8.3/plugins/fn-erlang: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-financial: .deps -Only in gnumeric-1.8.3/plugins/fn-financial: .libs -Only in gnumeric-1.8.3/plugins/fn-financial: Makefile -Only in gnumeric-1.8.3/plugins/fn-financial: functions.lo -Only in gnumeric-1.8.3/plugins/fn-financial: plugin.la -Only in gnumeric-1.8.3/plugins/fn-financial: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-financial: sc-fin.lo -Only in gnumeric-1.8.3/plugins/fn-info: .deps -Only in gnumeric-1.8.3/plugins/fn-info: .libs -Only in gnumeric-1.8.3/plugins/fn-info: Makefile -Only in gnumeric-1.8.3/plugins/fn-info: functions.lo -Only in gnumeric-1.8.3/plugins/fn-info: plugin.la -Only in gnumeric-1.8.3/plugins/fn-info: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-logical: .deps -Only in gnumeric-1.8.3/plugins/fn-logical: .libs -Only in gnumeric-1.8.3/plugins/fn-logical: Makefile -Only in gnumeric-1.8.3/plugins/fn-logical: functions.lo -Only in gnumeric-1.8.3/plugins/fn-logical: plugin.la -Only in gnumeric-1.8.3/plugins/fn-logical: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-lookup: .deps -Only in gnumeric-1.8.3/plugins/fn-lookup: .libs -Only in gnumeric-1.8.3/plugins/fn-lookup: Makefile -Only in gnumeric-1.8.3/plugins/fn-lookup: functions.lo -Only in gnumeric-1.8.3/plugins/fn-lookup: plugin.la -Only in gnumeric-1.8.3/plugins/fn-lookup: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-math: .deps -Only in gnumeric-1.8.3/plugins/fn-math: .libs -Only in gnumeric-1.8.3/plugins/fn-math: Makefile -Only in gnumeric-1.8.3/plugins/fn-math: functions.lo -Only in gnumeric-1.8.3/plugins/fn-math: plugin.la -Only in gnumeric-1.8.3/plugins/fn-math: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-r: .deps -Only in gnumeric-1.8.3/plugins/fn-r: .libs -Only in gnumeric-1.8.3/plugins/fn-r: Makefile -Only in gnumeric-1.8.3/plugins/fn-r: extra.lo -Only in gnumeric-1.8.3/plugins/fn-r: functions.lo -Only in gnumeric-1.8.3/plugins/fn-r: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-r: rstat.la -Only in gnumeric-1.8.3/plugins/fn-random: .deps -Only in gnumeric-1.8.3/plugins/fn-random: .libs -Only in gnumeric-1.8.3/plugins/fn-random: Makefile -Only in gnumeric-1.8.3/plugins/fn-random: functions.lo -Only in gnumeric-1.8.3/plugins/fn-random: plugin.la -Only in gnumeric-1.8.3/plugins/fn-random: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-stat: .deps -Only in gnumeric-1.8.3/plugins/fn-stat: .libs -Only in gnumeric-1.8.3/plugins/fn-stat: Makefile -Only in gnumeric-1.8.3/plugins/fn-stat: functions.lo -Only in gnumeric-1.8.3/plugins/fn-stat: plugin.la -Only in gnumeric-1.8.3/plugins/fn-stat: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-string: .deps -Only in gnumeric-1.8.3/plugins/fn-string: .libs -Only in gnumeric-1.8.3/plugins/fn-string: Makefile -Only in gnumeric-1.8.3/plugins/fn-string: functions.lo -Only in gnumeric-1.8.3/plugins/fn-string: plugin.la -Only in gnumeric-1.8.3/plugins/fn-string: plugin.xml -Only in gnumeric-1.8.3/plugins/fn-tsa: .deps -Only in gnumeric-1.8.3/plugins/fn-tsa: .libs -Only in gnumeric-1.8.3/plugins/fn-tsa: Makefile -Only in gnumeric-1.8.3/plugins/fn-tsa: functions.lo -Only in gnumeric-1.8.3/plugins/fn-tsa: plugin.la -Only in gnumeric-1.8.3/plugins/fn-tsa: plugin.xml -Only in gnumeric-1.8.3/plugins/gda: .deps -Only in gnumeric-1.8.3/plugins/gda: Makefile -Only in gnumeric-1.8.3/plugins/gnome-db: .deps -Only in gnumeric-1.8.3/plugins/gnome-db: Makefile -Only in gnumeric-1.8.3/plugins/gnome-glossary: Makefile -Only in gnumeric-1.8.3/plugins/html: .deps -Only in gnumeric-1.8.3/plugins/html: .libs -Only in gnumeric-1.8.3/plugins/html: Makefile -Only in gnumeric-1.8.3/plugins/html: boot.lo -Only in gnumeric-1.8.3/plugins/html: font.lo -Only in gnumeric-1.8.3/plugins/html: html.la -Only in gnumeric-1.8.3/plugins/html: html.lo -Only in gnumeric-1.8.3/plugins/html: html_read.lo -Only in gnumeric-1.8.3/plugins/html: latex.lo -Only in gnumeric-1.8.3/plugins/html: plugin.xml -Only in gnumeric-1.8.3/plugins/html: roff.lo -Only in gnumeric-1.8.3/plugins/lotus-123: .deps -Only in gnumeric-1.8.3/plugins/lotus-123: .libs -Only in gnumeric-1.8.3/plugins/lotus-123: Makefile -Only in gnumeric-1.8.3/plugins/lotus-123: boot.lo -Only in gnumeric-1.8.3/plugins/lotus-123: lotus-formula.lo -Only in gnumeric-1.8.3/plugins/lotus-123: lotus.la -Only in gnumeric-1.8.3/plugins/lotus-123: lotus.lo -Only in gnumeric-1.8.3/plugins/lotus-123: plugin.xml -Only in gnumeric-1.8.3/plugins/mps: .deps -Only in gnumeric-1.8.3/plugins/mps: .libs -Only in gnumeric-1.8.3/plugins/mps: Makefile -Only in gnumeric-1.8.3/plugins/mps: mps.la -Only in gnumeric-1.8.3/plugins/mps: mps.lo -Only in gnumeric-1.8.3/plugins/mps: parser.lo -Only in gnumeric-1.8.3/plugins/mps: plugin.xml -Only in gnumeric-1.8.3/plugins/numtheory: .deps -Only in gnumeric-1.8.3/plugins/numtheory: .libs -Only in gnumeric-1.8.3/plugins/numtheory: Makefile diff -ru gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c gnumeric-1.8.3/plugins/numtheory/numtheory.c --- gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c 2008-01-15 00:55:10.000000000 +0100 +++ gnumeric-1.8.3/plugins/numtheory/numtheory.c 2009-03-17 00:55:21.253509921 +0100 @@ -240,90 +31,6 @@ /* ------------------------------------------------------------------------- */ -Only in gnumeric-1.8.3/plugins/numtheory: numtheory.e -Only in gnumeric-1.8.3/plugins/numtheory: numtheory.la -Only in gnumeric-1.8.3/plugins/numtheory: numtheory.lo -Only in gnumeric-1.8.3/plugins/numtheory: plugin.xml -Only in gnumeric-1.8.3/plugins/oleo: .deps -Only in gnumeric-1.8.3/plugins/oleo: .libs -Only in gnumeric-1.8.3/plugins/oleo: Makefile -Only in gnumeric-1.8.3/plugins/oleo: boot.lo -Only in gnumeric-1.8.3/plugins/oleo: oleo.la -Only in gnumeric-1.8.3/plugins/oleo: oleo.lo -Only in gnumeric-1.8.3/plugins/oleo: plugin.xml -Only in gnumeric-1.8.3/plugins/openoffice: .deps -Only in gnumeric-1.8.3/plugins/openoffice: .libs -Only in gnumeric-1.8.3/plugins/openoffice: Makefile -Only in gnumeric-1.8.3/plugins/openoffice: openoffice-read.lo -Only in gnumeric-1.8.3/plugins/openoffice: openoffice-write.lo -Only in gnumeric-1.8.3/plugins/openoffice: openoffice.la -Only in gnumeric-1.8.3/plugins/openoffice: plugin.xml -Only in gnumeric-1.8.3/plugins/paradox: .deps -Only in gnumeric-1.8.3/plugins/paradox: Makefile -Only in gnumeric-1.8.3/plugins/perl-func: Makefile -Only in gnumeric-1.8.3/plugins/perl-func: plugin.xml -Only in gnumeric-1.8.3/plugins/perl-loader: .libs -Only in gnumeric-1.8.3/plugins/perl-loader: Makefile -Only in gnumeric-1.8.3/plugins/perl-loader: boot.lo -Only in gnumeric-1.8.3/plugins/perl-loader: perl-gnumeric.lo -Only in gnumeric-1.8.3/plugins/perl-loader: perl-loader.lo -Only in gnumeric-1.8.3/plugins/perl-loader: perl_loader.la -Only in gnumeric-1.8.3/plugins/perl-loader: plugin.xml -Only in gnumeric-1.8.3/plugins/perl-loader: xsinit.c -Only in gnumeric-1.8.3/plugins/perl-loader: xsinit.lo -Only in gnumeric-1.8.3/plugins/plan-perfect: .deps -Only in gnumeric-1.8.3/plugins/plan-perfect: .libs -Only in gnumeric-1.8.3/plugins/plan-perfect: Makefile -Only in gnumeric-1.8.3/plugins/plan-perfect: charset.lo -Only in gnumeric-1.8.3/plugins/plan-perfect: plan_perfect.la -Only in gnumeric-1.8.3/plugins/plan-perfect: pln.lo -Only in gnumeric-1.8.3/plugins/plan-perfect: plugin.xml -Only in gnumeric-1.8.3/plugins/psiconv: .deps -Only in gnumeric-1.8.3/plugins/psiconv: Makefile -Only in gnumeric-1.8.3/plugins/py-func: Makefile -Only in gnumeric-1.8.3/plugins/python-loader: .deps -Only in gnumeric-1.8.3/plugins/python-loader: Makefile -Only in gnumeric-1.8.3/plugins/qpro: .deps -Only in gnumeric-1.8.3/plugins/qpro: .libs -Only in gnumeric-1.8.3/plugins/qpro: Makefile -Only in gnumeric-1.8.3/plugins/qpro: plugin.xml -Only in gnumeric-1.8.3/plugins/qpro: qpro-read.lo -Only in gnumeric-1.8.3/plugins/qpro: qpro.la -Only in gnumeric-1.8.3/plugins/sample_datasource: .deps -Only in gnumeric-1.8.3/plugins/sample_datasource: .libs -Only in gnumeric-1.8.3/plugins/sample_datasource: Makefile -Only in gnumeric-1.8.3/plugins/sample_datasource: plugin.xml -Only in gnumeric-1.8.3/plugins/sample_datasource: sample_datasource.la -Only in gnumeric-1.8.3/plugins/sample_datasource: sample_datasource.lo -Only in gnumeric-1.8.3/plugins/sc: .deps -Only in gnumeric-1.8.3/plugins/sc: .libs -Only in gnumeric-1.8.3/plugins/sc: Makefile -Only in gnumeric-1.8.3/plugins/sc: plugin.xml -Only in gnumeric-1.8.3/plugins/sc: sc.la -Only in gnumeric-1.8.3/plugins/sc: sc.lo -Only in gnumeric-1.8.3/plugins/sylk: .deps -Only in gnumeric-1.8.3/plugins/sylk: .libs -Only in gnumeric-1.8.3/plugins/sylk: Makefile -Only in gnumeric-1.8.3/plugins/sylk: plugin.xml -Only in gnumeric-1.8.3/plugins/sylk: sylk-write.lo -Only in gnumeric-1.8.3/plugins/sylk: sylk.la -Only in gnumeric-1.8.3/plugins/sylk: sylk.lo -Only in gnumeric-1.8.3/plugins/uihello: .deps -Only in gnumeric-1.8.3/plugins/uihello: .libs -Only in gnumeric-1.8.3/plugins/uihello: Makefile -Only in gnumeric-1.8.3/plugins/uihello: plugin.la -Only in gnumeric-1.8.3/plugins/uihello: plugin.xml -Only in gnumeric-1.8.3/plugins/uihello: uihello.lo -Only in gnumeric-1.8.3/plugins/xbase: .deps -Only in gnumeric-1.8.3/plugins/xbase: .libs -Only in gnumeric-1.8.3/plugins/xbase: Makefile -Only in gnumeric-1.8.3/plugins/xbase: boot.lo -Only in gnumeric-1.8.3/plugins/xbase: plugin.xml -Only in gnumeric-1.8.3/plugins/xbase: xbase.la -Only in gnumeric-1.8.3/plugins/xbase: xbase.lo -Only in gnumeric-1.8.3/po: .intltool-merge-cache -Only in gnumeric-1.8.3/po: Makefile -Only in gnumeric-1.8.3/po: Makefile.in diff -ru gnumeric-1.8.3.orig/po/Makefile.in.in gnumeric-1.8.3/po/Makefile.in.in --- gnumeric-1.8.3.orig/po/Makefile.in.in 2008-05-24 22:40:36.000000000 +0200 +++ gnumeric-1.8.3/po/Makefile.in.in 2009-03-17 00:59:24.557217225 +0100 @@ -336,183 +43,6 @@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ -Only in gnumeric-1.8.3/po: POTFILES -Only in gnumeric-1.8.3/po: am.gmo -Only in gnumeric-1.8.3/po: ar.gmo -Only in gnumeric-1.8.3/po: az.gmo -Only in gnumeric-1.8.3/po: bg.gmo -Only in gnumeric-1.8.3/po: ca.gmo -Only in gnumeric-1.8.3/po: cs.gmo -Only in gnumeric-1.8.3/po: da.gmo -Only in gnumeric-1.8.3/po: de.gmo -Only in gnumeric-1.8.3/po: dz.gmo -Only in gnumeric-1.8.3/po: el.gmo -Only in gnumeric-1.8.3/po: en_CA.gmo -Only in gnumeric-1.8.3/po: en_GB.gmo -Only in gnumeric-1.8.3/po: es.gmo -Only in gnumeric-1.8.3/po: et.gmo -Only in gnumeric-1.8.3/po: fi.gmo -Only in gnumeric-1.8.3/po: fr.gmo -Only in gnumeric-1.8.3/po: ga.gmo -Only in gnumeric-1.8.3/po: gl.gmo -Only in gnumeric-1.8.3/po: he.gmo -Only in gnumeric-1.8.3/po: hr.gmo -Only in gnumeric-1.8.3/po: hu.gmo -Only in gnumeric-1.8.3/po: it.gmo -Only in gnumeric-1.8.3/po: ja.gmo -Only in gnumeric-1.8.3/po: ko.gmo -Only in gnumeric-1.8.3/po: lt.gmo -Only in gnumeric-1.8.3/po: lv.gmo -Only in gnumeric-1.8.3/po: mk.gmo -Only in gnumeric-1.8.3/po: ml.gmo -Only in gnumeric-1.8.3/po: mr.gmo -Only in gnumeric-1.8.3/po: ms.gmo -Only in gnumeric-1.8.3/po: nb.gmo -Only in gnumeric-1.8.3/po: ne.gmo -Only in gnumeric-1.8.3/po: nl.gmo -Only in gnumeric-1.8.3/po: nn.gmo -Only in gnumeric-1.8.3/po: oc.gmo -Only in gnumeric-1.8.3/po: pl.gmo -Only in gnumeric-1.8.3/po: pt.gmo -Only in gnumeric-1.8.3/po: pt_BR.gmo -Only in gnumeric-1.8.3/po: ro.gmo -Only in gnumeric-1.8.3/po: ru.gmo -Only in gnumeric-1.8.3/po: rw.gmo -Only in gnumeric-1.8.3/po: sk.gmo -Only in gnumeric-1.8.3/po: sr.gmo -Only in gnumeric-1.8.3/po: sr at Latn.gmo -Only in gnumeric-1.8.3/po: stamp-it -Only in gnumeric-1.8.3/po: sv.gmo -Only in gnumeric-1.8.3/po: te.gmo -Only in gnumeric-1.8.3/po: tr.gmo -Only in gnumeric-1.8.3/po: uk.gmo -Only in gnumeric-1.8.3/po: vi.gmo -Only in gnumeric-1.8.3/po: zh_CN.gmo -Only in gnumeric-1.8.3/po: zh_TW.gmo -Only in gnumeric-1.8.3/po-functions: Makefile -Only in gnumeric-1.8.3/po-functions: Makefile.in -Only in gnumeric-1.8.3/po-functions: POTFILES -Only in gnumeric-1.8.3/po-functions: am.gmo -Only in gnumeric-1.8.3/po-functions: ar.gmo -Only in gnumeric-1.8.3/po-functions: az.gmo -Only in gnumeric-1.8.3/po-functions: bg.gmo -Only in gnumeric-1.8.3/po-functions: ca.gmo -Only in gnumeric-1.8.3/po-functions: cs.gmo -Only in gnumeric-1.8.3/po-functions: da.gmo -Only in gnumeric-1.8.3/po-functions: de.gmo -Only in gnumeric-1.8.3/po-functions: dz.gmo -Only in gnumeric-1.8.3/po-functions: el.gmo -Only in gnumeric-1.8.3/po-functions: en_CA.gmo -Only in gnumeric-1.8.3/po-functions: en_GB.gmo -Only in gnumeric-1.8.3/po-functions: es.gmo -Only in gnumeric-1.8.3/po-functions: et.gmo -Only in gnumeric-1.8.3/po-functions: fi.gmo -Only in gnumeric-1.8.3/po-functions: fr.gmo -Only in gnumeric-1.8.3/po-functions: ga.gmo -Only in gnumeric-1.8.3/po-functions: gl.gmo -Only in gnumeric-1.8.3/po-functions: he.gmo -Only in gnumeric-1.8.3/po-functions: hr.gmo -Only in gnumeric-1.8.3/po-functions: hu.gmo -Only in gnumeric-1.8.3/po-functions: it.gmo -Only in gnumeric-1.8.3/po-functions: ja.gmo -Only in gnumeric-1.8.3/po-functions: ko.gmo -Only in gnumeric-1.8.3/po-functions: lt.gmo -Only in gnumeric-1.8.3/po-functions: lv.gmo -Only in gnumeric-1.8.3/po-functions: mk.gmo -Only in gnumeric-1.8.3/po-functions: ml.gmo -Only in gnumeric-1.8.3/po-functions: mr.gmo -Only in gnumeric-1.8.3/po-functions: ms.gmo -Only in gnumeric-1.8.3/po-functions: nb.gmo -Only in gnumeric-1.8.3/po-functions: ne.gmo -Only in gnumeric-1.8.3/po-functions: nl.gmo -Only in gnumeric-1.8.3/po-functions: nn.gmo -Only in gnumeric-1.8.3/po-functions: oc.gmo -Only in gnumeric-1.8.3/po-functions: pl.gmo -Only in gnumeric-1.8.3/po-functions: pt.gmo -Only in gnumeric-1.8.3/po-functions: pt_BR.gmo -Only in gnumeric-1.8.3/po-functions: ro.gmo -Only in gnumeric-1.8.3/po-functions: ru.gmo -Only in gnumeric-1.8.3/po-functions: rw.gmo -Only in gnumeric-1.8.3/po-functions: sk.gmo -Only in gnumeric-1.8.3/po-functions: sr.gmo -Only in gnumeric-1.8.3/po-functions: sr at Latn.gmo -Only in gnumeric-1.8.3/po-functions: sv.gmo -Only in gnumeric-1.8.3/po-functions: te.gmo -Only in gnumeric-1.8.3/po-functions: tr.gmo -Only in gnumeric-1.8.3/po-functions: uk.gmo -Only in gnumeric-1.8.3/po-functions: vi.gmo -Only in gnumeric-1.8.3/po-functions: zh_CN.gmo -Only in gnumeric-1.8.3/po-functions: zh_TW.gmo -Only in gnumeric-1.8.3/schemas: Makefile -Only in gnumeric-1.8.3/schemas: gnumeric-dialogs.schemas -Only in gnumeric-1.8.3/schemas: gnumeric-general.schemas -Only in gnumeric-1.8.3/schemas: gnumeric-plugins.schemas -Only in gnumeric-1.8.3/src: .deps -Only in gnumeric-1.8.3/src: .libs -Only in gnumeric-1.8.3/src: GNOME_Gnumeric-gtk.xml -Only in gnumeric-1.8.3/src: Makefile -Only in gnumeric-1.8.3/src/cut-n-paste-code: Makefile -Only in gnumeric-1.8.3/src/dialogs: .deps -Only in gnumeric-1.8.3/src/dialogs: .libs -Only in gnumeric-1.8.3/src/dialogs: Makefile -Only in gnumeric-1.8.3/src/dialogs: dao-gui-utils.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-about.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-advanced-filter.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-analysis-tools.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autocorrect.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autofilter.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autoformat.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-autosave.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-cell-comment.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-cell-format.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-cell-sort.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-col-row.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-col-width.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-consolidate.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-data-table.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-define-names.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-delete-cells.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-doc-metadata.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-fill-series.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-formula-guru.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-function-select.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-goal-seek.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-goto-cell.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-hyperlink.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-insert-cells.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-merge.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-password.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-paste-names.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-paste-special.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-plugin-manager.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-preferences.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-printer-setup.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-quit.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-random-generator.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-recent.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-row-height.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-scenarios.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-search-replace.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-search.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-sheet-order.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-shuffle.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-simulation.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-so-list.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-so-styled.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-solver.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-csv-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-export.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-fixed-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-format-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-main-page.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf-preview.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-stf.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-tabulate.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-view.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-workbook-attr.lo -Only in gnumeric-1.8.3/src/dialogs: dialog-zoom.lo -Only in gnumeric-1.8.3/src/dialogs: libdialogs.la -Only in gnumeric-1.8.3/src: gnm-marshalers.h diff -ru gnumeric-1.8.3.orig/src/gnm-so-polygon.c gnumeric-1.8.3/src/gnm-so-polygon.c --- gnumeric-1.8.3.orig/src/gnm-so-polygon.c 2008-01-15 00:54:39.000000000 +0100 +++ gnumeric-1.8.3/src/gnm-so-polygon.c 2009-03-16 23:35:49.881228497 +0100 @@ -525,206 +55,3 @@ } static void -Only in gnumeric-1.8.3/src: gnumeric -Only in gnumeric-1.8.3/src: gnumeric-paths.h -Only in gnumeric-1.8.3/src: io-context-gtk.o -Only in gnumeric-1.8.3/src: libspreadsheet.la -Only in gnumeric-1.8.3/src: libspreadsheet_la-application.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-auto-format.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cell-draw.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cell.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cellspan.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-clipboard.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-cmd-edit.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-collect.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-colrow.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-command-context-stderr.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-command-context.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-commands.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-complete-sheet.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-complete.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-complex.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-consolidate.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-dependent.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-expr-name.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-expr.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-file-autoft.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-format-template.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-func-builtin.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-func.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-datetime.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-format.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-graph-window.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-marshalers.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-pane.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-plugin.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-so-filled.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-so-line.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnm-so-polygon.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnumeric-gconf.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gnumeric-simple-canvas.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-graph.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gui-clipboard.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gui-file.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gui-util.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-gutils.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-history.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-hlink.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-input-msg.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-acetate.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-bar.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-cursor.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-debug.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-edit.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-item-grid.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-libgnumeric.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-mathfunc.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-mstyle.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-number-match.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-parse-util.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-parser.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-pattern.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-position.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-preview-grid.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-print-cell.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-print-info.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-print.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-rangefunc-strings.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-rangefunc.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-ranges.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-rendered-value.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-search.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-selection.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-session.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-autofill.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-control-gui.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-control.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-filter.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-merge.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-cell-comment.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-graph.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-image.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object-widget.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-object.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-style.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet-view.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sheet.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-sort.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-stf-export.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-stf-parse.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-stf.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-str.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style-border.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style-color.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style-conditions.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-style.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-symbol.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-validation.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-value-sheet.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-value.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-wbc-gtk-actions.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-wbc-gtk-edit.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-wbc-gtk.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook-cmd-format.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook-control.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook-view.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-workbook.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-xml-io.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-xml-sax-read.lo -Only in gnumeric-1.8.3/src: libspreadsheet_la-xml-sax-write.lo -Only in gnumeric-1.8.3/src: main-application.o -Only in gnumeric-1.8.3/src/pixmaps: Makefile -Only in gnumeric-1.8.3/src/pixmaps: gnumeric-stock-pixbufs.h -Only in gnumeric-1.8.3/src: ssconvert -Only in gnumeric-1.8.3/src: ssconvert.o -Only in gnumeric-1.8.3/src: ssindex -Only in gnumeric-1.8.3/src: ssindex.o -Only in gnumeric-1.8.3/src/tools: .deps -Only in gnumeric-1.8.3/src/tools: .libs -Only in gnumeric-1.8.3/src/tools: Makefile -Only in gnumeric-1.8.3/src/tools: analysis-histogram.lo -Only in gnumeric-1.8.3/src/tools: analysis-tools.lo -Only in gnumeric-1.8.3/src/tools: auto-correct.lo -Only in gnumeric-1.8.3/src/tools: dao.lo -Only in gnumeric-1.8.3/src/tools: data-shuffling.lo -Only in gnumeric-1.8.3/src/tools: fill-series.lo -Only in gnumeric-1.8.3/src/tools: filter.lo -Only in gnumeric-1.8.3/src/tools: goal-seek.lo -Only in gnumeric-1.8.3/src/tools: libtools.la -Only in gnumeric-1.8.3/src/tools: random-generator.lo -Only in gnumeric-1.8.3/src/tools: scenarios.lo -Only in gnumeric-1.8.3/src/tools: simulation.lo -Only in gnumeric-1.8.3/src/tools/solver: .deps -Only in gnumeric-1.8.3/src/tools/solver: .libs -Only in gnumeric-1.8.3/src/tools/solver: Makefile -Only in gnumeric-1.8.3/src/tools/solver: api.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk: Makefile -Only in gnumeric-1.8.3/src/tools/solver/glpk/include: Makefile -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: .deps -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: .libs -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: Makefile -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpavl.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpdmp.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpinv.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpipp1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpipp2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib1a.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib1b.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib3.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplib4.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpp1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpp2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx3.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx4.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx5.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx6a.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx6c.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx6d.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx7.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glplpx7a.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpluf.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpmip1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpmip2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpspx1.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpspx2.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: glpstr.lo -Only in gnumeric-1.8.3/src/tools/solver/glpk/source: libglpk.la -Only in gnumeric-1.8.3/src/tools/solver: libsolver.la -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: .deps -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: .libs -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: Makefile -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: liblp_solve.la -Only in gnumeric-1.8.3/src/tools/solver/lp_solve: lp_solve.lo -Only in gnumeric-1.8.3/src/tools/solver: reports-write.lo -Only in gnumeric-1.8.3/src/tools/solver: reports.lo -Only in gnumeric-1.8.3/src/tools/solver: solver.lo -Only in gnumeric-1.8.3/src/tools: tabulate.lo -Only in gnumeric-1.8.3/src/widgets: .deps -Only in gnumeric-1.8.3/src/widgets: .libs -Only in gnumeric-1.8.3/src/widgets: Makefile -Only in gnumeric-1.8.3/src/widgets: gnm-cell-combo-foo-view.lo -Only in gnumeric-1.8.3/src/widgets: gnm-dao.lo -Only in gnumeric-1.8.3/src/widgets: gnm-filter-combo-foo-view.lo -Only in gnumeric-1.8.3/src/widgets: gnm-format-sel.lo -Only in gnumeric-1.8.3/src/widgets: gnm-validation-combo-foo-view.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-cell-renderer-expr-entry.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-cell-renderer-text.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-cell-renderer-toggle.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-dashed-canvas-line.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-expr-entry.lo -Only in gnumeric-1.8.3/src/widgets: gnumeric-lazy-list.lo -Only in gnumeric-1.8.3/src/widgets: libwidgets.la -Only in gnumeric-1.8.3/src/widgets: widget-editable-label.lo -Only in gnumeric-1.8.3/src/widgets: widget-font-selector.lo -Only in gnumeric-1.8.3: stamp-h1 -Only in gnumeric-1.8.3: stamp-h2 -Only in gnumeric-1.8.3/templates: Makefile -Only in gnumeric-1.8.3/templates/autoformat: Makefile -Only in gnumeric-1.8.3/templates/english: Makefile -Only in gnumeric-1.8.3/test: Makefile -Only in gnumeric-1.8.3/tools: .deps -Only in gnumeric-1.8.3/tools: Makefile -Only in gnumeric-1.8.3/tools/win32: gnumeric.nsi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From rmacduff at users.sourceforge.net Mon Apr 6 21:28:32 2009 From: rmacduff at users.sourceforge.net (rmacduff at users.sourceforge.net) Date: Mon, 06 Apr 2009 19:28:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4212] csw/mgar/pkg/sed/trunk/Makefile Message-ID: Revision: 4212 http://gar.svn.sourceforge.net/gar/?rev=4212&view=rev Author: rmacduff Date: 2009-04-06 19:28:32 +0000 (Mon, 06 Apr 2009) Log Message: ----------- gsed: corrected runtime linker path Modified Paths: -------------- csw/mgar/pkg/sed/trunk/Makefile Modified: csw/mgar/pkg/sed/trunk/Makefile =================================================================== --- csw/mgar/pkg/sed/trunk/Makefile 2009-04-06 14:57:25 UTC (rev 4211) +++ csw/mgar/pkg/sed/trunk/Makefile 2009-04-06 19:28:32 UTC (rev 4212) @@ -5,7 +5,7 @@ PACKAGES = CSWgsed CATALOGNAME_CSWgsed = gsed -DESCRIPTION = GNU Stream Editor +DESCRIPTION = The GNU non-interactive text Stream-oriented EDitor (sed) define BLURB Sed, the GNU Stream Editor, copies the named files (standard input default) to the standard output, edited according to a script of commands. @@ -25,6 +25,8 @@ REQUIRED_PKGS = CSWiconv +# No special platform optimization +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --program-prefix=g @@ -37,4 +39,6 @@ # Make sure we are using gnu tools (esp. sed) PATH := /opt/csw/gnu:$(PATH) -EXTRA_MERGE_EXCLUDE_FILES = $(libdir)/charset.alias +EXTRA_MERGE_EXCLUDE_FILES = $(sharedstatedir)/.*locale.alias +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/charset.alias + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From ggunselm at emporia.edu Tue Apr 7 06:05:26 2009 From: ggunselm at emporia.edu (Glen Gunselman) Date: Mon, 06 Apr 2009 23:05:26 -0500 Subject: [csw-devel] Orca and friends packages In-Reply-To: <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> References: <49BF8E3F.CC54.005D.3@emporia.edu> <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> Message-ID: <49DA8AB5.CC54.005D.0@emporia.edu> I the collection process running on the master and one client. When I run Orca I get the following: /opt/csw/bin/orca -v /opt/csw/etc/orca_services.cfg Orca at Mon Apr 6 22:02:00 2009 running on: Orca version 0.28.0 (dev 535) RRDs version 1.3006 Perl version 5.008008 Loading state from '/var/opt/csw/orca/rrd/orca_services/orca.state'. Creating orca_logo.gif. Creating rrdtool_logo.gif. Creating rothschild_image_logo.png. Finding files and setting up data structures at Mon Apr 6 22:02:00 2009. Current running time is 0:01 minutes. Loading new data from group orca_services for sys1. Loading new data from group orca_services for sysa. Saving state into '/var/opt/csw/orca/rrd/orca_services/orca.state'. Updating PNGs. Creating HTML files in '/opt/csw/share/www/orca/orca_services/'. Sleeping at Mon Apr 6 22:02:02 2009 until Mon Apr 6 22:07:30 2009. Current running time is 5:32 minutes. Loading new data from group orca_services for sys1. Updating PNGs. Sleeping at Mon Apr 6 22:07:31 2009 until Mon Apr 6 22:07:32 2009. Current running time is 5:34 minutes. Loading new data from group orca_services for sysa. Updating PNGs. Sleeping at Mon Apr 6 22:07:33 2009 until Mon Apr 6 22:13:01 2009. ^CCurrent running time is 11:02 minutes. /opt/csw/bin/orca: caught signal INT. At this point the web page contains the headers and trailers plus the table(s) with the two servers but no graphs. The plot statements from the cfg file are of the following format: plot { title %g SMTP Mail Queue source orca_services data mailq_total legend Msgs. in queue (5m) y_legend Number of Messages line_type line2 data_min 0 data_max U href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Mail_Queue } I'm looking for plots like the older versions (0.265 is what I've been using). Unless you have a magic bullet I'm ready to throw in the towel. If I had any obligation to test CSW packages, I feel that I've proven that it's beyond me. I invested a couple of weeks trying but don't really have anything to show for it. Glen Gunselman Systems Software Specialist TCS Emporia State University >>> Dagobert Michelsen dam at opencsw.org> 3/17/2009 4:22 PM >> ( mailto:dam at opencsw.org> ) Basically the packages are ready for use, but the start-scripts are still without SMF-support. Do you know how to operate Orca in general or should I write some small how-to? Best regards -- Dago -------------- next part -------------- An HTML attachment was scrubbed... URL: From valholla at users.sourceforge.net Tue Apr 7 07:22:48 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 07 Apr 2009 05:22:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4213] csw/mgar/pkg Message-ID: Revision: 4213 http://gar.svn.sourceforge.net/gar/?rev=4213&view=rev Author: valholla Date: 2009-04-07 05:22:47 +0000 (Tue, 07 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/libffi/ csw/mgar/pkg/libffi/branches/ csw/mgar/pkg/libffi/tags/ csw/mgar/pkg/libffi/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 7 07:23:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 07 Apr 2009 05:23:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4214] csw/mgar/pkg/libffi/trunk/ Message-ID: Revision: 4214 http://gar.svn.sourceforge.net/gar/?rev=4214&view=rev Author: valholla Date: 2009-04-07 05:23:56 +0000 (Tue, 07 Apr 2009) Log Message: ----------- externals to garv2 Property Changed: ---------------- csw/mgar/pkg/libffi/trunk/ Property changes on: csw/mgar/pkg/libffi/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dam at opencsw.org Tue Apr 7 09:28:00 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Tue, 7 Apr 2009 09:28:00 +0200 Subject: [csw-devel] Orca and friends packages In-Reply-To: <49DA8AB5.CC54.005D.0@emporia.edu> References: <49BF8E3F.CC54.005D.3@emporia.edu> <0D826C3D-72DD-4D61-B481-E58105177490@opencsw.org> <49DA8AB5.CC54.005D.0@emporia.edu> Message-ID: Hi Glen, Am 07.04.2009 um 06:05 schrieb Glen Gunselman: > I the collection process running on the master and one client. That means you have applied something like this? --- /opt/csw/bin/start_orcallator.orig 2009-04-07 09:21:13.991714686 +0200 +++ /opt/csw/bin/start_orcallator 2009-04-07 09:21:27.598788701 +0200 @@ -139,7 +139,7 @@ # Now start the logging. echo "Starting logging" -nohup $SE $SE_PATCHES -DWATCH_OS $WATCH_WEB -I$libdir/SE/$SE_VERSION $libdir/orcallator.se & +nohup $SE $SE_PATCHES -DWATCH_OS $WATCH_WEB $libdir/orca/ orcallator.se & # Write the PID of orcallator to a file to make killing easier. pid=$! Then you should have statistics data like this coming in: build8s-dam# ls -l /var/opt/csw/orca/orcallator/build8s-dam/ total 11 -rw-r--r-- 1 root other 7137 Apr 7 09:20 orcallator-2009-04-07-000 -rw-r--r-- 1 root other 1 Apr 7 09:01 orcallator.pid Copy these from the clients to the host doing the graphing e. g. via rsync. > When I run Orca I get the following: > > /opt/csw/bin/orca -v /opt/csw/etc/orca_services.cfg Are you collecting data for services? If you run orcallator.se you must run /opt/csw/bin/orca -v /opt/csw/etc/orcallator.cfg to generate the graphs for the collected data. > Updating PNGs. > Sleeping at Mon Apr 6 22:07:31 2009 until Mon Apr 6 22:07:32 2009. > Current running time is 5:34 minutes. > Loading new data from group orca_services for sysa. > Updating PNGs. > Sleeping at Mon Apr 6 22:07:33 2009 until Mon Apr 6 22:13:01 2009. > ^CCurrent running time is 11:02 minutes. > /opt/csw/bin/orca: caught signal INT. > > At this point the web page contains the headers and trailers plus > the table(s) with the two servers but no graphs. Do not stop the process, start it in background and make sure the data from the collection hosts is transferred regularly to /var/opt/csw/ orca/orcallator. Then the webpages should be updated. > Unless you have a magic bullet I'm ready to throw in the towel. > > If I had any obligation to test CSW packages, I feel that I've > proven that it's beyond me. I invested a couple of weeks trying but > don't really have anything to show for it. Thank you very much for your commitment. I apologize for not having enough time to build a proper releasable package of Orca right now. My day is currently stuffed with private things and work-related stuff and the little remaining spare time is needed for work on the build system itself. Best regards -- Dago -------------- next part -------------- An HTML attachment was scrubbed... URL: From idogan23 at users.sourceforge.net Tue Apr 7 14:48:15 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Tue, 07 Apr 2009 12:48:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4215] csw/mgar/pkg/rrdtool/trunk Message-ID: Revision: 4215 http://gar.svn.sourceforge.net/gar/?rev=4215&view=rev Author: idogan23 Date: 2009-04-07 12:48:14 +0000 (Tue, 07 Apr 2009) Log Message: ----------- rrdtool: update to 1.3.7 Modified Paths: -------------- csw/mgar/pkg/rrdtool/trunk/Makefile csw/mgar/pkg/rrdtool/trunk/checksums Modified: csw/mgar/pkg/rrdtool/trunk/Makefile =================================================================== --- csw/mgar/pkg/rrdtool/trunk/Makefile 2009-04-07 05:23:56 UTC (rev 4214) +++ csw/mgar/pkg/rrdtool/trunk/Makefile 2009-04-07 12:48:14 UTC (rev 4215) @@ -1,5 +1,5 @@ GARNAME = rrdtool -GARVERSION = 1.3.6 +GARVERSION = 1.3.7 CATEGORIES = utils DESCRIPTION = time-series data logging and graphing. Modified: csw/mgar/pkg/rrdtool/trunk/checksums =================================================================== --- csw/mgar/pkg/rrdtool/trunk/checksums 2009-04-07 05:23:56 UTC (rev 4214) +++ csw/mgar/pkg/rrdtool/trunk/checksums 2009-04-07 12:48:14 UTC (rev 4215) @@ -1,3 +1,3 @@ -afaabd5a60115581e866efbac796d307 download/rrdtool-1.3.6.tar.gz +e2e0da2a83e58ba2fcefba932a3cbb72 download/rrdtool-1.3.7.tar.gz 48a9b258cf8b4b943dbaf30ea939c315 download/CSWrrdtool.gspec 1c2f1efd982f4f4a1c9d5abd1f8b6501 download/fixme.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 7 15:25:57 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 07 Apr 2009 13:25:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4216] csw/mgar/pkg/cpan/perl-ldap/trunk Message-ID: Revision: 4216 http://gar.svn.sourceforge.net/gar/?rev=4216&view=rev Author: bonivart Date: 2009-04-07 13:25:57 +0000 (Tue, 07 Apr 2009) Log Message: ----------- perl-ldap: update to 0.39 Modified Paths: -------------- csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile csw/mgar/pkg/cpan/perl-ldap/trunk/checksums Added Paths: ----------- csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING Removed Paths: ------------- csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec Property Changed: ---------------- csw/mgar/pkg/cpan/perl-ldap/trunk/ Property changes on: csw/mgar/pkg/cpan/perl-ldap/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/Makefile 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,5 +1,5 @@ GARNAME = perl-ldap -GARVERSION = 0.34 +GARVERSION = 0.39 CATEGORIES = cpan AUTHOR = GBARR @@ -10,12 +10,21 @@ maintenance functions such as adding, deleting or modifying entries. endef -DISTFILES += CSWpmldap.gspec CSWpmldap.depend +DISTFILES = COPYING +PACKAGES = CSWpmldap +CATALOGNAME = pm_ldap +ARCHALL = 1 + +REQUIRED_PKGS = CSWpmxmlsax CSWpmauthensasl CSWpmiosocketssl CSWpmuri CSWpmconvertasn1 CSWpmmimebase64 + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + DEPENDS += cpan/Convert-ASN1 cpan/IO-Socket-SSL DEPENDS += cpan/Authen-SASL cpan/XML-SAX # Module version numbers defeat Sort::Versions -MANUAL_UPDATE = 1 +#MANUAL_UPDATE = 1 include gar/category.mk Modified: csw/mgar/pkg/cpan/perl-ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/checksums 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/checksums 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,3 +1,2 @@ -3f89b099591e33b3f040adba367c56ff download/CSWpmldap.gspec -a857be6cb94009be59ef97db547d91f7 download/CSWpmldap.depend -398689b0a7b1615075a6b5035f6e3e91 download/perl-ldap-0.34.tar.gz +4d6588c2fa0d38ae162f6314d201d89e download/COPYING +0c31097aa22672a2831a7542250d1b55 download/perl-ldap-0.39.tar.gz Added: csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING (rev 0) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/files/COPYING 2009-04-07 13:25:57 UTC (rev 4216) @@ -0,0 +1,3 @@ +Copyright (c) 1997-2004 Graham Barr. All rights reserved. +This package is free software; you can redistribute it and/or +modify it under the same terms as Perl itself. Deleted: csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.depend 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,4 +0,0 @@ -P CSWpmauthensasl pm_authensasl - SASL Authentication framework -P CSWpmconvertasn1 pm_convertasn1 - ASN.1 Encode/Decode library -P CSWpmiosocketssl pm_iosocketssl - nearly transparent SSL encapsulation for IO::Socket::INET. -P CSWpmxmlsax pm_xmlsax - Simple API for XML Deleted: csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec =================================================================== --- csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec 2009-04-07 12:48:14 UTC (rev 4215) +++ csw/mgar/pkg/cpan/perl-ldap/trunk/files/CSWpmldap.gspec 2009-04-07 13:25:57 UTC (rev 4216) @@ -1,7 +0,0 @@ -%var bitname pm_ldap -%var pkgname CSWpmldap -%include url file://%{PKGLIB}/csw_cpan.gspec -%copyright -Copyright (c) 1997-2004 Graham Barr. All rights reserved. -This package is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Tue Apr 7 16:42:23 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Tue, 07 Apr 2009 14:42:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4217] csw/mgar/pkg/cadaver/trunk Message-ID: Revision: 4217 http://gar.svn.sourceforge.net/gar/?rev=4217&view=rev Author: chninkel Date: 2009-04-07 14:42:01 +0000 (Tue, 07 Apr 2009) Log Message: ----------- cadaver: fixed catalog name Modified Paths: -------------- csw/mgar/pkg/cadaver/trunk/Makefile csw/mgar/pkg/cadaver/trunk/checksums csw/mgar/pkg/cadaver/trunk/files/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/Makefile =================================================================== --- csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-07 13:25:57 UTC (rev 4216) +++ csw/mgar/pkg/cadaver/trunk/Makefile 2009-04-07 14:42:01 UTC (rev 4217) @@ -23,6 +23,7 @@ endef PACKAGES = CSWcadav +CATALOGNAME_CSWcadav = cadaver REQUIRED_PKGS = CSWggettextrt CSWiconv CSWneon CSWosslrt CSWreadline CSWzlib CSWgcrypt CSWgnutls CSWgpgerr Modified: csw/mgar/pkg/cadaver/trunk/checksums =================================================================== --- csw/mgar/pkg/cadaver/trunk/checksums 2009-04-07 13:25:57 UTC (rev 4216) +++ csw/mgar/pkg/cadaver/trunk/checksums 2009-04-07 14:42:01 UTC (rev 4217) @@ -1,3 +1,3 @@ 5ac79e41f3b7b4f68bf4003beed5dc26 download/cadaver-0.23.2.tar.gz 7a78f71995cd40263b04470976eba5a6 download/CSWcadav.prototype -9deb0d89879fd18151fdd8a5472f194d download/changelog.CSW +0db916e7303fe1fac02ba69acbd41ce9 download/changelog.CSW Modified: csw/mgar/pkg/cadaver/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-07 13:25:57 UTC (rev 4216) +++ csw/mgar/pkg/cadaver/trunk/files/changelog.CSW 2009-04-07 14:42:01 UTC (rev 4217) @@ -1,4 +1,4 @@ -cadaver (0.23.2,REV=2009.04.04) unstable +cadaver (0.23.2,REV=2009.04.07) unstable * New upstream version. * Dropped destdir.patch as DESTDIR support has been added upstream. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Tue Apr 7 17:20:39 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Tue, 07 Apr 2009 15:20:39 +0000 Subject: [csw-devel] SF.net SVN: gar:[4218] csw/mgar/pkg/mcabber/trunk/Makefile Message-ID: Revision: 4218 http://gar.svn.sourceforge.net/gar/?rev=4218&view=rev Author: skayser Date: 2009-04-07 15:20:38 +0000 (Tue, 07 Apr 2009) Log Message: ----------- mcabber: build against ncursesw, add samplerc / changelog to pkg Modified Paths: -------------- csw/mgar/pkg/mcabber/trunk/Makefile Modified: csw/mgar/pkg/mcabber/trunk/Makefile =================================================================== --- csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-07 14:42:01 UTC (rev 4217) +++ csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-07 15:20:38 UTC (rev 4218) @@ -16,6 +16,10 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +PREREQUISITE_PKGS = CSWncurses CSWossldevel CSWotrdevel +PREREQUISITE_PKGS += CSWaspell CSWggettext CSWglib2devel CSWpkgconfig +PREREQUISITE_PKGS += CSWgpgerr CSWgpgme CSWiconv + REQUIRED_PKGS = CSWncurses CSWosslrt CSWotr REQUIRED_PKGS += CSWaspell CSWggettextrt CSWglib2 REQUIRED_PKGS += CSWgpgerr CSWgpgme CSWiconv @@ -26,6 +30,7 @@ CONFIGURE_ARGS += --with-openssl=/opt/csw/lib CONFIGURE_ARGS += --enable-otr CONFIGURE_ARGS += --enable-aspell +CONFIGURE_ARGS += --enable-sigwinch # mcabber is geared towards gcc and heavily uses inline functions without # static/extern storage qualifiers. Sun Studio needs to emulate gcc @@ -35,8 +40,8 @@ # EXTRA_CFLAGS = -features=no%extinl -EXTRA_LDFLAGS = -lsocket -EXTRA_INC = /opt/csw/lib/ncurses +EXTRA_LDFLAGS = -lsocket -lnsl +EXTRA_INC = /opt/csw/lib/ncursesw # Get rid of inline functions which are referenced externally (no%extinl # makes inline functions static and would break linking otherwise) @@ -53,10 +58,13 @@ $(WORKSRC)/Makefile \ $(WORKSRC)/src/Makefile \ $(WORKSRC)/libjabber/Makefile + @$(MAKECOOKIE) post-install-modulated: @perl -pi -e '\ s|/usr/share/ssl/certs/ca-bundle.crt|/opt/csw/ssl/certs/ca-certificates.crt|;' \ $(WORKSRC)/mcabberrc.example - @ginstall -d $(DESTDIR)$(docdir)$(GARNAME) - @cp $(WORKSRC)/mcabberrc.example $(DESTDIR)$(docdir)$(GARNAME) + @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) + @cp $(WORKSRC)/mcabberrc.example $(DESTDIR)$(docdir)/$(GARNAME) + @cp $(WORKSRC)/ChangeLog $(DESTDIR)$(docdir)/$(GARNAME)/changelog + @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 7 21:49:04 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 07 Apr 2009 19:49:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4219] csw/mgar/pkg/sysstat/trunk Message-ID: Revision: 4219 http://gar.svn.sourceforge.net/gar/?rev=4219&view=rev Author: dmichelsen Date: 2009-04-07 19:49:04 +0000 (Tue, 07 Apr 2009) Log Message: ----------- sysstat: Update to 20090405 Modified Paths: -------------- csw/mgar/pkg/sysstat/trunk/Makefile csw/mgar/pkg/sysstat/trunk/checksums Property Changed: ---------------- csw/mgar/pkg/sysstat/trunk/ Property changes on: csw/mgar/pkg/sysstat/trunk ___________________________________________________________________ Added: svn:ignore + work download cookies Modified: csw/mgar/pkg/sysstat/trunk/Makefile =================================================================== --- csw/mgar/pkg/sysstat/trunk/Makefile 2009-04-07 15:20:38 UTC (rev 4218) +++ csw/mgar/pkg/sysstat/trunk/Makefile 2009-04-07 19:49:04 UTC (rev 4219) @@ -1,5 +1,5 @@ GARNAME = sysstat -GARVERSION = 20090218 +GARVERSION = 20090405 CATEGORIES = utils DESCRIPTION = Key system statistics at a glance Modified: csw/mgar/pkg/sysstat/trunk/checksums =================================================================== --- csw/mgar/pkg/sysstat/trunk/checksums 2009-04-07 15:20:38 UTC (rev 4218) +++ csw/mgar/pkg/sysstat/trunk/checksums 2009-04-07 19:49:04 UTC (rev 4219) @@ -1,2 +1,2 @@ -cb48048e5b6eee430017ce8591a71d65 download/sysstat-20090218.tgz +847e0101576ae2a73a09c2b4af3da8f1 download/sysstat-20090405.tgz 7a7f0f67bb68484b56375d4a922fb63f download/patch-onlyisaexec-sysstatd.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Tue Apr 7 22:42:11 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Tue, 07 Apr 2009 20:42:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4220] csw/mgar/pkg/bash_completion/trunk Message-ID: Revision: 4220 http://gar.svn.sourceforge.net/gar/?rev=4220&view=rev Author: chninkel Date: 2009-04-07 20:42:11 +0000 (Tue, 07 Apr 2009) Log Message: ----------- bash_completion: added completion for pkgutil Modified Paths: -------------- csw/mgar/pkg/bash_completion/trunk/checksums csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW Added Paths: ----------- csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion Modified: csw/mgar/pkg/bash_completion/trunk/checksums =================================================================== --- csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-07 19:49:04 UTC (rev 4219) +++ csw/mgar/pkg/bash_completion/trunk/checksums 2009-04-07 20:42:11 UTC (rev 4220) @@ -1,7 +1,8 @@ cd1c5648272917fbe0eef4ba30bb93f4 download/bash-completion-1.0.tar.gz -2acb33dad8ee4ea46b02f2cd86ced5e1 download/pkg-get.completion -0fcc270cda377374a9637d24c8b689b3 download/pkgadd.completion -7d304567cc880dd42e8ea277c991017f download/pkgrm.completion -cc213a6d8dd2d484f2bce4f7905437f8 download/smf.completion -1745e51815578a18384ff36a449e0002 download/changelog.CSW +5bc234f6060561c564a20d2a9cc552c1 download/pkg-get.completion +af7a63477c6e81ed5b08f195e153091e download/pkgadd.completion +1389a7771e34fc54fe993d442cce1524 download/pkgrm.completion +f922762210a6f208695c328c040ac90d download/pkgutil.completion +52bd6948f5cc1548c3791a969da0e5e2 download/smf.completion +a413f5d9346c32ef22093b55956bd268 download/changelog.CSW d0c0d867babf351bca9ee97e03be550d download/opencsw_paths.patch Modified: csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW 2009-04-07 19:49:04 UTC (rev 4219) +++ csw/mgar/pkg/bash_completion/trunk/files/changelog.CSW 2009-04-07 20:42:11 UTC (rev 4220) @@ -1,6 +1,7 @@ -bash_completion (1.0,REV=2009.04.05) +bash_completion (1.0,REV=2009.04.07) * New upstream version. + * Added completion code for pkgutil. * Switched to gar v2. - -- Yann Rouillard Sun, 05 Apr 2009 15:32:52 +0200 + -- Yann Rouillard Sun, 07 Apr 2009 15:32:52 +0200 Added: csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion =================================================================== --- csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion (rev 0) +++ csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion 2009-04-07 20:42:11 UTC (rev 4220) @@ -0,0 +1,62 @@ +# +# Copyright 2006 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This code is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +# +# pkgutil.completion - bash completion for pkgutil +# + +have pkgutil && +_pkgutil() +{ + local cur prev file catalog_file url command + local catalog_file="/var/opt/csw/pkgutil/catalog.`uname -p`.`uname -r`" + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + i=${#COMP_WORDS[*]} + while [[ $i -gt 1 ]]; do + i=$((i-1)) + if [[ "${COMP_WORDS[$i]}" = @(-t|--temp) ]]; then + url="${COMP_WORDS[$((i+1))]}" + fi + if [[ "${COMP_WORDS[$i]}" == @(-i|--install|-u|--upgrade|-r|--remove|-d|--download|-a|--available|-c|--compare|-U|--catalog|-S|--stream) ]]; then + command="${COMP_WORDS[$i]}" + fi + done + + if [[ -n "$command" ]]; then + if [[ -f $catalog_file ]]; then + if [[ "$command" == @(--download|-d|--install|-i|--upgrade|-u|s|--stream) ]]; then + local packages_list=$(awk ' $0 ~ /BEGIN PGP SIGNATURE/ { exit } $1 ~ /^Hash:/ || $1 ~ /^ *(-|#|$)/ { next } { print $1 }' $catalog_file) + COMPREPLY=( $(compgen -W "${packages_list}" -- ${cur}) ) + elif [[ "$command" == @(-r|--remove) ]]; then + local packages_list=$(pkginfo | awk ' $2 ~ /^CSW/ { printf ("%s|",$2) }') + packages_list=${packages_list%|} + packages_list=$(nawk " \$3 ~ /^$packages_list\$/ { print \$1 }" $catalog_file) + COMPREPLY=( $(compgen -W "${packages_list}" -- ${cur}) ) + fi + fi + return 0 + fi + + if [[ "$prev" = @(-W|--workdir) ]]; then + COMPREPLY=( $(compgen -d -- ${cur}) ) + return 0 + fi + + if [[ "$prev" = @(-o|--output) ]]; then + COMPREPLY=( $(compgen -f -- ${cur}) ) + return 0 + fi + + local commands="-i --install -u --upgrade -r --remove -d --download -a --available -c --compare -U --catalog -e --email -t --temp=site -s --stream -T --target -o --output -x --exclude -W --workdir -y --yes -n --nomod -D --debug -h --help -v --version -V --syscheck" + COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) + return 0 +} && +complete -F _pkgutil pkgutil Property changes on: csw/mgar/pkg/bash_completion/trunk/files/pkgutil.completion ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 00:48:42 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Tue, 07 Apr 2009 22:48:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4221] csw/mgar/pkg/libgda Message-ID: Revision: 4221 http://gar.svn.sourceforge.net/gar/?rev=4221&view=rev Author: hson Date: 2009-04-07 22:48:42 +0000 (Tue, 07 Apr 2009) Log Message: ----------- libgda: Add intermediate level Makefile, fix for __FUNCTION__ Modified Paths: -------------- csw/mgar/pkg/libgda/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/libgda/Makefile Added: csw/mgar/pkg/libgda/Makefile =================================================================== --- csw/mgar/pkg/libgda/Makefile (rev 0) +++ csw/mgar/pkg/libgda/Makefile 2009-04-07 22:48:42 UTC (rev 4221) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Modified: csw/mgar/pkg/libgda/trunk/Makefile =================================================================== --- csw/mgar/pkg/libgda/trunk/Makefile 2009-04-07 20:42:11 UTC (rev 4220) +++ csw/mgar/pkg/libgda/trunk/Makefile 2009-04-07 22:48:42 UTC (rev 4221) @@ -16,16 +16,20 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 DISTNAME = $(GARNAME)-$(GARVERSION) -#REQUIRED_PKGS += CSWgconf2 CSWggettextrt CSWglib2 CSWgtk2 CSWlibatk -#REQUIRED_PKGS += CSWlibcairo CSWlibglade2 CSWlibgsf CSWlibxml2 CSWlibxrender -#REQUIRED_PKGS += CSWpango CSWsunmath CSWzlib +REQUIRED_PKGS += CSWggettextrt CSWglib2 CSWiconv CSWlibxml2 CSWlibxslt +REQUIRED_PKGS += CSWncurses CSWreadline CSWzlib # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 +CFLAGS += -D__FUNCTION__=__func__ +CXXFLAGS += -D__FUNCTION__=__func__ + CONFIGURE_ARGS = $(DIRPATHS) -#TEST_TARGET = +# One test fail for some reason... +#TEST_TARGET = check +TEST_TARGET = include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 01:44:44 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Tue, 07 Apr 2009 23:44:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4222] csw/mgar/pkg/libgnomedb/Makefile Message-ID: Revision: 4222 http://gar.svn.sourceforge.net/gar/?rev=4222&view=rev Author: hson Date: 2009-04-07 23:44:44 +0000 (Tue, 07 Apr 2009) Log Message: ----------- libgnomedb: Add intermediate Makefile Added Paths: ----------- csw/mgar/pkg/libgnomedb/Makefile Added: csw/mgar/pkg/libgnomedb/Makefile =================================================================== --- csw/mgar/pkg/libgnomedb/Makefile (rev 0) +++ csw/mgar/pkg/libgnomedb/Makefile 2009-04-07 23:44:44 UTC (rev 4222) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 8 02:21:29 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 08 Apr 2009 00:21:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4223] csw/mgar/pkg/mysql5/trunk/Makefile Message-ID: Revision: 4223 http://gar.svn.sourceforge.net/gar/?rev=4223&view=rev Author: bdwalton Date: 2009-04-08 00:21:29 +0000 (Wed, 08 Apr 2009) Log Message: ----------- Builds completely. RPATH set appropriately (accounting for modified prefix). Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-07 23:44:44 UTC (rev 4222) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-08 00:21:29 UTC (rev 4223) @@ -2,6 +2,8 @@ GARVERSION = 5.1.32 CATEGORIES = server +GARCOMPILER = GCC4 + DESCRIPTION = Multithreaded SQL database define BLURB MySQL is a very fast, multi-threaded, multi-user and robust SQL @@ -18,23 +20,25 @@ # Change prefix to /opt/csw/mysql5 prefix = /opt/csw/mysql5 +WORKSRC = $(WORKDIR)/mysql-$(GARVERSION) + +EXTRA_LD_OPTIONS = -R/opt/csw/lib/\$$ISALIST + # Set ./configure options CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-assembler -CONFIGURE_ARGS += --without-docs -CONFIGURE_ARGS += --enable-thread-safe-client -CONFIGURE_ARGS += --with-named-z-libs=yes -CONFIGURE_ARGS += --with-berkeley-db -CONFIGURE_ARGS += --with-innodb -CONFIGURE_ARGS += --enable-local-infile -CONFIGURE_ARGS += --with-extra-charsets=all +CONFIGURE_ARGS += --without-docs +CONFIGURE_ARGS += --enable-local-infile +CONFIGURE_ARGS += --with-extra-charsets=all CONFIGURE_ARGS += --with-low-memory +CONFIGURE_ARGS += --with-pthread +CONFIGURE_ARGS += --with-readline +CONFIGURE_ARGS += --with-zlib-dir=/opt/csw +CONFIGURE_ARGS += --with-ssl=/opt/csw +CONFIGURE_ARGS += --with-plugins=max-no-ndb # Enable 64 bits build # BUILD64 = 1 include gar/category.mk -post-extract: - @for i in $(WORKROOTDIR)/build-isa* ; do mv $$i/mysql-$(GARVERSION) $$i/$(GARNAME)-$(GARVERSION) ; done - @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 02:34:16 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 00:34:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4224] csw/mgar/pkg/mcabber/trunk Message-ID: Revision: 4224 http://gar.svn.sourceforge.net/gar/?rev=4224&view=rev Author: skayser Date: 2009-04-08 00:34:16 +0000 (Wed, 08 Apr 2009) Log Message: ----------- mcabber: fixed build issues on Solaris 10 Modified Paths: -------------- csw/mgar/pkg/mcabber/trunk/checksums csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff Modified: csw/mgar/pkg/mcabber/trunk/checksums =================================================================== --- csw/mgar/pkg/mcabber/trunk/checksums 2009-04-08 00:21:29 UTC (rev 4223) +++ csw/mgar/pkg/mcabber/trunk/checksums 2009-04-08 00:34:16 UTC (rev 4224) @@ -1,3 +1,3 @@ 189fb9d23f5a8412bc660884528475ea download/mcabber-0.9.9.tar.bz2 a7ceb9f017c2c9267e2264aa626b7a4e download/patch-inline.diff -cff6d32fef59fc10806534025dc53f7e download/patch-iswblank.diff +73e2ae212a072d753942ff24c806ba5d download/patch-iswblank.diff Modified: csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff =================================================================== --- csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff 2009-04-08 00:21:29 UTC (rev 4223) +++ csw/mgar/pkg/mcabber/trunk/files/patch-iswblank.diff 2009-04-08 00:34:16 UTC (rev 4224) @@ -1,13 +1,22 @@ ---- mcabber-0.9.9.orig/src/screen.h 2008-10-09 22:17:52.000000000 +0200 -+++ mcabber-0.9.9/src/screen.h 2009-03-08 16:31:44.043214331 +0100 -@@ -20,6 +20,10 @@ - //static void spellcheck(char*, char*); - #endif +diff --speed-large-files --minimal -Nru mcabber-0.9.9.orig/src/utf8.h mcabber-0.9.9/src/utf8.h +--- mcabber-0.9.9.orig/src/utf8.h 2008-10-09 22:17:52.000000000 +0200 ++++ mcabber-0.9.9/src/utf8.h 2009-04-03 17:57:44.524993893 +0200 +@@ -17,6 +17,18 @@ -+#ifndef HAVE_ISWBLANK -+#define iswblank(wc) iswctype(wc, wctype("blank")) -+#endif + #ifdef HAVE_WCTYPE_H + # include + - #include "hbuf.h" - #include "logprint.h" - ++/* The following bit is a hack for Solaris 8&9 systems that don't have ++ * iswblank(). HAVE_ISWBLANK is not set by the mcabber build system so ++ * this always gets included, even on Solaris 10 systems where iswblank() ++ * is present. ++ * For now i made sure it comes after wctype.h so it doesn't create ++ * problems (wctype.h has calls to iswblank() before wctype() is declared). ++ */ ++# ifndef HAVE_ISWBLANK ++# define iswblank(wc) iswctype(wc, wctype("blank")) ++# endif ++ + #else + # define iswblank(c) (c == ' ') + # define iswalnum(c) isalnum(c) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 14:56:18 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 12:56:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4225] csw/mgar/pkg/xterm/trunk Message-ID: Revision: 4225 http://gar.svn.sourceforge.net/gar/?rev=4225&view=rev Author: skayser Date: 2009-04-08 12:56:18 +0000 (Wed, 08 Apr 2009) Log Message: ----------- xterm: added fix for ACS chars in UTF-8 mode, added README.CSW Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/Makefile csw/mgar/pkg/xterm/trunk/checksums Added Paths: ----------- csw/mgar/pkg/xterm/trunk/files/README.CSW csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff Modified: csw/mgar/pkg/xterm/trunk/Makefile =================================================================== --- csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 00:34:16 UTC (rev 4224) +++ csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 12:56:18 UTC (rev 4225) @@ -16,6 +16,10 @@ REQUIRED_PKGS = CSWfconfig CSWlibxft2 +# enable -mk_width per default to address unicode form character width woes, +# can be taken out once upstream enhances wcwidth() sanity checking +# http://article.gmane.org/gmane.comp.lib.ncurses.bugs/3795 +PATCHFILES = patch-mkwidth.diff # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tgz @@ -47,3 +51,8 @@ EXTRA_INC = $(includedir)/freetype2 include gar/category.mk + +post-install-modulated: + @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) + @cp $(FILEDIR)/README.CSW $(DESTDIR)$(docdir)/$(GARNAME) + @$(MAKECOOKIE) Modified: csw/mgar/pkg/xterm/trunk/checksums =================================================================== --- csw/mgar/pkg/xterm/trunk/checksums 2009-04-08 00:34:16 UTC (rev 4224) +++ csw/mgar/pkg/xterm/trunk/checksums 2009-04-08 12:56:18 UTC (rev 4225) @@ -1 +1,2 @@ be25d2d3661d0bb77fc66e1bcbb3caba download/xterm-243.tgz +347f24b7ed3e42a3d40b1db1ed0061f0 download/patch-mkwidth.diff Added: csw/mgar/pkg/xterm/trunk/files/README.CSW =================================================================== --- csw/mgar/pkg/xterm/trunk/files/README.CSW (rev 0) +++ csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-08 12:56:18 UTC (rev 4225) @@ -0,0 +1,22 @@ +Note: app-defaults in /opt/csw/lib/X11/app-defaults +--------------------------------------------------- + +Although this package delivers some x resource files in +/opt/csw/lib/X11/app-defaults/ this folder is not evaluated by the +Solaris libXt per default. + +Either treat them as example files and copy and paste what you need into +your system / personal x resource files or set XFILESEARCHPATH / +XUSERFILESEARCHPATH to honor this directory. + + http://www.faqs.org/faqs/x-faq/part2/section-22.html + + +Note: mkWidth/-mk_width activated per default +--------------------------------------------- + +This xterm has been adjusted to set the mkWidth resource to true per +default (xterm command line argument -mk_width), which works around some +bugs with box drawing characters and Solaris locales. In case you want +to restore the default behaviour, either start xterm with +mk_width or +set the mkWidth resource to false. Added: csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff =================================================================== --- csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff (rev 0) +++ csw/mgar/pkg/xterm/trunk/files/patch-mkwidth.diff 2009-04-08 12:56:18 UTC (rev 4225) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru xterm-243.orig/charproc.c xterm-243/charproc.c +--- xterm-243.orig/charproc.c 2009-03-29 01:23:12.000000000 +0100 ++++ xterm-243/charproc.c 2009-04-08 14:09:42.224460743 +0200 +@@ -662,7 +662,7 @@ + + #if OPT_WIDE_CHARS + Bres(XtNcjkWidth, XtCCjkWidth, misc.cjk_width, False), +- Bres(XtNmkWidth, XtCMkWidth, misc.mk_width, False), ++ Bres(XtNmkWidth, XtCMkWidth, misc.mk_width, True), + Bres(XtNutf8Latin1, XtCUtf8Latin1, screen.utf8_latin1, False), + Bres(XtNutf8Title, XtCUtf8Title, screen.utf8_title, False), + Bres(XtNvt100Graphics, XtCVT100Graphics, screen.vt100_graphics, True), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 15:26:11 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 13:26:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4226] csw/mgar/pkg/xterm/trunk/Makefile Message-ID: Revision: 4226 http://gar.svn.sourceforge.net/gar/?rev=4226&view=rev Author: skayser Date: 2009-04-08 13:26:11 +0000 (Wed, 08 Apr 2009) Log Message: ----------- xterm: fix double /opt/csw/lib entry in R*PATH Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/Makefile Modified: csw/mgar/pkg/xterm/trunk/Makefile =================================================================== --- csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 12:56:18 UTC (rev 4225) +++ csw/mgar/pkg/xterm/trunk/Makefile 2009-04-08 13:26:11 UTC (rev 4226) @@ -52,6 +52,12 @@ include gar/category.mk +# Hack for now to address the double /opt/csw/lib in $R*PATH. One comes +# from LD_OPTIONS and this one from pkg-config i suppose. +pre-build-modulated: + @perl -pi -e 's|-R/opt/csw/lib ||' $(WORKSRC)/Makefile + @$(MAKECOOKIE) + post-install-modulated: @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) @cp $(FILEDIR)/README.CSW $(DESTDIR)$(docdir)/$(GARNAME) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 8 15:38:19 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 08 Apr 2009 13:38:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4227] csw/mgar/pkg/xterm/trunk/files/README.CSW Message-ID: Revision: 4227 http://gar.svn.sourceforge.net/gar/?rev=4227&view=rev Author: skayser Date: 2009-04-08 13:38:19 +0000 (Wed, 08 Apr 2009) Log Message: ----------- xterm: added note about TERM handling WRT to vanilla Solaris xterm Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/files/README.CSW Modified: csw/mgar/pkg/xterm/trunk/files/README.CSW =================================================================== --- csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-08 13:26:11 UTC (rev 4226) +++ csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-08 13:38:19 UTC (rev 4227) @@ -1,3 +1,16 @@ +$TERM, ncurses and how to make xterm display colors +--------------------------------------------------- + +The xterm distributed with Solaris is a basic xterm (xterm-r6), whereas this +is a current xterm and supports a wider range of terminal capabilites. +To keep CSWncurses compatible with the Solaris xterm, TERM=xterm refers +to the basic xterm-r6 capabilities, which unfortunately also defeats +color support in some ncurses-based applications. + +To make full use of the capabilities of this xterm (including color-support) +set TERM=xterm-new. + + Note: app-defaults in /opt/csw/lib/X11/app-defaults --------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 8 16:09:54 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 08 Apr 2009 14:09:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4228] csw/mgar/pkg/pkgutil/trunk Message-ID: Revision: 4228 http://gar.svn.sourceforge.net/gar/?rev=4228&view=rev Author: bonivart Date: 2009-04-08 14:09:53 +0000 (Wed, 08 Apr 2009) Log Message: ----------- pkgutil: update to 1.5 Modified Paths: -------------- csw/mgar/pkg/pkgutil/trunk/Makefile csw/mgar/pkg/pkgutil/trunk/checksums Modified: csw/mgar/pkg/pkgutil/trunk/Makefile =================================================================== --- csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-08 13:38:19 UTC (rev 4227) +++ csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-08 14:09:53 UTC (rev 4228) @@ -1,5 +1,5 @@ GARNAME = pkgutil -GARVERSION = 1.5b4 +GARVERSION = 1.5 CATEGORIES = utils DESCRIPTION = Installs Solaris packages easily Modified: csw/mgar/pkg/pkgutil/trunk/checksums =================================================================== --- csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-08 13:38:19 UTC (rev 4227) +++ csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-08 14:09:53 UTC (rev 4228) @@ -1,4 +1,4 @@ -f4771b87ddaa176ebe0c5bbd31414e2c download/pkgutil-1.5b4.zip +97349a661c6f779e33621b73b738925e download/pkgutil-1.5.zip 805cd30ad9f21cb1167d166fa99b5891 download/CSWpkgutil.gspec 54bd1af1cd6ca5ac7e63586ffc16842d download/CSWpkgutil.prototype e1407c24d47306dbc4cea22dcb291f1d download/CSWpkgutil.postinstall This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 16:39:27 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Wed, 08 Apr 2009 14:39:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4229] csw/mgar/pkg/htmldoc/trunk/Makefile Message-ID: Revision: 4229 http://gar.svn.sourceforge.net/gar/?rev=4229&view=rev Author: hson Date: 2009-04-08 14:39:27 +0000 (Wed, 08 Apr 2009) Log Message: ----------- htmldoc: Split package in two Modified Paths: -------------- csw/mgar/pkg/htmldoc/trunk/Makefile Modified: csw/mgar/pkg/htmldoc/trunk/Makefile =================================================================== --- csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-08 14:09:53 UTC (rev 4228) +++ csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-08 14:39:27 UTC (rev 4229) @@ -4,19 +4,33 @@ DESCRIPTION = converts HTML files and web pages into indexed HTML PostScript and PDF define BLURB - HTMLDOC converts Hyper-Text Markup Language ("HTML") files and web pages into - indexed HTML, Adobe\xAE PostScript\xAE, or Adobe Portable Document Format ("PDF") - files. + HTMLDOC is a program for writing documentation in HTML and producing indexed + HTML, PostScript, or PDF output (with tables of contents). It supports most + HTML 3.2 and some HTML 4.0 syntax, as well as GIF, JPEG, and PNG images. endef +PACKAGES = CSWhtmldoc-common CSWhtmldoc +CATALOGNAME_CSWhtmldoc = $(GARNAME) +CATALOGNAME_CSWhtmldoc-common = $(GARNAME)_common +SPKG_DESC_CSWhtmldoc = $(DESCRIPTION) +SPKG_DESC_CSWhtmldoc-common = This package contains the htmldoc files common to all architectures. +ARCHALL_CSWhtmldoc-common = 1 + +REQUIRED_PKGS_CSWhtmldoc = CSWfltk CSWjpeg CSWosslrt CSWpng CSWzlib +REQUIRED_PKGS_CSWhtmldoc += CSWhtmldoc-common +#REQUIRED_PKGS_CSWhtmldoc-common = + +PKGFILES_CSWhtmldoc = $(bindir)/.* +PKGFILES_CSWhtmldoc-common = $(datadir)/.* + MASTER_SITES = http://ftp.easysw.com/pub/htmldoc/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION)-source.tar.bz2 +#DISTFILES += $(call admfiles,CSWhtmldoc, ) +#DISTFILES += $(call admfiles,CSWhtmldoc-common, ) -SPKG_SOURCEURL = http://www.htmldoc.org - LICENSE = COPYING.txt -REQUIRED_PKGS = CSWfltk CSWjpeg CSWosslrt CSWpng CSWzlib +SPKG_SOURCEURL = http://www.htmldoc.org # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*)-source.tar.bz2 @@ -31,4 +45,6 @@ TEST_SCRIPTS = +# Disable check until package is released +ENABLE_CHECK = 0 include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 8 22:12:00 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 08 Apr 2009 20:12:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4230] csw/mgar/pkg/pca/trunk Message-ID: Revision: 4230 http://gar.svn.sourceforge.net/gar/?rev=4230&view=rev Author: dmichelsen Date: 2009-04-08 20:12:00 +0000 (Wed, 08 Apr 2009) Log Message: ----------- pca: Update to 20090408-01 Modified Paths: -------------- csw/mgar/pkg/pca/trunk/Makefile csw/mgar/pkg/pca/trunk/checksums Modified: csw/mgar/pkg/pca/trunk/Makefile =================================================================== --- csw/mgar/pkg/pca/trunk/Makefile 2009-04-08 14:39:27 UTC (rev 4229) +++ csw/mgar/pkg/pca/trunk/Makefile 2009-04-08 20:12:00 UTC (rev 4230) @@ -1,5 +1,5 @@ GARNAME = pca -GARVERSION = 20090224-01 +GARVERSION = 20090408-01 CATEGORIES = utils DESCRIPTION = Patch Check Advanced Modified: csw/mgar/pkg/pca/trunk/checksums =================================================================== --- csw/mgar/pkg/pca/trunk/checksums 2009-04-08 14:39:27 UTC (rev 4229) +++ csw/mgar/pkg/pca/trunk/checksums 2009-04-08 20:12:00 UTC (rev 4230) @@ -1,3 +1,3 @@ -3de9a69abff821d3b103a660f161f119 download/pca-20090224-01 +9019de37bfb4d9e89930f922695cc788 download/pca-20090408-01 6f2f2376eba0a788795dd43d68ad32d1 download/COPYING 12de68ff8f67b4bb8b095e5646402208 download/pca.conf This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 8 22:55:24 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 08 Apr 2009 20:55:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4231] csw/mgar/pkg/libvorbis/trunk/Makefile Message-ID: Revision: 4231 http://gar.svn.sourceforge.net/gar/?rev=4231&view=rev Author: dmichelsen Date: 2009-04-08 20:55:24 +0000 (Wed, 08 Apr 2009) Log Message: ----------- libvorbis: Fix package name Modified Paths: -------------- csw/mgar/pkg/libvorbis/trunk/Makefile Modified: csw/mgar/pkg/libvorbis/trunk/Makefile =================================================================== --- csw/mgar/pkg/libvorbis/trunk/Makefile 2009-04-08 20:12:00 UTC (rev 4230) +++ csw/mgar/pkg/libvorbis/trunk/Makefile 2009-04-08 20:55:24 UTC (rev 4231) @@ -12,6 +12,8 @@ MASTER_SITES = http://downloads.xiph.org/releases/vorbis/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PACKAGES = CSWvorbis +CATALOGNAME = libvorbis REQUIRED_PKGS = CSWlibogg SPKG_SOURCEURL = http://www.vorbis.com/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 23:55:23 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Wed, 08 Apr 2009 21:55:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4232] csw/mgar/pkg/gnumeric/trunk Message-ID: Revision: 4232 http://gar.svn.sourceforge.net/gar/?rev=4232&view=rev Author: hson Date: 2009-04-08 21:55:22 +0000 (Wed, 08 Apr 2009) Log Message: ----------- gnumeric: Add patches required to compile Modified Paths: -------------- csw/mgar/pkg/gnumeric/trunk/Makefile csw/mgar/pkg/gnumeric/trunk/checksums Added Paths: ----------- csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff Removed Paths: ------------- csw/mgar/pkg/gnumeric/trunk/files/mainpatch Modified: csw/mgar/pkg/gnumeric/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-08 20:55:24 UTC (rev 4231) +++ csw/mgar/pkg/gnumeric/trunk/Makefile 2009-04-08 21:55:22 UTC (rev 4232) @@ -19,7 +19,8 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -#PATCHFILES = mainpatch +PATCHFILES = md5.h.diff +PATCHFILES += numtheory.c.diff CONFIGURE_ARGS = $(DIRPATHS) Modified: csw/mgar/pkg/gnumeric/trunk/checksums =================================================================== --- csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-08 20:55:24 UTC (rev 4231) +++ csw/mgar/pkg/gnumeric/trunk/checksums 2009-04-08 21:55:22 UTC (rev 4232) @@ -1 +1,3 @@ 4bc2ca7b90e953934b086c931238fd04 download/gnumeric-1.9.5.tar.gz +883cdef1974db050cb0fd002a399d940 download/md5.h.diff +70046f2846c948a2740cfc9e4c331a50 download/numtheory.c.diff Deleted: csw/mgar/pkg/gnumeric/trunk/files/mainpatch =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-08 20:55:24 UTC (rev 4231) +++ csw/mgar/pkg/gnumeric/trunk/files/mainpatch 2009-04-08 21:55:22 UTC (rev 4232) @@ -1,57 +0,0 @@ -diff -ru gnumeric-1.8.3.orig/plugins/excel/md5.h gnumeric-1.8.3/plugins/excel/md5.h ---- gnumeric-1.8.3.orig/plugins/excel/md5.h 2008-01-15 00:55:11.000000000 +0100 -+++ gnumeric-1.8.3/plugins/excel/md5.h 2009-03-17 00:23:02.110582251 +0100 -@@ -22,7 +22,11 @@ - #define _MD5_H 1 - - #include -+#ifdef __sun -+#include -+#else - #include -+#endif - - #define MD5_DIGEST_SIZE 16 - #define MD5_BLOCK_SIZE 64 -diff -ru gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c gnumeric-1.8.3/plugins/numtheory/numtheory.c ---- gnumeric-1.8.3.orig/plugins/numtheory/numtheory.c 2008-01-15 00:55:10.000000000 +0100 -+++ gnumeric-1.8.3/plugins/numtheory/numtheory.c 2009-03-17 00:55:21.253509921 +0100 -@@ -33,7 +33,14 @@ - - #define OUT_OF_BOUNDS "#LIMIT!" - -+#ifdef __sun -+static inline double bit_max_fn(void) { -+ return MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); -+} -+#define bit_max (bit_max_fn()) -+#else - static const double bit_max = MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); -+#endif - - /* ------------------------------------------------------------------------- */ - -diff -ru gnumeric-1.8.3.orig/po/Makefile.in.in gnumeric-1.8.3/po/Makefile.in.in ---- gnumeric-1.8.3.orig/po/Makefile.in.in 2008-05-24 22:40:36.000000000 +0200 -+++ gnumeric-1.8.3/po/Makefile.in.in 2009-03-17 00:59:24.557217225 +0100 -@@ -69,7 +69,7 @@ - EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS - - POTFILES = \ -- -+# - CATALOGS = @CATALOGS@ - CATOBJEXT = @CATOBJEXT@ - -diff -ru gnumeric-1.8.3.orig/src/gnm-so-polygon.c gnumeric-1.8.3/src/gnm-so-polygon.c ---- gnumeric-1.8.3.orig/src/gnm-so-polygon.c 2008-01-15 00:54:39.000000000 +0100 -+++ gnumeric-1.8.3/src/gnm-so-polygon.c 2009-03-16 23:35:49.881228497 +0100 -@@ -223,7 +223,7 @@ - gnm_so_polygon_write_xml_sax (SheetObject const *so, GsfXMLOut *output) - { - /* TODO */ -- return gnm_so_polygon_parent_class->write_xml_sax (so, output); -+ gnm_so_polygon_parent_class->write_xml_sax (so, output); - } - - static void Added: csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff (rev 0) +++ csw/mgar/pkg/gnumeric/trunk/files/md5.h.diff 2009-04-08 21:55:22 UTC (rev 4232) @@ -0,0 +1,15 @@ +diff -ru ../build-global/gnumeric-1.9.5/plugins/excel/md5.h gnumeric-1.9.5/plugins/excel/md5.h +--- ../build-global/gnumeric-1.9.5/plugins/excel/md5.h 2007-09-21 02:11:31.000000000 +0200 ++++ gnumeric-1.9.5/plugins/excel/md5.h 2009-04-07 08:29:55.235754017 +0200 +@@ -22,7 +22,11 @@ + #define _MD5_H 1 + + #include ++#ifdef __sun ++#include ++#else + #include ++#endif + + #define MD5_DIGEST_SIZE 16 + #define MD5_BLOCK_SIZE 64 Added: csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff =================================================================== --- csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff (rev 0) +++ csw/mgar/pkg/gnumeric/trunk/files/numtheory.c.diff 2009-04-08 21:55:22 UTC (rev 4232) @@ -0,0 +1,18 @@ +diff -ru ../build-global/gnumeric-1.9.5/plugins/numtheory/numtheory.c gnumeric-1.9.5/plugins/numtheory/numtheory.c +--- ../build-global/gnumeric-1.9.5/plugins/numtheory/numtheory.c 2009-03-02 03:05:42.000000000 +0100 ++++ gnumeric-1.9.5/plugins/numtheory/numtheory.c 2009-04-08 00:59:37.712247116 +0200 +@@ -38,7 +38,14 @@ + * represented in a gnm_float _and_ in a guint64. (For regular "double", + * the latter part is irrelevant.) + */ ++#ifdef __sun ++static inline double bit_max_fn(void) { ++ return MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); ++} ++#define bit_max (bit_max_fn()) ++#else + static const double bit_max = MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64); ++#endif + + /* ------------------------------------------------------------------------- */ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Wed Apr 8 23:56:32 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Wed, 08 Apr 2009 21:56:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4233] csw/mgar/pkg Message-ID: Revision: 4233 http://gar.svn.sourceforge.net/gar/?rev=4233&view=rev Author: hson Date: 2009-04-08 21:56:32 +0000 (Wed, 08 Apr 2009) Log Message: ----------- scrollkeeper: Initial commit Added Paths: ----------- csw/mgar/pkg/scrollkeeper/ csw/mgar/pkg/scrollkeeper/Makefile csw/mgar/pkg/scrollkeeper/branches/ csw/mgar/pkg/scrollkeeper/tags/ csw/mgar/pkg/scrollkeeper/trunk/ csw/mgar/pkg/scrollkeeper/trunk/Makefile csw/mgar/pkg/scrollkeeper/trunk/files/ csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff Added: csw/mgar/pkg/scrollkeeper/Makefile =================================================================== --- csw/mgar/pkg/scrollkeeper/Makefile (rev 0) +++ csw/mgar/pkg/scrollkeeper/Makefile 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/scrollkeeper/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/scrollkeeper/trunk/Makefile =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/Makefile (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/Makefile 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,37 @@ +GARNAME = scrollkeeper +GARVERSION = 0.3.14 +CATEGORIES = utils + +DESCRIPTION = a cataloging system for documentation on open systems +define BLURB + ScrollKeeper is a cataloging system for documentation on open systems. It + manages documentation metadata (as specified by the Open Source Metadata + Framework(OMF)) and provides a simple API to allow help browsers to find, + sort, and search the document catalog. It will also be able to communicate + with catalog servers on the Net to search for documents which are not on the + local system. +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +SPKG_SOURCEURL = http://scrollkeeper.sourceforge.net/ + +LICENSE = COPYING + +REQUIRED_PKGS = CSWggettextrt CSWiconv CSWlibxml2 CSWlibxslt CSWzlib + +# We define upstream file regex so we can be notifed of new upstream software release +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=11543 +UPSTREAM_USE_SF = 1 +UFILES_REGEX = (\d+(?:\.\d+)*) + +PATCHFILES = Makefile.in.diff + +CONFIGURE_ARGS = $(DIRPATHS) + +TEST_SCRIPTS = + +include gar/category.mk + +localstatedir = /var/$(prefix) Added: csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postinstall 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,5 @@ +#!/bin/sh +PATH=/opt/csw/bin:$PATH;export PATH +if [ -x /opt/csw/bin/scrollkeeper-rebuilddb ]; then + /opt/csw/bin/scrollkeeper-rebuilddb -q -p /var/opt/csw/lib/scrollkeeper +fi Added: csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,6 @@ +#!/bin/sh +PATH=/opt/csw/bin:$PATH;export PATH +if [ -d /var/opt/csw/lib/scrollkeeper ]; then + rm -rf /var/opt/csw/lib/scrollkeeper + rm -f /var/opt/csw/log/scrollkeeper.log* +fi Property changes on: csw/mgar/pkg/scrollkeeper/trunk/files/CSWscrollkeeper.postremove ___________________________________________________________________ Added: svn:executable + * Added: csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/files/Makefile.in.diff 2009-04-08 21:56:32 UTC (rev 4233) @@ -0,0 +1,17 @@ +--- ../build-global/scrollkeeper-0.3.14/Makefile.in 2003-12-06 09:17:51.000000000 +0100 ++++ scrollkeeper-0.3.14/Makefile.in 2009-04-08 19:57:15.376155974 +0200 +@@ -673,10 +673,10 @@ + rm -rf $(DESTDIR)$(scrollkeeper_localstate_dir) + $(mkinstalldirs) $(DESTDIR)$(scrollkeeper_localstate_dir) + $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log +- PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ +- echo "`date +\"%b %d %X\"` Installing ScrollKeeper `scrollkeeper-config --version`..." >> $(DESTDIR)$(localstatedir)/log/scrollkeeper.log +- PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ +- $(DESTDIR)$(bindir)/scrollkeeper-rebuilddb -q -p $(DESTDIR)$(scrollkeeper_localstate_dir) ++# PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ ++# echo "`date +\"%b %d %X\"` Installing ScrollKeeper `scrollkeeper-config --version`..." >> $(DESTDIR)$(localstatedir)/log/scrollkeeper.log ++# PATH="$(PATH):$(DESTDIR)$(bindir)" ; \ ++# $(DESTDIR)$(bindir)/scrollkeeper-rebuilddb -q -p $(DESTDIR)$(scrollkeeper_localstate_dir) + + # Remove generated files + uninstall-local: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 9 01:18:59 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 08 Apr 2009 23:18:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4234] csw/mgar/pkg/glib2/trunk/Makefile Message-ID: Revision: 4234 http://gar.svn.sourceforge.net/gar/?rev=4234&view=rev Author: harpchad Date: 2009-04-08 23:18:58 +0000 (Wed, 08 Apr 2009) Log Message: ----------- No longer dependant on CSWsunmath Modified Paths: -------------- csw/mgar/pkg/glib2/trunk/Makefile Modified: csw/mgar/pkg/glib2/trunk/Makefile =================================================================== --- csw/mgar/pkg/glib2/trunk/Makefile 2009-04-08 21:56:32 UTC (rev 4233) +++ csw/mgar/pkg/glib2/trunk/Makefile 2009-04-08 23:18:58 UTC (rev 4234) @@ -32,7 +32,7 @@ BUILD64 = 1 NO_ISAEXEC = 1 -REQUIRED_PKGS_CSWglib2 = CSWggettextrt CSWiconv CSWsunmath +REQUIRED_PKGS_CSWglib2 = CSWggettextrt CSWiconv REQUIRED_PKGS_CSWglib2devel = CSWglib2 CSWggettextrt CSWiconv TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 9 02:14:19 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Thu, 09 Apr 2009 00:14:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4235] csw/mgar/pkg/gvim/trunk Message-ID: Revision: 4235 http://gar.svn.sourceforge.net/gar/?rev=4235&view=rev Author: harpchad Date: 2009-04-09 00:14:19 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Bump to patchrev 148 Modified Paths: -------------- csw/mgar/pkg/gvim/trunk/Makefile csw/mgar/pkg/gvim/trunk/checksums Modified: csw/mgar/pkg/gvim/trunk/Makefile =================================================================== --- csw/mgar/pkg/gvim/trunk/Makefile 2009-04-08 23:18:58 UTC (rev 4234) +++ csw/mgar/pkg/gvim/trunk/Makefile 2009-04-09 00:14:19 UTC (rev 4235) @@ -1,6 +1,6 @@ GARNAME = vim DISTVERSION = 7.2 -PATCHREV = 128 +PATCHREV = 148 GARVERSION = $(DISTVERSION).$(PATCHREV) CATEGORIES = utils SPKG_SOURCEURL = http://www.vim.org/download.php @@ -48,7 +48,7 @@ REQUIRED_PKGS_CSWgvim = CSWvimrt CSWbonobo2 CSWfconfig CSWftype2 CSWgconf2 REQUIRED_PKGS_CSWgvim += CSWggettextrt CSWglib2 CSWgnomekeyring CSWgnomevfs2 CSWgtk2 REQUIRED_PKGS_CSWgvim += CSWiconv CSWlibart CSWlibatk CSWlibbonoboui CSWlibcairo -REQUIRED_PKGS_CSWgvim += CSWlibgnome CSWlibgnomecanvas CSWlibgnomeui CSWlibnet CSWlibpopt +REQUIRED_PKGS_CSWgvim += CSWlibgnome CSWlibgnomecanvas CSWlibgnomeui CSWlibpopt REQUIRED_PKGS_CSWgvim += CSWlibxml2 CSWlibxrender CSWncurses CSWorbit2 CSWpango REQUIRED_PKGS_CSWgvim += CSWperl CSWpng CSWzlib Modified: csw/mgar/pkg/gvim/trunk/checksums =================================================================== --- csw/mgar/pkg/gvim/trunk/checksums 2009-04-08 23:18:58 UTC (rev 4234) +++ csw/mgar/pkg/gvim/trunk/checksums 2009-04-09 00:14:19 UTC (rev 4235) @@ -131,4 +131,24 @@ b31534667bb741e21479b1e3757c9e21 download/7.2.126 71e87e78bea69d8876ff7f6d824c8986 download/7.2.127 21da01d371757282bfd402ddd91005ba download/7.2.128 +e890b630efa3847c8cdee2f197145b6c download/7.2.129 +d3fe3bf37d5c0940f3e751f41d92e817 download/7.2.130 +3c2aaa22914d06a65bf0f212e43c3ace download/7.2.131 +379aa718df5dbcde8215fc4d94062d9f download/7.2.132 +6d51f9deb4c2604692f532c118b73ef8 download/7.2.133 +4acae77b2a217e1cb47040c08e28180d download/7.2.134 +4d30bf2c9d2973f5dd1c12468123dc41 download/7.2.135 +f2ae8cc595933938ee608e040d1256a5 download/7.2.136 +c613c1e0fac319f05ffe1fa7e27d6600 download/7.2.137 +e7d02c3dea47fa579366bb1cd025ce5e download/7.2.138 +04f7131164b3f46d6365a8faea0e32c6 download/7.2.139 +e1c0e4fbd985f5a2e5a24a4cfab1112c download/7.2.140 +e5a9c7ef44a38057c0c5c1191d9cdf77 download/7.2.141 +f08f7f966749c2ef20ff87dfeb9bef62 download/7.2.142 +6b132dad3ad947662d1c370193a14218 download/7.2.143 +4e2a1d1cb12198a783759f88e6c64fc4 download/7.2.144 +38877e2ac720e45e5d62cd1089167db3 download/7.2.145 +cb97aca73a1f4fdd2fac894bba7e43ae download/7.2.146 +4219afedebf0172118f2d078d9012995 download/7.2.147 +49ca89a47315f512c7ee06f5b2617a90 download/7.2.148 582717146f6bbd5b73db83a2f62e62a5 download/vimtutor.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 9 02:14:51 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Thu, 09 Apr 2009 00:14:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4236] csw/mgar/pkg/vim/trunk Message-ID: Revision: 4236 http://gar.svn.sourceforge.net/gar/?rev=4236&view=rev Author: harpchad Date: 2009-04-09 00:14:50 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Bump to patchrev 148 Modified Paths: -------------- csw/mgar/pkg/vim/trunk/Makefile csw/mgar/pkg/vim/trunk/checksums Modified: csw/mgar/pkg/vim/trunk/Makefile =================================================================== --- csw/mgar/pkg/vim/trunk/Makefile 2009-04-09 00:14:19 UTC (rev 4235) +++ csw/mgar/pkg/vim/trunk/Makefile 2009-04-09 00:14:50 UTC (rev 4236) @@ -1,6 +1,6 @@ GARNAME = vim DISTVERSION = 7.2 -PATCHREV = 128 +PATCHREV = 148 GARVERSION = $(DISTVERSION).$(PATCHREV) CATEGORIES = utils SPKG_SOURCEURL = http://www.vim.org/download.php Modified: csw/mgar/pkg/vim/trunk/checksums =================================================================== --- csw/mgar/pkg/vim/trunk/checksums 2009-04-09 00:14:19 UTC (rev 4235) +++ csw/mgar/pkg/vim/trunk/checksums 2009-04-09 00:14:50 UTC (rev 4236) @@ -133,4 +133,24 @@ b31534667bb741e21479b1e3757c9e21 download/7.2.126 71e87e78bea69d8876ff7f6d824c8986 download/7.2.127 21da01d371757282bfd402ddd91005ba download/7.2.128 +e890b630efa3847c8cdee2f197145b6c download/7.2.129 +d3fe3bf37d5c0940f3e751f41d92e817 download/7.2.130 +3c2aaa22914d06a65bf0f212e43c3ace download/7.2.131 +379aa718df5dbcde8215fc4d94062d9f download/7.2.132 +6d51f9deb4c2604692f532c118b73ef8 download/7.2.133 +4acae77b2a217e1cb47040c08e28180d download/7.2.134 +4d30bf2c9d2973f5dd1c12468123dc41 download/7.2.135 +f2ae8cc595933938ee608e040d1256a5 download/7.2.136 +c613c1e0fac319f05ffe1fa7e27d6600 download/7.2.137 +e7d02c3dea47fa579366bb1cd025ce5e download/7.2.138 +04f7131164b3f46d6365a8faea0e32c6 download/7.2.139 +e1c0e4fbd985f5a2e5a24a4cfab1112c download/7.2.140 +e5a9c7ef44a38057c0c5c1191d9cdf77 download/7.2.141 +f08f7f966749c2ef20ff87dfeb9bef62 download/7.2.142 +6b132dad3ad947662d1c370193a14218 download/7.2.143 +4e2a1d1cb12198a783759f88e6c64fc4 download/7.2.144 +38877e2ac720e45e5d62cd1089167db3 download/7.2.145 +cb97aca73a1f4fdd2fac894bba7e43ae download/7.2.146 +4219afedebf0172118f2d078d9012995 download/7.2.147 +49ca89a47315f512c7ee06f5b2617a90 download/7.2.148 582717146f6bbd5b73db83a2f62e62a5 download/vimtutor.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 02:17:10 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 00:17:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4237] csw/mgar/pkg/scrollkeeper/trunk/checksums Message-ID: Revision: 4237 http://gar.svn.sourceforge.net/gar/?rev=4237&view=rev Author: hson Date: 2009-04-09 00:17:10 +0000 (Thu, 09 Apr 2009) Log Message: ----------- scrollkeeper: Missed checksums Added Paths: ----------- csw/mgar/pkg/scrollkeeper/trunk/checksums Added: csw/mgar/pkg/scrollkeeper/trunk/checksums =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/checksums (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/checksums 2009-04-09 00:17:10 UTC (rev 4237) @@ -0,0 +1,2 @@ +161eb3f29e30e7b24f84eb93ac696155 download/scrollkeeper-0.3.14.tar.gz +b04f0a91f4fa5870868059d454eda833 download/Makefile.in.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 9 04:08:32 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 09 Apr 2009 02:08:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4238] csw/mgar/pkg/mysql5/trunk/Makefile Message-ID: Revision: 4238 http://gar.svn.sourceforge.net/gar/?rev=4238&view=rev Author: bdwalton Date: 2009-04-09 02:08:32 +0000 (Thu, 09 Apr 2009) Log Message: ----------- use EXTRA_LIB instead of EXTRA_LD_OPTIONS to get handling of ISALIST properly for all -L dirs Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-09 00:17:10 UTC (rev 4237) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-09 02:08:32 UTC (rev 4238) @@ -22,7 +22,7 @@ WORKSRC = $(WORKDIR)/mysql-$(GARVERSION) -EXTRA_LD_OPTIONS = -R/opt/csw/lib/\$$ISALIST +EXTRA_LIB = /opt/csw/lib # Set ./configure options CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 04:42:30 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 02:42:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4239] csw/mgar/pkg/libpcap/trunk Message-ID: Revision: 4239 http://gar.svn.sourceforge.net/gar/?rev=4239&view=rev Author: hson Date: 2009-04-09 02:42:30 +0000 (Thu, 09 Apr 2009) Log Message: ----------- libpcap: Update to 0.9.8 Modified Paths: -------------- csw/mgar/pkg/libpcap/trunk/Makefile csw/mgar/pkg/libpcap/trunk/checksums Added Paths: ----------- csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff Removed Paths: ------------- csw/mgar/pkg/libpcap/trunk/files/solib.diff Property Changed: ---------------- csw/mgar/pkg/libpcap/trunk/ Property changes on: csw/mgar/pkg/libpcap/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/libpcap/trunk/Makefile =================================================================== --- csw/mgar/pkg/libpcap/trunk/Makefile 2009-04-09 02:08:32 UTC (rev 4238) +++ csw/mgar/pkg/libpcap/trunk/Makefile 2009-04-09 02:42:30 UTC (rev 4239) @@ -1,5 +1,5 @@ GARNAME = libpcap -GARVERSION = 0.8.3 +GARVERSION = 0.9.8 CATEGORIES = lib DESCRIPTION = Libraries for network diagnostics @@ -9,22 +9,29 @@ MASTER_SITES = http://www.tcpdump.org/release/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibpcap,) +LICENSE = LICENSE + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz # Shared libraries patch -PATCHFILES = solib.diff +PATCHFILES = Makefile.in.diff +PATCHFILES += scanner.l.diff # No test target for libpcap TEST_SCRIPTS = -CONFIGURE_ARGS = $(DIRPATHS) +BUILD64 = 1 -INSTALL_OVERRIDE_DIRS = prefix exec_prefix includedir libdir mandir +EXTRA_BUILD_ISAS_sparc = sparcv8plus sparcv8plus+vis +EXTRA_BUILD_ISAS_i386 = pentium pentium_pro+mmx +TEST_TARGET = check + +EXTRA_CFLAGS = -I. + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --enable-ipv6 + include gar/category.mk - -post-install: - rm -f $(DESTDIR)$(libdir)/$(GARNAME).a Modified: csw/mgar/pkg/libpcap/trunk/checksums =================================================================== --- csw/mgar/pkg/libpcap/trunk/checksums 2009-04-09 02:08:32 UTC (rev 4238) +++ csw/mgar/pkg/libpcap/trunk/checksums 2009-04-09 02:42:30 UTC (rev 4239) @@ -1,3 +1,3 @@ -56a9d4615d8354fcfe8cff8c8443c77b download/libpcap-0.8.3.tar.gz -a6d2e7614701143a2e4e905814fead77 download/CSWlibpcap.gspec -0754daf384e4d107ef35ed2cb4e44f0e download/solib.diff +5208f24d0328ee7c20b52c43eaa9aa0e download/libpcap-0.9.8.tar.gz +d036716d6563bcad5fad70916f5c2c2e download/Makefile.in.diff +c0002322e0b90a3e9eed0b7ac9e6c050 download/scanner.l.diff Added: csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff =================================================================== --- csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff (rev 0) +++ csw/mgar/pkg/libpcap/trunk/files/Makefile.in.diff 2009-04-09 02:42:30 UTC (rev 4239) @@ -0,0 +1,116 @@ +--- ../build-global/libpcap-0.9.8/Makefile.in 2007-07-24 04:35:15.000000000 +0200 ++++ libpcap-0.9.8/Makefile.in 2009-04-09 04:07:28.839392745 +0200 +@@ -37,6 +37,15 @@ + srcdir = @srcdir@ + VPATH = @srcdir@ + ++# some defines for shared library compilation - FIXME ++MAJ=0 ++MIN=9.8 ++VERSION=$(MAJ).$(MIN) ++LIBNAME=pcap ++LIBRARY=lib$(LIBNAME).a ++SOLIBRARY=lib$(LIBNAME).so ++SHAREDLIB=$(SOLIBRARY).$(VERSION) ++ + # + # You shouldn't need to edit anything below. + # +@@ -52,6 +61,7 @@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) ++CFLAGS_SHARED = -G $(LDFLAGS) -Wl,-h,$(SOLIBRARY).$(MAJ) + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -71,7 +81,11 @@ + # problem if you don't own the file but can write to the directory. + .c.o: + @rm -f $@ +- $(CC) $(CFLAGS) -c $(srcdir)/$*.c ++ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c ++ ++%_pic.o: %.c ++ @rm -f $@ ++ $(CC) -KPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c + + PSRC = pcap- at V_PCAP@.c + FSRC = fad- at V_FINDALLDEVS@.c +@@ -86,6 +100,8 @@ + # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot + # hack the extra indirection + OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) ++OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) ++ + HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ + ethertype.h gencode.h gnuc.h + GENHDR = \ +@@ -98,14 +114,22 @@ + $(SRC) $(HDR) $(TAGHDR) + + CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c ++CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* + +-all: libpcap.a ++all: libpcap.a $(SHAREDLIB) + + libpcap.a: $(OBJ) + @rm -f $@ + ar rc $@ $(OBJ) $(LIBS) + $(RANLIB) $@ + ++$(SHAREDLIB): $(OBJ_PIC) ++ - at rm -f $@ ++ - at rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) ++ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc ++ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) ++ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) ++ + shared: libpcap.$(DYEXT) + + # +@@ -131,6 +155,9 @@ + scanner.o: scanner.c tokdefs.h + $(CC) $(CFLAGS) -c scanner.c + ++scanner_pic.o: scanner.c tokdefs.h ++ $(CC) -KPIC $(CFLAGS) -o $@ -c scanner.c ++ + pcap.o: version.h + + tokdefs.h: grammar.c +@@ -144,9 +171,16 @@ + @rm -f $@ + $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + ++grammar_pic.o: grammar.c ++ @rm -f $@ ++ $(CC) -KPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c ++ + version.o: version.c + $(CC) $(CFLAGS) -c version.c + ++version_pic.o: version.c ++ $(CC) -KPIC $(CFLAGS) -o $@ -c version.c ++ + snprintf.o: $(srcdir)/missing/snprintf.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + +@@ -172,10 +206,16 @@ + bpf_filter.o: bpf_filter.c + $(CC) $(CFLAGS) -c bpf_filter.c + ++bpf_filter_pic.o: bpf_filter.c ++ $(CC) -KPIC $(CFLAGS) -o $@ -c bpf_filter.c ++ + install: libpcap.a + [ -d $(DESTDIR)$(libdir) ] || \ + (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) + $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a ++ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ ++ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) ++ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) + $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a + [ -d $(DESTDIR)$(includedir) ] || \ + (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) Added: csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff =================================================================== --- csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff (rev 0) +++ csw/mgar/pkg/libpcap/trunk/files/scanner.l.diff 2009-04-09 02:42:30 UTC (rev 4239) @@ -0,0 +1,11 @@ +--- ../build-global/libpcap-0.9.8/scanner.l 2007-06-11 21:34:28.000000000 +0200 ++++ libpcap-0.9.8/scanner.l 2009-04-09 04:41:33.481612776 +0200 +@@ -32,6 +32,8 @@ + #include + #include + ++#include ++ + #include "pcap-int.h" + + #include "gencode.h" Deleted: csw/mgar/pkg/libpcap/trunk/files/solib.diff =================================================================== --- csw/mgar/pkg/libpcap/trunk/files/solib.diff 2009-04-09 02:08:32 UTC (rev 4238) +++ csw/mgar/pkg/libpcap/trunk/files/solib.diff 2009-04-09 02:42:30 UTC (rev 4239) @@ -1,159 +0,0 @@ -diff --speed-large-files --minimal -Nru libpcap-0.7.1.orig/Makefile.in libpcap-0.7.1/Makefile.in ---- libpcap-0.7.1.orig/Makefile.in 2001-01-17 20:05:12.000000000 -0800 -+++ libpcap-0.7.1/Makefile.in 2003-07-28 14:12:12.837173000 -0700 -@@ -37,6 +37,15 @@ - srcdir = @srcdir@ - VPATH = @srcdir@ - -+# some defines for shared library compilation - FIXME -+MAJ=0 -+MIN=7.1 -+VERSION=$(MAJ).$(MIN) -+LIBNAME=pcap -+LIBRARY=lib$(LIBNAME).a -+SOLIBRARY=lib$(LIBNAME).so -+SHAREDLIB=$(SOLIBRARY).$(VERSION) -+ - # - # You shouldn't need to edit anything below. - # -@@ -48,6 +57,7 @@ - - # Standard CFLAGS - CFLAGS = $(CCOPT) $(INCLS) $(DEFS) -+CFLAGS_SHARED = -G -Wl,-h,$(SOLIBRARY).$(MAJ) - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ -@@ -67,7 +77,11 @@ - # problem if you don't own the file but can write to the directory. - .c.o: - @rm -f $@ -- $(CC) $(CFLAGS) -c $(srcdir)/$*.c -+ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c -+ -+%_pic.o: %.c -+ @rm -f $@ -+ $(CC) -KPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c - - PSRC = pcap- at V_PCAP@.c - CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \ -@@ -80,6 +94,8 @@ - # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot - # hack the extra indirection - OBJ = $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o) # $(LIBOBJS) -+OBJ_PIC = $(PSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) -+ - HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ - ethertype.h gencode.h gnuc.h - GENHDR = \ -@@ -91,15 +107,22 @@ - TAGFILES = \ - $(SRC) $(HDR) $(TAGHDR) - --CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c -+CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* - --all: libpcap.a -+all: libpcap.a $(SHAREDLIB) - - libpcap.a: $(OBJ) - @rm -f $@ - ar rc $@ $(OBJ) - $(RANLIB) $@ - -+$(SHAREDLIB): $(OBJ_PIC) -+ - at rm -f $@ -+ - at rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) -+ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc -+ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) -+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) -+ - scanner.c: $(srcdir)/scanner.l - @rm -f $@ - $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@ -@@ -107,6 +130,9 @@ - scanner.o: scanner.c tokdefs.h - $(CC) $(CFLAGS) -c scanner.c - -+scanner_pic.o: scanner.c tokdefs.h -+ $(CC) -KPIC $(CFLAGS) -o $@ -c scanner.c -+ - tokdefs.h: grammar.c - grammar.c: $(srcdir)/grammar.y - @rm -f grammar.c tokdefs.h -@@ -118,9 +144,16 @@ - @rm -f $@ - $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c - -+grammar_pic.o: grammar.c -+ @rm -f $@ -+ $(CC) -KPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c -+ - version.o: version.c - $(CC) $(CFLAGS) -c version.c - -+version_pic.o: version.c -+ $(CC) -KPIC $(CFLAGS) -o $@ -c version.c -+ - snprintf.o: $(srcdir)/../tcpdump/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/../tcpdump/missing/snprintf.c - -@@ -135,31 +168,35 @@ - bpf_filter.o: bpf_filter.c - $(CC) $(CFLAGS) -c bpf_filter.c - -+bpf_filter_pic.o: bpf_filter.c -+ $(CC) -KPIC $(CFLAGS) -o $@ -c bpf_filter.c -+ - install: -- [ -d $(DESTDIR)$(libdir) ] || \ -- (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) -- $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a -- $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a -- [ -d $(DESTDIR)$(includedir) ] || \ -- (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) -- $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h -- $(INSTALL_DATA) $(srcdir)/pcap-namedb.h \ -- $(DESTDIR)$(includedir)/pcap-namedb.h -- [ -d $(DESTDIR)$(includedir)/net ] || \ -- (mkdir -p $(DESTDIR)$(includedir)/net; chmod 755 $(DESTDIR)$(includedir)/net) -- $(INSTALL_DATA) $(srcdir)/bpf/net/bpf.h \ -- $(DESTDIR)$(includedir)/net/bpf.h -- [ -d $(DESTDIR)$(mandir)/man3 ] || \ -- (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3) -- $(INSTALL_DATA) $(srcdir)/pcap.3 \ -- $(DESTDIR)$(mandir)/man3/pcap.3 -+ [ -d $(libdir) ] || \ -+ (mkdir -p $(libdir); chmod 755 $(libdir)) -+ $(INSTALL_DATA) libpcap.a $(libdir)/libpcap.a -+ $(INSTALL_DATA) $(SHAREDLIB) $(libdir)/ -+ ln -sf $(SHAREDLIB) $(libdir)/$(SOLIBRARY).$(MAJ) -+ ln -sf $(SOLIBRARY).$(MAJ) $(libdir)/$(SOLIBRARY) -+ $(RANLIB) $(libdir)/libpcap.a -+ [ -d $(includedir) ] || \ -+ (mkdir -p $(includedir); chmod 755 $(includedir)) -+ $(INSTALL_DATA) $(srcdir)/pcap.h $(includedir)/pcap.h -+ $(INSTALL_DATA) $(srcdir)/pcap-namedb.h $(includedir)/pcap-namedb.h -+ [ -d $(includedir)/net ] || \ -+ (mkdir -p $(includedir)/net; chmod 755 $(includedir)/net) -+ $(INSTALL_DATA) $(srcdir)/bpf/net/bpf.h $(includedir)/net/bpf.h -+ [ -d $(mandir)/man3 ] || \ -+ (mkdir -p $(mandir)/man3; chmod 755 $(mandir)/man3) -+ $(INSTALL_DATA) $(srcdir)/pcap.3 $(mandir)/man3/pcap.3 -+ - - uninstall: -- rm -f $(DESTDIR)$(libdir)/libpcap.a -- rm -f $(DESTDIR)$(includedir)/pcap.h -- rm -f $(DESTDIR)$(includedir)/pcap-namedb.h -- rm -f $(DESTDIR)$(includedir)/net/bpf.h -- rm -f $(DESTDIR)$(mandir)/man3/pcap.3 -+ rm -f $(libdir)/libpcap.a -+ rm -f $(includedir)/pcap.h -+ rm -f $(includedir)/pcap-namedb.h -+ rm -f $(includedir)/net/bpf.h -+ rm -f $(mandir)/man3/pcap.3 - - clean: - rm -f $(CLEANFILES) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 05:32:05 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 03:32:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4240] csw/mgar/pkg Message-ID: Revision: 4240 http://gar.svn.sourceforge.net/gar/?rev=4240&view=rev Author: hson Date: 2009-04-09 03:32:05 +0000 (Thu, 09 Apr 2009) Log Message: ----------- tcpdump: Initial commit Added Paths: ----------- csw/mgar/pkg/tcpdump/ csw/mgar/pkg/tcpdump/Makefile csw/mgar/pkg/tcpdump/branches/ csw/mgar/pkg/tcpdump/tags/ csw/mgar/pkg/tcpdump/trunk/ csw/mgar/pkg/tcpdump/trunk/Makefile csw/mgar/pkg/tcpdump/trunk/checksums csw/mgar/pkg/tcpdump/trunk/files/ Added: csw/mgar/pkg/tcpdump/Makefile =================================================================== --- csw/mgar/pkg/tcpdump/Makefile (rev 0) +++ csw/mgar/pkg/tcpdump/Makefile 2009-04-09 03:32:05 UTC (rev 4240) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/tcpdump/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/tcpdump/trunk/Makefile =================================================================== --- csw/mgar/pkg/tcpdump/trunk/Makefile (rev 0) +++ csw/mgar/pkg/tcpdump/trunk/Makefile 2009-04-09 03:32:05 UTC (rev 4240) @@ -0,0 +1,31 @@ +GARNAME = tcpdump +GARVERSION = 3.9.8 +CATEGORIES = utils + +DESCRIPTION = tcpdump allows you to dump the traffic on a network +define BLURB + +endef + +MASTER_SITES = http://www.tcpdump.org/release/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +LICENSE = LICENSE + +PREREQUISITE_PKGS = CSWlibpcap CSWosslrt CSWossldevel +REQUIRED_PKGS = CSWlibpcap CSWosslrt +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +# Shared libraries patch +#PATCHFILES = solib.diff + +# No test target for libpcap +TEST_SCRIPTS = + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --enable-ipv6 + +#INSTALL_OVERRIDE_DIRS = prefix exec_prefix includedir libdir mandir + +include gar/category.mk Added: csw/mgar/pkg/tcpdump/trunk/checksums =================================================================== --- csw/mgar/pkg/tcpdump/trunk/checksums (rev 0) +++ csw/mgar/pkg/tcpdump/trunk/checksums 2009-04-09 03:32:05 UTC (rev 4240) @@ -0,0 +1 @@ +c491a78c52fe73f1f7271aa5d8c6ab2e download/tcpdump-3.9.8.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 9 06:43:04 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 09 Apr 2009 04:43:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4241] csw/mgar/pkg/sudo-ldap/trunk Message-ID: Revision: 4241 http://gar.svn.sourceforge.net/gar/?rev=4241&view=rev Author: valholla Date: 2009-04-09 04:43:04 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Update to gar v2 and sudo 1.7 Modified Paths: -------------- csw/mgar/pkg/sudo-ldap/trunk/Makefile csw/mgar/pkg/sudo-ldap/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space Property Changed: ---------------- csw/mgar/pkg/sudo-ldap/trunk/ Property changes on: csw/mgar/pkg/sudo-ldap/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/sudo-ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,8 +1,8 @@ GARNAME = sudo -GARVERSION = 1.6.9p8 +GARVERSION = 1.7.0 CATEGORIES = utils -DESCRIPTION = Provides limited super user privileges to specific users +DESCRIPTION = Provides limited super user privileges (LDAP Enabled) define BLURB Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while @@ -12,19 +12,25 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PATCHFILES = install.diff -# We define upstream file regex so we can be notifed of new upstream software release -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +# We define upstream file regex so we can be notifed of new +# upstream software release +UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz -DISTFILES += CSWsudo-ldap.gspec CSWsudo-ldap.postinstall -DISTFILES += CSWsudo-ldap.prototype CSWsudo-ldap.depend -DISTFILES += CSWsudo-ldap.space CSWsudo-ldap.postremove +PACKAGES = CSWsudo-ldap -# Original maintainer's patch to disable strip on install -PATCHFILES = install.diff +CATALOGNAME_CSWsudo-ldap = sudo_ldap +SPKG_DESC_CSWsudo-ldap = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudo-ldap = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudo-ldap = CSWsudo +REQUIRED_PKGS_CSWsudo-ldap = CSWsudo-common CSWggettextrt CSWoldaprt CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam +CONFIGURE_ARGS += --with-logging=both +CONFIGURE_ARGS += --with-ignore-dot +CONFIGURE_ARGS += --with-env-editor CONFIGURE_ARGS += --with-ldap=$(prefix) CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf @@ -32,3 +38,12 @@ include gar/category.mk +PKGFILES_CSWsudo-ldap = .*/bin/.* + +post-install-modulated: + @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) + @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) + @$(MAKECOOKIE) + $(DONADA) Modified: csw/mgar/pkg/sudo-ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/checksums 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/checksums 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,8 +1,2 @@ -67a7f95664e9f3926dc3e36d8684f921 download/sudo-1.6.9p8.tar.gz -c8104c6902e496dba5bb18f9c6db1959 download/CSWsudo-ldap.gspec -f9eeac02cdb8e5a3c2d13b65f76a6cf2 download/CSWsudo-ldap.postinstall -e78775e8a1d8d3ce576d2c8d38afc008 download/CSWsudo-ldap.prototype -5bda7fbebf834933fb7b72d64da8d60b download/CSWsudo-ldap.depend -44fabb4ce87e861516533d80274a52c0 download/CSWsudo-ldap.space -cc346986b765441205b04e076a80ba0e download/CSWsudo-ldap.postremove +5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz 157b2e5e38ca54eb36e0364706bd0292 download/install.diff Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,5 +0,0 @@ -P CSWsudo-common - sudo_common - sudo common files -P CSWlibnet libnet - the libnet packet construction library -P CSWoldaprt openldap_rt - ldap runtime libraries -P CSWosslrt openssl_rt - Openssl runtime libraries -P CSWsasl sasl - Simple Authentication and Security Layer Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,5 +0,0 @@ -%var bitname sudo_ldap -%var pkgname CSWsudoldap -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%var desc Provides limited super user privileges (LDAP Enabled) -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,11 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit -ln -f sudo.ldap sudo -ln -f sudo.ldap sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,16 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit - -OTHERSUDO=`ls -1 sudo.* 2>/dev/null | head -1` -if [ -n "$OTHERSUDO" ]; then - rm -f sudo - ln -f $OTHERSUDO sudo - ln -f $OTHERSUDO sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-09 04:43:04 UTC (rev 4241) @@ -1,3 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sudo.ldap=/opt/csw/bin/sudo 4111 root root -l none /opt/csw/bin/sudoedit=/opt/csw/bin/sudo.ldap Deleted: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space 2009-04-09 04:43:04 UTC (rev 4241) @@ -1 +0,0 @@ -$BASEDIR 1 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 9 06:44:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 09 Apr 2009 04:44:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4242] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4242 http://gar.svn.sourceforge.net/gar/?rev=4242&view=rev Author: valholla Date: 2009-04-09 04:44:37 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Update to gar v2 and sudo 1.7 Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.depend csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype csw/mgar/pkg/sudo/trunk/files/CSWsudo.space Property Changed: ---------------- csw/mgar/pkg/sudo/trunk/ Property changes on: csw/mgar/pkg/sudo/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,5 +1,5 @@ GARNAME = sudo -GARVERSION = 1.6.9p8 +GARVERSION = 1.7.0 CATEGORIES = utils DESCRIPTION = Provides limited super user privileges @@ -12,30 +12,45 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PATCHFILES = install.diff -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of new +# upstream software release UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz -DISTFILES += CSWsudo.gspec CSWsudo.postinstall -DISTFILES += CSWsudo.prototype CSWsudo.depend -DISTFILES += CSWsudo.space CSWsudo.postremove +PACKAGES = CSWsudo CSWsudo-common -DISTFILES += CSWsudo-common.gspec CSWsudo-common.postinstall -DISTFILES += CSWsudo-common.prototype CSWsudo-common.depend -DISTFILES += CSWsudo-common.space +CATALOGNAME_CSWsudo = sudo +SPKG_DESC_CSWsudo = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudo = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudo = CSWsudo-ldap +REQUIRED_PKGS_CSWsudo = CSWsudo-common CSWggettextrt -# Original maintainer's patch to disable strip on install -PATCHFILES = install.diff +CATALOGNAME_CSWsudo-common = sudo_common +SPKG_DESC_CSWsudo-common = Common files for sudo +SPKG_SOURCEURL_CSWsudo-common = http://www.sudo.ws +REQUIRED_PKGS_CSWsudo-common = CSWggettextrt +DISTFILES += CSWsudo-common.postinstall + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam +CONFIGURE_ARGS += --with-logging=both +CONFIGURE_ARGS += --with-ignore-dot +CONFIGURE_ARGS += --with-env-editor TEST_TARGET = check FIXCONFIG_DIRS = $(DESTDIR)$(libexecdir) include gar/category.mk -post-install: +PKGFILES_CSWsudo = .*/bin/.* + +post-install-modulated: @( cd $(DESTDIR)$(sysconfdir) ; mv sudoers sudoers.CSW ) + @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) + @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.minimal ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudo ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudoedit ) @$(MAKECOOKIE) $(DONADA) Modified: csw/mgar/pkg/sudo/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo/trunk/checksums 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/checksums 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,13 +1,5 @@ -67a7f95664e9f3926dc3e36d8684f921 download/sudo-1.6.9p8.tar.gz -58d79819635f48eccc23c49028d01b55 download/CSWsudo.gspec +5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz 2264728d06b220edf5e47eb9da2b7e66 download/CSWsudo.postinstall -9fbef4bcd879914c4ebc7d8d1ca2a92a download/CSWsudo.prototype -82a6efe0a5c261689546cebfff198b0a download/CSWsudo.depend -44fabb4ce87e861516533d80274a52c0 download/CSWsudo.space e9bd76af1d6c4110121d6d784c910b3d download/CSWsudo.postremove -d009538c73a79d95974996ba3096194b download/CSWsudo-common.gspec 955d99eda1432c7b7e00d98b91e35a79 download/CSWsudo-common.postinstall -9203dbbf5dc2c1741fcea6b86895bd6a download/CSWsudo-common.prototype -d41d8cd98f00b204e9800998ecf8427e download/CSWsudo-common.depend -44fabb4ce87e861516533d80274a52c0 download/CSWsudo-common.space 157b2e5e38ca54eb36e0364706bd0292 download/install.diff Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.gspec 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,5 +0,0 @@ -%var bitname sudo_common -%var pkgname CSWsudo-common -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%var desc sudo common files -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.prototype 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,13 +0,0 @@ -d none /opt/csw/sbin 0755 root bin -f none /opt/csw/sbin/visudo 0111 root root -f none /opt/csw/etc/sudoers.CSW 0440 root root -d none /opt/csw/share 0755 root bin -d none /opt/csw/share/man 0755 root bin -d none /opt/csw/share/man/man1m 0755 root bin -f none /opt/csw/share/man/man1m/sudo.1m 0644 root root -l none /opt/csw/share/man/man1m/sudoedit.1m=/opt/csw/share/man/man1m/sudo.1m -f none /opt/csw/share/man/man1m/visudo.1m 0644 root root -d none /opt/csw/share/man/man4 0755 root bin -f none /opt/csw/share/man/man4/sudoers.4 0644 root root -f none /opt/csw/libexec/sudo_noexec.so 0755 root root -f none /opt/csw/libexec/sudo_noexec.la 0644 root root Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo-common.space 2009-04-09 04:44:37 UTC (rev 4242) @@ -1 +0,0 @@ -$BASEDIR 1 1 Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.depend 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,2 +0,0 @@ -I CSWsudo-minimal sudo_minimal -P CSWsudo-common sudo_common - sudo common files Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.gspec 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,4 +0,0 @@ -%var bitname sudo -%var pkgname CSWsudo -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,12 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -# Set up links -cd $BINDIR -rm -f sudo sudoedit -ln -f sudo.minimal sudo -ln -f sudo.minimal sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,15 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit - -OTHERSUDO=`ls -1 sudo.* 2>/dev/null | head -1` -if [ -n "$OTHERSUDO" ]; then - ln -f $OTHERSUDO sudo - ln -f $OTHERSUDO sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.prototype 2009-04-09 04:44:37 UTC (rev 4242) @@ -1,2 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sudo.minimal=/opt/csw/bin/sudo 4111 root root Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.space =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.space 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.space 2009-04-09 04:44:37 UTC (rev 4242) @@ -1 +0,0 @@ -$BASEDIR 1 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Thu Apr 9 10:19:51 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Thu, 09 Apr 2009 08:19:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4243] csw/mgar/pkg/htmldoc/trunk/Makefile Message-ID: Revision: 4243 http://gar.svn.sourceforge.net/gar/?rev=4243&view=rev Author: hson Date: 2009-04-09 08:19:51 +0000 (Thu, 09 Apr 2009) Log Message: ----------- htmldoc: Enable check again Modified Paths: -------------- csw/mgar/pkg/htmldoc/trunk/Makefile Modified: csw/mgar/pkg/htmldoc/trunk/Makefile =================================================================== --- csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-09 04:44:37 UTC (rev 4242) +++ csw/mgar/pkg/htmldoc/trunk/Makefile 2009-04-09 08:19:51 UTC (rev 4243) @@ -46,5 +46,5 @@ TEST_SCRIPTS = # Disable check until package is released -ENABLE_CHECK = 0 +#ENABLE_CHECK = 0 include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 10:57:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 08:57:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4244] csw/mgar/gar/v2/gar.pkg.mk Message-ID: Revision: 4244 http://gar.svn.sourceforge.net/gar/?rev=4244&view=rev Author: dmichelsen Date: 2009-04-09 08:57:06 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Take out legacy feature inherited from Garnome Modified Paths: -------------- csw/mgar/gar/v2/gar.pkg.mk Modified: csw/mgar/gar/v2/gar.pkg.mk =================================================================== --- csw/mgar/gar/v2/gar.pkg.mk 2009-04-09 08:19:51 UTC (rev 4243) +++ csw/mgar/gar/v2/gar.pkg.mk 2009-04-09 08:57:06 UTC (rev 4244) @@ -127,9 +127,6 @@ SPKG_REVSTAMP ?= ,REV=$(shell date '+%Y.%m.%d') endif -# Is this a full or incremental build? -SPKG_INCREMENTAL ?= 1 - # Where we find our mkpackage global templates PKGLIB = $(CURDIR)/$(GARDIR)/pkglib This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 9 11:06:41 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 09 Apr 2009 09:06:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4245] csw/mgar/pkg/pkgutil/trunk Message-ID: Revision: 4245 http://gar.svn.sourceforge.net/gar/?rev=4245&view=rev Author: bonivart Date: 2009-04-09 09:06:41 +0000 (Thu, 09 Apr 2009) Log Message: ----------- pkgutil: rename LICENSE to license Modified Paths: -------------- csw/mgar/pkg/pkgutil/trunk/Makefile csw/mgar/pkg/pkgutil/trunk/checksums csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype Modified: csw/mgar/pkg/pkgutil/trunk/Makefile =================================================================== --- csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/Makefile 2009-04-09 09:06:41 UTC (rev 4245) @@ -45,7 +45,7 @@ @cp $(WORKSRC)/bldcat $(DESTDIR)$(bindir) @cp $(WORKSRC)/chkcat $(DESTDIR)$(bindir) @cp $(WORKSRC)/readme $(DESTDIR)$(docdir)/$(GARNAME)/ - @cp $(WORKSRC)/LICENSE $(DESTDIR)$(docdir)/$(GARNAME)/ + @cp $(WORKSRC)/license $(DESTDIR)$(docdir)/$(GARNAME)/ # @cp $(FILEDIR)/CSWpkgutil.i.cswpkgutil $(DESTDIR)/usr/sadm/install/scripts/i.cswpkgutil # @cp $(FILEDIR)/CSWpkgutil.r.cswpkgutil $(DESTDIR)/usr/sadm/install/scripts/r.cswpkgutil @cp $(WORKSRC)/admin $(DESTDIR)/var/opt/csw/$(GARNAME)/admin.CSW Modified: csw/mgar/pkg/pkgutil/trunk/checksums =================================================================== --- csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/checksums 2009-04-09 09:06:41 UTC (rev 4245) @@ -1,5 +1,5 @@ -97349a661c6f779e33621b73b738925e download/pkgutil-1.5.zip -805cd30ad9f21cb1167d166fa99b5891 download/CSWpkgutil.gspec -54bd1af1cd6ca5ac7e63586ffc16842d download/CSWpkgutil.prototype +f9fdd7e5a2bf82ebabe1db387ef163a1 download/pkgutil-1.5.zip +a16c6f81bc537d6172fd65d8da1aeecc download/CSWpkgutil.gspec +bbfa438bcc97cd709f8d1b6716485925 download/CSWpkgutil.prototype e1407c24d47306dbc4cea22dcb291f1d download/CSWpkgutil.postinstall 2fb6c94a2d212f08b71d462082a2d31a download/CSWpkgutil.preremove Modified: csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec =================================================================== --- csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.gspec 2009-04-09 09:06:41 UTC (rev 4245) @@ -6,5 +6,5 @@ %prototype url file://%{FILEDIR}/CSWpkgutil.prototype %copyright -Please see /opt/csw/share/doc/pkgutil/LICENSE for license information. +Please see /opt/csw/share/doc/pkgutil/license for license information. Modified: csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype =================================================================== --- csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype 2009-04-09 08:57:06 UTC (rev 4244) +++ csw/mgar/pkg/pkgutil/trunk/files/CSWpkgutil.prototype 2009-04-09 09:06:41 UTC (rev 4245) @@ -17,7 +17,7 @@ d none /opt/csw/share 0755 root bin d none /opt/csw/share/doc 0755 root bin d none /opt/csw/share/doc/pkgutil 0755 root bin -f none /opt/csw/share/doc/pkgutil/LICENSE 644 root bin +f none /opt/csw/share/doc/pkgutil/license 644 root bin f none /opt/csw/share/doc/pkgutil/readme 644 root bin d none /opt/csw/share/man 0755 root bin d none /opt/csw/share/man/man1 0755 root bin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Thu Apr 9 12:03:46 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Thu, 09 Apr 2009 10:03:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4246] csw/mgar/pkg/xterm/trunk Message-ID: Revision: 4246 http://gar.svn.sourceforge.net/gar/?rev=4246&view=rev Author: skayser Date: 2009-04-09 10:03:42 +0000 (Thu, 09 Apr 2009) Log Message: ----------- xterm: enable build against freetype2, added program suffix (86) Modified Paths: -------------- csw/mgar/pkg/xterm/trunk/Makefile csw/mgar/pkg/xterm/trunk/files/README.CSW Modified: csw/mgar/pkg/xterm/trunk/Makefile =================================================================== --- csw/mgar/pkg/xterm/trunk/Makefile 2009-04-09 09:06:41 UTC (rev 4245) +++ csw/mgar/pkg/xterm/trunk/Makefile 2009-04-09 10:03:42 UTC (rev 4246) @@ -39,6 +39,8 @@ CONFIGURE_ARGS += --enable-sun-fkeys CONFIGURE_ARGS += --enable-warnings CONFIGURE_ARGS += --enable-wide-chars +CONFIGURE_ARGS += --program-suffix=86 --with-xterm-symlink +CONFIGURE_ARGS += --with-freetype-cflags="-I$(includedir)/freetype2" # luit comes with snv_85 # http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6662431 @@ -48,8 +50,6 @@ CONFIGURE_ARGS += $(CONFIGURE_ARGS_$(GARFLAVOR)) CONFIGURE_ARGS_DBG = --enable-trace --enable-warnings -EXTRA_INC = $(includedir)/freetype2 - include gar/category.mk # Hack for now to address the double /opt/csw/lib in $R*PATH. One comes Modified: csw/mgar/pkg/xterm/trunk/files/README.CSW =================================================================== --- csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-09 09:06:41 UTC (rev 4245) +++ csw/mgar/pkg/xterm/trunk/files/README.CSW 2009-04-09 10:03:42 UTC (rev 4246) @@ -8,18 +8,21 @@ color support in some ncurses-based applications. To make full use of the capabilities of this xterm (including color-support) -set TERM=xterm-new. +set TERM=xterm-new. You might then however experience problems when +SSH'ing to machines where xterm-new isn't known to terminfo ("terminal not +fully functional" messages). That's the main reason TERM=xterm-new hasn't +been compiled in as a default by the way. -Note: app-defaults in /opt/csw/lib/X11/app-defaults ---------------------------------------------------- +Note: X resource files in /opt/csw/lib/X11/app-defaults +------------------------------------------------------- -Although this package delivers some x resource files in +Although this package delivers some X resource files in /opt/csw/lib/X11/app-defaults/ this folder is not evaluated by the Solaris libXt per default. Either treat them as example files and copy and paste what you need into -your system / personal x resource files or set XFILESEARCHPATH / +your system / personal X resource files or set XFILESEARCHPATH / XUSERFILESEARCHPATH to honor this directory. http://www.faqs.org/faqs/x-faq/part2/section-22.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Thu Apr 9 12:05:14 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Thu, 09 Apr 2009 10:05:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4247] csw/mgar/pkg/mcabber/trunk/Makefile Message-ID: Revision: 4247 http://gar.svn.sourceforge.net/gar/?rev=4247&view=rev Author: skayser Date: 2009-04-09 10:05:14 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mcabber: adjusted DESCRIPTION Modified Paths: -------------- csw/mgar/pkg/mcabber/trunk/Makefile Modified: csw/mgar/pkg/mcabber/trunk/Makefile =================================================================== --- csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-09 10:03:42 UTC (rev 4246) +++ csw/mgar/pkg/mcabber/trunk/Makefile 2009-04-09 10:05:14 UTC (rev 4247) @@ -2,7 +2,7 @@ GARVERSION = 0.9.9 CATEGORIES = utils -DESCRIPTION = A small Jabber console client +DESCRIPTION = A small terminal-based Jabber client define BLURB mcabber is a small Jabber console client. mcabber includes features such as SSL support, MUC (Multi-User Chat) support, history logging, command This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 13:12:41 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 11:12:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4248] csw/mgar/pkg/maven2/trunk Message-ID: Revision: 4248 http://gar.svn.sourceforge.net/gar/?rev=4248&view=rev Author: trygvis Date: 2009-04-09 11:12:41 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Upgrading to Maven 2.0.10. Modified Paths: -------------- csw/mgar/pkg/maven2/trunk/Makefile csw/mgar/pkg/maven2/trunk/checksums Modified: csw/mgar/pkg/maven2/trunk/Makefile =================================================================== --- csw/mgar/pkg/maven2/trunk/Makefile 2009-04-09 10:05:14 UTC (rev 4247) +++ csw/mgar/pkg/maven2/trunk/Makefile 2009-04-09 11:12:41 UTC (rev 4248) @@ -1,5 +1,5 @@ GARNAME = maven2 -GARVERSION = 2.0.9 +GARVERSION = 2.0.10 CATEGORIES = devel GARCH = all Modified: csw/mgar/pkg/maven2/trunk/checksums =================================================================== --- csw/mgar/pkg/maven2/trunk/checksums 2009-04-09 10:05:14 UTC (rev 4247) +++ csw/mgar/pkg/maven2/trunk/checksums 2009-04-09 11:12:41 UTC (rev 4248) @@ -1,3 +1,3 @@ -6d842f7cb9696676982096c72d063133 download/apache-maven-2.0.9-bin.tar.gz +1673c4b206633155774ecbcab1c2fb2e download/apache-maven-2.0.10-bin.tar.gz 8c87a565ba53d763dbf82a2f27f1cff0 download/CSWmaven2.gspec f935bf12216ef6533ca53879a456ebeb download/bin-mvn This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 14:35:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 12:35:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4249] csw/mgar/pkg Message-ID: Revision: 4249 http://gar.svn.sourceforge.net/gar/?rev=4249&view=rev Author: dmichelsen Date: 2009-04-09 12:35:00 +0000 (Thu, 09 Apr 2009) Log Message: ----------- vncserver: Initial commit, unfinished Added Paths: ----------- csw/mgar/pkg/vncserver/ csw/mgar/pkg/vncserver/branches/ csw/mgar/pkg/vncserver/tags/ csw/mgar/pkg/vncserver/trunk/ csw/mgar/pkg/vncserver/trunk/Makefile csw/mgar/pkg/vncserver/trunk/checksums csw/mgar/pkg/vncserver/trunk/files/ csw/mgar/pkg/vncserver/trunk/files/vncservers Property changes on: csw/mgar/pkg/vncserver/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/vncserver/trunk/Makefile =================================================================== --- csw/mgar/pkg/vncserver/trunk/Makefile (rev 0) +++ csw/mgar/pkg/vncserver/trunk/Makefile 2009-04-09 12:35:00 UTC (rev 4249) @@ -0,0 +1,132 @@ +GARNAME = tightvnc +GARVERSION = 1.3.10 +CATEGORIES = utils + +DESCRIPTION = TightVNC server is a free remote control package derived from the popular VNC software +define BLURB +endef + +SF_PROJ = vnc-tight +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION)_unixsrc.tar.bz2 +DISTFILES += vncservers + +PACKAGES = CSWvncs +CATALOGNAME = vncserver + +SPKG_SOURCEURL = http://www.tightvnc.org/ + +REQUIRED_PKGS = CSWjpeg CSWtcpwrap + +# We define upstream file regex so we can be notifed of new upstream software release +UPSTREAM_USE_SF = 1 +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=14067 +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*)_unixsrc.tar.bz2 + +DISTNAME = vnc_unixsrc + +# Use tightvnc.spec + +EXTRA_DEFINES = -DUSE_LIBWRAP=1 +EXTRA_INCLUDE = $(CFLAGS) +LOCAL_LDFLAGS = $(LINKER_FLAGS) +BUILD_OVERRIDE_DIRS = EXTRA_DEFINES EXTRA_INCLUDE LOCAL_LDFLAGS + +CONFIGURE_SCRIPTS = $(WORKSRC)/Imakefile Xvnc +CONFIGURE_ARGS = -a + +BUILD_SCRIPTS = vnc Xvnc + +# VNC doesn't come with tests +TEST_SCRIPTS = + +INSTALL_SCRIPTS = vnc + +include gar/category.mk + +pre-configure-modulated: + perl -pi -e "s|/usr/local/vnc/classes|$(datadir)/vnc/classes|" $(WORKSRC)/vncserver + $(MAKECOOKIE) + +configure-Xvnc: + banner "Config Xvnc" + perl -pi -e "s|^(\s*make)\s*$$|\1 CC=$(CC)|" $(WORKSRC)/Xvnc/configure + cd $(WORKSRC)/Xvnc && ./configure + $(MAKECOOKIE) + +build-vnc: + banner "Build VNC" + #$(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $* $(BUILD_ARGS) + cd $(WORKSRC) && $(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") World + $(MAKECOOKIE) + +build-Xvnc: configure-Xvnc + banner "Build Xvnc" + cd $(WORKSRC)/Xvnc && $(MAKE) EXTRA_LIBRARIES="-lwrap" EXTRA_DEFINES="-DUSE_LIBWRAP=1" + +#xmkmf -a +#make CDEBUGFLAGS="$RPM_OPT_FLAGS" World +#cd Xvnc +#./configure +#make EXTRA_LIBRARIES="-lwrap -lnss_nis" CDEBUGFLAGS="$RPM_OPT_FLAGS" \ +# EXTRA_DEFINES="-DUSE_LIBWRAP=1" + +install-vnc: + ginstall -d $(DESTDIR)$(bindir) + ginstall -d $(DESTDIR)$(mandir)/man1 + (cd $(WORKSRC); ./vncinstall $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)) + ginstall -d $(DESTDIR)$(datadir)/vnc + (cd $(WORKSRC); cp -pR classes $(DESTDIR)$(datadir)/vnc) + #mkdir -p %{buildroot}/etc/rc.d/init.d + #install -m755 vncserver.init %{buildroot}/etc/rc.d/init.d/vncserver + ginstall -m 644 $(WORKDIR)/vncservers $(DESTDIR)$(sysconfdir)/vncservers + + + +# Build + +#patch < vnc-xclients.patch + +#xmkmf -a +#make CDEBUGFLAGS="$RPM_OPT_FLAGS" World +#cd Xvnc +#./configure +#make EXTRA_LIBRARIES="-lwrap -lnss_nis" CDEBUGFLAGS="$RPM_OPT_FLAGS" \ +# EXTRA_DEFINES="-DUSE_LIBWRAP=1" + + + + +# Install + +#rm -rf %{buildroot} + +#mkdir -p %{buildroot}%{_bindir} +#mkdir -p %{buildroot}%{_mandir}/man1 +#./vncinstall %{buildroot}%{_bindir} %{buildroot}%{_mandir} + +#mkdir -p %{buildroot}%{_datadir}/vnc +#cp -aR classes %{buildroot}%{_datadir}/vnc + +#strip %{buildroot}%{_bindir}/* || : + +#mkdir -p %{buildroot}/etc/rc.d/init.d +#install -m755 vncserver.init %{buildroot}/etc/rc.d/init.d/vncserver +# +#mkdir -p %{buildroot}/etc/sysconfig +#cat > %{buildroot}/etc/sysconfig/vncservers << EOF +# The VNCSERVERS variable is a list of display:user pairs. +# +# Uncomment the line below to start a VNC server on display :1 +# as my 'myusername' (adjust this to your own). You will also +# need to set a VNC password; run 'man vncpasswd' to see how +# to do that. +# +# DO NOT RUN THIS SERVICE if your local area network is +# untrusted! For a secure way of using VNC, see +# . + +# VNCSERVERS="1:myusername" +#EOF +#chmod 644 %{buildroot}/etc/sysconfig/vncservers + Added: csw/mgar/pkg/vncserver/trunk/checksums =================================================================== --- csw/mgar/pkg/vncserver/trunk/checksums (rev 0) +++ csw/mgar/pkg/vncserver/trunk/checksums 2009-04-09 12:35:00 UTC (rev 4249) @@ -0,0 +1,2 @@ +397b35faad32d5246b6d44b142f8304f download/tightvnc-1.3.10_unixsrc.tar.bz2 +56c09be17c17184e96193c13246fd649 download/vncservers Added: csw/mgar/pkg/vncserver/trunk/files/vncservers =================================================================== --- csw/mgar/pkg/vncserver/trunk/files/vncservers (rev 0) +++ csw/mgar/pkg/vncserver/trunk/files/vncservers 2009-04-09 12:35:00 UTC (rev 4249) @@ -0,0 +1,12 @@ +# The VNCSERVERS variable is a list of display:user pairs. + +# Uncomment the line below to start a VNC server on display :1 +# as my 'myusername' (adjust this to your own). You will also +# need to set a VNC password; run 'man vncpasswd' to see how +# to do that. + +# DO NOT RUN THIS SERVICE if your local area network is +# untrusted! For a secure way of using VNC, see +# . + +# VNCSERVERS="1:myusername" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 14:36:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 12:36:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4250] csw/mgar/gar/v2/gar.mk Message-ID: Revision: 4250 http://gar.svn.sourceforge.net/gar/?rev=4250&view=rev Author: dmichelsen Date: 2009-04-09 12:36:04 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Avoid double-inclusion of patches appearing on more than one modulation Modified Paths: -------------- csw/mgar/gar/v2/gar.mk Modified: csw/mgar/gar/v2/gar.mk =================================================================== --- csw/mgar/gar/v2/gar.mk 2009-04-09 12:35:00 UTC (rev 4249) +++ csw/mgar/gar/v2/gar.mk 2009-04-09 12:36:04 UTC (rev 4250) @@ -49,7 +49,7 @@ ALLFILES_PATCHFILES ?= $(PATCHFILES) $(foreach M,$(MODULATIONS),$(PATCHFILES_$M)) ALLFILES_DYNSCRIPTS ?= $(DYNSCRIPTS) ALLFILES_GIT_REPOS ?= $(foreach R,$(GIT_REPOS),$(call GITPROJ,$(R))) -ALLFILES ?= $(ALLFILES_DISTFILES) $(ALLFILES_PATCHFILES) $(ALLFILES_DYNSCRIPTS) $(ALLFILES_GIT_REPOS) +ALLFILES ?= $(sort $(ALLFILES_DISTFILES) $(ALLFILES_PATCHFILES) $(ALLFILES_DYNSCRIPTS) $(ALLFILES_GIT_REPOS) $(EXTRA_ALLFILES)) ifeq ($(MAKE_INSTALL_DIRS),1) INSTALL_DIRS = $(addprefix $(DESTDIR),$(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(libdir) $(infodir) $(lispdir) $(includedir) $(mandir) $(foreach NUM,1 2 3 4 5 6 7 8, $(mandir)/man$(NUM)) $(sourcedir)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 14:53:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 12:53:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4251] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4251 http://gar.svn.sourceforge.net/gar/?rev=4251&view=rev Author: dmichelsen Date: 2009-04-09 12:53:21 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Extend path to include imake-related things Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-09 12:36:04 UTC (rev 4250) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-09 12:53:21 UTC (rev 4251) @@ -489,7 +489,8 @@ # 1. Make sure everything works fine for SOS12 # 2. Allow us to use programs we just built. This is a bit complicated, # but we want PATH to be a recursive variable, or 'gmake isaenv' won't work -PATH = $(if $(filter SOS12,$(GARCOMPILER)),$(abspath $(GARBIN)/sos12-wrappers):)$(if $(IGNORE_DESTDIR),,$(abspath $(DESTDIR)$(binpath_install)/$(MM_BINDIR)):$(DESTDIR)$(binpath_install):$(abspath $(DESTDIR)$(sbinpath_install)/$(MM_BINDIR)):$(DESTDIR)$(sbinpath_install):)$(abspath $(binpath_install)/$(MM_BINDIR)):$(binpath_install):$(abspath $(sbinpath_install)/$(MM_BINDIR)):$(sbinpath_install):$(CC_HOME)/bin:$(abspath $(GARBIN)):/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin +# /usr/openwin/bin is needed for xmkmf used in gar.lib.mk +PATH = $(if $(filter SOS12,$(GARCOMPILER)),$(abspath $(GARBIN)/sos12-wrappers):)$(if $(IGNORE_DESTDIR),,$(abspath $(DESTDIR)$(binpath_install)/$(MM_BINDIR)):$(DESTDIR)$(binpath_install):$(abspath $(DESTDIR)$(sbinpath_install)/$(MM_BINDIR)):$(DESTDIR)$(sbinpath_install):)$(abspath $(binpath_install)/$(MM_BINDIR)):$(binpath_install):$(abspath $(sbinpath_install)/$(MM_BINDIR)):$(sbinpath_install):$(CC_HOME)/bin:$(abspath $(GARBIN)):/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin # This is for foo-config chaos PKG_CONFIG_DIRS ?= $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 15:13:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 13:13:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4252] csw/mgar/pkg/top/trunk/Makefile Message-ID: Revision: 4252 http://gar.svn.sourceforge.net/gar/?rev=4252&view=rev Author: dmichelsen Date: 2009-04-09 13:13:26 +0000 (Thu, 09 Apr 2009) Log Message: ----------- top: Don't include superflous runtime linker path Modified Paths: -------------- csw/mgar/pkg/top/trunk/Makefile Modified: csw/mgar/pkg/top/trunk/Makefile =================================================================== --- csw/mgar/pkg/top/trunk/Makefile 2009-04-09 12:53:21 UTC (rev 4251) +++ csw/mgar/pkg/top/trunk/Makefile 2009-04-09 13:13:26 UTC (rev 4252) @@ -19,6 +19,9 @@ BUILD64 = 1 +# No runtime linker path as we don't reference any libs from /opt/csw +RUNPATH_LINKER_FLAGS = + # autoconf tries to compile for the current kernel. Get rid of # these extra flags as we set them ourselves with BUILD64 = 1 BUILD_OVERRIDE_DIRS = ARCHFLAG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 15:40:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 13:40:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4253] csw/mgar/pkg/flac/trunk Message-ID: Revision: 4253 http://gar.svn.sourceforge.net/gar/?rev=4253&view=rev Author: dmichelsen Date: 2009-04-09 13:40:35 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: UModulate over 1.1.4 and 1.2.1 Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile csw/mgar/pkg/flac/trunk/checksums csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch Added Paths: ----------- csw/mgar/pkg/flac/trunk/bin/ csw/mgar/pkg/flac/trunk/bin/CC csw/mgar/pkg/flac/trunk/bin/cc Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 13:13:26 UTC (rev 4252) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 13:40:35 UTC (rev 4253) @@ -1,7 +1,17 @@ -GARNAME = flac +GARNAME = libflac GARVERSION = 1.2.1 CATEGORIES = lib +EXTRA_MODULATORS = GARVERSION +MODULATIONS_GARVERSION = 1.1.4 1.2.1 + +MODULATIONS = isa-sparcv8-garversion-1.1.4 +# There was no 64 bit legacy version. Do not provide it as new binaries should +# link against the new version. +#MODULATIONS += isa-sparcv9-garversion-1.1.4 +MODULATIONS += isa-sparcv8-garversion-1.2.1 +MODULATIONS += isa-sparcv9-garversion-1.2.1 + DESCRIPTION = Free lossless audio codec define BLURB FLAC stands for Free Lossless Audio Codec, an audio format similar @@ -15,13 +25,24 @@ SF_PROJ = flac MASTER_SITES = $(SF_MIRRORS) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTNAME = $(SF_PROJ)-$(GARVERSION) +DISTFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION),$(SF_PROJ)-$(VERSION).tar.gz) -PATCHFILES = no-stdint.patch -PATCHFILES += libtool-64bit.patch +PATCHFILES_isa-sparcv8-garversion-1.1.4 = libtool-64bit.patch +PATCHFILES_isa-sparcv9-garversion-1.1.4 = libtool-64bit.patch +PATCHFILES_isa-sparcv8-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PATCHFILES_isa-sparcv9-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PACKAGES = CSWflac CSWxmmsflac CATALOGNAME = libflac +CATALOGNAME = xmms_flac +REQUIRED_PKGS_CSWflac = CSWiconv CSWlibogg +REQUIRED_PKGS_CSWxmmsflac = CSWglib CSWgtk CSWxmms CSWflac + +SPKG_DESC_CSWflac = Free lossless audio codec +SPKG_DESC_CSWxmmsflac = FLAC plugin for XMMS + LICENSE = $(foreach lic,FDL GPL LGPL Xiph,COPYING.$(lic)) # We define upstream file regex so we can be notifed of new upstream software release @@ -29,14 +50,43 @@ UPSTREAM_USE_SF = 1 UFILES_REGEX = flac-(\d+(?:\.\d+)*)-src -REQUIRED_PKGS = CSWiconv CSWlibogg - BUILD64 = 1 +NODIRPATHS = --includedir +CPPFLAGS = + +# Must be defined and empty or -I$(includedir) is added too early +EXTRA_CFLAGS = -D__inline= +EXTRA_BUILD_EXPORTS = AM_CFLAGS + +EXTRA_CONFIGURE_ARGS_mm-64 = --disable-xmms-plugin CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += $(EXTRA_CONFIGURE_ARGS_mm-$(MEMORYMODEL)) TEST_TARGET = check +MERGE_SCRIPTS_isa-i386-garversion-1.1.4 = copy-only +MERGE_DIRS_isa-i386-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-amd64-garversion-1.1.4 = copy-relocated-only +MERGE_DIRS_isa-amd64-garversion-1.1.4 = $(libdir) + +MERGE_SCRIPTS_isa-i386-garversion-1.2.1 = copy-all +MERGE_SCRIPTS_isa-amd64-garversion-1.2.1 = copy-relocated-only +MERGE_DIRS_isa-amd64-garversion-1.2.1 = $(bindir) $(sbindir) $(libexecdir) $(libdir) + +MERGE_SCRIPTS_isa-sparcv8-garversion-1.1.4 = copy-only +MERGE_DIRS_isa-sparcv8-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-sparcv9-garversion-1.1.4 = copy-relocated-only +MERGE_DIRS_isa-sparcv9-garversion-1.1.4 = $(libdir) + +MERGE_SCRIPTS_isa-sparcv8-garversion-1.2.1 = copy-all +MERGE_SCRIPTS_isa-sparcv9-garversion-1.2.1 = copy-relocated-only +MERGE_DIRS_isa-sparcv9-garversion-1.2.1 = $(bindir) $(sbindir) $(libexecdir) $(libdir) + +PKGFILES_CSWxmmsflac = $(libdir)/xmms/.* + include gar/category.mk -PATH := $(PATH):/usr/ccs/bin +CC := $(abspath ./bin/cc) +CXX := $(abspath ./bin/CC) +PATH := ./bin:$(PATH):/usr/ccs/bin Added: csw/mgar/pkg/flac/trunk/bin/CC =================================================================== --- csw/mgar/pkg/flac/trunk/bin/CC (rev 0) +++ csw/mgar/pkg/flac/trunk/bin/CC 2009-04-09 13:40:35 UTC (rev 4253) @@ -0,0 +1 @@ +link cc \ No newline at end of file Property changes on: csw/mgar/pkg/flac/trunk/bin/CC ___________________________________________________________________ Added: svn:special + * Added: csw/mgar/pkg/flac/trunk/bin/cc =================================================================== --- csw/mgar/pkg/flac/trunk/bin/cc (rev 0) +++ csw/mgar/pkg/flac/trunk/bin/cc 2009-04-09 13:40:35 UTC (rev 4253) @@ -0,0 +1,22 @@ +#!/opt/csw/bin/perl -w + +use strict; + +my @oargs; + +my @includes = grep { /^-I/ } @ARGV; + at includes = ((grep { /^-I[^\/]/ } @includes),(grep { /^-I[\/]/ } @includes)); +my @argswoincludes = grep { !/^-I/ } @ARGV; + +foreach (@ARGV) { + if( /^-I/ ) { + push @oargs, @includes, @argswoincludes; + last; + } + push @oargs, shift @argswoincludes; +} + +my $cc = "/opt/studio/SOS11/SUNWspro/bin/" . ($0 =~ /cc/ ? "cc" : "CC"); + +print "$cc ", join( " ", @oargs ), "\n"; +exec( $cc, @oargs ); Property changes on: csw/mgar/pkg/flac/trunk/bin/cc ___________________________________________________________________ Added: svn:executable + * Modified: csw/mgar/pkg/flac/trunk/checksums =================================================================== --- csw/mgar/pkg/flac/trunk/checksums 2009-04-09 13:13:26 UTC (rev 4252) +++ csw/mgar/pkg/flac/trunk/checksums 2009-04-09 13:40:35 UTC (rev 4253) @@ -1,3 +1,4 @@ +3958cbd5b6ed8c14966792538e44223b download/flac-1.1.4.tar.gz 153c8b15a54da428d1f0fadc756c22c7 download/flac-1.2.1.tar.gz +c9e9052e1d1238a21ac6c4ab263d2b7f download/libtool-64bit.patch e3144fad8810ceaca718adb6f09dc8fa download/no-stdint.patch -099621e0dad419188acd42c588242131 download/libtool-64bit.patch Modified: csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch =================================================================== --- csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch 2009-04-09 13:13:26 UTC (rev 4252) +++ csw/mgar/pkg/flac/trunk/files/libtool-64bit.patch 2009-04-09 13:40:35 UTC (rev 4253) @@ -1,7 +1,7 @@ -diff -Naur db-4.4.20.orig/dist/ltmain.sh db-4.4.20/dist/ltmain.sh ---- dist/ltmain.sh 2005-10-17 16:35:53.000000000 +0200 -+++ dist/ltmain.sh 2008-05-14 08:30:26.766534000 +0200 -@@ -1552,9 +1552,7 @@ +diff -Naur flac-1.1.4.orig/ltmain.sh flac-1.1.4.patched/ltmain.sh +--- flac-1.1.4.orig/ltmain.sh 2005-04-26 20:23:39.000000000 +0200 ++++ flac-1.1.4.patched/ltmain.sh 2009-04-09 13:59:57.521039544 +0200 +@@ -1545,9 +1545,7 @@ esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 15:57:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 13:57:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4254] csw/mgar/pkg/texinfo/trunk/Makefile Message-ID: Revision: 4254 http://gar.svn.sourceforge.net/gar/?rev=4254&view=rev Author: dmichelsen Date: 2009-04-09 13:57:33 +0000 (Thu, 09 Apr 2009) Log Message: ----------- texinfo: Fix runtime linker path from bug #3598 and depend on CSWbash from #3613 Modified Paths: -------------- csw/mgar/pkg/texinfo/trunk/Makefile Modified: csw/mgar/pkg/texinfo/trunk/Makefile =================================================================== --- csw/mgar/pkg/texinfo/trunk/Makefile 2009-04-09 13:40:35 UTC (rev 4253) +++ csw/mgar/pkg/texinfo/trunk/Makefile 2009-04-09 13:57:33 UTC (rev 4254) @@ -19,10 +19,14 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -REQUIRED_PKGS = CSWgsed CSWncurses CSWiconv CSWggettextrt +REQUIRED_PKGS = CSWbash CSWgsed CSWncurses CSWiconv CSWggettextrt CONFIGURE_ARGS = $(DIRPATHS) +# /opt/csw/lib is added automatically during the build and the +# required libraries don't offer optimized versions, hence no $ISALIST. +RUNPATH_LINKER_FLAGS = + TEST_TARGET = check EXTRA_MERGE_EXCLUDE_FILES = $(libdir)/charset.alias @@ -31,6 +35,10 @@ SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(RELEASE) +post-extract-modulated: + perl -pi -e "s(#! /bin/sh)(#!/opt/csw/bin/bash)" $(WORKSRC)/util/texi2dvi + @$(MAKECOOKIE) + post-install-modulated: ginstall -d $(DESTDIR)$(sbindir) ginstall -m 755 $(WORKDIR)/mkdirentries $(DESTDIR)$(sbindir)/mkdirentries This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 16:01:11 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 14:01:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4255] csw/mgar/pkg Message-ID: Revision: 4255 http://gar.svn.sourceforge.net/gar/?rev=4255&view=rev Author: trygvis Date: 2009-04-09 14:01:11 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Initial commit of Kawa. Added Paths: ----------- csw/mgar/pkg/kawa/ csw/mgar/pkg/kawa/Makefile csw/mgar/pkg/kawa/branches/ csw/mgar/pkg/kawa/tags/ csw/mgar/pkg/kawa/trunk/ csw/mgar/pkg/kawa/trunk/Makefile csw/mgar/pkg/kawa/trunk/checksums csw/mgar/pkg/kawa/trunk/files/ csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec Added: csw/mgar/pkg/kawa/Makefile =================================================================== --- csw/mgar/pkg/kawa/Makefile (rev 0) +++ csw/mgar/pkg/kawa/Makefile 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/kawa/trunk ___________________________________________________________________ Added: svn:ignore + Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile (rev 0) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,29 @@ +GARNAME = kawa +GARVERSION = 1.9.1 +CATEGORIES = utils +GARCH = all + +DESCRIPTION = Java implementation of Scheme and a framework for implementing high-level and dynamic languages + +MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa +DISTFILES = apache-maven-$(GARVERSION)-bin.tar.gz +DISTFILES += $(call admfiles,CSWkawa,) + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz + +#CONFIGURE_SCRIPTS = +#BUILD_SCRIPTS = +#TEST_SCRIPTS = +#INSTALL_SCRIPTS = common + +include gar/category.mk + +#install-common: +# mkdir -p $(DESTDIR)/opt/csw/bin +# rm -rf $(DESTDIR)/opt/csw/share/maven2 +# mkdir -p $(DESTDIR)/opt/csw/share/maven2 +# cp -r $(WORKDIR)/apache-maven-$(GARVERSION)/ $(DESTDIR)/opt/csw/share/maven2/home +# cp $(WORKDIR)/bin-mvn $(DESTDIR)/opt/csw/bin/mvn +# chmod +x $(DESTDIR)/opt/csw/bin/mvn +# $(MAKECOOKIE) Added: csw/mgar/pkg/kawa/trunk/checksums =================================================================== --- csw/mgar/pkg/kawa/trunk/checksums (rev 0) +++ csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,3 @@ +6d842f7cb9696676982096c72d063133 download/apache-maven-2.0.9-bin.tar.gz +8c87a565ba53d763dbf82a2f27f1cff0 download/CSWmaven2.gspec +f935bf12216ef6533ca53879a456ebeb download/bin-mvn Added: csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec =================================================================== --- csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec (rev 0) +++ csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec 2009-04-09 14:01:11 UTC (rev 4255) @@ -0,0 +1,6 @@ +%var bitname kawa +%var pkgname CSWkawa +%include url file://%{PKGLIB}/csw_dyndepend.gspec +%copyright + +See /opt/csw/share/kawa/LICENSE.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 16:42:37 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 14:42:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4256] csw/mgar/pkg/kawa/trunk Message-ID: Revision: 4256 http://gar.svn.sourceforge.net/gar/?rev=4256&view=rev Author: trygvis Date: 2009-04-09 14:42:37 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Correcting master site and checksums. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile csw/mgar/pkg/kawa/trunk/checksums Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 14:01:11 UTC (rev 4255) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 14:42:37 UTC (rev 4256) @@ -5,8 +5,8 @@ DESCRIPTION = Java implementation of Scheme and a framework for implementing high-level and dynamic languages -MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa -DISTFILES = apache-maven-$(GARVERSION)-bin.tar.gz +MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWkawa,) # We define upstream file regex so we can be notifed of new upstream software release Modified: csw/mgar/pkg/kawa/trunk/checksums =================================================================== --- csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 14:01:11 UTC (rev 4255) +++ csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 14:42:37 UTC (rev 4256) @@ -1,3 +1,2 @@ -6d842f7cb9696676982096c72d063133 download/apache-maven-2.0.9-bin.tar.gz -8c87a565ba53d763dbf82a2f27f1cff0 download/CSWmaven2.gspec -f935bf12216ef6533ca53879a456ebeb download/bin-mvn +611209ca2f621cee8041321902a0466c download/CSWkawa.gspec +8a1cc2d67127392f6f3f180d53800725 download/kawa-1.9.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 16:48:02 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 14:48:02 +0000 Subject: [csw-devel] SF.net SVN: gar:[4257] csw/mgar/pkg/flac/trunk Message-ID: Revision: 4257 http://gar.svn.sourceforge.net/gar/?rev=4257&view=rev Author: dmichelsen Date: 2009-04-09 14:48:02 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Downgrade to legacy 1.1.2 Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile csw/mgar/pkg/flac/trunk/checksums Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 14:42:37 UTC (rev 4256) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 14:48:02 UTC (rev 4257) @@ -3,12 +3,13 @@ CATEGORIES = lib EXTRA_MODULATORS = GARVERSION -MODULATIONS_GARVERSION = 1.1.4 1.2.1 +# Version 1.1.2 is the last to contain libflac.so.7 where most of the binaries depend on +MODULATIONS_GARVERSION = 1.1.2 1.2.1 -MODULATIONS = isa-sparcv8-garversion-1.1.4 +MODULATIONS = isa-sparcv8-garversion-1.1.2 # There was no 64 bit legacy version. Do not provide it as new binaries should # link against the new version. -#MODULATIONS += isa-sparcv9-garversion-1.1.4 +#MODULATIONS += isa-sparcv9-garversion-1.1.2 MODULATIONS += isa-sparcv8-garversion-1.2.1 MODULATIONS += isa-sparcv9-garversion-1.2.1 @@ -28,8 +29,8 @@ DISTNAME = $(SF_PROJ)-$(GARVERSION) DISTFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION),$(SF_PROJ)-$(VERSION).tar.gz) -PATCHFILES_isa-sparcv8-garversion-1.1.4 = libtool-64bit.patch -PATCHFILES_isa-sparcv9-garversion-1.1.4 = libtool-64bit.patch +PATCHFILES_isa-sparcv8-garversion-1.1.2 = libtool-64bit.patch +PATCHFILES_isa-sparcv9-garversion-1.1.2 = libtool-64bit.patch PATCHFILES_isa-sparcv8-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch PATCHFILES_isa-sparcv9-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch @@ -43,6 +44,8 @@ SPKG_DESC_CSWflac = Free lossless audio codec SPKG_DESC_CSWxmmsflac = FLAC plugin for XMMS +SPKG_SOURCEURL = http://flac.sourceforge.net/ + LICENSE = $(foreach lic,FDL GPL LGPL Xiph,COPYING.$(lic)) # We define upstream file regex so we can be notifed of new upstream software release @@ -65,19 +68,19 @@ TEST_TARGET = check -MERGE_SCRIPTS_isa-i386-garversion-1.1.4 = copy-only -MERGE_DIRS_isa-i386-garversion-1.1.4 = $(libdir) -MERGE_SCRIPTS_isa-amd64-garversion-1.1.4 = copy-relocated-only -MERGE_DIRS_isa-amd64-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-i386-garversion-1.1.2 = copy-only +MERGE_DIRS_isa-i386-garversion-1.1.2 = $(libdir) +MERGE_SCRIPTS_isa-amd64-garversion-1.1.2 = copy-relocated-only +MERGE_DIRS_isa-amd64-garversion-1.1.2 = $(libdir) MERGE_SCRIPTS_isa-i386-garversion-1.2.1 = copy-all MERGE_SCRIPTS_isa-amd64-garversion-1.2.1 = copy-relocated-only MERGE_DIRS_isa-amd64-garversion-1.2.1 = $(bindir) $(sbindir) $(libexecdir) $(libdir) -MERGE_SCRIPTS_isa-sparcv8-garversion-1.1.4 = copy-only -MERGE_DIRS_isa-sparcv8-garversion-1.1.4 = $(libdir) -MERGE_SCRIPTS_isa-sparcv9-garversion-1.1.4 = copy-relocated-only -MERGE_DIRS_isa-sparcv9-garversion-1.1.4 = $(libdir) +MERGE_SCRIPTS_isa-sparcv8-garversion-1.1.2 = copy-only +MERGE_DIRS_isa-sparcv8-garversion-1.1.2 = $(libdir) +MERGE_SCRIPTS_isa-sparcv9-garversion-1.1.2 = copy-relocated-only +MERGE_DIRS_isa-sparcv9-garversion-1.1.2 = $(libdir) MERGE_SCRIPTS_isa-sparcv8-garversion-1.2.1 = copy-all MERGE_SCRIPTS_isa-sparcv9-garversion-1.2.1 = copy-relocated-only @@ -90,3 +93,7 @@ CC := $(abspath ./bin/cc) CXX := $(abspath ./bin/CC) PATH := ./bin:$(PATH):/usr/ccs/bin + +post-patch-isa-sparcv8-garversion-1.1.2: + perl -pi -e "s/-O2 //g" $(WORKSRC)/configure + $(MAKECOOKIE) Modified: csw/mgar/pkg/flac/trunk/checksums =================================================================== --- csw/mgar/pkg/flac/trunk/checksums 2009-04-09 14:42:37 UTC (rev 4256) +++ csw/mgar/pkg/flac/trunk/checksums 2009-04-09 14:48:02 UTC (rev 4257) @@ -1,4 +1,4 @@ -3958cbd5b6ed8c14966792538e44223b download/flac-1.1.4.tar.gz +2bfc127cdda02834d0491ab531a20960 download/flac-1.1.2.tar.gz 153c8b15a54da428d1f0fadc756c22c7 download/flac-1.2.1.tar.gz c9e9052e1d1238a21ac6c4ab263d2b7f download/libtool-64bit.patch e3144fad8810ceaca718adb6f09dc8fa download/no-stdint.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:14:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:14:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4258] csw/mgar/gar/v2/gar.mk Message-ID: Revision: 4258 http://gar.svn.sourceforge.net/gar/?rev=4258&view=rev Author: dmichelsen Date: 2009-04-09 15:14:33 +0000 (Thu, 09 Apr 2009) Log Message: ----------- mGAR v2: Allow skipping of specific modulations Modified Paths: -------------- csw/mgar/gar/v2/gar.mk Modified: csw/mgar/gar/v2/gar.mk =================================================================== --- csw/mgar/gar/v2/gar.mk 2009-04-09 14:48:02 UTC (rev 4257) +++ csw/mgar/gar/v2/gar.mk 2009-04-09 15:14:33 UTC (rev 4258) @@ -121,7 +121,7 @@ ),\ $(call expand_modulator_1,$(1))) -MODULATIONS ?= $(strip $(call modulations,$(strip $(MODULATORS)))) +MODULATIONS ?= $(filter-out $(SKIP_MODULATIONS),$(strip $(call modulations,$(strip $(MODULATORS))))) # _modulate(ISA STATIC,,,) # -> _modulate2(STATIC,isa-i386,ISA,ISA=i386) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 17:16:36 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:16:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4259] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4259 http://gar.svn.sourceforge.net/gar/?rev=4259&view=rev Author: trygvis Date: 2009-04-09 15:16:35 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adjustments. Thanks Ben!. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 15:14:33 UTC (rev 4258) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 15:16:35 UTC (rev 4259) @@ -12,18 +12,13 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz -#CONFIGURE_SCRIPTS = -#BUILD_SCRIPTS = -#TEST_SCRIPTS = -#INSTALL_SCRIPTS = common +CONFIGURE_ARGS = $(DIRPATHS) +TEST_SCRIPTS = include gar/category.mk -#install-common: -# mkdir -p $(DESTDIR)/opt/csw/bin -# rm -rf $(DESTDIR)/opt/csw/share/maven2 -# mkdir -p $(DESTDIR)/opt/csw/share/maven2 -# cp -r $(WORKDIR)/apache-maven-$(GARVERSION)/ $(DESTDIR)/opt/csw/share/maven2/home -# cp $(WORKDIR)/bin-mvn $(DESTDIR)/opt/csw/bin/mvn -# chmod +x $(DESTDIR)/opt/csw/bin/mvn -# $(MAKECOOKIE) +PATH := /usr/jdk1.5.0_15/bin:$(PATH) + +# checkpkg complains unless this file is removed. +post-install: + rm $(DESTDIR)/opt/csw/share/info/dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:17:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:17:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4260] csw/mgar/pkg/flac/trunk/Makefile Message-ID: Revision: 4260 http://gar.svn.sourceforge.net/gar/?rev=4260&view=rev Author: dmichelsen Date: 2009-04-09 15:17:22 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Add modulations for i386 Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:16:35 UTC (rev 4259) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:17:22 UTC (rev 4260) @@ -6,12 +6,10 @@ # Version 1.1.2 is the last to contain libflac.so.7 where most of the binaries depend on MODULATIONS_GARVERSION = 1.1.2 1.2.1 -MODULATIONS = isa-sparcv8-garversion-1.1.2 # There was no 64 bit legacy version. Do not provide it as new binaries should # link against the new version. -#MODULATIONS += isa-sparcv9-garversion-1.1.2 -MODULATIONS += isa-sparcv8-garversion-1.2.1 -MODULATIONS += isa-sparcv9-garversion-1.2.1 +SKIP_MODULATIONS = isa-sparcv9-garversion-1.1.2 +SKIP_MODULATIONS += isa-amd64-garversion-1.1.2 DESCRIPTION = Free lossless audio codec define BLURB @@ -34,6 +32,11 @@ PATCHFILES_isa-sparcv8-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch PATCHFILES_isa-sparcv9-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PATCHFILES_isa-i386-garversion-1.1.2 = libtool-64bit.patch +PATCHFILES_isa-amd64-garversion-1.1.2 = libtool-64bit.patch +PATCHFILES_isa-i386-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch +PATCHFILES_isa-amd64-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch + PACKAGES = CSWflac CSWxmmsflac CATALOGNAME = libflac CATALOGNAME = xmms_flac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 17:19:33 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:19:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4261] csw/mgar/pkg/kawa/trunk/ Message-ID: Revision: 4261 http://gar.svn.sourceforge.net/gar/?rev=4261&view=rev Author: trygvis Date: 2009-04-09 15:19:32 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adding ignores. Property Changed: ---------------- csw/mgar/pkg/kawa/trunk/ Property changes on: csw/mgar/pkg/kawa/trunk ___________________________________________________________________ Modified: svn:ignore - + cookies download work This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:35:25 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:35:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4262] csw/mgar/pkg/flac/trunk/Makefile Message-ID: Revision: 4262 http://gar.svn.sourceforge.net/gar/?rev=4262&view=rev Author: dmichelsen Date: 2009-04-09 15:35:24 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Add patch for i386 modulation Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:19:32 UTC (rev 4261) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:35:24 UTC (rev 4262) @@ -97,6 +97,10 @@ CXX := $(abspath ./bin/CC) PATH := ./bin:$(PATH):/usr/ccs/bin +post-patch-isa-i386-garversion-1.1.2: + perl -pi -e "s/-O2 //g" $(WORKSRC)/configure + $(MAKECOOKIE) + post-patch-isa-sparcv8-garversion-1.1.2: perl -pi -e "s/-O2 //g" $(WORKSRC)/configure $(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 17:51:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 15:51:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4263] csw/mgar/pkg/flac/trunk/Makefile Message-ID: Revision: 4263 http://gar.svn.sourceforge.net/gar/?rev=4263&view=rev Author: dmichelsen Date: 2009-04-09 15:51:19 +0000 (Thu, 09 Apr 2009) Log Message: ----------- flac: Fix catalog name Modified Paths: -------------- csw/mgar/pkg/flac/trunk/Makefile Modified: csw/mgar/pkg/flac/trunk/Makefile =================================================================== --- csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:35:24 UTC (rev 4262) +++ csw/mgar/pkg/flac/trunk/Makefile 2009-04-09 15:51:19 UTC (rev 4263) @@ -38,8 +38,8 @@ PATCHFILES_isa-amd64-garversion-1.2.1 = libtool-64bit.patch no-stdint.patch PACKAGES = CSWflac CSWxmmsflac -CATALOGNAME = libflac -CATALOGNAME = xmms_flac +CATALOGNAME_CSWflac = libflac +CATALOGNAME_CSWxmmsflac = xmms_flac REQUIRED_PKGS_CSWflac = CSWiconv CSWlibogg REQUIRED_PKGS_CSWxmmsflac = CSWglib CSWgtk CSWxmms CSWflac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 22:00:54 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:00:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4264] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4264 http://gar.svn.sourceforge.net/gar/?rev=4264&view=rev Author: trygvis Date: 2009-04-09 20:00:54 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Fixing broken ARCH flag. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 15:51:19 UTC (rev 4263) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:00:54 UTC (rev 4264) @@ -1,7 +1,7 @@ GARNAME = kawa GARVERSION = 1.9.1 CATEGORIES = utils -GARCH = all +ARCHALL = 1 DESCRIPTION = Java implementation of Scheme and a framework for implementing high-level and dynamic languages This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 22:22:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:22:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4265] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4265 http://gar.svn.sourceforge.net/gar/?rev=4265&view=rev Author: dmichelsen Date: 2009-04-09 20:22:59 +0000 (Thu, 09 Apr 2009) Log Message: ----------- kawa: Removed unnecessary removal of info/dir Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:00:54 UTC (rev 4264) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:22:59 UTC (rev 4265) @@ -18,7 +18,3 @@ include gar/category.mk PATH := /usr/jdk1.5.0_15/bin:$(PATH) - -# checkpkg complains unless this file is removed. -post-install: - rm $(DESTDIR)/opt/csw/share/info/dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 9 22:42:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:42:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4266] csw/mgar/pkg/kawa/trunk Message-ID: Revision: 4266 http://gar.svn.sourceforge.net/gar/?rev=4266&view=rev Author: dmichelsen Date: 2009-04-09 20:42:35 +0000 (Thu, 09 Apr 2009) Log Message: ----------- kawa: Switch to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:22:59 UTC (rev 4265) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:42:35 UTC (rev 4266) @@ -7,7 +7,6 @@ MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWkawa,) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz Deleted: csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec =================================================================== --- csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec 2009-04-09 20:22:59 UTC (rev 4265) +++ csw/mgar/pkg/kawa/trunk/files/CSWkawa.gspec 2009-04-09 20:42:35 UTC (rev 4266) @@ -1,6 +0,0 @@ -%var bitname kawa -%var pkgname CSWkawa -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -See /opt/csw/share/kawa/LICENSE.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 22:48:54 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 20:48:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4267] csw/mgar/pkg/kawa/trunk/Makefile Message-ID: Revision: 4267 http://gar.svn.sourceforge.net/gar/?rev=4267&view=rev Author: trygvis Date: 2009-04-09 20:48:54 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adding dependency information. o Enabling the readline wrapper. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:42:35 UTC (rev 4266) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:48:54 UTC (rev 4267) @@ -8,12 +8,22 @@ MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +REQUIRED_PKG = CSWncurses CSWreadline + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz -CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --enable-kawa-frontend TEST_SCRIPTS = include gar/category.mk PATH := /usr/jdk1.5.0_15/bin:$(PATH) + +# When building the 'kawa' binary, this flag is ignore from the ./configure stuff, but LIBS is used. +kawa_LDFLAGS = -L/opt/csw/lib +export kawa_LDFLAGS + +LIBS = -lsocket +export LIBS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 23:27:07 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 21:27:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4268] csw/mgar/pkg/kawa/trunk Message-ID: Revision: 4268 http://gar.svn.sourceforge.net/gar/?rev=4268&view=rev Author: trygvis Date: 2009-04-09 21:27:06 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Removing the native readline wrapper, no good. Adding custom one based on CSWrlwrap. Modified Paths: -------------- csw/mgar/pkg/kawa/trunk/Makefile csw/mgar/pkg/kawa/trunk/checksums Modified: csw/mgar/pkg/kawa/trunk/Makefile =================================================================== --- csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 20:48:54 UTC (rev 4267) +++ csw/mgar/pkg/kawa/trunk/Makefile 2009-04-09 21:27:06 UTC (rev 4268) @@ -7,16 +7,17 @@ MASTER_SITES = ftp://ftp.gnu.org/pub/gnu/kawa/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += bin-kawa -REQUIRED_PKG = CSWncurses CSWreadline +REQUIRED_PKG = CSWrlwrap # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = kawa-(\d+(?:\.\d+)*).tar.gz CONFIGURE_ARGS = $(DIRPATHS) -CONFIGURE_ARGS += --enable-kawa-frontend -TEST_SCRIPTS = +TEST_SCRIPTS = + include gar/category.mk PATH := /usr/jdk1.5.0_15/bin:$(PATH) @@ -27,3 +28,7 @@ LIBS = -lsocket export LIBS + +post-install-modulated: + # Overwrite the default kawa junk + cp $(WORKDIR)/bin-kawa $(DESTDIR)/opt/csw/bin/kawa Modified: csw/mgar/pkg/kawa/trunk/checksums =================================================================== --- csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 20:48:54 UTC (rev 4267) +++ csw/mgar/pkg/kawa/trunk/checksums 2009-04-09 21:27:06 UTC (rev 4268) @@ -1,2 +1,2 @@ -611209ca2f621cee8041321902a0466c download/CSWkawa.gspec +ba051c4dde680a004ea89ed369355d0e download/bin-kawa 8a1cc2d67127392f6f3f180d53800725 download/kawa-1.9.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From trygvis at users.sourceforge.net Thu Apr 9 23:27:41 2009 From: trygvis at users.sourceforge.net (trygvis at users.sourceforge.net) Date: Thu, 09 Apr 2009 21:27:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4269] csw/mgar/pkg/kawa/trunk/files/bin-kawa Message-ID: Revision: 4269 http://gar.svn.sourceforge.net/gar/?rev=4269&view=rev Author: trygvis Date: 2009-04-09 21:27:41 +0000 (Thu, 09 Apr 2009) Log Message: ----------- o Adding missing file from previous commit. Added Paths: ----------- csw/mgar/pkg/kawa/trunk/files/bin-kawa Added: csw/mgar/pkg/kawa/trunk/files/bin-kawa =================================================================== --- csw/mgar/pkg/kawa/trunk/files/bin-kawa (rev 0) +++ csw/mgar/pkg/kawa/trunk/files/bin-kawa 2009-04-09 21:27:41 UTC (rev 4269) @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -z "$JAVA" ] +then + if [ -z "$JAVA_HOME" ] + then + JAVA=/usr/jdk/latest/bin/java + fi +fi + +exec /opt/csw/bin/rlwrap "$JAVA" -classpath /opt/csw/share/java/kawa.jar kawa.repl "$@" Property changes on: csw/mgar/pkg/kawa/trunk/files/bin-kawa ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 10 02:13:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 10 Apr 2009 00:13:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4270] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4270 http://gar.svn.sourceforge.net/gar/?rev=4270&view=rev Author: valholla Date: 2009-04-10 00:13:56 +0000 (Fri, 10 Apr 2009) Log Message: ----------- add binutils as a requirement, this gcc uses /opt/csw/bin/gas Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-09 21:27:41 UTC (rev 4269) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-10 00:13:56 UTC (rev 4270) @@ -64,7 +64,7 @@ REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4ada = CSWgcc4adart $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) CSWbinutils REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4g++rt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert CSWiconv This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Fri Apr 10 04:34:31 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Fri, 10 Apr 2009 02:34:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4271] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4271 http://gar.svn.sourceforge.net/gar/?rev=4271&view=rev Author: bdwalton Date: 2009-04-10 02:34:31 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Bump to 1.74.3. Convert to dynamic gspec. Updated postinstall script. Update makefile patch to reflect the fact that they now ship one (that doesn't do an install). Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch Removed Paths: ------------- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec Modified: csw/mgar/pkg/docbook-style-xsl/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,11 +1,16 @@ GARNAME = docbookxsl -GARVERSION = 1.69.1 -PATCHLEVEL = 5.1 +GARVERSION = 1.74.3 CATEGORIES = xtra # for our (modified from rhel) copied in Makefile. PREREQUISITE_PKGS = CSWgfile CSWbash +PACKAGES = CSWdocbookxsl CSWdocbookxsldoc +ARCHALL = 1 + +CATALOGNAME_CSWdocbookxsl = $(GARNAME) +CATALOGNAME_CSWdocbookxsldoc = $(GARNAME)doc + REQUIRED_PKGS_CSWdocbookxsl = CSWsgmlcommon CSWxmlcommon CSWdocbookdtds REQUIRED_PKGS_CSWdocbookxsl += CSWlibxml2 REQUIRED_PKGS_CSWdocbookxsldoc = CSWdocbookxsl @@ -28,21 +33,18 @@ MASTER_SITES = $(SF_MIRRORS) DISTFILES = docbook-xsl-$(GARVERSION).tar.bz2 DISTFILES += docbook-xsl-doc-$(GARVERSION).tar.bz2 -DISTFILES += $(call admfiles,CSWdocbookxsl,postinstall preremove) -DISTFILES += $(call admfiles,CSWdocbookxsldoc,) +DISTFILES += CSWdocbookxsl.postinstall CSWdocbookxsl.preremove -# These are listed in the same order they'd be applied during the rpm build... -# They don't apply cleanly, otherwise. -PATCHFILES = docbook-xsl-pagesetup.patch docbook-xsl-marginleft.patch -PATCHFILES += docbook-xsl-lists.patch docbook-xsl-sp.patch PATCHFILES += add_makefile.patch CONFIGURE_SCRIPTS = -BUILD_SCRIPTS = +BUILD_SCRIPTS = TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/Makefile.csw + INSTALL_ARGS = DESTDIR=$(DESTDIR) #to make the package extraction happy...(we don't use the - separator) @@ -50,5 +52,7 @@ include gar/category.mk -#override system checkpkg so that docbookxsldoc can depend on docbookxsl -PATH := /home/bwalton:$(PATH) +install-%/Makefile.csw: + @echo " ==> Running make install in $*" + @$(INSTALL_ENV) $(MAKE) -f Makefile.csw DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install + @$(MAKECOOKIE) \ No newline at end of file Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,11 +1,5 @@ -6ebd29a67f2dcc3f2220f475ee6f6552 download/docbook-xsl-1.69.1.tar.bz2 -b3bf09a0b1a368a3490e68ffc695d290 download/docbook-xsl-doc-1.69.1.tar.bz2 -4120f10e50070dd8fc2284d5214bf51d download/CSWdocbookxsl.gspec -e96ac786b8d7b1bd6bc76787c965017a download/CSWdocbookxsl.postinstall +c022eb8e15bf110605a4695235f20075 download/CSWdocbookxsl.postinstall 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove -a0c6ee83fdef595158d9eed95d508d8f download/CSWdocbookxsldoc.gspec -84b37b559cc95c747e39a5a8f79558a3 download/docbook-xsl-pagesetup.patch -1d1ff63f5ebd3527c925f68e55138b6f download/docbook-xsl-marginleft.patch -cec8c281ed1c9be99ad47a74362248d5 download/docbook-xsl-lists.patch -e7bbf777eadbb70aaed073006de0347e download/docbook-xsl-sp.patch -8b8a8d4307fa3f3dcb992ebd16c4fb09 download/add_makefile.patch +9ba4d6409de31404b8022f10630016e0 download/add_makefile.patch +c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 +2a032a95fbf24367d13acc8210f9cd72 download/docbook-xsl-doc-1.74.3.tar.bz2 Deleted: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.gspec 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,5 +0,0 @@ -%var bitname docbookxsl -%var pkgname CSWdocbookxsl -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec - Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-10 02:34:31 UTC (rev 4271) @@ -14,7 +14,7 @@ CATALOG=/opt/csw/etc/xml/catalog #we need a version here, since that will be referenced in URLS being redirected -VERSION=1.69.1 +VERSION=1.74.3 $PREFIX $CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/$VERSION" \ Deleted: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsldoc.gspec 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,6 +0,0 @@ -%var bitname docbookxsldoc -%var pkgname CSWdocbookxsldoc -%var arch all -%var desc Documentation for the Docbook XSL Stylesheets -%include url file://%{PKGLIB}/csw_dyndepend.gspec - Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-10 00:13:56 UTC (rev 4270) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-10 02:34:31 UTC (rev 4271) @@ -1,7 +1,6 @@ ---- /dev/null 2008-12-14 03:06:26.000000000 +0100 -+++ docbook-xsl-1.69.1/Makefile 2008-12-14 04:12:33.444192066 +0100 -@@ -0,0 +1,49 @@ -+ +--- /dev/null 2009-04-10 02:03:32.000000000 +0200 ++++ docbook-xsl-1.74.3/Makefile.csw 2009-04-10 04:25:32.872750482 +0200 +@@ -0,0 +1,46 @@ +DESTDIR ?= ... should be overridden by GAR ... + +SHELL = /opt/csw/bin/bash @@ -29,11 +28,9 @@ + cp htmlhelp/*.xsl $(instdir)/htmlhelp + cp javahelp/*.xsl $(instdir)/javahelp + cp lib/lib.xsl $(instdir)/lib -+ cp template/README $(instdir)/template + cp template/*.xml $(instdir)/template + cp template/*.xsl $(instdir)/template + cp xhtml/*.xsl $(instdir)/xhtml -+ cp manpages/README $(instdir)/manpages + cp manpages/*.xsl $(instdir)/manpages + cp profiling/*.xsl $(instdir)/profiling + @@ -48,6 +45,5 @@ + +install-docs: + gmkdir -p $(docdir) -+ cp BUGS ChangeLog README TODO $(docdir)/ ++ cp AUTHORS BUGS README TODO RELEASE-NOTES* NEWS* $(docdir)/ + cp -R doc $(docdir)/ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Fri Apr 10 12:49:05 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Fri, 10 Apr 2009 10:49:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4272] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4272 http://gar.svn.sourceforge.net/gar/?rev=4272&view=rev Author: chninkel Date: 2009-04-10 10:49:05 +0000 (Fri, 10 Apr 2009) Log Message: ----------- bash: updated to patch level 17 Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/checksums csw/mgar/pkg/bash/trunk/files/changelog.CSW Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 02:34:31 UTC (rev 4271) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 10:49:05 UTC (rev 4272) @@ -1,6 +1,6 @@ GARNAME = bash GARVERSION = 4.0 -PATCHLEVEL = 10 +PATCHLEVEL = 17 CATEGORIES = devel DESCRIPTION = A sh-compatible command language interpreter Modified: csw/mgar/pkg/bash/trunk/checksums =================================================================== --- csw/mgar/pkg/bash/trunk/checksums 2009-04-10 02:34:31 UTC (rev 4271) +++ csw/mgar/pkg/bash/trunk/checksums 2009-04-10 10:49:05 UTC (rev 4272) @@ -4,7 +4,7 @@ bcc9760316385d49ff31c2ed72f4be4a download/CSWbash.postinstall 589297e4f9a43d0c82632e99423db7ef download/CSWbash.postremove 293cc64a948ea3d49010ae6e58122b52 download/CSWbash.depend -a4c85be596685b1d7bdc469d17472f5f download/changelog.CSW +9fbdf25b297945fee52e6f7b7a5c218f download/changelog.CSW bc7f4762443939bd7dccb42370f0d932 download/bash40-001 c2a4a4786a83ed4ec366c6a8924369a2 download/bash40-002 22e8a824eddba21a8fce10d7984c2aba download/bash40-003 @@ -15,4 +15,11 @@ d3eb7b6f00d525e032478c33f51d46a8 download/bash40-008 340601c997ce569532417a7ae92248b8 download/bash40-009 0bd5ab96d514ffb1afbb8c7984b15146 download/bash40-010 +32cb20f339a20e1e9fb37a5d18f18fca download/bash40-011 +33fd9e93d30a17988c19554ef26d56e0 download/bash40-012 +a266b42df5e9ed7e8818a8b00d50e00b download/bash40-013 +86cac78f191a32cd1404f11264eb9b2a download/bash40-014 +bb41963d030bc61a20e8185367b337c5 download/bash40-015 +f75455048a086528971252fd979b8755 download/bash40-016 +34b2cd57271a452f4a26b39d77ff908f download/bash40-017 29607316cff22f7427322d8f190cbadf download/use_system_bashrc_and_logout.patch Modified: csw/mgar/pkg/bash/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 02:34:31 UTC (rev 4271) +++ csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 10:49:05 UTC (rev 4272) @@ -1,3 +1,9 @@ +bash (4.0,REV=2009.04.10) unstable + + * Added bash patches bash40-011 to bash40-017. + + -- Yann Rouillard Fri, 10 Apr 2009 12:06:33 +0200 + bash (4.0,REV=2009.03.21) unstable * Added bash patches bash40-001 to bash40-010. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Fri Apr 10 18:56:53 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Fri, 10 Apr 2009 16:56:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4273] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4273 http://gar.svn.sourceforge.net/gar/?rev=4273&view=rev Author: chninkel Date: 2009-04-10 16:56:53 +0000 (Fri, 10 Apr 2009) Log Message: ----------- bash: added patch level in package version and some reorganisation Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/files/changelog.CSW Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 10:49:05 UTC (rev 4272) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 16:56:53 UTC (rev 4273) @@ -1,6 +1,19 @@ +##################################################################### +# OpenCSW build recipe for bash +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = bash -GARVERSION = 4.0 -PATCHLEVEL = 17 +GARVERSION = 4.0.17 CATEGORIES = devel DESCRIPTION = A sh-compatible command language interpreter @@ -8,23 +21,29 @@ GNU Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incorporates useful features from the Korn and C shells (ksh and csh). Bash is intended to be a conforming implementation of the IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2). endef +BASH_VERSION = $(shell echo $(GARVERSION)c | cut -d. -f1-2) +BASH_PATCHLEVEL = $(shell echo -n $(GARVERSION) | cut -d. -f3) + + +###### Upstream and opencsw files information ####### + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = bash-(\d+\.\d+).tar.gz $(PATCHFILE_PREFIX)-(\d+) # Patches download location -MASTER_SITES = $(GNU_MIRROR)/bash-$(GARVERSION)-patches/ +MASTER_SITES = $(GNU_MIRROR)/bash-$(BASH_VERSION)-patches/ # Main archive location MASTER_SITES += $(GNU_MIRROR) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES = $(GARNAME)-$(BASH_VERSION).tar.gz DISTFILES += $(call admfiles,CSWbash,prototype postinstall postremove depend) DISTFILES += changelog.CSW -PATCHFILE_PREFIX = bash$(subst .,,$(GARVERSION)) +PATCHFILE_PREFIX = bash$(subst .,,$(BASH_VERSION)) PATCHDIRLEVEL = 0 # we generate the list of patches from the PATCHLEVEL PATCHFILES = $(shell LEVEL=1; \ PREFIX_0="00"; \ - while [ $$LEVEL -le $(PATCHLEVEL) ]; do \ + while [ $$LEVEL -le $(BASH_PATCHLEVEL) ]; do \ echo $(PATCHFILE_PREFIX)-$$PREFIX_0$$LEVEL; \ LEVEL=`expr $$LEVEL + 1`; \ if [ $$LEVEL -ge 10 ]; then \ @@ -34,6 +53,9 @@ PATCHFILES += use_system_bashrc_and_logout.patch + +##### Build and installation information ##### + CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/bash/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 10:49:05 UTC (rev 4272) +++ csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 16:56:53 UTC (rev 4273) @@ -1,6 +1,7 @@ -bash (4.0,REV=2009.04.10) unstable +bash (4.0.17,REV=2009.04.10) unstable * Added bash patches bash40-011 to bash40-017. + * Added patch level in package version. -- Yann Rouillard Fri, 10 Apr 2009 12:06:33 +0200 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sat Apr 11 17:35:57 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 11 Apr 2009 15:35:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4274] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4274 http://gar.svn.sourceforge.net/gar/?rev=4274&view=rev Author: chninkel Date: 2009-04-11 15:35:57 +0000 (Sat, 11 Apr 2009) Log Message: ----------- bash: switched to gar v2 Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/checksums csw/mgar/pkg/bash/trunk/files/CSWbash.prototype csw/mgar/pkg/bash/trunk/files/changelog.CSW Removed Paths: ------------- csw/mgar/pkg/bash/trunk/files/CSWbash.depend csw/mgar/pkg/bash/trunk/files/CSWbash.gspec Property Changed: ---------------- csw/mgar/pkg/bash/trunk/ Property changes on: csw/mgar/pkg/bash/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-11 15:35:57 UTC (rev 4274) @@ -24,7 +24,12 @@ BASH_VERSION = $(shell echo $(GARVERSION)c | cut -d. -f1-2) BASH_PATCHLEVEL = $(shell echo -n $(GARVERSION) | cut -d. -f3) +PACKAGES = CSWbash +REQUIRED_PKGS = CSWggettextrt +REQUIRED_PKGS += CSWiconv + + ###### Upstream and opencsw files information ####### # We define upstream file regex so we can be notifed of new upstream software release @@ -34,8 +39,9 @@ MASTER_SITES = $(GNU_MIRROR)/bash-$(BASH_VERSION)-patches/ # Main archive location MASTER_SITES += $(GNU_MIRROR) +DISTNAME = $(GARNAME)-$(BASH_VERSION) DISTFILES = $(GARNAME)-$(BASH_VERSION).tar.gz -DISTFILES += $(call admfiles,CSWbash,prototype postinstall postremove depend) +DISTFILES += CSWbash.prototype CSWbash.postinstall CSWbash.postremove DISTFILES += changelog.CSW PATCHFILE_PREFIX = bash$(subst .,,$(BASH_VERSION)) @@ -68,8 +74,9 @@ touch $(WORKSRC)/config.status -post-install: +post-merge: @( for FILE in README RBASH NEWS NOTES POSIX AUTHORS doc/FAQ doc/INTRO; do \ - ginstall -D $(WORKSRC)/$$FILE $(DESTDIR)$(docdir)/$(GARNAME)/`basename $$FILE`; \ + ginstall -D $(WORKSRC_FIRSTMOD)/$$FILE $(PKGROOT)$(docdir)/$(GARNAME)/`basename $$FILE`; \ done ) + ginstall -D $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW Modified: csw/mgar/pkg/bash/trunk/checksums =================================================================== --- csw/mgar/pkg/bash/trunk/checksums 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/checksums 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,10 +1,7 @@ -a90a1b5a6db4838483f05438e05e8eb9 download/bash-4.0.tar.gz -29e973aa9a6fca0a9e28c905b95609bf download/CSWbash.gspec -5ba80bd9a48fdccfb70739095fb77010 download/CSWbash.prototype bcc9760316385d49ff31c2ed72f4be4a download/CSWbash.postinstall 589297e4f9a43d0c82632e99423db7ef download/CSWbash.postremove -293cc64a948ea3d49010ae6e58122b52 download/CSWbash.depend -9fbdf25b297945fee52e6f7b7a5c218f download/changelog.CSW +949396065ba932e8af683eae510586e9 download/CSWbash.prototype +a90a1b5a6db4838483f05438e05e8eb9 download/bash-4.0.tar.gz bc7f4762443939bd7dccb42370f0d932 download/bash40-001 c2a4a4786a83ed4ec366c6a8924369a2 download/bash40-002 22e8a824eddba21a8fce10d7984c2aba download/bash40-003 @@ -22,4 +19,5 @@ bb41963d030bc61a20e8185367b337c5 download/bash40-015 f75455048a086528971252fd979b8755 download/bash40-016 34b2cd57271a452f4a26b39d77ff908f download/bash40-017 +4e4a9d374ce4291b6ba4974adc086767 download/changelog.CSW 29607316cff22f7427322d8f190cbadf download/use_system_bashrc_and_logout.patch Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.depend =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.depend 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.depend 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,2 +0,0 @@ -P CSWggettextrt ggettextrt - GNU gettext -P CSWiconv libiconv - GNU iconv library Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.gspec =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.gspec 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.gspec 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,4 +0,0 @@ -%var bitname bash -%var pkgname CSWbash -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING Modified: csw/mgar/pkg/bash/trunk/files/CSWbash.prototype =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.prototype 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.prototype 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,7 +1,7 @@ f none /opt/csw/bin/bash 0755 root bin f none /opt/csw/bin/bashbug 0555 root bin d none /opt/csw/share/doc/bash 0755 root bin -f none /opt/csw/share/doc/bash/changelog.CSW=changelog.CSW 0644 root bin +f none /opt/csw/share/doc/bash/changelog.CSW 0644 root bin f none /opt/csw/share/doc/bash/README 0644 root bin f none /opt/csw/share/doc/bash/FAQ 0644 root bin f none /opt/csw/share/doc/bash/RBASH 0644 root bin Modified: csw/mgar/pkg/bash/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-10 16:56:53 UTC (rev 4273) +++ csw/mgar/pkg/bash/trunk/files/changelog.CSW 2009-04-11 15:35:57 UTC (rev 4274) @@ -1,28 +1,28 @@ -bash (4.0.17,REV=2009.04.10) unstable +bash (4.0.17,REV=2009.04.11) unstable * Added bash patches bash40-011 to bash40-017. * Added patch level in package version. - -- Yann Rouillard Fri, 10 Apr 2009 12:06:33 +0200 + -- Yann Rouillard Fri, 11 Apr 2009 12:06:33 +0200 bash (4.0,REV=2009.03.21) unstable * Added bash patches bash40-001 to bash40-010. - -- Yann Rouillard Sat, 21 Mar 2009 12:55:58 +0100 + -- Yann Rouillard Sat, 21 Mar 2009 12:55:58 +0100 bash (4.0,REV=2009.02.21) unstable * New upstream release. - -- Yann Rouillard Sat, 21 Feb 2009 16:58:45 +0100 + -- Yann Rouillard Sat, 21 Feb 2009 16:58:45 +0100 bash (3.2,REV=2009.02.15) unstable * Changed gettext dependancy to follow gettext package split (Closes: #3147). - -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 + -- Yann Rouillard Sat, 14 Feb 2009 23:53:41 +0100 bash (3.2,REV=2008.11.30) unstable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sat Apr 11 20:42:24 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 11 Apr 2009 18:42:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4275] csw/mgar/pkg/bash/trunk Message-ID: Revision: 4275 http://gar.svn.sourceforge.net/gar/?rev=4275&view=rev Author: chninkel Date: 2009-04-11 18:42:23 +0000 (Sat, 11 Apr 2009) Log Message: ----------- bash: now uses build class action script provided by Solaris Modified Paths: -------------- csw/mgar/pkg/bash/trunk/Makefile csw/mgar/pkg/bash/trunk/checksums csw/mgar/pkg/bash/trunk/files/CSWbash.prototype csw/mgar/pkg/bash/trunk/files/changelog.CSW Added Paths: ----------- csw/mgar/pkg/bash/trunk/files/shells Removed Paths: ------------- csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall csw/mgar/pkg/bash/trunk/files/CSWbash.postremove Modified: csw/mgar/pkg/bash/trunk/Makefile =================================================================== --- csw/mgar/pkg/bash/trunk/Makefile 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/Makefile 2009-04-11 18:42:23 UTC (rev 4275) @@ -29,6 +29,7 @@ REQUIRED_PKGS = CSWggettextrt REQUIRED_PKGS += CSWiconv +SPKG_CLASSES = none build ###### Upstream and opencsw files information ####### @@ -41,9 +42,12 @@ MASTER_SITES += $(GNU_MIRROR) DISTNAME = $(GARNAME)-$(BASH_VERSION) DISTFILES = $(GARNAME)-$(BASH_VERSION).tar.gz -DISTFILES += CSWbash.prototype CSWbash.postinstall CSWbash.postremove +DISTFILES += CSWbash.prototype DISTFILES += changelog.CSW +# build action script to modify /etc/shells at package installation and removal time +DISTFILES += shells + PATCHFILE_PREFIX = bash$(subst .,,$(BASH_VERSION)) PATCHDIRLEVEL = 0 # we generate the list of patches from the PATCHLEVEL @@ -57,6 +61,8 @@ fi; \ done ) +# +# opencsw bash use /etc/bash.bashrc and /etc/bash.bash_logout files PATCHFILES += use_system_bashrc_and_logout.patch @@ -79,4 +85,4 @@ ginstall -D $(WORKSRC_FIRSTMOD)/$$FILE $(PKGROOT)$(docdir)/$(GARNAME)/`basename $$FILE`; \ done ) ginstall -D $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW - + ginstall -D $(WORKDIR_FIRSTMOD)/shells $(PKGROOT)/etc/shells Modified: csw/mgar/pkg/bash/trunk/checksums =================================================================== --- csw/mgar/pkg/bash/trunk/checksums 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/checksums 2009-04-11 18:42:23 UTC (rev 4275) @@ -1,6 +1,4 @@ -bcc9760316385d49ff31c2ed72f4be4a download/CSWbash.postinstall -589297e4f9a43d0c82632e99423db7ef download/CSWbash.postremove -949396065ba932e8af683eae510586e9 download/CSWbash.prototype +f93b41b44ce6b023df65b72f00386ac5 download/CSWbash.prototype a90a1b5a6db4838483f05438e05e8eb9 download/bash-4.0.tar.gz bc7f4762443939bd7dccb42370f0d932 download/bash40-001 c2a4a4786a83ed4ec366c6a8924369a2 download/bash40-002 @@ -19,5 +17,6 @@ bb41963d030bc61a20e8185367b337c5 download/bash40-015 f75455048a086528971252fd979b8755 download/bash40-016 34b2cd57271a452f4a26b39d77ff908f download/bash40-017 -4e4a9d374ce4291b6ba4974adc086767 download/changelog.CSW +e3a631b0798de159e48cdb8701dad334 download/changelog.CSW +60956e6be20f69dafbb06fcc83bab88e download/shells 29607316cff22f7427322d8f190cbadf download/use_system_bashrc_and_logout.patch Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall 2009-04-11 18:42:23 UTC (rev 4275) @@ -1,42 +0,0 @@ -#!/bin/sh -PATH=/usr/bin -export PATH - -if [ -f ${BASEDIR}/etc/shells ]; then - echo "${BASEDIR}/etc/shells already exists." -else - cat > ${BASEDIR}/etc/shells </dev/null >/dev/null; then - echo "${BASEDIR}/etc/shells is UNCHANGED because entry $THE_SHELL does already exists." -else - echo "$THE_SHELL" >> ${BASEDIR}/etc/shells - echo "ADDED $THE_SHELL to ${BASEDIR}/etc/shells." -fi - Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.postremove =================================================================== --- csw/mgar/pkg/bash/trunk/files/CSWbash.postremove 2009-04-11 15:35:57 UTC (rev 4274) +++ csw/mgar/pkg/bash/trunk/files/CSWbash.postremove 2009-04-11 18:42:23 UTC (rev 4275) @@ -1,19 +0,0 @@ -#!/bin/sh -PATH=/usr/bin -export PATH - -# Removing bash from /etc/shells -THE_SHELL="`echo "${BASEDIR}/opt/csw/bin/bash" | /usr/bin/sed -e 's/\/\/*/\//g'`" - -if /usr/bin/cat "${BASEDIR}/etc/shells" | /usr/bin/sed -e 's/\/\/*/\//g' | /usr/bin/grep "$THE_SHELL" 2>/dev/null >/dev/null; then - /usr/bin/perl -i -pwe '$_ = "" if /\/+opt\/+csw\/+bin\/+bash$/' ${BASEDIR}/etc/shells - cat < Fri, 11 Apr 2009 12:06:33 +0200 Added: csw/mgar/pkg/bash/trunk/files/shells =================================================================== --- csw/mgar/pkg/bash/trunk/files/shells (rev 0) +++ csw/mgar/pkg/bash/trunk/files/shells 2009-04-11 18:42:23 UTC (rev 4275) @@ -0,0 +1,40 @@ +if [ install = "$1" ]; then + if [ -f "$PKG_INSTALL_ROOT/etc/shells" ]; then + cat "$PKG_INSTALL_ROOT/etc/shells" + else + cat <<-__EOT__ +# default entries +/usr/bin/sh +/usr/bin/csh +/usr/bin/ksh +/usr/bin/jsh +/bin/sh +/bin/csh +/bin/ksh +/bin/jsh +/sbin/sh +/sbin/jsh +/usr/bin/pfsh +/usr/bin/pfcsh +/usr/bin/pfksh +/usr/bin/bash +/usr/bin/tcsh +/usr/bin/zsh +/bin/pfsh +/bin/pfcsh +/bin/pfksh +/bin/bash +/bin/tcsh +/bin/zsh +/usr/xpg4/bin/sh + +# added entries +__EOT__ + fi && + cat <<-__EOT__ +/opt/csw/bin/bash # added by $PKGINST +__EOT__ + +elif [ remove = "$1" ] && [ -f "$PKG_INSTALL_ROOT/etc/shells" ]; then + egrep -v "^/opt/csw/bin/bash(#| | |\$)" <$PKG_INSTALL_ROOT/etc/shells || echo "#" +fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 00:03:28 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sat, 11 Apr 2009 22:03:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4276] csw/mgar/pkg/lame/trunk/Makefile Message-ID: Revision: 4276 http://gar.svn.sourceforge.net/gar/?rev=4276&view=rev Author: dmichelsen Date: 2009-04-11 22:03:27 +0000 (Sat, 11 Apr 2009) Log Message: ----------- lame: Fix sourceurl for next package build Modified Paths: -------------- csw/mgar/pkg/lame/trunk/Makefile Modified: csw/mgar/pkg/lame/trunk/Makefile =================================================================== --- csw/mgar/pkg/lame/trunk/Makefile 2009-04-11 18:42:23 UTC (rev 4275) +++ csw/mgar/pkg/lame/trunk/Makefile 2009-04-11 22:03:27 UTC (rev 4276) @@ -13,6 +13,8 @@ REQUIRED_PKGS = CSWncurses +SPKG_SOURCEURL = http://lame.sourceforge.net/ + # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=628063 UPSTREAM_USE_SF = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 00:09:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sat, 11 Apr 2009 22:09:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4277] csw/mgar/pkg/less/trunk Message-ID: Revision: 4277 http://gar.svn.sourceforge.net/gar/?rev=4277&view=rev Author: dmichelsen Date: 2009-04-11 22:09:49 +0000 (Sat, 11 Apr 2009) Log Message: ----------- less: Update to 429 Modified Paths: -------------- csw/mgar/pkg/less/trunk/Makefile csw/mgar/pkg/less/trunk/checksums Modified: csw/mgar/pkg/less/trunk/Makefile =================================================================== --- csw/mgar/pkg/less/trunk/Makefile 2009-04-11 22:03:27 UTC (rev 4276) +++ csw/mgar/pkg/less/trunk/Makefile 2009-04-11 22:09:49 UTC (rev 4277) @@ -1,5 +1,5 @@ GARNAME = less -GARVERSION = 418 +GARVERSION = 429 CATEGORIES = utils DESCRIPTION = Less is a free, open-source file pager Modified: csw/mgar/pkg/less/trunk/checksums =================================================================== --- csw/mgar/pkg/less/trunk/checksums 2009-04-11 22:03:27 UTC (rev 4276) +++ csw/mgar/pkg/less/trunk/checksums 2009-04-11 22:09:49 UTC (rev 4277) @@ -1 +1 @@ -b5864d76c54ddf4627fd57ab333c88b4 download/less-418.tar.gz +206f2f13b9b0a35e45df660fcb6af31d download/less-429.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 00:51:25 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sat, 11 Apr 2009 22:51:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4278] csw/mgar/pkg/elinks/trunk Message-ID: Revision: 4278 http://gar.svn.sourceforge.net/gar/?rev=4278&view=rev Author: chninkel Date: 2009-04-11 22:51:24 +0000 (Sat, 11 Apr 2009) Log Message: ----------- elinks: updated to gar v2 Modified Paths: -------------- csw/mgar/pkg/elinks/trunk/Makefile csw/mgar/pkg/elinks/trunk/checksums csw/mgar/pkg/elinks/trunk/files/changelog.CSW Removed Paths: ------------- csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec Property Changed: ---------------- csw/mgar/pkg/elinks/trunk/ Property changes on: csw/mgar/pkg/elinks/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/elinks/trunk/Makefile =================================================================== --- csw/mgar/pkg/elinks/trunk/Makefile 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/Makefile 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,5 +1,19 @@ +##################################################################### +# OpenCSW build recipe for elinks +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = elinks -GARVERSION = 0.11.5 +GARVERSION = 0.11.6 CATEGORIES = net DESCRIPTION = An advanced text mode web browser @@ -10,25 +24,36 @@ scripts. It has limited support for CSS and Javascript. endef +PACKAGES = CSWelinks + +REQUIRED_PKGS = CSWbzip2 +REQUIRED_PKGS += CSWexpat +REQUIRED_PKGS += CSWiconv +REQUIRED_PKGS += CSWlibidn +REQUIRED_PKGS += CSWosslrt +REQUIRED_PKGS += CSWzlib + + +###### Upstream and opencsw files information ####### + MASTER_SITES = http://elinks.cz/download/ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 -DISTFILES += $(call admfiles,CSWelinks,prototype depend) +DISTFILES = CSWelinks.prototype DISTFILES += changelog.CSW # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -# suppress the rdynamic test which doesn't -# work correctly -# PATCHFILES = configure_no_rdynamic.patch - # Debian security path for CVE-2007-2027 PATCHFILES += elinks-417789.diff + +##### Build and installation information ##### + # we use bash instead of sh as the Makefiles # use "test -e" unsupported with sun sh CONFIG_SHELL = /bin/bash @@ -52,6 +77,6 @@ touch $(WORKSRC)/configure touch $(WORKSRC)/config.status -post-install: - @ginstall -D $(WORKDIR)/changelog.CSW $(DESTDIR)$(docdir)/$(GARNAME)/changelog.CSW +post-merge: + @ginstall -D $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW Modified: csw/mgar/pkg/elinks/trunk/checksums =================================================================== --- csw/mgar/pkg/elinks/trunk/checksums 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/checksums 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,6 +1,3 @@ -7dccdb6568d7eeda68912f6541496b7e download/elinks-0.11.5.tar.bz2 -69fa3fff33f6f6e3cbff0861f7ba7443 download/CSWelinks.gspec 9998467007acbd4cb8e46db6e5a9b306 download/CSWelinks.prototype -b928e13fa7db10428293f776939b4859 download/CSWelinks.depend -fcf32c4251bf50795365aa4f5c89dc03 download/changelog.CSW +14b871e8361937a10490cf1018d6f218 download/changelog.CSW 858331d6cc6c8459b2dba5e24f0c8cc3 download/elinks-417789.diff Deleted: csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend =================================================================== --- csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/files/CSWelinks.depend 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,6 +0,0 @@ -P CSWbzip2 bzip2 - a high-quality block-sorting file compressor -P CSWexpat expat - XML Parser Toolkit -P CSWiconv libiconv - GNU iconv library -P CSWlibidn libidn - Implementation of the Stringprep, Punycode and IDNA -P CSWosslrt openssl - The Open Source toolkit for SSL and TLS. -P CSWzlib zlib - Zlib Data Compression Library Deleted: csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec =================================================================== --- csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/files/CSWelinks.gspec 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,4 +0,0 @@ -%var bitname elinks -%var pkgname CSWelinks -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/COPYING Modified: csw/mgar/pkg/elinks/trunk/files/changelog.CSW =================================================================== --- csw/mgar/pkg/elinks/trunk/files/changelog.CSW 2009-04-11 22:09:49 UTC (rev 4277) +++ csw/mgar/pkg/elinks/trunk/files/changelog.CSW 2009-04-11 22:51:24 UTC (rev 4278) @@ -1,3 +1,9 @@ +elinks (0.11.6,REV=2009.03.22) unstable + + * New upstream version. + + -- Yann Rouillard Sun, 22 Mar 2009 10:34:39 +0100 + elinks (0.11.5,REV=2008.10.04) unstable * New upstream version. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 14:13:38 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:13:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4279] csw/mgar/pkg/elinks/trunk Message-ID: Revision: 4279 http://gar.svn.sourceforge.net/gar/?rev=4279&view=rev Author: chninkel Date: 2009-04-12 12:13:38 +0000 (Sun, 12 Apr 2009) Log Message: ----------- elinks: fixed DISTFILES error Modified Paths: -------------- csw/mgar/pkg/elinks/trunk/Makefile csw/mgar/pkg/elinks/trunk/checksums Modified: csw/mgar/pkg/elinks/trunk/Makefile =================================================================== --- csw/mgar/pkg/elinks/trunk/Makefile 2009-04-11 22:51:24 UTC (rev 4278) +++ csw/mgar/pkg/elinks/trunk/Makefile 2009-04-12 12:13:38 UTC (rev 4279) @@ -42,7 +42,7 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 -DISTFILES = CSWelinks.prototype +DISTFILES += CSWelinks.prototype DISTFILES += changelog.CSW # We define upstream file regex so we can be notifed of new upstream software release Modified: csw/mgar/pkg/elinks/trunk/checksums =================================================================== --- csw/mgar/pkg/elinks/trunk/checksums 2009-04-11 22:51:24 UTC (rev 4278) +++ csw/mgar/pkg/elinks/trunk/checksums 2009-04-12 12:13:38 UTC (rev 4279) @@ -1,3 +1,4 @@ 9998467007acbd4cb8e46db6e5a9b306 download/CSWelinks.prototype 14b871e8361937a10490cf1018d6f218 download/changelog.CSW +463ec007b013822a82d197580117ea16 download/elinks-0.11.6.tar.bz2 858331d6cc6c8459b2dba5e24f0c8cc3 download/elinks-417789.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 14:28:20 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:28:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4280] csw/mgar/pkg/vsftpd/trunk/Makefile Message-ID: Revision: 4280 http://gar.svn.sourceforge.net/gar/?rev=4280&view=rev Author: chninkel Date: 2009-04-12 12:28:20 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: some Makefile cleanup Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 12:13:38 UTC (rev 4279) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 12:28:20 UTC (rev 4280) @@ -1,3 +1,17 @@ +##################################################################### +# OpenCSW build recipe for vsftpd +# +# Copyright 2009 Yann Rouillard +# All rights reserved. Use is subject to license terms. +# +# Redistribution and/or use, with or without modification, is +# permitted. This software is without warranty of any kind. The +# author(s) shall not be liable in the event that use of the +# software causes damage. +##################################################################### + +###### Package information ####### + GARNAME = vsftpd GARVERSION = 2.1.0 CATEGORIES = server @@ -13,6 +27,14 @@ MASTER_SITES = ftp://vsftpd.beasts.org/users/cevans/ + +# adding configuration handling classes +# (init/smf classes are dynamically added in checkinstall) +SPKG_CLASSES = none conf + + +###### Upstream and opencsw files information ####### + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz @@ -23,10 +45,6 @@ DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd DISTFILES += i.conf r.conf -# adding configuration handling classes -# (init/smf classes are dynamically added in checkinstall) -SPKG_CLASSES = none conf - # build options are set by modifying # builddefs.h, so we patch it to enable # ssl and tcp wrapper support @@ -44,16 +62,11 @@ # privilege separation user PATCHFILES += set_priv_sep_user.patch -# patch to workaround the fact that -# solaris libc doesn t have tm_gmtoff -# update: not useful anymore since 2.0.5 -# PATCHFILES += tm_gmtoff.patch - # patch to add DESTDIR support to # vsftpd makfile PATCHFILES += destdir.patch -# Documents +# Documentation files DOCFILES = AUDIT BENCHMARKS BUGS COPYING COPYRIGHT Changelog FAQ INSTALL LICENSE REFS DOCFILES += REWARD SIZE SPEED TODO TUNING README README.ssl README.security DOCFILES += SECURITY/DESIGN SECURITY/IMPLEMENTATION SECURITY/OVERVIEW SECURITY/TRUST @@ -64,6 +77,9 @@ DOCFILES += EXAMPLE/INTERNET_SITE_NOINETD/README EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf + +##### Build and installation information ##### + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_SCRIPTS = fake This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 14:39:06 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:39:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4281] csw/mgar/pkg/vsftpd/trunk/ Message-ID: Revision: 4281 http://gar.svn.sourceforge.net/gar/?rev=4281&view=rev Author: chninkel Date: 2009-04-12 12:39:06 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to gar v2 Property Changed: ---------------- csw/mgar/pkg/vsftpd/trunk/ Property changes on: csw/mgar/pkg/vsftpd/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 12 14:59:04 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 12 Apr 2009 12:59:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4282] csw/mgar/pkg/ImageMagick/trunk Message-ID: Revision: 4282 http://gar.svn.sourceforge.net/gar/?rev=4282&view=rev Author: hson Date: 2009-04-12 12:59:04 +0000 (Sun, 12 Apr 2009) Log Message: ----------- imagemagick: update to 6.5.1-1 Modified Paths: -------------- csw/mgar/pkg/ImageMagick/trunk/Makefile csw/mgar/pkg/ImageMagick/trunk/checksums Added Paths: ----------- csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff Modified: csw/mgar/pkg/ImageMagick/trunk/Makefile =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 12:39:06 UTC (rev 4281) +++ csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 12:59:04 UTC (rev 4282) @@ -1,6 +1,6 @@ GARNAME = imagemagick -GARVERSION = 6.4.9 -GARSUBREV = 10 +GARVERSION = 6.5.1 +GARSUBREV = 1 CATEGORIES = lib DESCRIPTION = A comprehensive package supporting automated and interative manipulation of images @@ -39,6 +39,8 @@ CONFIGURE_ARGS += --x-libraries=/usr/openwin/lib PATCHFILES += Makefile.patch +# Temporary patch until upstream make a more permenent fix +PATCHFILES += djvu.c.diff # Test has to be run *after* install TEST_SCRIPTS = Modified: csw/mgar/pkg/ImageMagick/trunk/checksums =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/checksums 2009-04-12 12:39:06 UTC (rev 4281) +++ csw/mgar/pkg/ImageMagick/trunk/checksums 2009-04-12 12:59:04 UTC (rev 4282) @@ -1,2 +1,3 @@ -4efbf9ba504ce228ed67e6db4c8245ff download/ImageMagick-6.4.9-10.tar.bz2 +2e5f775ac599ff2548395706fcc7eba0 download/ImageMagick-6.5.1-1.tar.bz2 6bd361fe352c7d497d60d8d2cbe7cfd4 download/Makefile.patch +de358462d89bfceb050888cf6b564257 download/djvu.c.diff Added: csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff (rev 0) +++ csw/mgar/pkg/ImageMagick/trunk/files/djvu.c.diff 2009-04-12 12:59:04 UTC (rev 4282) @@ -0,0 +1,32 @@ +--- ../build-global/ImageMagick-6.5.1-1/coders/djvu.c 2009-03-31 17:44:40.000000000 +0200 ++++ ImageMagick-6.5.1-1/coders/djvu.c 2009-04-12 11:00:15.678316236 +0200 +@@ -58,6 +58,29 @@ + #if defined(MAGICKCORE_DJVU_DELEGATE) + #include + #endif ++ ++#if defined(__SunOS_5_8) || defined(__SunOS_5_9) ++#define signbit(x) copysign(1, x)<0 ++ ++ ++double ++fmax(double x, double y) ++{ ++ if (isnan(x)) ++ return (y); ++ if (isnan(y)) ++ return (x); ++ ++ if (signbit(x) != signbit(y)) { ++ if (signbit(x)) ++ return (y); ++ else ++ return (x); ++ } ++ ++ return (x > y ? x : y); ++} ++#endif + + /* + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:19:37 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:19:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4283] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4283 http://gar.svn.sourceforge.net/gar/?rev=4283&view=rev Author: chninkel Date: 2009-04-12 13:19:37 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: gar v2 fixes Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype Added Paths: ----------- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:19:37 UTC (rev 4283) @@ -80,11 +80,11 @@ ##### Build and installation information ##### +GARCOMPILER = SUN + CONFIGURE_ARGS = $(DIRPATHS) -CONFIGURE_SCRIPTS = fake -GARCOMPILER = SUN - +CONFIGURE_SCRIPTS = TEST_SCRIPTS = include gar/category.mk @@ -99,24 +99,29 @@ INSTALL_ENV += INSTALL="ginstall" -# no configure step with vsftpd -configure-fake: - $(MAKECOOKIE) # we create the csw directory hierarchy -pre-install: +pre-install-modulated: @echo "Creating csw directories" - ( install -d $(DESTDIR)$(sbindir); \ - install -d $(DESTDIR)$(mandir)/man5; \ - install -d $(DESTDIR)$(mandir)/man8; \ + ( ginstall -d $(DESTDIR)$(sbindir); \ + ginstall -d $(DESTDIR)$(mandir)/man5; \ + ginstall -d $(DESTDIR)$(mandir)/man8; \ ln -sf $(DESTDIR)$(mandir) $(DESTDIR)$(prefix)/man; \ - install -d $(DESTDIR)$(docdir)/vsftpd ) + ginstall -d $(DESTDIR)$(docdir)/vsftpd ) +post-merge: merge-doc-files merge-config-files merge-class-files -post-install: - cd $(WORKSRC) && \ +merge-config-files: + ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW" + ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist" + +merge-doc-files: for FILE in $(DOCFILES); do \ - ginstall -D $$FILE $(DESTDIR)$(docdir)/vsftpd/$$FILE; \ + ginstall -D "$(WORKSRC_FIRSTMOD)/$$FILE" "$(PKGROOT)$(docdir)/vsftpd/$$FILE"; \ done + ginstall -D "$(WORKDIR_FIRSTMOD)/changelog.CSW" "$(PKGROOT)$(docdir)/vsftpd/changelog.CSW" + ginstall -D "$(WORKDIR_FIRSTMOD)/README.CSW" "$(PKGROOT)$(docdir)/vsftpd/README.CSW" +merge-class-files: + ginstall "$(DOWNLOADDIR)/"*.conf $(WORKDIR)/ Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:19:37 UTC (rev 4283) @@ -1,20 +1,20 @@ -7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz -ad51a44007f43ed9ff736a38c764352b download/CSWvsftpd.gspec -eb9b4f253fa90f3b6187e44375306010 download/CSWvsftpd.prototype +314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config +81319e5dd110b08a476c3b31af2fd573 download/CSWvsftpd.depend +598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall -81319e5dd110b08a476c3b31af2fd573 download/CSWvsftpd.depend -314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config +c3916a9a49d6167fc67c07754d8aa980 download/CSWvsftpd.prototype +eeaf77528b2da0c7730323838f30b7ef download/README.CSW +281c51282cabd9475cceef363bbc699b download/build_options.patch 68178673c7d33baead2d7b97e878ed79 download/changelog.CSW -eeaf77528b2da0c7730323838f30b7ef download/README.CSW -f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf -60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist +54c1c39c6bfa8747a4457f135fd5bca1 download/csw_build_system.patch +a9e994d2b57999b76a0e03503745c01a download/csw_paths.patch 8a11892757760e07534a4a455f051e84 download/cswvsftpd 5d093652c802b21dd00a52b2d012d977 download/cswvsftpd.xml -32905b27a67ac3d4c93a52e10a3a80fd download/svc-cswvsftpd +73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch 9b2ae27f98333b73ff2b16ed98ee896a download/i.conf 5d9e9fb1a5b6af82ce915f72ebc5e3b7 download/r.conf -281c51282cabd9475cceef363bbc699b download/build_options.patch -a9e994d2b57999b76a0e03503745c01a download/csw_paths.patch -54c1c39c6bfa8747a4457f135fd5bca1 download/csw_build_system.patch a9a65f55cbfd01f9d72d1de25e67148d download/set_priv_sep_user.patch -73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch +32905b27a67ac3d4c93a52e10a3a80fd download/svc-cswvsftpd +7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz +f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf +60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 13:19:37 UTC (rev 4283) @@ -4,4 +4,4 @@ %copyright url file://%{WORKSRC}/LICENSE %var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf %include url file://%{PKGLIB}/smf_enabled.gspec -%include url file://%{PKGLIB}/csw_usrgrp.gspec +%include url file://files/csw_usrgrp.gspec Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:19:37 UTC (rev 4283) @@ -1,8 +1,8 @@ i i.conf i r.conf d none /opt/csw/etc/vsftpd 0755 root bin -f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW=vsftpd.conf 0755 root bin -e conf /opt/csw/etc/vsftpd/vsftpd.userlist=vsftpd.userlist 0755 root bin +f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0755 root bin +e conf /opt/csw/etc/vsftpd/vsftpd.userlist 0755 root bin f none /opt/csw/sbin/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin @@ -24,8 +24,8 @@ f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/vsftpd.xinetd 0644 root bin f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/README 0644 root bin f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/vsftpd.conf 0644 root bin -f none /opt/csw/share/doc/vsftpd/README.CSW=README.CSW 0755 root bin -f none /opt/csw/share/doc/vsftpd/changelog.CSW=changelog.CSW 0644 root bin +f none /opt/csw/share/doc/vsftpd/README.CSW 0755 root bin +f none /opt/csw/share/doc/vsftpd/changelog.CSW 0644 root bin f none /opt/csw/share/doc/vsftpd/AUDIT 0644 root bin f none /opt/csw/share/doc/vsftpd/BENCHMARKS 0644 root bin f none /opt/csw/share/doc/vsftpd/BUGS 0644 root bin Added: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec 2009-04-12 13:19:37 UTC (rev 4283) @@ -0,0 +1,3 @@ +%prototype:merge +i csw_usrgrp_config=CSW%{bitname}.csw_usrgrp_config +%preinstall:merge url file://files/csw_usrgrp.preinstall Added: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall 2009-04-12 13:19:37 UTC (rev 4283) @@ -0,0 +1,79 @@ +################################################################################ +# Start csw_usrgrp.postinstall +################################################################################ + +# This was once based upon the preinstallation script from vsftpd + +set -e + +################################################## +# create the given group if it doesn't exist +################################################## +create_group() +{ + NAME=$1 + + if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent group $NAME > /dev/null; then + /usr/bin/echo "Group already exist: $NAME" + else + /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/groupadd $NAME + /usr/bin/echo "Group created: $NAME" + fi +} + +################################################## +# create the given user if it doesn't exist +# paramters are: userid gid home shell gecos +################################################## +create_user() +{ + NAME=$1 + GROUP=$2 + HOME=$3 + SHELL=$4 + COMMENT="$5" + + if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent passwd $NAME > /dev/null; then + /usr/bin/echo "User already exists: $NAME" + else + /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/useradd -g "$GROUP" -c "$COMMENT" -d $HOME -s $SHELL $NAME + /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/pwconv + /usr/bin/echo "User created: $NAME" + fi +} + +PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-/} + +CSW_USRGRP_CONFIG="$PKGSAV/../install/csw_usrgrp_config" + +# Note to self: do not replace this with a "return" as additional scripts can be merged after this script +if [ -r "$CSW_USRGRP_CONFIG" ] +then + # Read the csw_usrgrp_config file and make sure that it has the correct version + set +e + version=`grep "^version=" "$CSW_USRGRP_CONFIG"` + set -e + + if [ "$version" != "version=1" ] + then + echo "ERROR: invalid csw_usrgrp_config file. Expected version=1" + exit 1 + fi + + OIFS="$IFS"; + IFS=":" + sed -n "s/^group=//p" "$CSW_USRGRP_CONFIG" | while read NAME + do + create_group "$NAME" + done + + sed -n "s/^user=//p" "$CSW_USRGRP_CONFIG" | while read NAME GROUP HOME SHELL COMMENT + do + create_user "$NAME" "$GROUP" "$HOME" "$SHELL" "$COMMENT" + done + IFS="$OIFS" +fi + +################################################################################ +# End csw_usrgrp.postinstall +################################################################################ Deleted: csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch 2009-04-12 12:59:04 UTC (rev 4282) +++ csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch 2009-04-12 13:19:37 UTC (rev 4283) @@ -1,23 +0,0 @@ -diff --speed-large-files --minimal -Nru vsftpd-2.0.4.orig/sysutil.c vsftpd-2.0.4/sysutil.c ---- vsftpd-2.0.4.orig/sysutil.c 2006-04-12 18:45:16.969532000 -0400 -+++ vsftpd-2.0.4/sysutil.c 2006-04-12 18:44:48.196361000 -0400 -@@ -2475,10 +2475,19 @@ - { - time_t the_time = 0; - struct tm* p_tm; -+#if defined (__SVR4) && defined (__sun) -+ struct tm* p_tm_utc; -+#endif -+ - tzset(); - the_time = time(NULL); - p_tm = localtime(&the_time); -+#if defined (__SVR4) && defined (__sun) -+ p_tm_utc = gmtime(&the_time); -+ s_timezone = -(mktime(p_tm) - mktime(p_tm_utc)); -+#else - s_timezone = -p_tm->tm_gmtoff; -+#endif - } - - const char* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:26:17 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:26:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4284] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4284 http://gar.svn.sourceforge.net/gar/?rev=4284&view=rev Author: chninkel Date: 2009-04-12 13:26:16 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to cswpreserveconf class Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/i.conf csw/mgar/pkg/vsftpd/trunk/files/r.conf Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:26:16 UTC (rev 4284) @@ -30,7 +30,7 @@ # adding configuration handling classes # (init/smf classes are dynamically added in checkinstall) -SPKG_CLASSES = none conf +SPKG_CLASSES = none cswpreserveconf ###### Upstream and opencsw files information ####### @@ -43,7 +43,6 @@ DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd -DISTFILES += i.conf r.conf # build options are set by modifying # builddefs.h, so we patch it to enable @@ -114,7 +113,7 @@ merge-config-files: ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW" - ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist" + ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist.CSW" merge-doc-files: for FILE in $(DOCFILES); do \ Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,8 +1,8 @@ 314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config -81319e5dd110b08a476c3b31af2fd573 download/CSWvsftpd.depend +6193a623b66f1132fa0d3e64904ecf15 download/CSWvsftpd.depend 598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall -c3916a9a49d6167fc67c07754d8aa980 download/CSWvsftpd.prototype +3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype eeaf77528b2da0c7730323838f30b7ef download/README.CSW 281c51282cabd9475cceef363bbc699b download/build_options.patch 68178673c7d33baead2d7b97e878ed79 download/changelog.CSW @@ -11,8 +11,6 @@ 8a11892757760e07534a4a455f051e84 download/cswvsftpd 5d093652c802b21dd00a52b2d012d977 download/cswvsftpd.xml 73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch -9b2ae27f98333b73ff2b16ed98ee896a download/i.conf -5d9e9fb1a5b6af82ce915f72ebc5e3b7 download/r.conf a9a65f55cbfd01f9d72d1de25e67148d download/set_priv_sep_user.patch 32905b27a67ac3d4c93a52e10a3a80fd download/svc-cswvsftpd 7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,2 +1,3 @@ P CSWtcpwrap tcpwrappers (ipv6.4 patched) lib and tools for pre-screening tcp connections P CSWosslrt openssl Openssl meta package +P CSWcswclassutils Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,8 +1,6 @@ -i i.conf -i r.conf d none /opt/csw/etc/vsftpd 0755 root bin f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0755 root bin -e conf /opt/csw/etc/vsftpd/vsftpd.userlist 0755 root bin +f cswpreserveconf /opt/csw/etc/vsftpd/vsftpd.userlist.CSW 0755 root bin f none /opt/csw/sbin/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin Deleted: csw/mgar/pkg/vsftpd/trunk/files/i.conf =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/i.conf 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/i.conf 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,54 +0,0 @@ -# -# Copyright 2006 Yann Rouillard -# All rights reserved. Use is subject to license terms. -# -# Redistribution and/or use, with or without modification, is -# permitted. This code is without warranty of any kind. The -# author(s) shall not be liable in the event that use of the -# software causes damage. -# -# i.conf - class script which install configuration files -# -# If the configuration file already exists on the filesystem, -# this script will let the existing file intact and will -# install a copy of the file provided in the package suffixed -# with .CSW -# except for service configuration files which are always installed -# CSW suffixed under Solaris 9 as they are used to enable/disable -# a service according to blastwave standards. -# -umask 0022 - -if [ -z "$PKG_INSTALL_ROOT" ]; then - PKG_INSTALL_ROOT=/ -fi - -while read SRC DEST; do - if [ -f "${PKG_INSTALL_ROOT}/$DEST" ]; then - cp "$SRC" "${PKG_INSTALL_ROOT}/$DEST.CSW" - else - cp "$SRC" "${PKG_INSTALL_ROOT}/$DEST" - fi -done - -# Unfortunately pkgadd doesn't backup the source file if the destination file is identical. -# It's a problem with zones installation where pkgadd try to find the backup files, so -# we do the backup manually -awk '{ if ( $3 == "conf" ) print $2,$3,$4,$5,$6,$7 }' $INST_DATADIR/$PKG/pkgmap | \ - while read FTYPE CLASS FPATH MODE OWNER GROUP; do - if echo $FPATH | grep "^/" >/dev/null; then - INST_PATH="$INST_DATADIR/$PKG/root/$FPATH" - SAVE_PATH="$PKGSAV/pspool/$PKG/root/$FPATH" - else - INST_PATH="$INST_DATADIR/$PKG/reloc/$FPATH" - SAVE_PATH="$PKGSAV/pspool/$PKG/reloc/$FPATH" - fi - - if [ ! -f "$SAVE_PATH" ]; then - mkdir -p "`LANG=C dirname $SAVE_PATH`" - cp "$INST_PATH" "$SAVE_PATH" - fi - done - -exit 0 - Deleted: csw/mgar/pkg/vsftpd/trunk/files/r.conf =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/r.conf 2009-04-12 13:19:37 UTC (rev 4283) +++ csw/mgar/pkg/vsftpd/trunk/files/r.conf 2009-04-12 13:26:16 UTC (rev 4284) @@ -1,21 +0,0 @@ -# -# Copyright 2006 Yann Rouillard -# All rights reserved. Use is subject to license terms. -# -# Redistribution and/or use, with or without modification, is -# permitted. This code is without warranty of any kind. The -# author(s) shall not be liable in the event that use of the -# software causes damage. -# -# r.conf - class script which removes configuration files -# -# This script doesn't delete config file, only backup ones -# installed by the package. -# - -while read DEST; do - if [ -f "$DEST.CSW" ]; then - rm "$DEST.CSW" - fi -done - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:32:04 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:32:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4285] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4285 http://gar.svn.sourceforge.net/gar/?rev=4285&view=rev Author: chninkel Date: 2009-04-12 13:32:03 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to dynamic depend files Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:26:16 UTC (rev 4284) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:32:03 UTC (rev 4285) @@ -32,14 +32,18 @@ # (init/smf classes are dynamically added in checkinstall) SPKG_CLASSES = none cswpreserveconf +REQUIRED_PKGS = CSWtcpwrap +REQUIRED_PKGS += CSWosslrt +REQUIRED_PKGS += CSWcswclassutils + ###### Upstream and opencsw files information ####### # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWvsftpd,prototype preinstall depend csw_usrgrp_config) +DISTFILES += $(call admfiles,CSWvsftpd,prototype preinstall csw_usrgrp_config) DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:26:16 UTC (rev 4284) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:32:03 UTC (rev 4285) @@ -1,5 +1,4 @@ 314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config -6193a623b66f1132fa0d3e64904ecf15 download/CSWvsftpd.depend 598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall 3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype Deleted: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:26:16 UTC (rev 4284) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.depend 2009-04-12 13:32:03 UTC (rev 4285) @@ -1,3 +0,0 @@ -P CSWtcpwrap tcpwrappers (ipv6.4 patched) lib and tools for pre-screening tcp connections -P CSWosslrt openssl Openssl meta package -P CSWcswclassutils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 15:46:37 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 13:46:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4286] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4286 http://gar.svn.sourceforge.net/gar/?rev=4286&view=rev Author: chninkel Date: 2009-04-12 13:46:36 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums Added Paths: ----------- csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:32:03 UTC (rev 4285) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:46:36 UTC (rev 4286) @@ -27,23 +27,24 @@ MASTER_SITES = ftp://vsftpd.beasts.org/users/cevans/ +PACKAGES = CSWvsftpd +REQUIRED_PKGS = CSWtcpwrap +REQUIRED_PKGS += CSWosslrt +REQUIRED_PKGS += CSWcswclassutils + # adding configuration handling classes # (init/smf classes are dynamically added in checkinstall) SPKG_CLASSES = none cswpreserveconf -REQUIRED_PKGS = CSWtcpwrap -REQUIRED_PKGS += CSWosslrt -REQUIRED_PKGS += CSWcswclassutils - ###### Upstream and opencsw files information ####### # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWvsftpd,prototype preinstall csw_usrgrp_config) +DISTFILES += CSWvsftpd.prototype CSWvsftpd.preinstall CSWvsftpd.csw_usrgrp_config DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd @@ -80,7 +81,12 @@ DOCFILES += EXAMPLE/INTERNET_SITE_NOINETD/README EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf +# little hack to be able to still use old smf support with gar v2 +# until openssh is migrated to cswclassutils init system +DISTFILES += vsftpd_dyngspec.fakespec +_CATEGORY_GSPEC_INCLUDE = ../../$(DOWNLOADDIR)/vsftpd_dyngspec.fakespec + ##### Build and installation information ##### GARCOMPILER = SUN Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:32:03 UTC (rev 4285) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:46:36 UTC (rev 4286) @@ -1,5 +1,4 @@ 314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config -598e429baa86555a44a3da6581a78704 download/CSWvsftpd.gspec a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall 3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype eeaf77528b2da0c7730323838f30b7ef download/README.CSW @@ -15,3 +14,4 @@ 7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf 60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist +0b0357e8470ccea567eabe6103daa769 download/vsftpd_dyngspec.fakespec Deleted: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 13:32:03 UTC (rev 4285) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec 2009-04-12 13:46:36 UTC (rev 4286) @@ -1,7 +0,0 @@ -%var bitname vsftpd -%var pkgname CSWvsftpd -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE -%var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf -%include url file://%{PKGLIB}/smf_enabled.gspec -%include url file://files/csw_usrgrp.gspec Added: csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec 2009-04-12 13:46:36 UTC (rev 4286) @@ -0,0 +1,4 @@ +%include url file://%{PKGLIB}/csw_dyngspec.gspec +%var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf +%include url file://%{PKGLIB}/smf_enabled.gspec +%include url file://files/csw_usrgrp.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From chninkel at users.sourceforge.net Sun Apr 12 16:05:48 2009 From: chninkel at users.sourceforge.net (chninkel at users.sourceforge.net) Date: Sun, 12 Apr 2009 14:05:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4287] csw/mgar/pkg/vsftpd/trunk Message-ID: Revision: 4287 http://gar.svn.sourceforge.net/gar/?rev=4287&view=rev Author: chninkel Date: 2009-04-12 14:05:48 +0000 (Sun, 12 Apr 2009) Log Message: ----------- vsftpd: switched to cswclassutils cswusergroup Modified Paths: -------------- csw/mgar/pkg/vsftpd/trunk/Makefile csw/mgar/pkg/vsftpd/trunk/checksums csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec Added Paths: ----------- csw/mgar/pkg/vsftpd/trunk/files/cswusergroup Removed Paths: ------------- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall Modified: csw/mgar/pkg/vsftpd/trunk/Makefile =================================================================== --- csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/Makefile 2009-04-12 14:05:48 UTC (rev 4287) @@ -35,7 +35,7 @@ # adding configuration handling classes # (init/smf classes are dynamically added in checkinstall) -SPKG_CLASSES = none cswpreserveconf +SPKG_CLASSES = none cswpreserveconf cswusergroup ###### Upstream and opencsw files information ####### @@ -44,10 +44,11 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += CSWvsftpd.prototype CSWvsftpd.preinstall CSWvsftpd.csw_usrgrp_config +DISTFILES += CSWvsftpd.prototype CSWvsftpd.preinstall DISTFILES += changelog.CSW README.CSW DISTFILES += vsftpd.conf vsftpd.userlist DISTFILES += cswvsftpd cswvsftpd.xml svc-cswvsftpd +DISTFILES += cswusergroup # build options are set by modifying # builddefs.h, so we patch it to enable @@ -119,11 +120,12 @@ ginstall -d $(DESTDIR)$(docdir)/vsftpd ) -post-merge: merge-doc-files merge-config-files merge-class-files +post-merge: merge-doc-files merge-config-files merge-config-files: ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW" ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist.CSW" + ginstall -D "$(WORKDIR_FIRSTMOD)/cswusergroup" "$(PKGROOT)$(sysconfdir)/pkg/CSWvsftpd/cswusergroup" merge-doc-files: for FILE in $(DOCFILES); do \ @@ -131,6 +133,3 @@ done ginstall -D "$(WORKDIR_FIRSTMOD)/changelog.CSW" "$(PKGROOT)$(docdir)/vsftpd/changelog.CSW" ginstall -D "$(WORKDIR_FIRSTMOD)/README.CSW" "$(PKGROOT)$(docdir)/vsftpd/README.CSW" - -merge-class-files: - ginstall "$(DOWNLOADDIR)/"*.conf $(WORKDIR)/ Modified: csw/mgar/pkg/vsftpd/trunk/checksums =================================================================== --- csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/checksums 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,11 +1,11 @@ -314e73654490c2abe742b7ed7be798b1 download/CSWvsftpd.csw_usrgrp_config a2f5b70fe49839b0463c9d90af0f11dd download/CSWvsftpd.preinstall -3445fbf0fc7e28cc7f2db827dfbaddb0 download/CSWvsftpd.prototype +accf66084b40cc8ea89037f1cc351833 download/CSWvsftpd.prototype eeaf77528b2da0c7730323838f30b7ef download/README.CSW 281c51282cabd9475cceef363bbc699b download/build_options.patch 68178673c7d33baead2d7b97e878ed79 download/changelog.CSW 54c1c39c6bfa8747a4457f135fd5bca1 download/csw_build_system.patch a9e994d2b57999b76a0e03503745c01a download/csw_paths.patch +98e1d831801985daf5ce2ed01fbc0efd download/cswusergroup 8a11892757760e07534a4a455f051e84 download/cswvsftpd 5d093652c802b21dd00a52b2d012d977 download/cswvsftpd.xml 73e59f9ada47d3d20199f7c97849fb13 download/destdir.patch @@ -14,4 +14,4 @@ 7890b54e7ffa6106ffbdfda53f47fa41 download/vsftpd-2.1.0.tar.gz f6ce22a6959b93e500a4ae800295c2ee download/vsftpd.conf 60c736802e2ce00c531953b01e4a26f6 download/vsftpd.userlist -0b0357e8470ccea567eabe6103daa769 download/vsftpd_dyngspec.fakespec +372d9e524d45e1b62578ef3361c8524c download/vsftpd_dyngspec.fakespec Deleted: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.csw_usrgrp_config 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,4 +0,0 @@ -version=1 -group=vsftpd -user=vsftpd:vsftpd:/opt/csw/var/empty/vsftpd:/bin/false:vsftpd privsep user -user=ftp:nogroup:/opt/csw/var/ftp:/bin/false:ftp user for anonymous access Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,6 +1,7 @@ d none /opt/csw/etc/vsftpd 0755 root bin -f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0755 root bin -f cswpreserveconf /opt/csw/etc/vsftpd/vsftpd.userlist.CSW 0755 root bin +f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0644 root bin +f cswpreserveconf /opt/csw/etc/vsftpd/vsftpd.userlist.CSW 0644 root bin +f cswusergroup /opt/csw/etc/pkg/CSWvsftpd/cswusergroup 0644 root bin f none /opt/csw/sbin/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd 0755 root bin d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin Deleted: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,3 +0,0 @@ -%prototype:merge -i csw_usrgrp_config=CSW%{bitname}.csw_usrgrp_config -%preinstall:merge url file://files/csw_usrgrp.preinstall Deleted: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,79 +0,0 @@ -################################################################################ -# Start csw_usrgrp.postinstall -################################################################################ - -# This was once based upon the preinstallation script from vsftpd - -set -e - -################################################## -# create the given group if it doesn't exist -################################################## -create_group() -{ - NAME=$1 - - if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent group $NAME > /dev/null; then - /usr/bin/echo "Group already exist: $NAME" - else - /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/groupadd $NAME - /usr/bin/echo "Group created: $NAME" - fi -} - -################################################## -# create the given user if it doesn't exist -# paramters are: userid gid home shell gecos -################################################## -create_user() -{ - NAME=$1 - GROUP=$2 - HOME=$3 - SHELL=$4 - COMMENT="$5" - - if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent passwd $NAME > /dev/null; then - /usr/bin/echo "User already exists: $NAME" - else - /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/useradd -g "$GROUP" -c "$COMMENT" -d $HOME -s $SHELL $NAME - /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/pwconv - /usr/bin/echo "User created: $NAME" - fi -} - -PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-/} - -CSW_USRGRP_CONFIG="$PKGSAV/../install/csw_usrgrp_config" - -# Note to self: do not replace this with a "return" as additional scripts can be merged after this script -if [ -r "$CSW_USRGRP_CONFIG" ] -then - # Read the csw_usrgrp_config file and make sure that it has the correct version - set +e - version=`grep "^version=" "$CSW_USRGRP_CONFIG"` - set -e - - if [ "$version" != "version=1" ] - then - echo "ERROR: invalid csw_usrgrp_config file. Expected version=1" - exit 1 - fi - - OIFS="$IFS"; - IFS=":" - sed -n "s/^group=//p" "$CSW_USRGRP_CONFIG" | while read NAME - do - create_group "$NAME" - done - - sed -n "s/^user=//p" "$CSW_USRGRP_CONFIG" | while read NAME GROUP HOME SHELL COMMENT - do - create_user "$NAME" "$GROUP" "$HOME" "$SHELL" "$COMMENT" - done - IFS="$OIFS" -fi - -################################################################################ -# End csw_usrgrp.postinstall -################################################################################ Added: csw/mgar/pkg/vsftpd/trunk/files/cswusergroup =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/cswusergroup (rev 0) +++ csw/mgar/pkg/vsftpd/trunk/files/cswusergroup 2009-04-12 14:05:48 UTC (rev 4287) @@ -0,0 +1,2 @@ +vsftpd:vsftpd:vsftpd privsep user:/opt/csw/var/empty/vsftpd:/bin/false:: +ftp:nogroup:ftp user for anonymous access:/opt/csw/var/ftp:/bin/false:: Modified: csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec =================================================================== --- csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec 2009-04-12 13:46:36 UTC (rev 4286) +++ csw/mgar/pkg/vsftpd/trunk/files/vsftpd_dyngspec.fakespec 2009-04-12 14:05:48 UTC (rev 4287) @@ -1,4 +1,3 @@ %include url file://%{PKGLIB}/csw_dyngspec.gspec %var SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf %include url file://%{PKGLIB}/smf_enabled.gspec -%include url file://files/csw_usrgrp.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From hson at users.sourceforge.net Sun Apr 12 17:15:28 2009 From: hson at users.sourceforge.net (hson at users.sourceforge.net) Date: Sun, 12 Apr 2009 15:15:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4288] csw/mgar/pkg/ImageMagick/trunk/Makefile Message-ID: Revision: 4288 http://gar.svn.sourceforge.net/gar/?rev=4288&view=rev Author: hson Date: 2009-04-12 15:15:28 +0000 (Sun, 12 Apr 2009) Log Message: ----------- imagemagick: Add EXTRA_LD_OPTIONS to force libtool to use built libs instead of installed libs during install phase Modified Paths: -------------- csw/mgar/pkg/ImageMagick/trunk/Makefile Modified: csw/mgar/pkg/ImageMagick/trunk/Makefile =================================================================== --- csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 14:05:48 UTC (rev 4287) +++ csw/mgar/pkg/ImageMagick/trunk/Makefile 2009-04-12 15:15:28 UTC (rev 4288) @@ -45,6 +45,7 @@ # Test has to be run *after* install TEST_SCRIPTS = +EXTRA_LD_OPTIONS = -L./magick/.libs MERGE_EXCLUDE_LIBTOOL ?= $(libdir)/lib.*\.la EXTRA_MERGE_EXCLUDE_FILES = .*/perllocal.pod This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 22:23:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 12 Apr 2009 20:23:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4289] csw/mgar/pkg/pcre/trunk Message-ID: Revision: 4289 http://gar.svn.sourceforge.net/gar/?rev=4289&view=rev Author: dmichelsen Date: 2009-04-12 20:23:53 +0000 (Sun, 12 Apr 2009) Log Message: ----------- pcre: Update to 7.9 Modified Paths: -------------- csw/mgar/pkg/pcre/trunk/Makefile csw/mgar/pkg/pcre/trunk/checksums Modified: csw/mgar/pkg/pcre/trunk/Makefile =================================================================== --- csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 15:15:28 UTC (rev 4288) +++ csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 20:23:53 UTC (rev 4289) @@ -1,5 +1,5 @@ GARNAME = pcre -GARVERSION = 7.8 +GARVERSION = 7.9 CATEGORIES = lib DESCRIPTION = Perl-compatible regular expression tools Modified: csw/mgar/pkg/pcre/trunk/checksums =================================================================== --- csw/mgar/pkg/pcre/trunk/checksums 2009-04-12 15:15:28 UTC (rev 4288) +++ csw/mgar/pkg/pcre/trunk/checksums 2009-04-12 20:23:53 UTC (rev 4289) @@ -1,3 +1 @@ -32fd7c7863b871d408d730e6ffa4aa71 download/pcre-7.8.tar.gz -ab54bd8abaae58cd88a86678977723e0 download/CSWpcre.gspec -9c278a0bbdb2766d198d585e5c73956a download/CSWpcrert.gspec +2256d0a1d0a358265165ca70e7cfc47a download/pcre-7.9.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 12 22:26:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 12 Apr 2009 20:26:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4290] csw/mgar/pkg/pcre/trunk/Makefile Message-ID: Revision: 4290 http://gar.svn.sourceforge.net/gar/?rev=4290&view=rev Author: dmichelsen Date: 2009-04-12 20:26:21 +0000 (Sun, 12 Apr 2009) Log Message: ----------- pcre: Use isaexec for pcregrep Modified Paths: -------------- csw/mgar/pkg/pcre/trunk/Makefile Modified: csw/mgar/pkg/pcre/trunk/Makefile =================================================================== --- csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 20:23:53 UTC (rev 4289) +++ csw/mgar/pkg/pcre/trunk/Makefile 2009-04-12 20:26:21 UTC (rev 4290) @@ -41,8 +41,6 @@ TEST_TARGET = check -NO_ISAEXEC = 1 - PKGFILES_CSWpcrert = $(PKGFILES_RT) include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 13 03:41:13 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 13 Apr 2009 01:41:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4291] csw/mgar/pkg/gcc4/trunk/Makefile Message-ID: Revision: 4291 http://gar.svn.sourceforge.net/gar/?rev=4291&view=rev Author: valholla Date: 2009-04-13 01:41:12 +0000 (Mon, 13 Apr 2009) Log Message: ----------- comment out amd merge Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-12 20:26:21 UTC (rev 4290) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-13 01:41:12 UTC (rev 4291) @@ -38,7 +38,7 @@ CONFIGURE_ARGS += --enable-languages=ada,c,c++,fortran,java,objc ## For cleanliness I split the Configuration into separate files -include files/amd_merge.mk +#include files/amd_merge.mk include files/gar_override.mk include files/package_def.mk include files/pkg_scripts.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 16:14:55 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 14:14:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4292] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4292 http://gar.svn.sourceforge.net/gar/?rev=4292&view=rev Author: bdwalton Date: 2009-04-13 14:14:55 +0000 (Mon, 13 Apr 2009) Log Message: ----------- converted to dynamic adm script Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall Modified: csw/mgar/pkg/docbook-style-xsl/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-13 01:41:12 UTC (rev 4291) +++ csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-13 14:14:55 UTC (rev 4292) @@ -33,8 +33,12 @@ MASTER_SITES = $(SF_MIRRORS) DISTFILES = docbook-xsl-$(GARVERSION).tar.bz2 DISTFILES += docbook-xsl-doc-$(GARVERSION).tar.bz2 -DISTFILES += CSWdocbookxsl.postinstall CSWdocbookxsl.preremove +DISTFILES += CSWdocbookxsl.preremove +#use the dynamic adm script feature so we don't need to edit file at +#version change +include files/CSWdocbookxsl.postinstall + PATCHFILES += add_makefile.patch CONFIGURE_SCRIPTS = Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 01:41:12 UTC (rev 4291) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 14:14:55 UTC (rev 4292) @@ -1,4 +1,3 @@ -c022eb8e15bf110605a4695235f20075 download/CSWdocbookxsl.postinstall 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove 9ba4d6409de31404b8022f10630016e0 download/add_makefile.patch c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 01:41:12 UTC (rev 4291) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 14:14:55 UTC (rev 4292) @@ -1,11 +1,12 @@ +define CSWdocbookxsl_postinstall #!/bin/sh -case "$PKG_INSTALL_ROOT" in +case "$$PKG_INSTALL_ROOT" in ""|"/") PREFIX= ;; - *) PREFIX="chroot $PKG_INSTALL_ROOT ";; + *) PREFIX="chroot $$PKG_INSTALL_ROOT ";; esac -PATH=/opt/csw/bin:$PATH +PATH=/opt/csw/bin:$$PATH CATCMD=/opt/csw/bin/xmlcatalog @@ -14,17 +15,18 @@ CATALOG=/opt/csw/etc/xml/catalog #we need a version here, since that will be referenced in URLS being redirected -VERSION=1.74.3 +VERSION=$(GARVERSION) -$PREFIX $CATCMD --noout --add "rewriteSystem" \ - "http://docbook.sourceforge.net/release/xsl/$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG -$PREFIX $CATCMD --noout --add "rewriteURI" \ - "http://docbook.sourceforge.net/release/xsl/$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG -$PREFIX $CATCMD --noout --add "rewriteSystem" \ +$$PREFIX $$CATCMD --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ + "file://$DBHOME/xsl-stylesheets" $$CATALOG +$$PREFIX $$CATCMD --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ + "file://$DBHOME/xsl-stylesheets" $$CATALOG +$$PREFIX $$CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG -$PREFIX $CATCMD --noout --add "rewriteURI" \ + "file://$DBHOME/xsl-stylesheets" $$CATALOG +$$PREFIX $$CATCMD --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $CATALOG + "file://$DBHOME/xsl-stylesheets" $$CATALOG +endef This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 16:30:07 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 14:30:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4293] csw/mgar/pkg/docbook-style-xsl/trunk/files/ CSWdocbookxsl.postinstall Message-ID: Revision: 4293 http://gar.svn.sourceforge.net/gar/?rev=4293&view=rev Author: bdwalton Date: 2009-04-13 14:30:06 +0000 (Mon, 13 Apr 2009) Log Message: ----------- correct adm script Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 14:14:55 UTC (rev 4292) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.postinstall 2009-04-13 14:30:06 UTC (rev 4293) @@ -19,14 +19,14 @@ $$PREFIX $$CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG $$PREFIX $$CATCMD --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/$$VERSION" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG $$PREFIX $$CATCMD --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG $$PREFIX $$CATCMD --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/current" \ - "file://$DBHOME/xsl-stylesheets" $$CATALOG + "file://$$DBHOME/xsl-stylesheets" $$CATALOG endef This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 16:53:03 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 14:53:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4294] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4294 http://gar.svn.sourceforge.net/gar/?rev=4294&view=rev Author: bdwalton Date: 2009-04-13 14:53:03 +0000 (Mon, 13 Apr 2009) Log Message: ----------- move GIT_USE_PROXY to .garrc instead of build recipe Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-13 14:30:06 UTC (rev 4293) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-13 14:53:03 UTC (rev 4294) @@ -66,7 +66,8 @@ SPKG_DESC_CSWgitdoc = Documentation for Git SPKG_DESC_CSWgitemacs = Git VCS support for Emacs -GIT_USE_PROXY = 1 +#NOTE: If you need to proxy git:// connections, set GIT_USE_PROXY in +# your .garrc file. (That leaves this recipe in a more generic form.) GIT_REPOS = git://git.kernel.org/pub/scm/git/git.git GIT_TREEISH_git.git = v$(GARVERSION) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Mon Apr 13 19:58:15 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Mon, 13 Apr 2009 17:58:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4295] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4295 http://gar.svn.sourceforge.net/gar/?rev=4295&view=rev Author: bdwalton Date: 2009-04-13 17:58:14 +0000 (Mon, 13 Apr 2009) Log Message: ----------- rework local makefile to be more generic Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 14:53:03 UTC (rev 4294) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-13 17:58:14 UTC (rev 4295) @@ -1,4 +1,4 @@ 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove -9ba4d6409de31404b8022f10630016e0 download/add_makefile.patch +a92b47305b3499396aafda83e4bbfefb download/add_makefile.patch c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 2a032a95fbf24367d13acc8210f9cd72 download/docbook-xsl-doc-1.74.3.tar.bz2 Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-13 14:53:03 UTC (rev 4294) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-13 17:58:14 UTC (rev 4295) @@ -1,10 +1,17 @@ ---- /dev/null 2009-04-10 02:03:32.000000000 +0200 -+++ docbook-xsl-1.74.3/Makefile.csw 2009-04-10 04:25:32.872750482 +0200 -@@ -0,0 +1,46 @@ +--- /dev/null 2009-04-13 19:20:44.000000000 +0200 ++++ docbook-xsl-1.74.3/Makefile.csw 2009-04-13 19:24:36.996214871 +0200 +@@ -0,0 +1,43 @@ +DESTDIR ?= ... should be overridden by GAR ... + +SHELL = /opt/csw/bin/bash + ++# directories that don't get installed by the generic install-xsl target ++# note the . (to work around find output) ++SS_EX_DIRS = doc docsrc tools tests . ++# directories that do get installed by install-xsl ++DIRS = $(subst ./,,$(shell gfind . -maxdepth 1 -type d)) ++SS_DIRS = $(foreach D,$(filter-out $(SS_EX_DIRS),$(DIRS)),dir-$(D)) ++ +prefix = $(DESTDIR)/opt/csw +bindir = $(prefix)/bin +datadir = $(prefix)/share @@ -14,33 +21,23 @@ + +all: install + -+install: install-xsl install-img install-misc install-docs ++install: install-xsl install-misc install-docs + -+install-xsl: -+ gmkdir -p $(instdir)/{common,fo,html,htmlhelp/doc,javahelp,lib,template,xhtml,manpages,profiling} -+ cp common/*.dtd $(instdir)/common -+ cp common/*.xml $(instdir)/common -+ cp common/*.xsl $(instdir)/common -+ cp fo/*.xml $(instdir)/fo -+ cp fo/*.xsl $(instdir)/fo -+ cp html/*.xml $(instdir)/html -+ cp html/*.xsl $(instdir)/html -+ cp htmlhelp/*.xsl $(instdir)/htmlhelp -+ cp javahelp/*.xsl $(instdir)/javahelp -+ cp lib/lib.xsl $(instdir)/lib -+ cp template/*.xml $(instdir)/template -+ cp template/*.xsl $(instdir)/template -+ cp xhtml/*.xsl $(instdir)/xhtml -+ cp manpages/*.xsl $(instdir)/manpages -+ cp profiling/*.xsl $(instdir)/profiling ++$(instdir): ++ gmkdir -p $(instdir) + -+install-img: -+ gmkdir -p $(instdir)/images/callouts -+ cp images/*.gif $(instdir)/images -+ cp images/*.png $(instdir)/images -+ cp images/callouts/*.png $(instdir)/images/callouts ++#so we don't get the example bin files, etc. we can always install them ++# 'properly' to csw/bin/ if there is demand. ++dir-epub: $(instdir) ++ gmkdir -p $(instdir)/epub ++ cp epub/*xsl $(instdir)/epub + -+install-misc: ++dir-%: ++ cp -R $*/ $(instdir)/ ++ ++install-xsl: $(instdir) $(SS_DIRS) ++ ++install-misc: $(instdir) + cp VERSION $(instdir) + +install-docs: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 13 21:29:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 13 Apr 2009 19:29:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4296] csw/mgar/pkg/libtasn1/trunk Message-ID: Revision: 4296 http://gar.svn.sourceforge.net/gar/?rev=4296&view=rev Author: dmichelsen Date: 2009-04-13 19:29:36 +0000 (Mon, 13 Apr 2009) Log Message: ----------- libtasn1: Update to 2.0 Modified Paths: -------------- csw/mgar/pkg/libtasn1/trunk/Makefile csw/mgar/pkg/libtasn1/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec Modified: csw/mgar/pkg/libtasn1/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-13 17:58:14 UTC (rev 4295) +++ csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-13 19:29:36 UTC (rev 4296) @@ -1,25 +1,22 @@ GARNAME = libtasn1 -GARVERSION = 1.8 +GARVERSION = 2.0 CATEGORIES = lib DESCRIPTION = GNU ASN1 library define BLURB endef -MASTER_SITES = http://ftp.gnu.org/pub/gnu/gnutls/ -#DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES = $(GARNAME)-1-20090116.tar.gz -DISTFILES += $(call admfiles,CSWlibtasn1,) +MASTER_SITES = $(GNU_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz SPKG_SOURCEURL = http://www.gnu.org/software/gnutls/ # We define upstream file regex so we can be notifed of new upstream software release -UFILES_REGEX = -(\d+(?:\.\d+)*).tar.gz +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz REQUIRED_PKGS = BUILD64 = 1 -NO_ISAEXEC = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-static Modified: csw/mgar/pkg/libtasn1/trunk/checksums =================================================================== --- csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-13 17:58:14 UTC (rev 4295) +++ csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-13 19:29:36 UTC (rev 4296) @@ -1,2 +1 @@ -cd6fa14e1ae5e422edcd154c26d6c923 download/libtasn1-1-20090116.tar.gz -efdfe199ba7cec7c8c1d86c43a1bc43c download/CSWlibtasn1.gspec +e9b1462f04b2586b03905b0ed9528261 download/libtasn1-2.0.tar.gz Deleted: csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec =================================================================== --- csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec 2009-04-13 17:58:14 UTC (rev 4295) +++ csw/mgar/pkg/libtasn1/trunk/files/CSWlibtasn1.gspec 2009-04-13 19:29:36 UTC (rev 4296) @@ -1,4 +0,0 @@ -%var bitname libtasn1 -%var pkgname CSWlibtasn1 -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 13:32:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 11:32:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4297] csw/mgar/pkg/libcairo/trunk Message-ID: Revision: 4297 http://gar.svn.sourceforge.net/gar/?rev=4297&view=rev Author: dmichelsen Date: 2009-04-14 11:32:34 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libcairo: Move to dynamic gspec, fix DISTNAME Modified Paths: -------------- csw/mgar/pkg/libcairo/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec Modified: csw/mgar/pkg/libcairo/trunk/Makefile =================================================================== --- csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-14 11:32:34 UTC (rev 4297) @@ -8,43 +8,43 @@ endef MASTER_SITES = http://www.cairographics.org/releases/ -DISTFILES = cairo-$(GARVERSION).tar.gz +DISTNAME = cairo-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +PACKAGES = CSWlibcairo CSWlibcairodevel CSWlibcairodoc +CATALOGNAME_CSWlibcairo = libcairo +CATALOGNAME_CSWlibcairodevel = libcairo_devel +CATALOGNAME_CSWlibcairodoc = libcairo_doc + SPKG_DESC_CSWlibcairo = $(DESCRIPTION) SPKG_DESC_CSWlibcairodevel = $(DESCRIPTION) development package SPKG_DESC_CSWlibcairodoc = $(DESCRIPTION) documentaiton -DISTFILES += $(call admfiles,CSWlibcairo, ) -DISTFILES += $(call admfiles,CSWlibcairodevel, ) -DISTFILES += $(call admfiles,CSWlibcairodoc, ) - PKGFILES_CSWlibcairodevel = $(PKGFILES_DEVEL) -PKGFILES_CSWlibcairodevel += /opt/csw/share/doc/libcairo_devel/.* -PKGFILES_CSWlibcairodoc = $(prefix)/share/gtk-doc.* -PKGFILES_CSWlibcairodoc += /opt/csw/share/doc/libcairo_doc/.* +PKGFILES_CSWlibcairodevel += $(docdir)/libcairo_devel/.* +PKGFILES_CSWlibcairodoc = $(sharedstatedir)/gtk-doc.* +PKGFILES_CSWlibcairodoc += $(docdir)/libcairo_doc/.* -REQUIRED_PKGS_CSWlibcairodevel = CSWlibcairo -REQUIRED_PKGS_CSWlibcairodoc = -REQUIRED_PKGS_CSWlibcairo += CSWfconfig -REQUIRED_PKGS_CSWlibcairo += CSWftype2 -REQUIRED_PKGS_CSWlibcairo += CSWlibxrender -REQUIRED_PKGS_CSWlibcairo += CSWpixman -REQUIRED_PKGS_CSWlibcairo += CSWpng -REQUIRED_PKGS_CSWlibcairo += CSWzlib +REQUIRED_PKGS_CSWlibcairo = CSWfconfig +REQUIRED_PKGS_CSWlibcairo += CSWftype2 +REQUIRED_PKGS_CSWlibcairo += CSWlibxrender +REQUIRED_PKGS_CSWlibcairo += CSWpixman +REQUIRED_PKGS_CSWlibcairo += CSWpng +REQUIRED_PKGS_CSWlibcairo += CSWzlib +REQUIRED_PKGS_CSWlibcairodevel = CSWlibcairo +REQUIRED_PKGS_CSWlibcairodoc = +# Wait for libpixman, libfontconfig and libXrender to be 64 bit +#BUILD64 = 1 + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-tests --enable-xlib=yes --enable-xlib-xrender=yes --enable-ft=yes --with-x CONFIGURE_ARGS += --enable-png=yes --enable-ps=yes --enable-pdf=yes --enable-svg=yes CONFIGURE_ARGS += --enable-gtk-doc --enable-test-surfaces=yes -post-extract: - ( cd $(WORKROOTDIR)/build-$(firstword $(MODULATIONS)) ; \ - mv cairo-$(GARVERSION) $(GARNAME)-$(GARVERSION) ) - @$(MAKECOOKIE) - include gar/category.mk Deleted: csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec =================================================================== --- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/files/CSWlibcairo.gspec 2009-04-14 11:32:34 UTC (rev 4297) @@ -1,9 +0,0 @@ -%var bitname libcairo -%var pkgname CSWlibcairo -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - Deleted: csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec =================================================================== --- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodevel.gspec 2009-04-14 11:32:34 UTC (rev 4297) @@ -1,9 +0,0 @@ -%var bitname libcairo_devel -%var pkgname CSWlibcairodevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - Deleted: csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec =================================================================== --- csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec 2009-04-13 19:29:36 UTC (rev 4296) +++ csw/mgar/pkg/libcairo/trunk/files/CSWlibcairodoc.gspec 2009-04-14 11:32:34 UTC (rev 4297) @@ -1,9 +0,0 @@ -%var bitname libcairo_doc -%var pkgname CSWlibcairodoc -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 13:48:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 11:48:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4298] csw/mgar/pkg Message-ID: Revision: 4298 http://gar.svn.sourceforge.net/gar/?rev=4298&view=rev Author: dmichelsen Date: 2009-04-14 11:48:50 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libspectre: Initial commit Added Paths: ----------- csw/mgar/pkg/libspectre/ csw/mgar/pkg/libspectre/branches/ csw/mgar/pkg/libspectre/tags/ csw/mgar/pkg/libspectre/trunk/ csw/mgar/pkg/libspectre/trunk/Makefile csw/mgar/pkg/libspectre/trunk/checksums csw/mgar/pkg/libspectre/trunk/files/ csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff Property changes on: csw/mgar/pkg/libspectre/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libspectre/trunk/Makefile =================================================================== --- csw/mgar/pkg/libspectre/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:48:50 UTC (rev 4298) @@ -0,0 +1,22 @@ +GARNAME = libspectre +GARVERSION = 0.2.2 +CATEGORIES = lib + +DESCRIPTION = A small library for rendering Postscript documents +define BLURB +endef + +MASTER_SITES = http://libspectre.freedesktop.org/releases/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PATCHFILES = patch-stdint.diff + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +REQUIRED_PKGS = CSWgs + +# Disable for now as libgs is missing 64 bit +#BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +include gar/category.mk Added: csw/mgar/pkg/libspectre/trunk/checksums =================================================================== --- csw/mgar/pkg/libspectre/trunk/checksums (rev 0) +++ csw/mgar/pkg/libspectre/trunk/checksums 2009-04-14 11:48:50 UTC (rev 4298) @@ -0,0 +1,2 @@ +0600653653d9313e3be135b2217ea7fd download/libspectre-0.2.2.tar.gz +7f3edd354885de75d806dfd740a23881 download/patch-stdint.diff Added: csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff =================================================================== --- csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff (rev 0) +++ csw/mgar/pkg/libspectre/trunk/files/patch-stdint.diff 2009-04-14 11:48:50 UTC (rev 4298) @@ -0,0 +1,15 @@ +diff -Naur libspectre-0.2.2.orig/libspectre/spectre-device.c libspectre-0.2.2.patched/libspectre/spectre-device.c +--- libspectre-0.2.2.orig/libspectre/spectre-device.c 2008-11-25 16:15:50.000000000 +0100 ++++ libspectre-0.2.2.patched/libspectre/spectre-device.c 2009-04-14 13:38:53.249669809 +0200 +@@ -21,7 +21,11 @@ + #include + #include + #include ++#ifdef __sun ++#include ++#else + #include ++#endif + + #include "spectre-device.h" + #include "spectre-gs.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 13:50:11 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 11:50:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4299] csw/mgar/pkg/libspectre/trunk/Makefile Message-ID: Revision: 4299 http://gar.svn.sourceforge.net/gar/?rev=4299&view=rev Author: dmichelsen Date: 2009-04-14 11:50:11 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libspectre: Fix SOURCEURL Modified Paths: -------------- csw/mgar/pkg/libspectre/trunk/Makefile Modified: csw/mgar/pkg/libspectre/trunk/Makefile =================================================================== --- csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:48:50 UTC (rev 4298) +++ csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:50:11 UTC (rev 4299) @@ -10,6 +10,8 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PATCHFILES = patch-stdint.diff +SPKG_SOURCEURL = http://libspectre.freedesktop.org + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 14:12:17 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 12:12:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4300] csw/mgar/pkg/libspectre/trunk Message-ID: Revision: 4300 http://gar.svn.sourceforge.net/gar/?rev=4300&view=rev Author: dmichelsen Date: 2009-04-14 12:12:17 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libspectre: Add fixconfig for missing .la-files Modified Paths: -------------- csw/mgar/pkg/libspectre/trunk/Makefile csw/mgar/pkg/libspectre/trunk/checksums Added Paths: ----------- csw/mgar/pkg/libspectre/trunk/files/fixme.sh Modified: csw/mgar/pkg/libspectre/trunk/Makefile =================================================================== --- csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 11:50:11 UTC (rev 4299) +++ csw/mgar/pkg/libspectre/trunk/Makefile 2009-04-14 12:12:17 UTC (rev 4300) @@ -8,6 +8,7 @@ MASTER_SITES = http://libspectre.freedesktop.org/releases/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += fixme.sh PATCHFILES = patch-stdint.diff SPKG_SOURCEURL = http://libspectre.freedesktop.org @@ -22,3 +23,8 @@ CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk + +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) Modified: csw/mgar/pkg/libspectre/trunk/checksums =================================================================== --- csw/mgar/pkg/libspectre/trunk/checksums 2009-04-14 11:50:11 UTC (rev 4299) +++ csw/mgar/pkg/libspectre/trunk/checksums 2009-04-14 12:12:17 UTC (rev 4300) @@ -1,2 +1,3 @@ +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh 0600653653d9313e3be135b2217ea7fd download/libspectre-0.2.2.tar.gz 7f3edd354885de75d806dfd740a23881 download/patch-stdint.diff Copied: csw/mgar/pkg/libspectre/trunk/files/fixme.sh (from rev 4263, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/libspectre/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/libspectre/trunk/files/fixme.sh 2009-04-14 12:12:17 UTC (rev 4300) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 14:33:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 12:33:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4301] csw/mgar/pkg Message-ID: Revision: 4301 http://gar.svn.sourceforge.net/gar/?rev=4301&view=rev Author: dmichelsen Date: 2009-04-14 12:33:42 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libatk: Fix garname Added Paths: ----------- csw/mgar/pkg/libatk/ Removed Paths: ------------- csw/mgar/pkg/atk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 15:21:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 13:21:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4302] csw/mgar/pkg/libatk/trunk Message-ID: Revision: 4302 http://gar.svn.sourceforge.net/gar/?rev=4302&view=rev Author: dmichelsen Date: 2009-04-14 13:21:50 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libatk: Update to 1.26.0 Modified Paths: -------------- csw/mgar/pkg/libatk/trunk/Makefile csw/mgar/pkg/libatk/trunk/checksums Modified: csw/mgar/pkg/libatk/trunk/Makefile =================================================================== --- csw/mgar/pkg/libatk/trunk/Makefile 2009-04-14 12:33:42 UTC (rev 4301) +++ csw/mgar/pkg/libatk/trunk/Makefile 2009-04-14 13:21:50 UTC (rev 4302) @@ -1,8 +1,8 @@ -GARNAME = atk -GARVERSION = 1.6.0 +GARNAME = libatk +GARVERSION = 1.26.0 CATEGORIES = lib -DESCRIPTION = An accessibility toolkit for GNOME. +DESCRIPTION = An accessibility toolkit for GNOME define BLURB Accessibility is enabling people with disabilities to participate in substantial life activities that include work and the use of services, @@ -11,22 +11,19 @@ utilize all of the functionality of the GNOME user environment. endef -DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 - +MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/atk/1.26/ +DISTNAME = atk-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.bz2 # We define upstream file regex so we can be notifed of new upstream software release # UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 UFILES_REGEX = (\d+(?:\.\d+)*) -MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/atk/ -LIBDEPS += lib/glib2 +REQUIRED_PKGS = CSWggettextrt CSWglib2 +BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-debug=yes TEST_TARGET = check include gar/category.mk - -CFLAGS := -g $(CFLAGS) -CXXFLAGS := -g $(CXXFLAGS) -export CFLAGS CXXFLAGS Modified: csw/mgar/pkg/libatk/trunk/checksums =================================================================== --- csw/mgar/pkg/libatk/trunk/checksums 2009-04-14 12:33:42 UTC (rev 4301) +++ csw/mgar/pkg/libatk/trunk/checksums 2009-04-14 13:21:50 UTC (rev 4302) @@ -1 +1 @@ -5e699af22a934ea3c1c1ed3742da0500 download/atk-1.6.0.tar.bz2 +719229408019c548855673840679f156 download/atk-1.26.0.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Tue Apr 14 16:28:13 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 14 Apr 2009 14:28:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4303] csw/mgar/pkg/mysql5/trunk Message-ID: Revision: 4303 http://gar.svn.sourceforge.net/gar/?rev=4303&view=rev Author: bdwalton Date: 2009-04-14 14:28:12 +0000 (Tue, 14 Apr 2009) Log Message: ----------- bump to 5.1.33 Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile csw/mgar/pkg/mysql5/trunk/checksums Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-14 13:21:50 UTC (rev 4302) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-14 14:28:12 UTC (rev 4303) @@ -1,5 +1,5 @@ GARNAME = mysql5 -GARVERSION = 5.1.32 +GARVERSION = 5.1.33 CATEGORIES = server GARCOMPILER = GCC4 Modified: csw/mgar/pkg/mysql5/trunk/checksums =================================================================== --- csw/mgar/pkg/mysql5/trunk/checksums 2009-04-14 13:21:50 UTC (rev 4302) +++ csw/mgar/pkg/mysql5/trunk/checksums 2009-04-14 14:28:12 UTC (rev 4303) @@ -1,2 +1,2 @@ -f2d14b5e3b9d50b809c9b9985e4513b7 download/mysql-5.1.32.tar.gz +9c5711e9bea4514df6f2659f283f0aa0 download/mysql-5.1.33.tar.gz 5a55ac71abe980fe2a909d9712364cae download/CSWmysql5.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Tue Apr 14 17:00:11 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 14 Apr 2009 15:00:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4304] csw/mgar/pkg/docbook-style-xsl/trunk Message-ID: Revision: 4304 http://gar.svn.sourceforge.net/gar/?rev=4304&view=rev Author: bdwalton Date: 2009-04-14 15:00:11 +0000 (Tue, 14 Apr 2009) Log Message: ----------- install COPYING file; use addprefix for the SS_DIRS list intead of a foreach Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/checksums csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch Modified: csw/mgar/pkg/docbook-style-xsl/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-14 14:28:12 UTC (rev 4303) +++ csw/mgar/pkg/docbook-style-xsl/trunk/checksums 2009-04-14 15:00:11 UTC (rev 4304) @@ -1,4 +1,4 @@ 1b98827c1a02fcec57ec0f7376bb8815 download/CSWdocbookxsl.preremove -a92b47305b3499396aafda83e4bbfefb download/add_makefile.patch +6c34caa4c60bf8bd16d6059fee60eb85 download/add_makefile.patch c77c0c317040b2f2e366842bd9df2218 download/docbook-xsl-1.74.3.tar.bz2 2a032a95fbf24367d13acc8210f9cd72 download/docbook-xsl-doc-1.74.3.tar.bz2 Modified: csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-14 14:28:12 UTC (rev 4303) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/add_makefile.patch 2009-04-14 15:00:11 UTC (rev 4304) @@ -10,7 +10,7 @@ +SS_EX_DIRS = doc docsrc tools tests . +# directories that do get installed by install-xsl +DIRS = $(subst ./,,$(shell gfind . -maxdepth 1 -type d)) -+SS_DIRS = $(foreach D,$(filter-out $(SS_EX_DIRS),$(DIRS)),dir-$(D)) ++SS_DIRS = $(addprefix dir-,$(filter-out $(SS_EX_DIRS),$(DIRS))) + +prefix = $(DESTDIR)/opt/csw +bindir = $(prefix)/bin @@ -42,5 +42,5 @@ + +install-docs: + gmkdir -p $(docdir) -+ cp AUTHORS BUGS README TODO RELEASE-NOTES* NEWS* $(docdir)/ ++ cp COPYING AUTHORS BUGS README TODO RELEASE-NOTES* NEWS* $(docdir)/ + cp -R doc $(docdir)/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Tue Apr 14 17:01:16 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 14 Apr 2009 15:01:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4305] csw/mgar/pkg/docbook-style-xsl/trunk/Makefile Message-ID: Revision: 4305 http://gar.svn.sourceforge.net/gar/?rev=4305&view=rev Author: bdwalton Date: 2009-04-14 15:01:13 +0000 (Tue, 14 Apr 2009) Log Message: ----------- use post-extract-modulated to correct directory name instead of modifying WORKSRC (cleaner for other things) Modified Paths: -------------- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile Modified: csw/mgar/pkg/docbook-style-xsl/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-14 15:00:11 UTC (rev 4304) +++ csw/mgar/pkg/docbook-style-xsl/trunk/Makefile 2009-04-14 15:01:13 UTC (rev 4305) @@ -51,11 +51,16 @@ INSTALL_ARGS = DESTDIR=$(DESTDIR) -#to make the package extraction happy...(we don't use the - separator) -WORKSRC = $(WORKDIR)/docbook-xsl-$(GARVERSION) - include gar/category.mk +post-extract-modulated: WRONGDIR=docbook-xsl-$(GARVERSION) +post-extract-modulated: + @( cd $(WORKDIR); \ + if test -d $(WRONGDIR); then \ + mv $(WRONGDIR) $(DISTNAME); \ + fi; ) + @$(MAKECOOKIE) + install-%/Makefile.csw: @echo " ==> Running make install in $*" @$(INSTALL_ENV) $(MAKE) -f Makefile.csw DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 17:50:12 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 15:50:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4306] csw/mgar/pkg/pango/trunk Message-ID: Revision: 4306 http://gar.svn.sourceforge.net/gar/?rev=4306&view=rev Author: dmichelsen Date: 2009-04-14 15:50:11 +0000 (Tue, 14 Apr 2009) Log Message: ----------- pango: Update to 1.24.1 and dynamic gspec Modified Paths: -------------- csw/mgar/pkg/pango/trunk/Makefile csw/mgar/pkg/pango/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/pango/trunk/files/CSWpango.gspec csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec Modified: csw/mgar/pkg/pango/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango/trunk/Makefile 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/Makefile 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,5 +1,5 @@ GARNAME = libpango -GARVERSION = 1.24.0 +GARVERSION = 1.24.1 CATEGORIES = lib DESCRIPTION = A framework for the layout and rendering of international text @@ -11,11 +11,16 @@ endef MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/pango/1.24/ -DISTFILES = pango-$(GARVERSION).tar.bz2 -DISTFILES += $(call admfiles,CSWpango, postinstall) -DISTFILES += $(call admfiles,CSWpangodoc,) -DISTFILES += $(call admfiles,CSWpangodevel,) +DISTNAME = pango-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.bz2 +PACKAGES = CSWpango CSWpangodevel CSWpangodoc +CATALOGNAME_CSWpango = libpango +CATALOGNAME_CSWpangodevel = libpango_devel +CATALOGNAME_CSWpangodoc = libpango_doc + +SPKG_SOURCEURL = http://www.pango.org/ + # We define upstream file regex so we can be notifed of new upstream software release UPSTREAM_MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/pango/ UFILES_REGEX = (\d+(?:\.\d+)*) @@ -24,21 +29,15 @@ CONFIGURE_ARGS += --with-x --enable-gtk-doc # CONFIGURE_ARGS += --with-included-modules -PREREQUISITE_PKGS += CSWgtk-doc CSWlibxslt - +PREREQUISITE_PKGS = CSWgtk-doc CSWlibxslt REQUIRED_PKGS_CSWpango = CSWggettextrt CSWglib2 +REQUIRED_PKGS_CSWpangodevel = CSWpango # Dynamic prototype PKGFILES_CSWpangodevel = $(PKGFILES_DEVEL) -PKGFILES_CSWpangodevel += /opt/csw/share/doc/libpango_devel/license -PKGFILES_CSWpangodoc = /opt/csw/share/gtk-doc/.* -PKGFILES_CSWpangodoc += /opt/csw/share/doc/libpango_doc/license +PKGFILES_CSWpangodoc = $(sharedstatedir)/gtk-doc/.* # Do not execute make test step TEST_SCRIPTS = include gar/category.mk - -post-extract: - ( cd $(WORKROOTDIR) ; for i in build-isa-* ; do mv $$i/pango-$(GARVERSION) $$i/$(GARNAME)-$(GARVERSION) ; done ) - @$(MAKECOOKIE) Modified: csw/mgar/pkg/pango/trunk/checksums =================================================================== --- csw/mgar/pkg/pango/trunk/checksums 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/checksums 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,5 +1 @@ -d209f41079833cd2ef2c5e580ab9c5ee download/pango-1.24.0.tar.bz2 -da5c6f501c3e86786917439354c131ce download/CSWpango.gspec -d37130471541f2025b465e9d21471dd3 download/CSWpango.postinstall -7c66de2a6fe8dabb01f04e23e93c83ba download/CSWpangodoc.gspec -b71fe2f312d197099f67bab293fdace2 download/CSWpangodevel.gspec +af0beac1dd1825e241c5728081f16acd download/pango-1.24.1.tar.bz2 Deleted: csw/mgar/pkg/pango/trunk/files/CSWpango.gspec =================================================================== --- csw/mgar/pkg/pango/trunk/files/CSWpango.gspec 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/files/CSWpango.gspec 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,9 +0,0 @@ -%var bitname libpango -%var pkgname CSWpango -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - Deleted: csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec =================================================================== --- csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/files/CSWpangodevel.gspec 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,7 +0,0 @@ -%var bitname libpango_devel -%var pkgname CSWpangodevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information Deleted: csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec =================================================================== --- csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec 2009-04-14 15:01:13 UTC (rev 4305) +++ csw/mgar/pkg/pango/trunk/files/CSWpangodoc.gspec 2009-04-14 15:50:11 UTC (rev 4306) @@ -1,9 +0,0 @@ -%var bitname libpango_doc -%var pkgname CSWpangodoc -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - - -Please see /opt/csw/share/doc/%{GARNAME} for license information - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Tue Apr 14 17:51:55 2009 From: bwalton at opencsw.org (Ben Walton) Date: Tue, 14 Apr 2009 11:51:55 -0400 Subject: [csw-devel] updated gar svn check Message-ID: <1239724080-sup-288@ntdws12.chass.utoronto.ca> Hi All, Here is an updated patch against the current gar r4305 that implements package renaming when the svn repo is in the UNCOMMITTED state. I opted against altering the package contents in favour of simply renaming the completed package files. This avoided REV= being changed to something that checkpkg wouldn't like, which I felt was good. The other points Dago raised (directory based packages and a release target) will be addressed separately. Feedback welcome. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: svn_check.patch Type: application/octet-stream Size: 2061 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From valholla at users.sourceforge.net Tue Apr 14 20:30:47 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 14 Apr 2009 18:30:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4307] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4307 http://gar.svn.sourceforge.net/gar/?rev=4307&view=rev Author: valholla Date: 2009-04-14 18:30:47 +0000 (Tue, 14 Apr 2009) Log Message: ----------- update packages for correct runtime versions Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/gar_override.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-14 15:50:11 UTC (rev 4306) +++ csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-14 18:30:47 UTC (rev 4307) @@ -3,7 +3,7 @@ WORKDIR = $(WORKROOTDIR)/build-$(MODULATION)-$(GAROSREL)-$(GARCH) PATCHDIR = $(WORKDIR)/$(GARNAME)-$(GARVERSION) INSTALLISADIR = $(WORKROOTDIR)/install-$(MODULATION)-$(GAROSREL)-$(GARCH) -PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GARCH)) +PKGROOT = $(abspath $(WORKROOTDIR)/pkgroot-$(GAROSREL)-$(GARCH)) OBJECT_DIR = $(WORKDIR)/objdir WORKSRC = $(OBJECT_DIR) DIRPATHS = @@ -38,7 +38,7 @@ CONFIGURE_SCRIPTS = objdir TEST_SCRIPTS = skip post-configure-modulated: fix-bootflags -MERGE_SCRIPTS_isa-i386 = amd +#MERGE_SCRIPTS_isa-i386 = amd ## Run checkpkg Manually ENABLE_CHECK = 0 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 15:50:11 UTC (rev 4306) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 18:30:47 UTC (rev 4307) @@ -62,121 +62,119 @@ ## Define Dependencies COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4ada = CSWgcc4adart $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert $(COMMON_REQUIRE) CSWbinutils +REQUIRED_PKGS_CSWgcc4core = $(COMMON_REQUIRE) CSWbinutils CSWggettextrt REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4gfortranrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt CSWiconv -REQUIRED_PKGS_CSWgcc4java = CSWgcc4javart CSWgcc4corert -REQUIRED_PKGS_CSWgcc4java += CSWzlib $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWzlib $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4objc = CSWgcc4objcrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core $(COMMON_REQUIRE) ## Define the Contents of the Packages ## gcc4ada Definitions -PKGFILES_CSWgcc4ada = .*/libexec/.*gnat1 -PKGFILES_CSWgcc4ada += .*/adalib/.* -PKGFILES_CSWgcc4ada += .*/adainclude/.* -PKGFILES_CSWgcc4ada += .*/info/.*gnat.* -PKGFILES_CSWgcc4ada += .*/bin/gnat.* +PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* +PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* +PKGFILES_CSWgcc4ada += .*/gcc4/bin/gnat.* ## gcc4gfortran Definitions -PKGFILES_CSWgcc4gfortran = .*/bin/.*gfortran -PKGFILES_CSWgcc4gfortran += .*/libexec/.*f951 -PKGFILES_CSWgcc4gfortran += .*/man1/gfortran.1 -PKGFILES_CSWgcc4gfortran += .*/info/gfortran.* +PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran +PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 +PKGFILES_CSWgcc4gfortran += .*/gcc4/man1/gfortran.1 +PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* ## gcc4g++ Definitions -PKGFILES_CSWgcc4g++ = .*/bin/.*g\+\+ -PKGFILES_CSWgcc4g++ += .*/bin/.*c\+\+ -PKGFILES_CSWgcc4g++ += .*/libexec/.*cc1plus -PKGFILES_CSWgcc4g++ += .*/man1/g\+\+.1 -PKGFILES_CSWgcc4g++ += .*/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* -PKGFILES_CSWgcc4g++ += .*/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* +PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus +PKGFILES_CSWgcc4g++ += .*/gcc4/man1/g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* ## gcc4java Definitions -PKGFILES_CSWgcc4java = .*/bin/.*gcj.* -PKGFILES_CSWgcc4java += .*/bin/.*jv-scan -PKGFILES_CSWgcc4java += .*/bin/.*jv-convert -PKGFILES_CSWgcc4java += .*/bin/.*jcf-dump -PKGFILES_CSWgcc4java += .*/bin/.*grmi.* -PKGFILES_CSWgcc4java += .*/bin/.*grepjar -PKGFILES_CSWgcc4java += .*/bin/.*gjnih -PKGFILES_CSWgcc4java += .*/bin/.*gij -PKGFILES_CSWgcc4java += .*/bin/.*fastjar -PKGFILES_CSWgcc4java += .*/bin/.*gjar.* -PKGFILES_CSWgcc4java += .*/bin/.*gjavah -PKGFILES_CSWgcc4java += .*/bin/.*gorbd -PKGFILES_CSWgcc4java += .*/bin/.*addr2name.awk -PKGFILES_CSWgcc4java += .*/bin/.*gappletviewer -PKGFILES_CSWgcc4java += .*/bin/.*gkeytool -PKGFILES_CSWgcc4java += .*/bin/.*gserialver -PKGFILES_CSWgcc4java += .*/bin/.*gtnameserv -PKGFILES_CSWgcc4java += .*/bin/.*gnative2ascii -PKGFILES_CSWgcc4java += .*/bin/.*gc-analyze -PKGFILES_CSWgcc4java += .*/man1/gcj.* -PKGFILES_CSWgcc4java += .*/man1/gij.* -PKGFILES_CSWgcc4java += .*/man1/jv.* -PKGFILES_CSWgcc4java += .*/man1/jcf.* -PKGFILES_CSWgcc4java += .*/man1/grmi.* -PKGFILES_CSWgcc4java += .*/man1/.*jar.* -PKGFILES_CSWgcc4java += .*/man1/.*jni.* -PKGFILES_CSWgcc4java += .*/man1/.*java.* -PKGFILES_CSWgcc4java += .*/man1/gorbd.* -PKGFILES_CSWgcc4java += .*/man1/gapplet.* -PKGFILES_CSWgcc4java += .*/man1/gkeytool.* -PKGFILES_CSWgcc4java += .*/man1/gserialver.* -PKGFILES_CSWgcc4java += .*/man1/gtnameserv.* -PKGFILES_CSWgcc4java += .*/man1/gnative2ascii.* -PKGFILES_CSWgcc4java += .*/man1/gc-analyze.* -PKGFILES_CSWgcc4java += .*/libexec/.*collect.* -PKGFILES_CSWgcc4java += .*/libexec/.*jvgenmain -PKGFILES_CSWgcc4java += .*/libexec/.*jc1.* -PKGFILES_CSWgcc4java += .*/info/gcj.* -PKGFILES_CSWgcc4java += .*/include/.*gcj/.* -PKGFILES_CSWgcc4java += .*/include/.*awt/.* -PKGFILES_CSWgcc4java += .*/include/.*classpath/.* -PKGFILES_CSWgcc4java += .*/include/.*java.* -PKGFILES_CSWgcc4java += .*/include/.*ffi.h -PKGFILES_CSWgcc4java += .*/include/.*org/.* +PKGFILES_CSWgcc4java = .*/gcc4/bin/.*gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-scan +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-convert +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jcf-dump +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grepjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjnih +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gij +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*fastjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjar.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjavah +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gorbd +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*addr2name.awk +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gappletviewer +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gkeytool +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gserialver +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze +PKGFILES_CSWgcc4java += .*/gcc4/man1/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gij.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/jv.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/jcf.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jar.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jni.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gorbd.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gapplet.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gkeytool.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gserialver.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gtnameserv.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gnative2ascii.* +PKGFILES_CSWgcc4java += .*/gcc4/man1/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* +PKGFILES_CSWgcc4java += .*/gcc4/info/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*gcj/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*awt/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*classpath/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*ffi.h +PKGFILES_CSWgcc4java += .*/gcc4/include/.*org/.* ## gcc4objc Definitions -PKGFILES_CSWgcc4objc = .*/libexec/.*cc1obj -PKGFILES_CSWgcc4objc += .*/include/.*objc/.* +PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj +PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* ####### RunTime Packages ## gcc4adart -PKGFILES_CSWgcc4adart = .*/lib/.*libgnat.* -PKGFILES_CSWgcc4adart += .*/lib/.*libgnarl.* +PKGFILES_CSWgcc4adart = .*/opt/csw/lib/.*libgnat.* +PKGFILES_CSWgcc4adart += .*/opt/csw/lib/.*libgnarl.* ## gcc4corert -PKGFILES_CSWgcc4corert = .*/lib/.*libgcc_s.* -PKGFILES_CSWgcc4corert += .*/lib/.*libgomp.* -PKGFILES_CSWgcc4corert += .*/lib/.*libiberty.* -PKGFILES_CSWgcc4corert += .*/lib/.*libssp.* +PKGFILES_CSWgcc4corert = .*/opt/csw/lib/.*libgcc_s.* +PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libgomp.* +PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libiberty.* +PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libssp.* ## gcc4gfortranrt -PKGFILES_CSWgcc4gfortranrt = .*/lib/.*libgfortran.* +PKGFILES_CSWgcc4gfortranrt = .*/opt/csw/lib/.*libgfortran.* ## gcc4g++rt -PKGFILES_CSWgcc4g++rt = .*/lib/.*libstdc.* -PKGFILES_CSWgcc4g++rt += .*/lib/.*libsupc\+\+.* +PKGFILES_CSWgcc4g++rt = .*/opt/csw/lib/.*libstdc.* +PKGFILES_CSWgcc4g++rt += .*/opt/csw/lib/.*libsupc\+\+.* ## gcc4javart -PKGFILES_CSWgcc4javart = .*/share/java/.* -PKGFILES_CSWgcc4javart += .*/lib/.*libgij.* -PKGFILES_CSWgcc4javart += .*/lib/.*libffi.* -PKGFILES_CSWgcc4javart += .*/lib/.*lib-gnu-awt.* -PKGFILES_CSWgcc4javart += .*/lib/.*security/classpath.* -PKGFILES_CSWgcc4javart += .*/lib/.*logging.properties -PKGFILES_CSWgcc4javart += .*/lib/.*pkgconfig.* -PKGFILES_CSWgcc4javart += .*/lib/.*gcj.* -PKGFILES_CSWgcc4javart += .*/lib/.*libgcj.* +PKGFILES_CSWgcc4javart = .*/opt/csw/lib/.*libgij.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libffi.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*lib-gnu-awt.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*security/classpath.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*logging.properties +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*pkgconfig.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*gcj.* +PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libgcj.* ## gcc4objc Runtime -PKGFILES_CSWgcc4objcrt = .*/lib/.*libobjc.* +PKGFILES_CSWgcc4objcrt = .*/opt/csw/lib/.*libobjc.* Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-14 15:50:11 UTC (rev 4306) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-14 18:30:47 UTC (rev 4307) @@ -27,6 +27,29 @@ $(WORKSRC)/Makefile) @$(MAKECOOKIE) +post-merge-modulated: + @( gecho "[===> Creating Runtime Package files <===]" ) + @( ginstall -d $(PKGROOT)/opt/csw/lib ) + @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/*.so* $(PKGROOT)/opt/csw/lib/ ) + @( gchmod 0755 $(PKGROOT)/opt/csw/lib/*.so* ) + @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ + $(PKGROOT)/opt/csw/lib/ ) + @( if [ "`uname -p`" = 'i386' ]; then \ + if [ "`uname -r`" = '5.10' ]; then \ + ginstall -d $(PKGROOT)/opt/csw/lib/amd64; \ + gcp -d $(PKGROOT)/opt/csw/gcc4/lib/amd64/*.so* \ + $(PKGROOT)/opt/csw/lib/amd64/; \ + gchmod 0755 $(PKGROOT)/opt/csw/lib/amd64/*.so*; \ + fi; \ + fi ) + @( if [ "`uname -p`" = 'sparc' ]; then \ + ginstall -d $(PKGROOT)/opt/csw/lib/sparcv9; \ + gcp -d $(PKGROOT)/opt/csw/gcc4/lib/sparcv9/*.so* \ + $(PKGROOT)/opt/csw/lib/sparcv9/; \ + gchmod 0755 $(PKGROOT)/opt/csw/lib/sparcv9/*.so*; \ + fi ) + @$(MAKECOOKIE) + test-skip: @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dam at opencsw.org Tue Apr 14 21:02:02 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Tue, 14 Apr 2009 21:02:02 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239724080-sup-288@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> Message-ID: <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> Hi Ben, Am 14.04.2009 um 17:51 schrieb Ben Walton: > Here is an updated patch against the current gar r4305 that implements > package renaming when the svn repo is in the UNCOMMITTED state. I > opted against altering the package contents in favour of simply > renaming the completed package files. This avoided REV= being changed > to something that checkpkg wouldn't like, which I felt was good. I see two issues here: - svncheck is skipped on ENABLE_CHECK=0, which currently must be done for packages with Solaris 10 x86 dependencies build on Solaris 8 (especially to libm.so.2). So this renaming is skipped on a number of cases. I would also add it to the other case. - Renaming afterwards looks unclean to me instead of just writing the package to another name. The already used 'mkpackage -qs' looks more complicated than necessary to me. Maybe we should change mkpackage and pass the package name explicitly. Best regards -- Dago From dmichelsen at users.sourceforge.net Tue Apr 14 21:05:34 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 19:05:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4308] csw/mgar/pkg/pcre/trunk/Makefile Message-ID: Revision: 4308 http://gar.svn.sourceforge.net/gar/?rev=4308&view=rev Author: dmichelsen Date: 2009-04-14 19:05:33 +0000 (Tue, 14 Apr 2009) Log Message: ----------- pcre: Add direct dependencies to pcre to keep checkpkg quiet Modified Paths: -------------- csw/mgar/pkg/pcre/trunk/Makefile Modified: csw/mgar/pkg/pcre/trunk/Makefile =================================================================== --- csw/mgar/pkg/pcre/trunk/Makefile 2009-04-14 18:30:47 UTC (rev 4307) +++ csw/mgar/pkg/pcre/trunk/Makefile 2009-04-14 19:05:33 UTC (rev 4308) @@ -16,8 +16,8 @@ SPKG_SOURCEURL = http://www.pcre.org PREREQUISITE_PKGS = CSWgnulinks -REQUIRED_PKGS_CSWpcre = CSWpcrert REQUIRED_PKGS_CSWpcrert = CSWzlib CSWbzip2 CSWreadline CSWncurses +REQUIRED_PKGS_CSWpcre = CSWpcrert $(REQUIRED_PKGS_CSWpcrert) PACKAGES = CSWpcre CSWpcrert CATALOGNAME_CSWpcrert = pcre_rt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 21:21:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 19:21:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4309] csw/mgar/pkg/libtheora/trunk/Makefile Message-ID: Revision: 4309 http://gar.svn.sourceforge.net/gar/?rev=4309&view=rev Author: dmichelsen Date: 2009-04-14 19:21:23 +0000 (Tue, 14 Apr 2009) Log Message: ----------- libtheora: Disable non-functioning asm-optimizations in x86 Modified Paths: -------------- csw/mgar/pkg/libtheora/trunk/Makefile Modified: csw/mgar/pkg/libtheora/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-14 19:05:33 UTC (rev 4308) +++ csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-14 19:21:23 UTC (rev 4309) @@ -25,6 +25,7 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --disable-examples +CONFIGURE_ARGS += --disable-asm TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 14 21:43:17 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 14 Apr 2009 19:43:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4310] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4310 http://gar.svn.sourceforge.net/gar/?rev=4310&view=rev Author: valholla Date: 2009-04-14 19:43:17 +0000 (Tue, 14 Apr 2009) Log Message: ----------- fix package contents Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 19:21:23 UTC (rev 4309) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 19:43:17 UTC (rev 4310) @@ -78,6 +78,8 @@ ## gcc4ada Definitions PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnat.* +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnarl.* PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* @@ -85,6 +87,7 @@ ## gcc4gfortran Definitions PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran +PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.* PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 PKGFILES_CSWgcc4gfortran += .*/gcc4/man1/gfortran.1 PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* @@ -93,7 +96,11 @@ PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus -PKGFILES_CSWgcc4g++ += .*/gcc4/man1/g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.* +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.* +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libstdc\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libsupc\+\+.1 PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* @@ -117,21 +124,30 @@ PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze -PKGFILES_CSWgcc4java += .*/gcc4/man1/gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gij.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/jv.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/jcf.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/grmi.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jar.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/.*jni.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/.*java.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gorbd.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gapplet.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gkeytool.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gserialver.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gtnameserv.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gnative2ascii.* -PKGFILES_CSWgcc4java += .*/gcc4/man1/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gij.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/jv.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/jcf.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jar.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jni.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gorbd.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gapplet.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gkeytool.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gserialver.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gtnameserv.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gnative2ascii.* +PKGFILES_CSWgcc4java += .*/gcc4/man.*/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/share/java/.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgij.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libffi.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*lib-gnu-awt.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*security/classpath.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*logging.properties +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*pkgconfig.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgcj.* PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* @@ -145,6 +161,7 @@ ## gcc4objc Definitions PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.* PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* ####### RunTime Packages This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 22:01:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 20:01:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4311] csw/mgar/pkg Message-ID: Revision: 4311 http://gar.svn.sourceforge.net/gar/?rev=4311&view=rev Author: dmichelsen Date: 2009-04-14 20:01:08 +0000 (Tue, 14 Apr 2009) Log Message: ----------- speex: Initial commit Added Paths: ----------- csw/mgar/pkg/speex/ csw/mgar/pkg/speex/branches/ csw/mgar/pkg/speex/tags/ csw/mgar/pkg/speex/trunk/ csw/mgar/pkg/speex/trunk/Makefile csw/mgar/pkg/speex/trunk/checksums csw/mgar/pkg/speex/trunk/files/ Property changes on: csw/mgar/pkg/speex/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/speex/trunk/Makefile =================================================================== --- csw/mgar/pkg/speex/trunk/Makefile (rev 0) +++ csw/mgar/pkg/speex/trunk/Makefile 2009-04-14 20:01:08 UTC (rev 4311) @@ -0,0 +1,23 @@ +GARNAME = speex +GARVERSION = 1.2rc1 +CATEGORIES = lib + +DESCRIPTION = Speex audio codec support library +define BLURB +endef + +MASTER_SITES = http://downloads.xiph.org/releases/speex/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +PACKAGES = CSWspeex +CATALOGNAME = libspeex + +SPKG_SOURCEURL = http://www.speex.org/ + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +include gar/category.mk Added: csw/mgar/pkg/speex/trunk/checksums =================================================================== --- csw/mgar/pkg/speex/trunk/checksums (rev 0) +++ csw/mgar/pkg/speex/trunk/checksums 2009-04-14 20:01:08 UTC (rev 4311) @@ -0,0 +1 @@ +c4438b22c08e5811ff10e2b06ee9b9ae download/speex-1.2rc1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 14 22:10:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 14 Apr 2009 20:10:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4312] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4312 http://gar.svn.sourceforge.net/gar/?rev=4312&view=rev Author: valholla Date: 2009-04-14 20:10:50 +0000 (Tue, 14 Apr 2009) Log Message: ----------- fix package contents Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 20:01:08 UTC (rev 4311) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-14 20:10:50 UTC (rev 4312) @@ -89,7 +89,7 @@ PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.* PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 -PKGFILES_CSWgcc4gfortran += .*/gcc4/man1/gfortran.1 +PKGFILES_CSWgcc4gfortran += .*/gcc4/man/.*gfortran.1 PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* ## gcc4g++ Definitions @@ -163,6 +163,7 @@ PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.* PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* ####### RunTime Packages This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Tue Apr 14 22:16:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Tue, 14 Apr 2009 20:16:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4313] csw/mgar/pkg/vorbistools/trunk Message-ID: Revision: 4313 http://gar.svn.sourceforge.net/gar/?rev=4313&view=rev Author: dmichelsen Date: 2009-04-14 20:16:35 +0000 (Tue, 14 Apr 2009) Log Message: ----------- vorbistools: Add dependencys, libtool fix Modified Paths: -------------- csw/mgar/pkg/vorbistools/trunk/Makefile csw/mgar/pkg/vorbistools/trunk/checksums Added Paths: ----------- csw/mgar/pkg/vorbistools/trunk/files/fixme.sh Modified: csw/mgar/pkg/vorbistools/trunk/Makefile =================================================================== --- csw/mgar/pkg/vorbistools/trunk/Makefile 2009-04-14 20:10:50 UTC (rev 4312) +++ csw/mgar/pkg/vorbistools/trunk/Makefile 2009-04-14 20:16:35 UTC (rev 4313) @@ -13,10 +13,16 @@ DISTNAME = vorbis-tools-$(GARVERSION) MASTER_SITES = http://downloads.xiph.org/releases/vorbis/ DISTFILES = $(DISTNAME).tar.gz +DISTFILES += fixme.sh +SPKG_SOURCEURL = http://www.vorbis.com + PACKAGES = CSWvtools CATALOGNAME = vorbistools +REQUIRED_PKGS = CSWcurlrt CSWflac CSWggettextrt CSWiconv CSWlibao +REQUIRED_PKGS += CSWlibogg CSWspeex CSWsunmath CSWvorbis + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) @@ -30,3 +36,9 @@ TEST_TARGET = check include gar/category.mk + +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + Modified: csw/mgar/pkg/vorbistools/trunk/checksums =================================================================== --- csw/mgar/pkg/vorbistools/trunk/checksums 2009-04-14 20:10:50 UTC (rev 4312) +++ csw/mgar/pkg/vorbistools/trunk/checksums 2009-04-14 20:16:35 UTC (rev 4313) @@ -1 +1,2 @@ +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh df976d24e51ef3d87cd462edf747bf9a download/vorbis-tools-1.2.0.tar.gz Copied: csw/mgar/pkg/vorbistools/trunk/files/fixme.sh (from rev 4263, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/vorbistools/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/vorbistools/trunk/files/fixme.sh 2009-04-14 20:16:35 UTC (rev 4313) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 15 13:32:54 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 15 Apr 2009 11:32:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4314] csw/mgar/pkg/libtheora/trunk/Makefile Message-ID: Revision: 4314 http://gar.svn.sourceforge.net/gar/?rev=4314&view=rev Author: dmichelsen Date: 2009-04-15 11:32:54 +0000 (Wed, 15 Apr 2009) Log Message: ----------- libtheora: Fix package name Modified Paths: -------------- csw/mgar/pkg/libtheora/trunk/Makefile Modified: csw/mgar/pkg/libtheora/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-14 20:16:35 UTC (rev 4313) +++ csw/mgar/pkg/libtheora/trunk/Makefile 2009-04-15 11:32:54 UTC (rev 4314) @@ -18,6 +18,9 @@ PREREQUISITE_PKGS = CSWtransfig REQUIRED_PKGS = CSWlibogg +PACKAGES = CSWtheora +CATALOGNAME = libtheora + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*).tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 15 14:17:52 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 15 Apr 2009 12:17:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4315] csw/mgar/pkg Message-ID: Revision: 4315 http://gar.svn.sourceforge.net/gar/?rev=4315&view=rev Author: dmichelsen Date: 2009-04-15 12:17:52 +0000 (Wed, 15 Apr 2009) Log Message: ----------- binutils: Initial commit Added Paths: ----------- csw/mgar/pkg/binutils/ csw/mgar/pkg/binutils/branches/ csw/mgar/pkg/binutils/tags/ csw/mgar/pkg/binutils/trunk/ csw/mgar/pkg/binutils/trunk/Makefile csw/mgar/pkg/binutils/trunk/checksums csw/mgar/pkg/binutils/trunk/files/ Property changes on: csw/mgar/pkg/binutils/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/binutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/binutils/trunk/Makefile (rev 0) +++ csw/mgar/pkg/binutils/trunk/Makefile 2009-04-15 12:17:52 UTC (rev 4315) @@ -0,0 +1,20 @@ +GARNAME = binutils +GARVERSION = 2.19.1 +CATEGORIES = utils + +DESCRIPTION = GNU binary utilities: gas, gld, gprof, and others +define BLURB +endef + +MASTER_SITES = $(GNU_MIRROR) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 + +REQUIRED_PKGS = CSWzlib CSWiconv CSWggettextrt + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +include gar/category.mk Added: csw/mgar/pkg/binutils/trunk/checksums =================================================================== --- csw/mgar/pkg/binutils/trunk/checksums (rev 0) +++ csw/mgar/pkg/binutils/trunk/checksums 2009-04-15 12:17:52 UTC (rev 4315) @@ -0,0 +1 @@ +09a8c5821a2dfdbb20665bc0bd680791 download/binutils-2.19.1.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 15 14:56:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 15 Apr 2009 12:56:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4316] csw/mgar/pkg/binutils/trunk/Makefile Message-ID: Revision: 4316 http://gar.svn.sourceforge.net/gar/?rev=4316&view=rev Author: dmichelsen Date: 2009-04-15 12:56:06 +0000 (Wed, 15 Apr 2009) Log Message: ----------- binutils: Fix test target Modified Paths: -------------- csw/mgar/pkg/binutils/trunk/Makefile Modified: csw/mgar/pkg/binutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/binutils/trunk/Makefile 2009-04-15 12:17:52 UTC (rev 4315) +++ csw/mgar/pkg/binutils/trunk/Makefile 2009-04-15 12:56:06 UTC (rev 4316) @@ -17,4 +17,6 @@ BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) +TEST_TARGET = check + include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 15 15:53:17 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 15 Apr 2009 13:53:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4317] csw/mgar/pkg/mysql5/trunk Message-ID: Revision: 4317 http://gar.svn.sourceforge.net/gar/?rev=4317&view=rev Author: bdwalton Date: 2009-04-15 13:53:17 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Convert to dynamic gspec, add initial framework for package splitting. Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile csw/mgar/pkg/mysql5/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 12:56:06 UTC (rev 4316) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 13:53:17 UTC (rev 4317) @@ -10,9 +10,18 @@ (Structured Query Language) database server. endef +PACKAGES = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel +PACKAGES += CSWmysql5rt CSWmysql5test + +CATALOGNAME_CSWmysql5 = $(GARNAME) +CATALOGNAME_CSWmysql5bench = $(GARNAME)bench +CATALOGNAME_CSWmysql5clien = $(GARNAME)client +CATALOGNAME_CSWmysql5devel = $(GARNAME)devel +CATALOGNAME_CSWmysql5rt = $(GARNAME)rt +CATALOGNAME_CSWmysql5test = $(GARNAME)test + MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/ DISTFILES = mysql-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWmysql5,) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz @@ -20,8 +29,8 @@ # Change prefix to /opt/csw/mysql5 prefix = /opt/csw/mysql5 -WORKSRC = $(WORKDIR)/mysql-$(GARVERSION) - +# because we alter the prefix. this gets us proper linking as well as +# LD_OPTIONS (RPATH) EXTRA_LIB = /opt/csw/lib # Set ./configure options @@ -42,3 +51,9 @@ include gar/category.mk +post-extract-modulated: + @( cd $(WORKDIR); \ + if test -d mysql-$(GARVERSION); then \ + mv mysql-$(GARVERSION) $(DISTNAME); \ + fi; ) + @$(MAKECOOKIE) \ No newline at end of file Modified: csw/mgar/pkg/mysql5/trunk/checksums =================================================================== --- csw/mgar/pkg/mysql5/trunk/checksums 2009-04-15 12:56:06 UTC (rev 4316) +++ csw/mgar/pkg/mysql5/trunk/checksums 2009-04-15 13:53:17 UTC (rev 4317) @@ -1,2 +1 @@ 9c5711e9bea4514df6f2659f283f0aa0 download/mysql-5.1.33.tar.gz -5a55ac71abe980fe2a909d9712364cae download/CSWmysql5.gspec Deleted: csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec =================================================================== --- csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec 2009-04-15 12:56:06 UTC (rev 4316) +++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.gspec 2009-04-15 13:53:17 UTC (rev 4317) @@ -1,4 +0,0 @@ -%var bitname mysql5 -%var pkgname CSWmysql5 -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC}/LICENSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Wed Apr 15 16:13:48 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:13:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4318] csw/mgar/pkg/curl/trunk Message-ID: Revision: 4318 http://gar.svn.sourceforge.net/gar/?rev=4318&view=rev Author: harpchad Date: 2009-04-15 14:13:48 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Fix header files to support both 32 and 64bit (sparc) Modified Paths: -------------- csw/mgar/pkg/curl/trunk/Makefile csw/mgar/pkg/curl/trunk/checksums Added Paths: ----------- csw/mgar/pkg/curl/trunk/files/curlbuild.h Modified: csw/mgar/pkg/curl/trunk/Makefile =================================================================== --- csw/mgar/pkg/curl/trunk/Makefile 2009-04-15 13:53:17 UTC (rev 4317) +++ csw/mgar/pkg/curl/trunk/Makefile 2009-04-15 14:13:48 UTC (rev 4318) @@ -19,6 +19,7 @@ DISTFILES += libcurl.so.2.0.2.s DISTFILES += libcurl.so.3.0.0.i DISTFILES += libcurl.so.2.0.2.i +DISTFILES += curlbuild.h PACKAGES = CSWcurl CSWcurlrt CSWcurldevel CATALOGNAME_CSWcurl = curl @@ -52,8 +53,18 @@ @cp $(FILEDIR)/libcurl.so.2.0.2.s $(INSTALLISADIR)/opt/csw/lib/libcurl.so.2.0.2 @( cd $(INSTALLISADIR)/opt/csw/lib; ln -s libcurl.so.3.0.0 libcurl.so.3 ) @( cd $(INSTALLISADIR)/opt/csw/lib; ln -s libcurl.so.2.0.2 libcurl.so.2 ) + @mv $(INSTALLISADIR)/opt/csw/include/curl/curlbuild.h $(INSTALLISADIR)/opt/csw/include/curl/curlbuild-32.h + @cp $(FILEDIR)/curlbuild.h $(INSTALLISADIR)/opt/csw/include/curl/curlbuild.h $(DONADA) +post-install-isa-sparcv9: + @mv $(INSTALLISADIR)/opt/csw/include/curl/curlbuild.h $(INSTALLISADIR)/opt/csw/include/curl/curlbuild-64.h + $(DONADA) + +post-merge-isa-sparcv9: + @cp $(INSTALLISADIR)/opt/csw/include/curl/curlbuild-64.h $(PKGROOT)/opt/csw/include/curl/curlbuild-64.h + $(DONADA) + post-install-isa-i386: @cp $(FILEDIR)/libcurl.so.3.0.0.i $(INSTALLISADIR)/opt/csw/lib/libcurl.so.3.0.0 @cp $(FILEDIR)/libcurl.so.2.0.2.i $(INSTALLISADIR)/opt/csw/lib/libcurl.so.2.0.2 Modified: csw/mgar/pkg/curl/trunk/checksums =================================================================== --- csw/mgar/pkg/curl/trunk/checksums 2009-04-15 13:53:17 UTC (rev 4317) +++ csw/mgar/pkg/curl/trunk/checksums 2009-04-15 14:13:48 UTC (rev 4318) @@ -3,3 +3,4 @@ b46b41659b805013740eeb76e759af4b download/libcurl.so.2.0.2.s 30e826ef67b6ce799b32154250014dd9 download/libcurl.so.3.0.0.i a09fcad6dfcd9636061dfab7598357be download/libcurl.so.2.0.2.i +e4d1b44b1176769755e51ba43408b0b3 download/curlbuild.h Added: csw/mgar/pkg/curl/trunk/files/curlbuild.h =================================================================== --- csw/mgar/pkg/curl/trunk/files/curlbuild.h (rev 0) +++ csw/mgar/pkg/curl/trunk/files/curlbuild.h 2009-04-15 14:13:48 UTC (rev 4318) @@ -0,0 +1,6 @@ +#Allow 32 and 64 bit headers to coexist +#if defined __arch64__ || defined __sparcv9 +#include "curlbuild-64.h" +#else +#include "curlbuild-32.h" +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 15 16:14:43 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:14:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4319] csw/mgar/pkg/mysql5/trunk/Makefile Message-ID: Revision: 4319 http://gar.svn.sourceforge.net/gar/?rev=4319&view=rev Author: bdwalton Date: 2009-04-15 14:14:43 +0000 (Wed, 15 Apr 2009) Log Message: ----------- override distname instead of moving the tarball extracted dir. Modified Paths: -------------- csw/mgar/pkg/mysql5/trunk/Makefile Modified: csw/mgar/pkg/mysql5/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 14:13:48 UTC (rev 4318) +++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-04-15 14:14:43 UTC (rev 4319) @@ -4,6 +4,8 @@ GARCOMPILER = GCC4 +DISTNAME = mysql-$(GARVERSION) + DESCRIPTION = Multithreaded SQL database define BLURB MySQL is a very fast, multi-threaded, multi-user and robust SQL @@ -50,10 +52,3 @@ # BUILD64 = 1 include gar/category.mk - -post-extract-modulated: - @( cd $(WORKDIR); \ - if test -d mysql-$(GARVERSION); then \ - mv mysql-$(GARVERSION) $(DISTNAME); \ - fi; ) - @$(MAKECOOKIE) \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Wed Apr 15 16:26:58 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:26:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4320] csw/mgar/pkg/curl/trunk Message-ID: Revision: 4320 http://gar.svn.sourceforge.net/gar/?rev=4320&view=rev Author: harpchad Date: 2009-04-15 14:26:57 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Fix typo Modified Paths: -------------- csw/mgar/pkg/curl/trunk/checksums csw/mgar/pkg/curl/trunk/files/curlbuild.h Modified: csw/mgar/pkg/curl/trunk/checksums =================================================================== --- csw/mgar/pkg/curl/trunk/checksums 2009-04-15 14:14:43 UTC (rev 4319) +++ csw/mgar/pkg/curl/trunk/checksums 2009-04-15 14:26:57 UTC (rev 4320) @@ -3,4 +3,4 @@ b46b41659b805013740eeb76e759af4b download/libcurl.so.2.0.2.s 30e826ef67b6ce799b32154250014dd9 download/libcurl.so.3.0.0.i a09fcad6dfcd9636061dfab7598357be download/libcurl.so.2.0.2.i -e4d1b44b1176769755e51ba43408b0b3 download/curlbuild.h +5aebb27149d80000d1107b58d65b551b download/curlbuild.h Modified: csw/mgar/pkg/curl/trunk/files/curlbuild.h =================================================================== --- csw/mgar/pkg/curl/trunk/files/curlbuild.h 2009-04-15 14:14:43 UTC (rev 4319) +++ csw/mgar/pkg/curl/trunk/files/curlbuild.h 2009-04-15 14:26:57 UTC (rev 4320) @@ -1,4 +1,4 @@ -#Allow 32 and 64 bit headers to coexist +/* Allow 32 and 64 bit headers to coexist */ #if defined __arch64__ || defined __sparcv9 #include "curlbuild-64.h" #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:36:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:36:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4321] csw/mgar/pkg/sudo-ldap/trunk Message-ID: Revision: 4321 http://gar.svn.sourceforge.net/gar/?rev=4321&view=rev Author: valholla Date: 2009-04-15 14:36:20 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix conflicting files Modified Paths: -------------- csw/mgar/pkg/sudo-ldap/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove Modified: csw/mgar/pkg/sudo-ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-15 14:26:57 UTC (rev 4320) +++ csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-15 14:36:20 UTC (rev 4321) @@ -12,33 +12,35 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += CSWsudoldap.postinstall +DISTFILES += CSWsudoldap.postremove PATCHFILES = install.diff # We define upstream file regex so we can be notifed of new # upstream software release UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz -PACKAGES = CSWsudo-ldap +PACKAGES = CSWsudoldap -CATALOGNAME_CSWsudo-ldap = sudo_ldap -SPKG_DESC_CSWsudo-ldap = $(DESCRIPTION) -SPKG_SOURCEURL_CSWsudo-ldap = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudo-ldap = CSWsudo -REQUIRED_PKGS_CSWsudo-ldap = CSWsudo-common CSWggettextrt CSWoldaprt +CATALOGNAME_CSWsudoldap = sudo_ldap +SPKG_DESC_CSWsudoldap = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudoldap = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudoldap = CSWsudo +REQUIRED_PKGS_CSWsudoldap = CSWsudo-common CSWggettextrt CSWoldaprt CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam CONFIGURE_ARGS += --with-logging=both CONFIGURE_ARGS += --with-ignore-dot CONFIGURE_ARGS += --with-env-editor -CONFIGURE_ARGS += --with-ldap=$(prefix) -CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf +CONFIGURE_ARGS += --withldap=$(prefix) +CONFIGURE_ARGS += --withldap-conf-file=$(sysconfdir)/ldap.conf TEST_TARGET = check include gar/category.mk -PKGFILES_CSWsudo-ldap = .*/bin/.* +PKGFILES_CSWsudoldap = .*/bin/.* post-install-modulated: @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) @@ -46,4 +48,7 @@ @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) @$(MAKECOOKIE) - $(DONADA) + +post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @$(MAKECOOKIE) Added: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall (rev 0) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall 2009-04-15 14:36:20 UTC (rev 4321) @@ -0,0 +1,11 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit + +exit 0 + Added: csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove (rev 0) +++ csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 14:36:20 UTC (rev 4321) @@ -0,0 +1,13 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin +SUDO_MINIMAL=${BINDIR}/sudo.minimal + +if [ -f ${SUDO_MINIMAL} ]; then + rm -f sudo sudoedit + ln -f $SUDO_MINIMAL ${BINDIR}/sudo + ln -f $SUDO_MINIMAL ${BINDIR}/sudoedit +fi + +exit 0 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:40:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:40:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4322] csw/mgar/pkg Message-ID: Revision: 4322 http://gar.svn.sourceforge.net/gar/?rev=4322&view=rev Author: valholla Date: 2009-04-15 14:40:20 +0000 (Wed, 15 Apr 2009) Log Message: ----------- rename sudo-ldap to sudo_ldap Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/sudo_ldap/ csw/mgar/pkg/sudo_ldap/trunk/ csw/mgar/pkg/sudo_ldap/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/files/ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Removed Paths: ------------- csw/mgar/pkg/sudo_ldap/trunk/ csw/mgar/pkg/sudo_ldap/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/files/ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.depend csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.gspec csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postinstall csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postremove csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.prototype csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.space Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 14:36:20 UTC (rev 4321) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) @@ -54,3 +54,7 @@ @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudoedit ) @$(MAKECOOKIE) $(DONADA) + +post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @$(MAKECOOKIE) Deleted: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/Makefile 2009-04-09 04:43:04 UTC (rev 4241) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,49 +0,0 @@ -GARNAME = sudo -GARVERSION = 1.7.0 -CATEGORIES = utils - -DESCRIPTION = Provides limited super user privileges (LDAP Enabled) -define BLURB - Sudo (superuser do) allows a system administrator to give certain users (or - groups of users) the ability to run some (or all) commands as root while - logging all commands and arguments. Sudo operates on a per-command basis, it - is not a replacement for the shell. -endef - -MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PATCHFILES = install.diff - -# We define upstream file regex so we can be notifed of new -# upstream software release -UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz - -PACKAGES = CSWsudo-ldap - -CATALOGNAME_CSWsudo-ldap = sudo_ldap -SPKG_DESC_CSWsudo-ldap = $(DESCRIPTION) -SPKG_SOURCEURL_CSWsudo-ldap = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudo-ldap = CSWsudo -REQUIRED_PKGS_CSWsudo-ldap = CSWsudo-common CSWggettextrt CSWoldaprt - -CONFIGURE_ARGS = $(DIRPATHS) -CONFIGURE_ARGS += --with-pam -CONFIGURE_ARGS += --with-logging=both -CONFIGURE_ARGS += --with-ignore-dot -CONFIGURE_ARGS += --with-env-editor -CONFIGURE_ARGS += --with-ldap=$(prefix) -CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf - -TEST_TARGET = check - -include gar/category.mk - -PKGFILES_CSWsudo-ldap = .*/bin/.* - -post-install-modulated: - @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) - @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) - @$(MAKECOOKIE) - $(DONADA) Copied: csw/mgar/pkg/sudo_ldap/trunk/Makefile (from rev 4321, csw/mgar/pkg/sudo-ldap/trunk/Makefile) =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile (rev 0) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) @@ -0,0 +1,54 @@ +GARNAME = sudo +GARVERSION = 1.7.0 +CATEGORIES = utils + +DESCRIPTION = Provides limited super user privileges (LDAP Enabled) +define BLURB + Sudo (superuser do) allows a system administrator to give certain users (or + groups of users) the ability to run some (or all) commands as root while + logging all commands and arguments. Sudo operates on a per-command basis, it + is not a replacement for the shell. +endef + +MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += CSWsudoldap.postinstall +DISTFILES += CSWsudoldap.postremove +PATCHFILES = install.diff + +# We define upstream file regex so we can be notifed of new +# upstream software release +UFILES_REGEX = $(GARNAME)-((\d+(?:\.\d+)*)(p\d+)?).tar.gz + +PACKAGES = CSWsudoldap + +CATALOGNAME_CSWsudoldap = sudo_ldap +SPKG_DESC_CSWsudoldap = $(DESCRIPTION) +SPKG_SOURCEURL_CSWsudoldap = http://www.sudo.ws +INCOMPATIBLE_PKGS_CSWsudoldap = CSWsudo +REQUIRED_PKGS_CSWsudoldap = CSWsudo-common CSWggettextrt CSWoldaprt + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --with-pam +CONFIGURE_ARGS += --with-logging=both +CONFIGURE_ARGS += --with-ignore-dot +CONFIGURE_ARGS += --with-env-editor +CONFIGURE_ARGS += --withldap=$(prefix) +CONFIGURE_ARGS += --withldap-conf-file=$(sysconfdir)/ldap.conf + +TEST_TARGET = check + +include gar/category.mk + +PKGFILES_CSWsudoldap = .*/bin/.* + +post-install-modulated: + @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) + @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) + @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) + @$(MAKECOOKIE) + +post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @$(MAKECOOKIE) Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.depend =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.depend 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.depend 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,5 +0,0 @@ -P CSWsudo-common - sudo_common - sudo common files -P CSWlibnet libnet - the libnet packet construction library -P CSWoldaprt openldap_rt - ldap runtime libraries -P CSWosslrt openssl_rt - Openssl runtime libraries -P CSWsasl sasl - Simple Authentication and Security Layer Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.gspec =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.gspec 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,5 +0,0 @@ -%var bitname sudo_ldap -%var pkgname CSWsudoldap -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%var desc Provides limited super user privileges (LDAP Enabled) -%copyright url file://%{WORKSRC}/LICENSE Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postinstall =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postinstall 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,11 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit -ln -f sudo.ldap sudo -ln -f sudo.ldap sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postremove =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.postremove 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,16 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -cd $BINDIR -rm -f sudo sudoedit - -OTHERSUDO=`ls -1 sudo.* 2>/dev/null | head -1` -if [ -n "$OTHERSUDO" ]; then - rm -f sudo - ln -f $OTHERSUDO sudo - ln -f $OTHERSUDO sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.prototype =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.prototype 2009-04-15 14:40:20 UTC (rev 4322) @@ -1,3 +0,0 @@ -d none /opt/csw/bin 0755 root bin -f none /opt/csw/bin/sudo.ldap=/opt/csw/bin/sudo 4111 root root -l none /opt/csw/bin/sudoedit=/opt/csw/bin/sudo.ldap Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.space =================================================================== --- csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudo-ldap.space 2009-04-09 03:32:05 UTC (rev 4240) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudo-ldap.space 2009-04-15 14:40:20 UTC (rev 4322) @@ -1 +0,0 @@ -$BASEDIR 1 1 Copied: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall (from rev 4321, csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postinstall) =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall (rev 0) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall 2009-04-15 14:40:20 UTC (rev 4322) @@ -0,0 +1,11 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo +ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit + +exit 0 + Copied: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove (from rev 4321, csw/mgar/pkg/sudo-ldap/trunk/files/CSWsudoldap.postremove) =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove (rev 0) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 14:40:20 UTC (rev 4322) @@ -0,0 +1,13 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin +SUDO_MINIMAL=${BINDIR}/sudo.minimal + +if [ -f ${SUDO_MINIMAL} ]; then + rm -f sudo sudoedit + ln -f $SUDO_MINIMAL ${BINDIR}/sudo + ln -f $SUDO_MINIMAL ${BINDIR}/sudoedit +fi + +exit 0 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:45:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:45:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4323] csw/mgar/pkg/sudo_ldap/trunk/Makefile Message-ID: Revision: 4323 http://gar.svn.sourceforge.net/gar/?rev=4323&view=rev Author: valholla Date: 2009-04-15 14:45:27 +0000 (Wed, 15 Apr 2009) Log Message: ----------- remove post-install-modulated Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:40:20 UTC (rev 4322) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:45:27 UTC (rev 4323) @@ -40,15 +40,9 @@ include gar/category.mk -PKGFILES_CSWsudoldap = .*/bin/.* +PKGFILES_CSWsudoldap = .*/bin/sudo.ldap -post-install-modulated: - @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) - @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.ldap ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudo ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.ldap sudoedit ) - @$(MAKECOOKIE) - post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) + @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo.ldap ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 16:47:46 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 14:47:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4324] csw/mgar/pkg/sudo_ldap/trunk Message-ID: Revision: 4324 http://gar.svn.sourceforge.net/gar/?rev=4324&view=rev Author: valholla Date: 2009-04-15 14:47:46 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix configure typo Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/checksums Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:45:27 UTC (rev 4323) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-15 14:47:46 UTC (rev 4324) @@ -33,8 +33,8 @@ CONFIGURE_ARGS += --with-logging=both CONFIGURE_ARGS += --with-ignore-dot CONFIGURE_ARGS += --with-env-editor -CONFIGURE_ARGS += --withldap=$(prefix) -CONFIGURE_ARGS += --withldap-conf-file=$(sysconfdir)/ldap.conf +CONFIGURE_ARGS += --with-ldap=$(prefix) +CONFIGURE_ARGS += --with-ldap-conf-file=$(sysconfdir)/ldap.conf TEST_TARGET = check Modified: csw/mgar/pkg/sudo_ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 14:45:27 UTC (rev 4323) +++ csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 14:47:46 UTC (rev 4324) @@ -1,2 +1,4 @@ +05fb6b46e36528fb889aca7f53106708 download/CSWsudoldap.postinstall +a28a033964a3c7e21446b2517bcbc38d download/CSWsudoldap.postremove +157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz -157b2e5e38ca54eb36e0364706bd0292 download/install.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 17:06:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 15:06:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4325] csw/mgar/pkg/sudo Message-ID: Revision: 4325 http://gar.svn.sourceforge.net/gar/?rev=4325&view=rev Author: valholla Date: 2009-04-15 15:06:56 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix conflicting files for sudo packages Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Added Paths: ----------- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 14:47:46 UTC (rev 4324) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 15:06:56 UTC (rev 4325) @@ -32,6 +32,8 @@ REQUIRED_PKGS_CSWsudo-common = CSWggettextrt DISTFILES += CSWsudo-common.postinstall +DISTFILES += CSWsudo.postinstall +DISTFILES += CSWsudo.postremove CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam @@ -44,17 +46,9 @@ include gar/category.mk -PKGFILES_CSWsudo = .*/bin/.* +PKGFILES_CSWsudo = .*/bin/sudo.minimal -post-install-modulated: - @( cd $(DESTDIR)$(sysconfdir) ; mv sudoers sudoers.CSW ) - @( cd $(DESTDIR)$(bindir) ; rm -f sudoedit ) - @( cd $(DESTDIR)$(bindir) ; mv sudo sudo.minimal ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudo ) - @( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudoedit ) - @$(MAKECOOKIE) - $(DONADA) - post-merge-modulated: + @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.minimal ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Added: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall (rev 0) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-15 15:06:56 UTC (rev 4325) @@ -0,0 +1,24 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +## First check to see if sudo.ldap is installed +## If it is make sure the liks are in place +## and permissions are set accordingly +if [ -f ${BINDIR}/sudo.ldap ]; then + chmod 4755 ${BINDIR}/sudo.ldap + if [ ! -f ${BINDIR}/sudo ]; then + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo + fi + if [ ! -f ${BINDIR}/sudoedit ]; then + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit + fi +else + rm -f ${BINDIR}/sudo + rm -f ${BINDIR}/sudoedit + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit +fi + +exit 0 + Added: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove (rev 0) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-15 15:06:56 UTC (rev 4325) @@ -0,0 +1,14 @@ +#!/bin/sh + +BINDIR=$BASEDIR/opt/csw/bin + +if [ -f ${BINDIR}/sudo.ldap ]; then + chmod 4755 ${BINDIR}/sudo.ldap + rm -f ${BINDIR}/sudo + rm -f ${BINDIR}/sudoedit + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo + ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit +fi + +exit 0 + Modified: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 14:47:46 UTC (rev 4324) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-15 15:06:56 UTC (rev 4325) @@ -1,12 +1,12 @@ #!/bin/sh BINDIR=$BASEDIR/opt/csw/bin -SUDO_MINIMAL=${BINDIR}/sudo.minimal -if [ -f ${SUDO_MINIMAL} ]; then - rm -f sudo sudoedit - ln -f $SUDO_MINIMAL ${BINDIR}/sudo - ln -f $SUDO_MINIMAL ${BINDIR}/sudoedit +if [ -f ${BINDIR}/sudo.minimal ]; then + rm -f ${BINDIR}/sudo + rm -f ${BINDIR}/sudoedit + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo + ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit fi exit 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 17:27:22 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 15:27:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4326] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4326 http://gar.svn.sourceforge.net/gar/?rev=4326&view=rev Author: valholla Date: 2009-04-15 15:27:21 +0000 (Wed, 15 Apr 2009) Log Message: ----------- fix sudoers Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo/trunk/checksums Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 15:06:56 UTC (rev 4325) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-15 15:27:21 UTC (rev 4326) @@ -50,5 +50,6 @@ post-merge-modulated: @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.minimal ) + @( cd $(PKGROOT)$(sysconfdir) ; mv sudoers sudoers.CSW ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Modified: csw/mgar/pkg/sudo/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo/trunk/checksums 2009-04-15 15:06:56 UTC (rev 4325) +++ csw/mgar/pkg/sudo/trunk/checksums 2009-04-15 15:27:21 UTC (rev 4326) @@ -1,5 +1,5 @@ -5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz -2264728d06b220edf5e47eb9da2b7e66 download/CSWsudo.postinstall -e9bd76af1d6c4110121d6d784c910b3d download/CSWsudo.postremove 955d99eda1432c7b7e00d98b91e35a79 download/CSWsudo-common.postinstall +ca867ca77bda965a44bcd665bae7dc6c download/CSWsudo.postinstall +2324b0bb3e9cf71398aaab1751aa63c5 download/CSWsudo.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff +5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 17:37:58 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 15:37:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4327] csw/mgar/pkg/sudo_ldap/trunk/checksums Message-ID: Revision: 4327 http://gar.svn.sourceforge.net/gar/?rev=4327&view=rev Author: valholla Date: 2009-04-15 15:37:58 +0000 (Wed, 15 Apr 2009) Log Message: ----------- checksums Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/checksums Modified: csw/mgar/pkg/sudo_ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 15:27:21 UTC (rev 4326) +++ csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-15 15:37:58 UTC (rev 4327) @@ -1,4 +1,4 @@ 05fb6b46e36528fb889aca7f53106708 download/CSWsudoldap.postinstall -a28a033964a3c7e21446b2517bcbc38d download/CSWsudoldap.postremove +f727decc2c3a7189614b657584b8e45f download/CSWsudoldap.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 18:15:27 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 16:15:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4328] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4328 http://gar.svn.sourceforge.net/gar/?rev=4328&view=rev Author: idogan23 Date: 2009-04-15 16:15:27 +0000 (Wed, 15 Apr 2009) Log Message: ----------- wget: added modulation for static binary, config file handled by cswpreserveconf Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 15:37:58 UTC (rev 4327) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 16:15:27 UTC (rev 4328) @@ -20,12 +20,40 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +EXTRA_MODULATORS = STATIC +MODULATIONS_STATIC = disable enable + +EXTRA_CONFIGURE_STATIC-disable = --with-ssl +EXTRA_CONFIGURE_STATIC-enable = --disable-shared +EXTRA_CONFIGURE_STATIC-enable += --enable-static +EXTRA_CONFIGURE_STATIC-enable += --without-ssl + CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl CONFIGURE_ARGS += --disable-nls +CONFIGURE_ARGS += $(EXTRA_CONFIGURE_STATIC-$(STATIC)) -REQUIRED_PKGS = CSWosslrt - TEST_TARGET = check +REQUIRED_PKGS = CSWosslrt CSWcswclassutils +SPKG_CLASSES = none cswcpsampleconf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/wgetrc.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' + +MERGE_SCRIPTS_isa-sparcv8-static-disable = copy-all + +MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only +MERGE_DIRS_isa-sparcv8-static-enable = $(bindir) + +merge-rename-wget: + @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static + +post-install-modulated: + (cd $(DESTDIR)$(prefix)/etc; \ + for i in wgetrc; do \ + if [ -r "$$i" ]; then \ + echo "$$i -> $$i.CSW"; \ + mv "$$i" "$$i.CSW"; \ + fi \ + done) + include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 18:21:57 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 16:21:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4329] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4329 http://gar.svn.sourceforge.net/gar/?rev=4329&view=rev Author: idogan23 Date: 2009-04-15 16:21:57 +0000 (Wed, 15 Apr 2009) Log Message: ----------- wget: added MERGE_SCRIPTS also for i386 Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 16:15:27 UTC (rev 4328) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 16:21:57 UTC (rev 4329) @@ -40,9 +40,12 @@ PROTOTYPE_FILTER = awk '$$$$3 ~ /\/wgetrc.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' MERGE_SCRIPTS_isa-sparcv8-static-disable = copy-all + MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only + MERGE_DIRS_isa-sparcv8-static-enable = $(bindir) -MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only -MERGE_DIRS_isa-sparcv8-static-enable = $(bindir) + MERGE_SCRIPTS_isa-i386-static-disable = copy-all + MERGE_SCRIPTS_isa-i386-static-enable = rename-wget copy-only + MERGE_DIRS_isa-i386-static-enable = $(bindir) merge-rename-wget: @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 18:56:11 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 16:56:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4330] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4330 http://gar.svn.sourceforge.net/gar/?rev=4330&view=rev Author: idogan23 Date: 2009-04-15 16:56:10 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: changed UFILES_REGEX Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 16:21:57 UTC (rev 4329) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 16:56:10 UTC (rev 4330) @@ -8,12 +8,12 @@ authoritative DNS nameserver. endef -MASTER_SITES = http://www.nlnetlabs.nl/downloads/nsd/ +MASTER_SITES = http://ww$(GARNAME)w.nlnetlabs.nl/downloads/nsd/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnsd,) # We define upstream file regex so we can be notifed of new upstream software release -#UFILES_REGEX = -(\d+(?:\.\d+)*).tar.gz +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz # If the url used to check for software update is different of MASTER_SITES, then # uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 15 19:36:10 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 15 Apr 2009 17:36:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4331] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4331 http://gar.svn.sourceforge.net/gar/?rev=4331&view=rev Author: valholla Date: 2009-04-15 17:35:58 +0000 (Wed, 15 Apr 2009) Log Message: ----------- test results Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Added Paths: ----------- csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/ csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/ csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s8/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/i386s9/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs10/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/g++.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/gcc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/gfortran.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/gnat.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs8/objc.log csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs9/ Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-15 16:56:10 UTC (rev 4330) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-15 17:35:58 UTC (rev 4331) @@ -99,8 +99,6 @@ PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.* PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.* PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 -PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libstdc\+\+.1 -PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*libsupc\+\+.1 PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* @@ -174,7 +172,6 @@ ## gcc4corert PKGFILES_CSWgcc4corert = .*/opt/csw/lib/.*libgcc_s.* PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libgomp.* -PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libiberty.* PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libssp.* ## gcc4gfortranrt Deleted: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd 2009-04-15 16:56:10 UTC (rev 4330) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-amd 2009-04-15 17:35:58 UTC (rev 4331) @@ -1,397 +0,0 @@ -$ make check -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gcc || mkdir testsuite/gcc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gcc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 01:17:49 2009 -Native configuration is i386-pc-solaris2.10 - - === gcc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... -FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 -FAIL: gcc.c-torture/execute/990127-2.c execution, -Os -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... - -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... -XPASS: gcc.dg/ucnid-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-3.c (test for excess errors) -XPASS: gcc.dg/ucnid-4.c (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... -FAIL: gcc.target/i386/sse-13.c (test for excess errors) -FAIL: gcc.target/i386/sse-14.c (test for excess errors) -FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable -FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... -skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined - - === gcc Summary === - -# of expected passes 48837 -# of unexpected failures 6 -# of unexpected successes 3 -# of expected failures 176 -# of untested testcases 42 -# of unsupported tests 314 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gcc] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' - === acats configuration === -target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/ -Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/specs Target: i386-pc-solaris2.10 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) -host=i386-pc-solaris2.8 -target=i386-pc-solaris2.10 -gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/gnatmake - - === acats support === -Generating support files... done. -Compiling support files... done. - - === acats tests === -Running chapter a ... -Running chapter c2 ... -Running chapter c3 ... -Running chapter c4 ... -Running chapter c5 ... -Running chapter c6 ... -Running chapter c7 ... -Running chapter c8 ... -Running chapter c9 ... -Running chapter ca ... -Running chapter cb ... -Running chapter cc ... -Running chapter cd ... -Running chapter ce ... -Running chapter cxa ... -Running chapter cxb ... -Running chapter cxf ... -Running chapter cxg ... -Running chapter cxh ... -Running chapter cz ... -Running chapter d ... -Running chapter e ... -Running chapter gcc ... -Running chapter l ... - === acats Summary === -# of expected passes 2315 -# of unexpected failures 0 -test -d testsuite || mkdir testsuite -test -d testsuite/gnat || mkdir testsuite/gnat -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gnat; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 05:27:21 2009 -Native configuration is i386-pc-solaris2.10 - - === gnat tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... - - === gnat Summary === - -# of expected passes 374 -# of expected failures 1 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/g++ || mkdir testsuite/g++ -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/g++; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 05:31:24 2009 -Native configuration is i386-pc-solaris2.10 - - === g++ tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... -XPASS: g++.dg/other/ucnid-1.C (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... -XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) -XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) -XPASS: g++.old-deja/g++.other/init19.C execution test - - === g++ Summary === - -# of expected passes 17496 -# of unexpected successes 4 -# of expected failures 83 -# of unsupported tests 172 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) - -gmake[1]: [check-parallel-g++] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gfortran || mkdir testsuite/gfortran -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gfortran; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 06:21:32 2009 -Native configuration is i386-pc-solaris2.10 - - === gfortran tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... -FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/array_constructor_23.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/array_constructor_23.f -O3 -g execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... - - === gfortran Summary === - -# of expected passes 25233 -# of unexpected failures 4 -# of expected failures 3 -# of unsupported tests 32 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gfortran] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/objc || mkdir testsuite/objc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/objc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 08:04:18 2009 -Native configuration is i386-pc-solaris2.10 - - === objc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... - - === objc Summary === - -# of expected passes 1812 -# of expected failures 7 -# of unsupported tests 24 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - Deleted: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 2009-04-15 16:56:10 UTC (rev 4330) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-i386 2009-04-15 17:35:58 UTC (rev 4331) @@ -1,512 +0,0 @@ -$ make check -Making a new config file... -echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite" >> ./tmp0 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gcc || mkdir testsuite/gcc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gcc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 10:07:08 2009 -Native configuration is i386-pc-solaris2.8 - - === gcc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... -FAIL: gcc.c-torture/execute/990127-2.c execution, -O2 -FAIL: gcc.c-torture/execute/990127-2.c execution, -Os -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... - -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... -FAIL: gcc.dg/builtins-8.c execution test -FAIL: gcc.dg/pr36584.c execution test -FAIL: gcc.dg/pthread-init-1.c (test for excess errors) -FAIL: gcc.dg/pthread-init-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-3.c (test for excess errors) -XPASS: gcc.dg/ucnid-4.c (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... -FAIL: largefile.c -O0 -g (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O0 -g assembly comparison -FAIL: largefile.c -O0 (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O0 assembly comparison -FAIL: largefile.c -O1 (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O1 assembly comparison -FAIL: largefile.c -O2 (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O2 assembly comparison -FAIL: largefile.c -O3 -fomit-frame-pointer (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O3 -fomit-frame-pointer assembly comparison -FAIL: largefile.c -O3 -g (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -O3 -g assembly comparison -FAIL: largefile.c -Os (test for excess errors) -FAIL: gcc.dg/pch/largefile.c -Os assembly comparison -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... -FAIL: gcc.dg/torture/complex-alias-1.c -O0 execution test -FAIL: gcc.dg/torture/complex-alias-1.c -O1 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... -XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized "link_error" 0 -FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "converted loop nest to perfect loop nest" 1 -FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-4.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-5.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-6.c scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gcc.dg/tree-ssa/ltrans-8.c scan-tree-dump-times ltrans "transformed loop" 1 -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... -FAIL: gcc.dg/vect/pr36493.c execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... -FAIL: gcc.target/i386/20060512-1.c execution test -FAIL: gcc.target/i386/20060512-3.c execution test -FAIL: gcc.target/i386/abi-1.c scan-assembler xmm0 -FAIL: gcc.target/i386/asm-2.c (internal compiler error) -FAIL: gcc.target/i386/asm-2.c (test for excess errors) -FAIL: gcc.target/i386/fastcall-sseregparm.c execution test -FAIL: gcc.target/i386/fpprec-1.c execution test -FAIL: gcc.target/i386/pr13685.c execution test -FAIL: gcc.target/i386/pr37191.c (test for excess errors) -FAIL: gcc.target/i386/reload-1.c (test for excess errors) -ERROR: gcc.target/i386/reload-1.c: error executing dg-final: no files matched glob pattern "reload-1.c.[0-9][0-9][0-9]r.csa" -FAIL: gcc.target/i386/sse-10.c execution test -FAIL: gcc.target/i386/sse-11.c execution test -FAIL: gcc.target/i386/sse-13.c (test for excess errors) -FAIL: gcc.target/i386/sse-14.c (test for excess errors) -FAIL: gcc.target/i386/sse-17.c execution test -FAIL: gcc.target/i386/sse-18.c execution test -FAIL: gcc.target/i386/sse-3.c execution test -FAIL: gcc.target/i386/sse-6.c execution test -FAIL: gcc.target/i386/sse-recip-vec.c execution test -FAIL: gcc.target/i386/sse-recip.c execution test -FAIL: gcc.target/i386/sse2-lrint-vec.c execution test -FAIL: gcc.target/i386/sse2-lrintf-vec.c execution test -FAIL: gcc.target/i386/sse2-vec-1.c execution test -FAIL: gcc.target/i386/sse2-vec-2.c execution test -FAIL: gcc.target/i386/sse2-vec-3.c execution test -FAIL: gcc.target/i386/sse2-vec-4.c execution test -FAIL: gcc.target/i386/sse2-vec-5.c execution test -FAIL: gcc.target/i386/sse2-vec-6.c execution test -FAIL: gcc.target/i386/sse5-haddX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-haddX.c compilation failed to produce executable -FAIL: gcc.target/i386/sse5-hsubX.c (test for excess errors) -WARNING: gcc.target/i386/sse5-hsubX.c compilation failed to produce executable -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... -skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined - - === gcc Summary === - -# of expected passes 48710 -# of unexpected failures 59 -# of unexpected successes 4 -# of expected failures 168 -# of unresolved testcases 1 -# of untested testcases 35 -# of unsupported tests 340 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gcc] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' - === acats configuration === -target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/ -Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/specs Target: i386-pc-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) -host=i386-pc-solaris2.8 -target=i386-pc-solaris2.8 -gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/gnatmake - - === acats support === -Generating support files... done. -Compiling support files... done. - - === acats tests === -Running chapter a ... -Running chapter c2 ... -Running chapter c3 ... -Running chapter c4 ... -Running chapter c5 ... -Running chapter c6 ... -Running chapter c7 ... -Running chapter c8 ... -Running chapter c9 ... -Running chapter ca ... -Running chapter cb ... -Running chapter cc ... -Running chapter cd ... -Running chapter ce ... -Running chapter cxa ... -Running chapter cxb ... -Running chapter cxf ... -Running chapter cxg ... -Running chapter cxh ... -Running chapter cz ... -Running chapter d ... -Running chapter e ... -Running chapter gcc ... -Running chapter l ... - === acats Summary === -# of expected passes 2315 -# of unexpected failures 0 -test -d testsuite || mkdir testsuite -test -d testsuite/gnat || mkdir testsuite/gnat -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gnat; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 14:20:14 2009 -Native configuration is i386-pc-solaris2.8 - - === gnat tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... - - === gnat Summary === - -# of expected passes 374 -# of expected failures 1 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/g++ || mkdir testsuite/g++ -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/g++; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 14:24:10 2009 -Native configuration is i386-pc-solaris2.8 - - === g++ tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... -FAIL: g++.dg/other/i386-1.C execution test -XPASS: g++.dg/other/ucnid-1.C (test for excess errors) -FAIL: g++.dg/warn/miss-format-1.C printf attribute warning (test for warnings, line 15) -FAIL: g++.dg/warn/miss-format-1.C printf attribute warning 2 (test for warnings, line 40) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... -FAIL: g++.dg/torture/pr34099.C -O0 execution test -FAIL: g++.dg/torture/pr34099.C -O1 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... -FAIL: g++.old-deja/g++.brendan/complex1.C execution test -XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors) -XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors) -FAIL: g++.old-deja/g++.other/headers1.C (test for excess errors) -WARNING: g++.old-deja/g++.other/headers1.C compilation failed to produce executable -XPASS: g++.old-deja/g++.other/init19.C execution test - - === g++ Summary === - -# of expected passes 17488 -# of unexpected failures 7 -# of unexpected successes 4 -# of expected failures 84 -# of unsupported tests 172 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) - -gmake[1]: [check-parallel-g++] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gfortran || mkdir testsuite/gfortran -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gfortran; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 15:18:21 2009 -Native configuration is i386-pc-solaris2.8 - - === gfortran tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... -FAIL: gfortran.dg/c_by_val_1.f -O0 execution test -FAIL: gfortran.dg/c_by_val_1.f -O1 execution test -FAIL: gfortran.dg/c_by_val_1.f -O2 execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/c_by_val_1.f -O3 -g execution test -FAIL: gfortran.dg/c_by_val_1.f -Os execution test -FAIL: gfortran.dg/f2c_2.f90 -O0 execution test -FAIL: gfortran.dg/f2c_2.f90 -O1 execution test -FAIL: gfortran.dg/f2c_2.f90 -O2 execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/f2c_2.f90 -O3 -g execution test -FAIL: gfortran.dg/f2c_2.f90 -Os execution test -FAIL: gfortran.dg/ltrans-7.f90 -O scan-tree-dump-times ltrans "transformed loop" 1 -FAIL: gfortran.dg/specifics_1.f90 -O0 execution test -FAIL: gfortran.dg/specifics_1.f90 -O1 execution test -FAIL: gfortran.dg/specifics_1.f90 -O2 execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/specifics_1.f90 -O3 -g execution test -FAIL: gfortran.dg/specifics_1.f90 -Os execution test -FAIL: gfortran.dg/value_4.f90 -O0 execution test -FAIL: gfortran.dg/value_4.f90 -O1 execution test -FAIL: gfortran.dg/value_4.f90 -O2 execution test -FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer execution test -FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-loops execution test -FAIL: gfortran.dg/value_4.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test -FAIL: gfortran.dg/value_4.f90 -O3 -g execution test -FAIL: gfortran.dg/value_4.f90 -Os execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... -FAIL: gfortran.dg/vect/vect-5.f90 -O execution test -FAIL: gfortran.dg/vect/fast-math-pr33299.f90 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... -FAIL: gfortran.fortran-torture/execute/common.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/common_size.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/forall_4.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/forall_5.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/seq_io.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O0 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O1 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fomit-frame-pointer -finline-functions -funroll-loops -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -fbounds-check -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O3 -g -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -Os -FAIL: gfortran.fortran-torture/execute/specifics.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/stack_varsize.f90 execution, -O2 -ftree-vectorize -msse2 -FAIL: gfortran.fortran-torture/execute/where_2.f90 execution, -O2 -ftree-vectorize -msse2 - - === gfortran Summary === - -# of expected passes 24969 -# of unexpected failures 52 -# of expected failures 3 -# of unsupported tests 136 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gfortran] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/objc || mkdir testsuite/objc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/objc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sun Apr 5 17:01:58 2009 -Native configuration is i386-pc-solaris2.8 - - === objc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... - - === objc Summary === - -# of expected passes 1812 -# of expected failures 7 -# of unsupported tests 24 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.8-i386/objdir/gcc/xgcc version 4.3.3 (GCC) - Added: csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/i386s10/g++.log 2009-04-15 17:35:58 UTC (rev 4331) @@ -0,0 +1,58890 @@ +Test Run By mwatters on Sun Apr 5 05:31:24 2009 +Native configuration is i386-pc-solaris2.10 + + === g++ tests === + +Schedule of variations: + unix + +Running target unix +Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. +Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. +Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... +set_ld_library_path_env_vars: ld_library_path=.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +ALWAYS_CXXFLAGS set to {additional_flags=-nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util} {ldflags= -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty } additional_flags =-fmessage-length=0 +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -fno-show-column -c -o uclibc10234.o uclibc10234.c (timeout = 300) +uclibc10234.c:2: error: features.h: No such file or directory +uclibc10234.c:4: error: #error FOO +compiler exited with status 1 +output is: +uclibc10234.c:2: error: features.h: No such file or directory +uclibc10234.c:4: error: #error FOO + +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -g -fprofile-arcs -fno-show-column -L/home/mwatters/mga r/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x01 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -g -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -g -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -g -fbranch-probabilities -fno-show-column -L/home/mwat ters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x02 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -g -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -g -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O0 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x11 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O0 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O0 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O0 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x12 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O0 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O0 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O1 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x21 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O1 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O1 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O1 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x22 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O1 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O1 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x31 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O2 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O2 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x32 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O2 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O2 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x41 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -fbranch-probabilities -fno-show-column -L/home/mwa tters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x42 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -g -fprofile-arcs -fno-show-column -L/home/mwatters /mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x51 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -g -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -g -fprofile-arcs +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -g -fbranch-probabilities -fno-show-column -L/home/ mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x52 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O3 -g -fbranch-probabilities +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -O3 -g -fbranch-probabilities +Executing on host: /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../g++ -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/../../ /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C -nostdinc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/libstdc++-v3/include -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/libsupc++ -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/include/backward -I/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/gcc-4.3.3/libstdc++-v3/testsuite/util -fmessage-length=0 -Os -fprofile-arcs -fno-show-column -L/home/mwatters/mg ar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs -L/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libiberty -lm -o /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/testsuite/g++/g++-bprob-1.x61 (timeout = 300) +PASS: g++.dg/bprob/g++-bprob-1.C compilation, -Os -fprofile-arcs +Setting LD_LIBRARY_PATH to .:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64:.:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/i386-pc-solaris2.10/./libstdc++-v3/src/.libs:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc:/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-i386-5.10-i386/objdir/gcc/amd64 +PASS: g++.dg/bprob/g++-bprob-1.C execution, -Os -fprofile-arcs @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 15 20:11:18 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 18:11:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4332] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4332 http://gar.svn.sourceforge.net/gar/?rev=4332&view=rev Author: idogan23 Date: 2009-04-15 18:11:17 +0000 (Wed, 15 Apr 2009) Log Message: ----------- wget: fixed description Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 17:35:58 UTC (rev 4331) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-15 18:11:17 UTC (rev 4332) @@ -2,7 +2,7 @@ GARVERSION = 1.11.4 CATEGORIES = net -DESCRIPTION = A network utility to retrieve files from the Web. +DESCRIPTION = A network utility to retrieve files from the Web define BLURB GNU Wget is a utility for noninteractive download of files from the Web. It supports HTTP and FTP protocols, as well as retrieval through HTTP proxies. It This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Wed Apr 15 22:09:28 2009 From: bwalton at opencsw.org (Ben Walton) Date: Wed, 15 Apr 2009 16:09:28 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> Message-ID: <1239824241-sup-2245@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Tue Apr 14 15:02:02 -0400 2009: Hi Dago, I dug into mkpackage and discovered that we are already supplying the package filename (pkgname) via the csw_vars.gspec file that gets pulled in. So, I added a very small change to the dynamic gspec generation code that supplies a %var that will supersede the %cvar if the svn repo is in an uncommitted state. This seems to work for ENABLE_CHECK=0 and doesn't require an after-the-fact rename. The downside to this approach is that if the maintainer hasn't converted to dynamic gspec, then this modification won't be used. I'm ok with that personally. What do you think? [I added the UNCOMMITED at the end of the filename as replacing REV=... was triggering a checkpkg rule.] Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: svn_uncommitted_pkgfile.patch Type: application/octet-stream Size: 632 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dam at opencsw.org Wed Apr 15 22:21:19 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Wed, 15 Apr 2009 22:21:19 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239824241-sup-2245@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> Message-ID: <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> Hi Ben, Am 15.04.2009 um 22:09 schrieb Ben Walton: > I dug into mkpackage and discovered that we are already supplying the > package filename (pkgname) via the csw_vars.gspec file that gets > pulled in. So, I added a very small change to the dynamic gspec > generation code that supplies a %var that will supersede the %cvar if > the svn repo is in an uncommitted state. This seems to work for > ENABLE_CHECK=0 and doesn't require an after-the-fact rename. > > The downside to this approach is that if the maintainer hasn't > converted to dynamic gspec, then this modification won't be used. I'm > ok with that personally. What do you think? In my opinion we should move the package name generation completely inside gar.pkg.mk and put it in a variable. This can then either be passed in dynamic gspec like you did and additionally by redefining pkgfile here: > dam at login [login]:/home/dam/mgar/gar/v2/pkglib > more csw_vars.gspec > %cvar arch %{GARCH} > %cvar desc %{SPKG_DESC} > %cvar pkgfile %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-% > {SPKG_OSNAME}-%{arch}-CSW.pkg > %cvar RC_INIT_SCRIPT csw%{bitname} > %cvar SMF_SCRIPT svc-csw%{bitname} > %cvar SMF_MANIFEST csw%{bitname}.xml ...to something that is passed in PKG_EXPORTS. Then we can control the name fine-grained in one place both for dynamic and classic gspec. I may have time tomorrow to take a look. Anyway, thanks for the inspiration :-) It is always easier to improve something than to invent it completely new. Best regards -- Dago From harpchad at users.sourceforge.net Wed Apr 15 23:11:06 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Wed, 15 Apr 2009 21:11:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4333] csw/mgar/pkg/gnutls/trunk Message-ID: Revision: 4333 http://gar.svn.sourceforge.net/gar/?rev=4333&view=rev Author: harpchad Date: 2009-04-15 21:11:06 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Bump to 2.6.5 Modified Paths: -------------- csw/mgar/pkg/gnutls/trunk/Makefile csw/mgar/pkg/gnutls/trunk/checksums Modified: csw/mgar/pkg/gnutls/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnutls/trunk/Makefile 2009-04-15 18:11:17 UTC (rev 4332) +++ csw/mgar/pkg/gnutls/trunk/Makefile 2009-04-15 21:11:06 UTC (rev 4333) @@ -1,5 +1,5 @@ GARNAME = gnutls -GARVERSION = 2.6.4 +GARVERSION = 2.6.5 CATEGORIES = lib DESCRIPTION = GNU Transport Layer Security libraries and tools Modified: csw/mgar/pkg/gnutls/trunk/checksums =================================================================== --- csw/mgar/pkg/gnutls/trunk/checksums 2009-04-15 18:11:17 UTC (rev 4332) +++ csw/mgar/pkg/gnutls/trunk/checksums 2009-04-15 21:11:06 UTC (rev 4333) @@ -1,4 +1,4 @@ -747111ab0d86e7b06a4bb120ba456ad8 download/gnutls-2.6.4.tar.bz2 +92b92c36b616aa8bd69a9a0fb2b8eb24 download/gnutls-2.6.5.tar.bz2 073c509902375c40b885f5adc9f7dba9 download/libgnutls-openssl.so.13.i 02e4011d400d262b8d4b5c7311d8a5b0 download/libgnutls-openssl.so.13.s b0eee0d29e3d260a146e626c6ca75b16 download/libgnutls.so.13.i This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From skayser at users.sourceforge.net Wed Apr 15 23:55:57 2009 From: skayser at users.sourceforge.net (skayser at users.sourceforge.net) Date: Wed, 15 Apr 2009 21:55:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4334] csw/mgar/pkg/watch/trunk/Makefile Message-ID: Revision: 4334 http://gar.svn.sourceforge.net/gar/?rev=4334&view=rev Author: skayser Date: 2009-04-15 21:55:57 +0000 (Wed, 15 Apr 2009) Log Message: ----------- watch: pass via in custom build rules Modified Paths: -------------- csw/mgar/pkg/watch/trunk/Makefile Modified: csw/mgar/pkg/watch/trunk/Makefile =================================================================== --- csw/mgar/pkg/watch/trunk/Makefile 2009-04-15 21:11:06 UTC (rev 4333) +++ csw/mgar/pkg/watch/trunk/Makefile 2009-04-15 21:55:57 UTC (rev 4334) @@ -59,10 +59,10 @@ build-custom: BUILD_ARGS:=ALL_CFLAGS="$(CFLAGS)" ALL_LDFLAGS="$(LDFLAGS)" build-custom: - @gmake -C $(WORKSRC) $(BUILD_ARGS) snprintf.o - @gmake -C $(WORKSRC) $(BUILD_ARGS) getopt.o - @gmake -C $(WORKSRC) $(BUILD_ARGS) getopt1.o - @gmake -C $(WORKSRC) \ + @$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) snprintf.o + @$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) getopt.o + @$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) getopt1.o + @$(BUILD_ENV) gmake -C $(WORKSRC) \ ALL_CFLAGS="$(CFLAGS) snprintf.o getopt.o getopt1.o" \ ALL_LDFLAGS="$(LDFLAGS)" watch $(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 00:42:03 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 22:42:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4335] csw/mgar/pkg/nsd/trunk Message-ID: Revision: 4335 http://gar.svn.sourceforge.net/gar/?rev=4335&view=rev Author: idogan23 Date: 2009-04-15 22:42:02 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: user & group for nsd are handled with cswusergroup class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/nsd/trunk/files/cswusergroup Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 21:55:57 UTC (rev 4334) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 22:42:02 UTC (rev 4335) @@ -11,7 +11,13 @@ MASTER_SITES = http://ww$(GARNAME)w.nlnetlabs.nl/downloads/nsd/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnsd,) +DISTFILES += cswusergroup +SPKG_CLASSES = none cswusergroup +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } { print }' + +REQUIRED_PKGS = CSWcswclassutils + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz @@ -22,4 +28,8 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw +post-install-modulated: + @ginstall -d $(DESTDIR)/etc/opt/csw/nsd + @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup + include gar/category.mk Added: csw/mgar/pkg/nsd/trunk/files/cswusergroup =================================================================== --- csw/mgar/pkg/nsd/trunk/files/cswusergroup (rev 0) +++ csw/mgar/pkg/nsd/trunk/files/cswusergroup 2009-04-15 22:42:02 UTC (rev 4335) @@ -0,0 +1 @@ +nsd:nsd:Name Server Daemon:/:/bin/false:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 00:42:53 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 22:42:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4336] csw/mgar/pkg/nsd/trunk/checksums Message-ID: Revision: 4336 http://gar.svn.sourceforge.net/gar/?rev=4336&view=rev Author: idogan23 Date: 2009-04-15 22:42:53 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: addedd missing checksum file to svn Added Paths: ----------- csw/mgar/pkg/nsd/trunk/checksums Added: csw/mgar/pkg/nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/nsd/trunk/checksums (rev 0) +++ csw/mgar/pkg/nsd/trunk/checksums 2009-04-15 22:42:53 UTC (rev 4336) @@ -0,0 +1,3 @@ +193710012704d807e85445886c72aca8 download/CSWnsd.gspec +7a7560acb5d56847ea16fb8cd77b6ca5 download/cswusergroup +66b602a793b851ad109403d3d2654fad download/nsd-3.2.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 00:48:14 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 15 Apr 2009 22:48:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4337] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4337 http://gar.svn.sourceforge.net/gar/?rev=4337&view=rev Author: idogan23 Date: 2009-04-15 22:48:14 +0000 (Wed, 15 Apr 2009) Log Message: ----------- nsd: changes sysconfdir to /etc/opt/csw/nsd, changed pid file path to /var/run Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 22:42:53 UTC (rev 4336) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-15 22:48:14 UTC (rev 4337) @@ -27,6 +27,8 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw +CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid +CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw post-install-modulated: @ginstall -d $(DESTDIR)/etc/opt/csw/nsd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Thu Apr 16 03:14:30 2009 From: bwalton at opencsw.org (Ben Walton) Date: Wed, 15 Apr 2009 21:14:30 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> Message-ID: <1239844317-sup-687@ntdws12.chass.utoronto.ca> Hi Dago, Here's one more stab at this. It addresses the points your raised with my last attempt. Thoughts? Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: svn_spkg_pkgfile.patch Type: application/octet-stream Size: 1442 bytes Desc: not available URL: From dam at opencsw.org Thu Apr 16 08:46:28 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Thu, 16 Apr 2009 08:46:28 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239844317-sup-687@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> Message-ID: <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> Hi Ben, Am 16.04.2009 um 03:14 schrieb Ben Walton: > Here's one more stab at this. It addresses the points your raised > with my last attempt. > > Thoughts? Almost perfect ;-) SPKG_PKGFILE contains many %-expansions from environment variables passed. We can set all these directly without the need of deep-passing values into mkpackage: +SPKG_PKGFILE = %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-% {SPKG_OSNAME}-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- UNCOMMITTED).pkg +SPKG_PKGFILE = %{bitname}-$(SPKG_VERSION)$(SPKG_REVSTAMP)-$ (SPKG_OSNAME)-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- UNCOMMITTED).pkg But then it is not possible any more to overwrite any of these during mkpackage (if that is desirable of course...) I guess we just stick to your proposal. We must stick to %{bitname} and %{arch} for static gspec anyway. One more thing: SPKG_PSTAMP contains the value of $(_REVISION), and there are more fault values: UNCOMMITTED, NOTVERSIONED (svn found, but not added to the repository) and NOSVN (no subversion installed). This should do it $(filter $(SPKG_PSTAMP),UNCOMMITTED NOTVERSIONED NOSVN) Best regards -- Dago From dmichelsen at users.sourceforge.net Thu Apr 16 10:02:24 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 08:02:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4338] csw/mgar/gar/v2 Message-ID: Revision: 4338 http://gar.svn.sourceforge.net/gar/?rev=4338&view=rev Author: dmichelsen Date: 2009-04-16 08:02:24 +0000 (Thu, 16 Apr 2009) Log Message: ----------- mGAR v2: Append UNCOMMITTED etc. to package filename if sources have not been fully checked in Modified Paths: -------------- csw/mgar/gar/v2/gar.pkg.mk csw/mgar/gar/v2/pkglib/csw_vars.gspec Modified: csw/mgar/gar/v2/gar.pkg.mk =================================================================== --- csw/mgar/gar/v2/gar.pkg.mk 2009-04-15 22:48:14 UTC (rev 4337) +++ csw/mgar/gar/v2/gar.pkg.mk 2009-04-16 08:02:24 UTC (rev 4338) @@ -112,6 +112,8 @@ SPKG_DEPEND_DB = $(GARDIR)/csw/depend.db +SPKG_PKGFILE ?= %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg + PKGGET_DESTDIR ?= DEPMAKER_EXTRA_ARGS = --noscript --nodep SUNW @@ -134,7 +136,7 @@ PKG_EXPORTS += CURDIR WORKDIR WORKDIR_FIRSTMOD WORKSRC WORKSRC_FIRSTMOD PKGROOT PKG_EXPORTS += SPKG_REVSTAMP SPKG_PKGNAME SPKG_DESC SPKG_VERSION SPKG_CATEGORY PKG_EXPORTS += SPKG_VENDOR SPKG_EMAIL SPKG_PSTAMP SPKG_BASEDIR SPKG_CLASSES -PKG_EXPORTS += SPKG_OSNAME SPKG_SOURCEURL SPKG_PACKAGER TIMESTAMP +PKG_EXPORTS += SPKG_OSNAME SPKG_SOURCEURL SPKG_PACKAGER SPKG_PKGFILE TIMESTAMP PKG_EXPORTS += DEPMAKER_EXTRA_ARGS PKGLIB DESTDIR define _PKG_ENV Modified: csw/mgar/gar/v2/pkglib/csw_vars.gspec =================================================================== --- csw/mgar/gar/v2/pkglib/csw_vars.gspec 2009-04-15 22:48:14 UTC (rev 4337) +++ csw/mgar/gar/v2/pkglib/csw_vars.gspec 2009-04-16 08:02:24 UTC (rev 4338) @@ -1,6 +1,6 @@ %cvar arch %{GARCH} %cvar desc %{SPKG_DESC} -%cvar pkgfile %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-CSW.pkg +%cvar pkgfile %{SPKG_PKGFILE} %cvar RC_INIT_SCRIPT csw%{bitname} %cvar SMF_SCRIPT svc-csw%{bitname} %cvar SMF_MANIFEST csw%{bitname}.xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 13:15:00 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 11:15:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4339] csw/mgar/pkg/wget/trunk/Makefile Message-ID: Revision: 4339 http://gar.svn.sourceforge.net/gar/?rev=4339&view=rev Author: idogan23 Date: 2009-04-16 11:15:00 +0000 (Thu, 16 Apr 2009) Log Message: ----------- wget: small cosmetic fix of MASTER_SITES Modified Paths: -------------- csw/mgar/pkg/wget/trunk/Makefile Modified: csw/mgar/pkg/wget/trunk/Makefile =================================================================== --- csw/mgar/pkg/wget/trunk/Makefile 2009-04-16 08:02:24 UTC (rev 4338) +++ csw/mgar/pkg/wget/trunk/Makefile 2009-04-16 11:15:00 UTC (rev 4339) @@ -13,10 +13,12 @@ whole file has been retrieved. endef -MASTER_SITES = $(GNU_MIRROR) +MASTER_SITES = http://www.gnu.org/software/wget/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 DISTFILES += $(call admfiles,CSWwget) +UPSTREAM_MASTER_SITES = $(GNU_MIRROR) + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 13:55:27 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 11:55:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4340] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4340 http://gar.svn.sourceforge.net/gar/?rev=4340&view=rev Author: idogan23 Date: 2009-04-16 11:55:27 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: config file handling by cswsampleconf class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 11:15:00 UTC (rev 4339) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 11:55:27 UTC (rev 4340) @@ -13,8 +13,8 @@ DISTFILES += $(call admfiles,CSWnsd,) DISTFILES += cswusergroup -SPKG_CLASSES = none cswusergroup -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } { print }' +SPKG_CLASSES = none cswusergroup cswcpsampleconf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' REQUIRED_PKGS = CSWcswclassutils @@ -31,7 +31,7 @@ CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw post-install-modulated: - @ginstall -d $(DESTDIR)/etc/opt/csw/nsd + @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:23:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:23:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4341] csw/mgar/pkg Message-ID: Revision: 4341 http://gar.svn.sourceforge.net/gar/?rev=4341&view=rev Author: dmichelsen Date: 2009-04-16 12:23:32 +0000 (Thu, 16 Apr 2009) Log Message: ----------- libthai: Initial commit Added Paths: ----------- csw/mgar/pkg/libthai/ csw/mgar/pkg/libthai/branches/ csw/mgar/pkg/libthai/tags/ csw/mgar/pkg/libthai/trunk/ csw/mgar/pkg/libthai/trunk/Makefile csw/mgar/pkg/libthai/trunk/checksums csw/mgar/pkg/libthai/trunk/files/ Property changes on: csw/mgar/pkg/libthai/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/libthai/trunk/Makefile (rev 0) +++ csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:23:32 UTC (rev 4341) @@ -0,0 +1,23 @@ +GARNAME = libthai +GARVERSION = 0.1.4 +CATEGORIES = lib + +DESCRIPTION = Thai language support routines +define BLURB +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +# We define upstream file regex so we can be notifed of new upstream software release + +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448&package_id=26558 +UPSTREAM_USE_SF = 1 +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +TEST_TARGET = check + +include gar/category.mk Added: csw/mgar/pkg/libthai/trunk/checksums =================================================================== --- csw/mgar/pkg/libthai/trunk/checksums (rev 0) +++ csw/mgar/pkg/libthai/trunk/checksums 2009-04-16 12:23:32 UTC (rev 4341) @@ -0,0 +1 @@ +844dad9f8e7b915b4791409611fe816b download/libthai-0.1.4.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:24:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:24:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4342] csw/mgar/pkg Message-ID: Revision: 4342 http://gar.svn.sourceforge.net/gar/?rev=4342&view=rev Author: dmichelsen Date: 2009-04-16 12:24:18 +0000 (Thu, 16 Apr 2009) Log Message: ----------- pango-libthai: Initial commit Added Paths: ----------- csw/mgar/pkg/pango-libthai/ csw/mgar/pkg/pango-libthai/branches/ csw/mgar/pkg/pango-libthai/tags/ csw/mgar/pkg/pango-libthai/trunk/ csw/mgar/pkg/pango-libthai/trunk/Makefile csw/mgar/pkg/pango-libthai/trunk/checksums csw/mgar/pkg/pango-libthai/trunk/files/ Property changes on: csw/mgar/pkg/pango-libthai/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/pango-libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango-libthai/trunk/Makefile (rev 0) +++ csw/mgar/pkg/pango-libthai/trunk/Makefile 2009-04-16 12:24:18 UTC (rev 4342) @@ -0,0 +1,25 @@ +GARNAME = pango-libthai +GARVERSION = 0.1.4 +CATEGORIES = lib + +DESCRIPTION = Pango bindings for Thai language support +define BLURB +endef + +SF_PROJ = libthai +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448 +UPSTREAM_USE_SF = 1 +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +REQUIRED_PKGS = CSWlibthai + +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + +PACKAGES = CSWpango-libthai +CATALOGNAME = pango_libthai + +include gar/category.mk Added: csw/mgar/pkg/pango-libthai/trunk/checksums =================================================================== --- csw/mgar/pkg/pango-libthai/trunk/checksums (rev 0) +++ csw/mgar/pkg/pango-libthai/trunk/checksums 2009-04-16 12:24:18 UTC (rev 4342) @@ -0,0 +1 @@ +d7a082c2da46379a55da0d3c0eccf8cd download/pango-libthai-0.1.4.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:26:56 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:26:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4343] csw/mgar/pkg/pango/trunk Message-ID: Revision: 4343 http://gar.svn.sourceforge.net/gar/?rev=4343&view=rev Author: dmichelsen Date: 2009-04-16 12:26:56 +0000 (Thu, 16 Apr 2009) Log Message: ----------- pango: Add libtool fix Modified Paths: -------------- csw/mgar/pkg/pango/trunk/Makefile csw/mgar/pkg/pango/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pango/trunk/files/fixme.sh Modified: csw/mgar/pkg/pango/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:24:18 UTC (rev 4342) +++ csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:26:56 UTC (rev 4343) @@ -13,6 +13,7 @@ MASTER_SITES = http://ftp.gnome.org/pub/gnome/sources/pango/1.24/ DISTNAME = pango-$(GARVERSION) DISTFILES = $(DISTNAME).tar.bz2 +DISTFILES += fixme.sh PACKAGES = CSWpango CSWpangodevel CSWpangodoc CATALOGNAME_CSWpango = libpango @@ -41,3 +42,10 @@ TEST_SCRIPTS = include gar/category.mk + +post-configure-modulated: + @echo " ==> Fixing libtool files" + @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @$(MAKECOOKIE) + + Modified: csw/mgar/pkg/pango/trunk/checksums =================================================================== --- csw/mgar/pkg/pango/trunk/checksums 2009-04-16 12:24:18 UTC (rev 4342) +++ csw/mgar/pkg/pango/trunk/checksums 2009-04-16 12:26:56 UTC (rev 4343) @@ -1 +1,2 @@ +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh af0beac1dd1825e241c5728081f16acd download/pango-1.24.1.tar.bz2 Copied: csw/mgar/pkg/pango/trunk/files/fixme.sh (from rev 4338, csw/mgar/pkg/fixme/trunk/fixme.sh) =================================================================== --- csw/mgar/pkg/pango/trunk/files/fixme.sh (rev 0) +++ csw/mgar/pkg/pango/trunk/files/fixme.sh 2009-04-16 12:26:56 UTC (rev 4343) @@ -0,0 +1,51 @@ +#!/bin/bash +#################################################### +# +# fixme.sh +# Intended to remove the use of libtool's +# pseudo-libraries for opencsw builds. +# +# Author: Mike Watters mwatters_at_opencsw.org +# Initial Version: 0.1 +# +#################################################### + +umask 0022 +PATH=/opt/csw/bin + +if [ $# -ne 1 ]; then + gecho "USAGE: $(basename $0) WORKSRC" + exit 1 +fi +BASEPATH=$1 + +## Fix Makefiles +for mk in $(gfind ${BASEPATH} -name Makefile -print); do + LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \ + gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/") + + for file in ${LT_FILES}; do + LIB_NAME=$(ggrep 'dlname=' ${file} | \ + gsed -e "s/.*'\(.*\)'/\1/" \ + -e "s/^lib//" \ + -e "s/\.so.*$//") + fixpath=$(gecho $file |gsed 's/\//\\\//g') + gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new + gmv Makefile.new ${mk} + gchmod +x ${mk} + done +done + +## Fix libtool Script +for lt in $(gfind ${BASEPATH} -name libtool -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new + gmv ${lt}.new ${lt} + gchmod +x ${lt} +done + +for LTMAIN in $(gfind ${BASEPATH} -name ltmain.sh -print); do + gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new + gmv ${LTMAIN}.new ${LTMAIN} + gchmod +x ${LTMAIN} +done + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:29:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:29:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4344] csw/mgar/pkg/pango/trunk/Makefile Message-ID: Revision: 4344 http://gar.svn.sourceforge.net/gar/?rev=4344&view=rev Author: dmichelsen Date: 2009-04-16 12:29:49 +0000 (Thu, 16 Apr 2009) Log Message: ----------- pango: Add more required packages Modified Paths: -------------- csw/mgar/pkg/pango/trunk/Makefile Modified: csw/mgar/pkg/pango/trunk/Makefile =================================================================== --- csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:26:56 UTC (rev 4343) +++ csw/mgar/pkg/pango/trunk/Makefile 2009-04-16 12:29:49 UTC (rev 4344) @@ -31,7 +31,8 @@ # CONFIGURE_ARGS += --with-included-modules PREREQUISITE_PKGS = CSWgtk-doc CSWlibxslt -REQUIRED_PKGS_CSWpango = CSWggettextrt CSWglib2 +REQUIRED_PKGS_CSWpango = CSWggettextrt CSWglib2 CSWfconfig CSWftype2 +REQUIRED_PKGS_CSWpango += CSWlibcairo CSWlibxft2 CSWlibxrender CSWzlib REQUIRED_PKGS_CSWpangodevel = CSWpango # Dynamic prototype This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:43:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:43:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4345] csw/mgar/pkg/libthai/trunk/Makefile Message-ID: Revision: 4345 http://gar.svn.sourceforge.net/gar/?rev=4345&view=rev Author: dmichelsen Date: 2009-04-16 12:43:01 +0000 (Thu, 16 Apr 2009) Log Message: ----------- libthai: Skip runpath Modified Paths: -------------- csw/mgar/pkg/libthai/trunk/Makefile Modified: csw/mgar/pkg/libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:29:49 UTC (rev 4344) +++ csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:43:01 UTC (rev 4345) @@ -11,11 +11,12 @@ # We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448&package_id=26558 +UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448 UPSTREAM_USE_SF = 1 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz BUILD64 = 1 +NORUNPATH = 1 CONFIGURE_ARGS = $(DIRPATHS) TEST_TARGET = check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 14:43:17 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:43:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4346] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4346 http://gar.svn.sourceforge.net/gar/?rev=4346&view=rev Author: idogan23 Date: 2009-04-16 12:43:17 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: changed db file paths to /var/opt/csw/nsd Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 12:43:01 UTC (rev 4345) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 12:43:17 UTC (rev 4346) @@ -29,8 +29,12 @@ CONFIGURE_ARGS += --with-ssl=/opt/csw CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw +CONFIGURE_ARGS += --with-dbfile=/var/opt/csw/nsd/nsd.db +CONFIGURE_ARGS += --with-difffile=/var/opt/csw/nsd/ixfr.db +CONFIGURE_ARGS += --with-xfrdfile=/var/opt/csw/nsd/xfrd.state post-install-modulated: + @ginstall -d $(DESTDIR)/var/opt/csw/nsd @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 16 14:54:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 16 Apr 2009 12:54:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4347] csw/mgar/pkg/libthai/trunk/Makefile Message-ID: Revision: 4347 http://gar.svn.sourceforge.net/gar/?rev=4347&view=rev Author: dmichelsen Date: 2009-04-16 12:54:33 +0000 (Thu, 16 Apr 2009) Log Message: ----------- libthai: Added blurb and SOURCEURL Modified Paths: -------------- csw/mgar/pkg/libthai/trunk/Makefile Modified: csw/mgar/pkg/libthai/trunk/Makefile =================================================================== --- csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:43:17 UTC (rev 4346) +++ csw/mgar/pkg/libthai/trunk/Makefile 2009-04-16 12:54:33 UTC (rev 4347) @@ -4,17 +4,23 @@ DESCRIPTION = Thai language support routines define BLURB + LibThai is a set of Thai language support routines aimed to ease + developers tasks to incorporate Thai language support in their applications. + It includes important Thai-specific functions e.g. word breaking, input + and output methods as well as basic character and string supports. + LibThai is an Open Source and collaborative effort initiated by + Thai Linux Working Group and opened for all contributors. endef MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -# We define upstream file regex so we can be notifed of new upstream software release - UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=34448 UPSTREAM_USE_SF = 1 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +SPKG_SOURCEURL = http://linux.thai.net/projects/libthai/ + BUILD64 = 1 NORUNPATH = 1 CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bwalton at opencsw.org Thu Apr 16 14:56:54 2009 From: bwalton at opencsw.org (Ben Walton) Date: Thu, 16 Apr 2009 08:56:54 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> Message-ID: <1239886400-sup-3534@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Thu Apr 16 02:46:28 -0400 2009: > Almost perfect ;-) SPKG_PKGFILE contains many %-expansions from > environment variables passed. We can set all these directly without > the need of deep-passing values into mkpackage: > > +SPKG_PKGFILE = %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-% > {SPKG_OSNAME}-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- > UNCOMMITTED).pkg > > +SPKG_PKGFILE = %{bitname}-$(SPKG_VERSION)$(SPKG_REVSTAMP)-$ > (SPKG_OSNAME)-%{arch}-CSW$(if $(findstring UNCOM,$(SPKG_PSTAMP)),- > UNCOMMITTED).pkg I had thought about this as well. I decided to leave it all for mkpackage, as I didn't see that it was hugely wasteful (a little, yes). > One more thing: SPKG_PSTAMP contains the value of $(_REVISION), and > there are more fault values: UNCOMMITTED, NOTVERSIONED (svn found, > but not added to the repository) and NOSVN (no subversion > installed). This should do it $(filter $(SPKG_PSTAMP),UNCOMMITTED > NOTVERSIONED NOSVN) I had considered this also, but chose the path I did because in both the NOSVN and NOTVERSIONED case, I didn't think that flagging the package file name was appropriate. If someone builds packages with GAR, but outside of the svn tree, would we release a package with the NOTVERSIONED or NOSVN tags? If so, I'd say that CSW is still the best choice. I'm not fussy either way though. Thanks for putting up with my patch parade! :) -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dam at opencsw.org Thu Apr 16 15:11:58 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Thu, 16 Apr 2009 15:11:58 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239886400-sup-3534@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> Message-ID: Hi Ben, Am 16.04.2009 um 14:56 schrieb Ben Walton: > If someone builds packages with > GAR, but outside of the svn tree, would we release a package with the > NOTVERSIONED or NOSVN tags? No. If a package is build with GAR it must be fully checked in or it will not be released. > Thanks for putting up with my patch parade! :) Your welcome :) Best regards -- Dago From bwalton at opencsw.org Thu Apr 16 15:24:46 2009 From: bwalton at opencsw.org (Ben Walton) Date: Thu, 16 Apr 2009 09:24:46 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> Message-ID: <1239888018-sup-3416@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Thu Apr 16 09:11:58 -0400 2009: Hi Dago, > No. If a package is build with GAR it must be fully checked in or it > will not be released. Does that not preclude people from building on their own farms if they're not a maintainer and then contributing the work back? Since the repo is public, anyone could checkout GAR and build a package. GAR might have the SVN stuff, but their local package description might not. Would we refuse to release a package in this case? [My own feeling is that we'd simply request that they open a maintainer account and commit the source in that case, but since we don't even force the use of GAR/svn within the existing maintainer base, this may seem heavy handed.] Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dam at opencsw.org Thu Apr 16 15:33:28 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Thu, 16 Apr 2009 15:33:28 +0200 Subject: [csw-devel] updated gar svn check In-Reply-To: <1239888018-sup-3416@ntdws12.chass.utoronto.ca> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> <1239888018-sup-3416@ntdws12.chass.utoronto.ca> Message-ID: <9493E636-4635-4BF4-90B4-285F6AB7387E@opencsw.org> Hi Ben, Am 16.04.2009 um 15:24 schrieb Ben Walton: > Excerpts from Dagobert Michelsen's message of Thu Apr 16 09:11:58 > -0400 2009: >> No. If a package is build with GAR it must be fully checked in or it >> will not be released. > > Does that not preclude people from building on their own farms if > they're not a maintainer and then contributing the work back? Since > the repo is public, anyone could checkout GAR and build a package. > GAR might have the SVN stuff, but their local package description > might not. Would we refuse to release a package in this case? Yes. If the package is going to be officially released under OpenCSW he must become a maintainer and contribute his work back. > [My own feeling is that we'd simply request that they open a > maintainer account and commit the source in that case, but since we > don't even force the use of GAR/svn within the existing maintainer > base, this may seem heavy handed.] We don't force it on long-time maintainers who already have potentially complex build processed on their own. For new maintainers GAR is, umh, strongly recommended. Releasable packages must be build on the buildfarm anyway. Best regards -- Dago PS: I guess you should post on maintainers@ next time as devel@ doesn't seem to be read widely due to commit mails. From bwalton at opencsw.org Thu Apr 16 15:35:43 2009 From: bwalton at opencsw.org (Ben Walton) Date: Thu, 16 Apr 2009 09:35:43 -0400 Subject: [csw-devel] updated gar svn check In-Reply-To: <9493E636-4635-4BF4-90B4-285F6AB7387E@opencsw.org> References: <1239724080-sup-288@ntdws12.chass.utoronto.ca> <48EE3B68-4750-4949-A52A-EF2666503C5B@opencsw.org> <1239824241-sup-2245@ntdws12.chass.utoronto.ca> <5A48A51B-579E-4B49-92BA-22B2EC915219@opencsw.org> <1239844317-sup-687@ntdws12.chass.utoronto.ca> <5E6DF209-D28D-4109-AE7A-3CE42C45F7B8@opencsw.org> <1239886400-sup-3534@ntdws12.chass.utoronto.ca> <1239888018-sup-3416@ntdws12.chass.utoronto.ca> <9493E636-4635-4BF4-90B4-285F6AB7387E@opencsw.org> Message-ID: <1239888897-sup-1987@ntdws12.chass.utoronto.ca> Excerpts from Dagobert Michelsen's message of Thu Apr 16 09:33:28 -0400 2009: Hi Dago, > Yes. If the package is going to be officially released under > OpenCSW he must become a maintainer and contribute his work back. Ok. Then I like your additional file tags. > We don't force it on long-time maintainers who already have > potentially complex build processed on their own. For new > maintainers GAR is, umh, strongly recommended. Releasable > packages must be build on the buildfarm anyway. Ok. This works for me too. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From valholla at users.sourceforge.net Thu Apr 16 16:16:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:16:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4348] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4348 http://gar.svn.sourceforge.net/gar/?rev=4348&view=rev Author: valholla Date: 2009-04-16 14:16:56 +0000 (Thu, 16 Apr 2009) Log Message: ----------- fixed postinstall and other pkg tweaks Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/checksums csw/mgar/pkg/gcc4/trunk/files/gar_override.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Added Paths: ----------- csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space csw/mgar/pkg/gcc4/trunk/files/package_files.mk Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-16 14:16:56 UTC (rev 4348) @@ -42,5 +42,7 @@ include files/gar_override.mk include files/package_def.mk include files/pkg_scripts.mk +include files/package_files.mk +include files/amd_merge.mk ## include mGar definitions include gar/category.mk Modified: csw/mgar/pkg/gcc4/trunk/checksums =================================================================== --- csw/mgar/pkg/gcc4/trunk/checksums 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/checksums 2009-04-16 14:16:56 UTC (rev 4348) @@ -1,3 +1,2 @@ cc3c5565fdb9ab87a05ddb106ba0bd1f download/gcc-4.3.3.tar.bz2 -9644641dee1c5433930319b20710dca3 download/re-enable-alloc.diff -57900f0dad9f424a43e7d1aa502070b8 download/split-insn-attrtab.diff +9883bd7887c22e1180b9dae4f2acd8ec download/CSWgcc4core.space Added: csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/CSWgcc4core.space 2009-04-16 14:16:56 UTC (rev 4348) @@ -0,0 +1 @@ +/opt 1340 200 Modified: csw/mgar/pkg/gcc4/trunk/files/gar_override.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/files/gar_override.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -38,7 +38,7 @@ CONFIGURE_SCRIPTS = objdir TEST_SCRIPTS = skip post-configure-modulated: fix-bootflags -#MERGE_SCRIPTS_isa-i386 = amd +MERGE_SCRIPTS_isa-i386 = amd ## Run checkpkg Manually ENABLE_CHECK = 0 Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -1,7 +1,7 @@ ### Package Section ### -PACKAGES = CSWgcc4ada CSWgcc4adart CSWgcc4core CSWgcc4corert CSWgcc4gfortran -PACKAGES += CSWgcc4gfortranrt CSWgcc4java CSWgcc4javart CSWgcc4objc -PACKAGES += CSWgcc4objcrt CSWgcc4g++ CSWgcc4g++rt +PACKAGES = CSWgcc4ada CSWgcc4adart CSWgcc4gfortran CSWgcc4gfortranrt +PACKAGES += CSWgcc4java CSWgcc4javart CSWgcc4objc CSWgcc4objcrt +PACKAGES += CSWgcc4g++ CSWgcc4g++rt CSWgcc4corert CSWgcc4core ## Define Package Catalog Names CATALOGNAME_CSWgcc4ada = gcc4ada @@ -60,136 +60,91 @@ SPKG_DESC_CSWgcc4objcrt = GNU Objective C Compiler Run Time ## Define Dependencies -COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr -REQUIRED_PKGS_CSWgcc4adart = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core $(COMMON_REQUIRE) +COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr CSWggettextrt +REQUIRED_PKGS_CSWgcc4adart = CSWgcc4corert CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4ada += CSWgcc4adart $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4core = $(COMMON_REQUIRE) CSWbinutils CSWggettextrt -REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt CSWiconv -REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWzlib $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert CSWiconv -REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert CSWbinutils $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4g++ += CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4gfortranrt = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4gfortran += CSWgcc4gfortranrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWgcc4corert CSWjavart CSWzlib +REQUIRED_PKGS_CSWgcc4java += CSWgcc4g++ CSWgcc4g++rt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4objc += CSWgcc4objcrt $(COMMON_REQUIRE) -## Define the Contents of the Packages +DISTFILES += CSWgcc4core.space -## gcc4ada Definitions -PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 -PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnat.* -PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnarl.* -PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* -PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* -PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* -PKGFILES_CSWgcc4ada += .*/gcc4/bin/gnat.* +define CSWgcc4core_postinstall +#!/bin/sh -## gcc4gfortran Definitions -PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran -PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.* -PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 -PKGFILES_CSWgcc4gfortran += .*/gcc4/man/.*gfortran.1 -PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* +Error() +{ + echo "=====> postinstall Error: $$1" >&2 + exit 1 +} -## gcc4g++ Definitions -PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ -PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ -PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus -PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.* -PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.* -PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 -PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* -PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* +OS_REV="`/usr/bin/uname -r | sed -e 's/[^.]*//'`" +case `/usr/bin/uname -p` in + "sparc") OS_TARGET="sparc-sun-solaris2.8" ;; + "i386") OS_TARGET="i386-pc-solaris2$${OS_REV}" ;; +esac -## gcc4java Definitions -PKGFILES_CSWgcc4java = .*/gcc4/bin/.*gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-scan -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-convert -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jcf-dump -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grmi.* -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grepjar -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjnih -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gij -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*fastjar -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjar.* -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjavah -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gorbd -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*addr2name.awk -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gappletviewer -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gkeytool -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gserialver -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii -PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gij.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/jv.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/jcf.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/grmi.* -PKGFILES_CSWgcc4java += .*/gcc4/man/.*jar.* -PKGFILES_CSWgcc4java += .*/gcc4/man/.*jni.* -PKGFILES_CSWgcc4java += .*/gcc4/man/.*java.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gorbd.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gapplet.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gkeytool.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gserialver.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gtnameserv.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gnative2ascii.* -PKGFILES_CSWgcc4java += .*/gcc4/man.*/gc-analyze.* -PKGFILES_CSWgcc4java += .*/gcc4/share/java/.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgij.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libffi.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*lib-gnu-awt.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*security/classpath.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*logging.properties -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*pkgconfig.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgcj.* -PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* -PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain -PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* -PKGFILES_CSWgcc4java += .*/gcc4/info/gcj.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*gcj/.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*awt/.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*classpath/.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*java.* -PKGFILES_CSWgcc4java += .*/gcc4/include/.*ffi.h -PKGFILES_CSWgcc4java += .*/gcc4/include/.*org/.* +TOOLS_DIR="$${PKG_INSTALL_ROOT}/opt/csw/gcc4/libexec/gcc" +TOOLS_DIR="$${TOOLS_DIR}/$${OS_TARGET}/$(GARVERSION)/install-tools" +MKHEADERS_CMD="$${PKG_INSTALL_ROOT}/opt/csw/gcc4/bin/mkheaders" +INCLUDE_DIR="$${PKG_INSTALL_ROOT}/opt/csw/gcc4/lib/gcc" +INCLUDE_DIR="$${INCLUDE_DIR}/$${OS_TARGET}/$(GARVERSION)/include" -## gcc4objc Definitions -PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj -PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.* -PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* -PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* +cat << _EOF_ +****************************************************************************** +* NOTICE: Fixing the system headers +* +* Do not forget: whenever your system headers change +* Run the $${MKHEADERS_CMD} script! +****************************************************************************** +_EOF_ -####### RunTime Packages +if [ -f $${TOOLS_DIR}/mkheaders ]; then + cp $${TOOLS_DIR}/mkheaders $${MKHEADERS_CMD} + installf $${PKGINST} "$${MKHEADERS_CMD}" +else + Error "$${TOOLS_DIR}/mkheaders Not Found" +fi -## gcc4adart -PKGFILES_CSWgcc4adart = .*/opt/csw/lib/.*libgnat.* -PKGFILES_CSWgcc4adart += .*/opt/csw/lib/.*libgnarl.* +if [ -f $${MKHEADERS_CMD} ];then + chmod 0755 $${MKHEADERS_CMD} 2>/dev/null + chown root:bin $${MKHEADERS_CMD} 2>/dev/null + "$${MKHEADERS_CMD}" || Error "$${MKHEADERS_CMD} Failed." +else + Error "Could not find $${MKHEADERS_CMD}" +fi -## gcc4corert -PKGFILES_CSWgcc4corert = .*/opt/csw/lib/.*libgcc_s.* -PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libgomp.* -PKGFILES_CSWgcc4corert += .*/opt/csw/lib/.*libssp.* +if [ -d $${INCLUDE_DIR} ]; then + chmod 0755 $${INCLUDE_DIR} || Error "Failed to chmod $${INCLUDE_DIR}" + chown -R root:bin $${INCLUDE_DIR} || + Error "Failed to change ownership for $${INCLUDE_DIR}" + find $${INCLUDE_DIR} -print | installf $${PKGINST} - +fi -## gcc4gfortranrt -PKGFILES_CSWgcc4gfortranrt = .*/opt/csw/lib/.*libgfortran.* -## gcc4g++rt -PKGFILES_CSWgcc4g++rt = .*/opt/csw/lib/.*libstdc.* -PKGFILES_CSWgcc4g++rt += .*/opt/csw/lib/.*libsupc\+\+.* +cat << _EOF_ +****************************************************************************** +* NOTICE: Successfully fixed system headers +* +* Do not forget: whenever your system headers change +* Run the $${MKHEADERS_CMD} script! +****************************************************************************** +_EOF_ + +installf -f $${PKGINST} -## gcc4javart -PKGFILES_CSWgcc4javart = .*/opt/csw/lib/.*libgij.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libffi.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*lib-gnu-awt.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*security/classpath.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*logging.properties -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*pkgconfig.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*gcj.* -PKGFILES_CSWgcc4javart += .*/opt/csw/lib/.*libgcj.* +exit 0 +endef -## gcc4objc Runtime -PKGFILES_CSWgcc4objcrt = .*/opt/csw/lib/.*libobjc.* Added: csw/mgar/pkg/gcc4/trunk/files/package_files.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_files.mk (rev 0) +++ csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -0,0 +1,119 @@ +## Define the Contents of the Packages + +## gcc4ada Definitions +PKGFILES_CSWgcc4ada = .*/gcc4/libexec/.*gnat1 +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnat.*a +PKGFILES_CSWgcc4ada += .*/gcc4/lib/.*libgnarl.*a +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adalib/.* +PKGFILES_CSWgcc4ada += .*/gcc4/.*/adainclude/.* +PKGFILES_CSWgcc4ada += .*/gcc4/info/.*gnat.* +PKGFILES_CSWgcc4ada += .*/gcc4/bin/gnat.* + +## gcc4gfortran Definitions +PKGFILES_CSWgcc4gfortran = .*/gcc4/bin/.*gfortran +PKGFILES_CSWgcc4gfortran += .*/gcc4/lib/.*libgfortran.*a +PKGFILES_CSWgcc4gfortran += .*/gcc4/libexec/.*f951 +PKGFILES_CSWgcc4gfortran += .*/gcc4/man/.*gfortran.1 +PKGFILES_CSWgcc4gfortran += .*/gcc4/info/gfortran.* + +## gcc4g++ Definitions +PKGFILES_CSWgcc4g++ = .*/gcc4/bin/.*g\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/bin/.*c\+\+ +PKGFILES_CSWgcc4g++ += .*/gcc4/libexec/.*cc1plus +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libstdc.*a +PKGFILES_CSWgcc4g++ += .*/gcc4/lib/.*libsupc\+\+.*a +PKGFILES_CSWgcc4g++ += .*/gcc4/man/.*g\+\+.1 +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.* +PKGFILES_CSWgcc4g++ += .*/gcc4/include/c\+\+/(\d+(?:\.\d+)*)/ostream.* + +## gcc4java Definitions +PKGFILES_CSWgcc4java = .*/gcc4/bin/.*gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-scan +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jv-convert +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*jcf-dump +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*grepjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjnih +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gij +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*fastjar +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjar.* +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gjavah +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gorbd +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*addr2name.awk +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gappletviewer +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gkeytool +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gserialver +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gtnameserv +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gnative2ascii +PKGFILES_CSWgcc4java += .*/gcc4/bin/.*gc-analyze +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gij.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/jv.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/jcf.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/grmi.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jar.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*jni.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gorbd.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gapplet.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gkeytool.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gserialver.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gtnameserv.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gnative2ascii.* +PKGFILES_CSWgcc4java += .*/gcc4/man/.*/gc-analyze.* +PKGFILES_CSWgcc4java += .*/gcc4/share/java/.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgij.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libffi.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*lib-gnu-awt.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*security.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*logging.properties +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*pkgconfig.* +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*gcj.*a +PKGFILES_CSWgcc4java += .*/gcc4/lib/.*libgcj.*a +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*collect.* +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jvgenmain +PKGFILES_CSWgcc4java += .*/gcc4/libexec/.*jc1.* +PKGFILES_CSWgcc4java += .*/gcc4/info/gcj.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*gcj/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*awt/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*classpath/.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*java.* +PKGFILES_CSWgcc4java += .*/gcc4/include/.*ffi.h +PKGFILES_CSWgcc4java += .*/gcc4/include/.*org/.* + +## gcc4objc Definitions +PKGFILES_CSWgcc4objc = .*/gcc4/libexec/.*cc1obj +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.*a +PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* +PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* + +####### RunTime Packages + +## gcc4adart +PKGFILES_CSWgcc4adart = .*/gcc4/lib/.*libgnat.*\.so.* +PKGFILES_CSWgcc4adart += .*/gcc4/lib/.*libgnarl.*\.so.* + +## gcc4corert +PKGFILES_CSWgcc4corert = .*/gcc4/lib/.*libgcc_s.*\.so.* +PKGFILES_CSWgcc4corert += .*/gcc4/lib/.*libgomp.*\.so.* +PKGFILES_CSWgcc4corert += .*/gcc4/lib/.*libssp.*\.so.* + +## gcc4gfortranrt +PKGFILES_CSWgcc4gfortranrt = .*/gcc4/lib/.*libgfortran.*\.so.* + +## gcc4g++rt +PKGFILES_CSWgcc4g++rt = .*/gcc4/lib/.*libstdc.*\.so.* +PKGFILES_CSWgcc4g++rt += .*/gcc4/lib/.*libsupc\+\+.*\.so.* + +## gcc4javart +PKGFILES_CSWgcc4javart = .*/gcc4/lib/.*libgij.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*libffi.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*lib-gnu-awt.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*security/classpath.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*logging.properties +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*pkgconfig.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*gcj.*\.so.* +PKGFILES_CSWgcc4javart += .*/gcc4/lib/.*libgcj.*\.so.* + +## gcc4objc Runtime +PKGFILES_CSWgcc4objcrt = .*/gcc4/lib/.*libobjc.*\.so.* Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-16 12:54:33 UTC (rev 4347) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-16 14:16:56 UTC (rev 4348) @@ -1,55 +1,37 @@ +ifeq ($(PKG_DEBUG),) + _DBG=@ +else + _DBG= +endif -post-patch-modulated: - @(echo "==> Running autoheader and autoconf") - @(cd $(PATCHDIR)/gcc && autoheader) - @(cd $(PATCHDIR)/gcc && autoconf) - @$(MAKECOOKIE) ## Create $(OBJECT_DIR) to build in post-extract-$(addprefix post-extract-,$(MODULATIONS)): - @(echo "==> Creating Object Dir for Building") - @( mkdir $(OBJECT_DIR) ) - $(MAKECOOKIE) + $(_DBG)(echo "==> Creating Object Dir for Building") + $(_DBG)(mkdir $(OBJECT_DIR)) + $(_DBG)$(MAKECOOKIE) ## instead of changing to $(WORKSRC) and running configure ## Run it from the $(OBJECT_DIR) configure-objdir: - echo "==> Running Configure from $(OBJECT_DIR)" - cd $(OBJECT_DIR) && $(CONFIGURE_ENV) \ - ../$(DISTNAME)/configure $(CONFIGURE_ARGS) - $(MAKECOOKIE) + $(_DBG)(echo "==> Running Configure from $(OBJECT_DIR)") + $(_DBG)(cd $(OBJECT_DIR) && $(CONFIGURE_ENV) \ + ../$(DISTNAME)/configure $(CONFIGURE_ARGS)) + $(_DBG)$(MAKECOOKIE) ## Set the CFLAGS so the correct architecture is used fix-bootflags: - @(perl -i -plne "s|^BOOT_CFLAGS.*|BOOT_CFLAGS= $(BOOT_CFLAGS)|" \ + $(_DBG)(perl -i -plne "s|^BOOT_CFLAGS.*|BOOT_CFLAGS= $(BOOT_CFLAGS)|" \ $(WORKSRC)/Makefile) - @(perl -i -plne "s|^BOOT_LDFLAGS.*|BOOT_LDFLAGS= $(BOOT_LDFLAGS)|" \ + $(_DBG)(perl -i -plne "s|^BOOT_LDFLAGS.*|BOOT_LDFLAGS= $(BOOT_LDFLAGS)|" \ $(WORKSRC)/Makefile) - @$(MAKECOOKIE) + $(_DBG)$(MAKECOOKIE) post-merge-modulated: - @( gecho "[===> Creating Runtime Package files <===]" ) - @( ginstall -d $(PKGROOT)/opt/csw/lib ) - @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/*.so* $(PKGROOT)/opt/csw/lib/ ) - @( gchmod 0755 $(PKGROOT)/opt/csw/lib/*.so* ) - @( gcp -d $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ - $(PKGROOT)/opt/csw/lib/ ) - @( if [ "`uname -p`" = 'i386' ]; then \ - if [ "`uname -r`" = '5.10' ]; then \ - ginstall -d $(PKGROOT)/opt/csw/lib/amd64; \ - gcp -d $(PKGROOT)/opt/csw/gcc4/lib/amd64/*.so* \ - $(PKGROOT)/opt/csw/lib/amd64/; \ - gchmod 0755 $(PKGROOT)/opt/csw/lib/amd64/*.so*; \ - fi; \ - fi ) - @( if [ "`uname -p`" = 'sparc' ]; then \ - ginstall -d $(PKGROOT)/opt/csw/lib/sparcv9; \ - gcp -d $(PKGROOT)/opt/csw/gcc4/lib/sparcv9/*.so* \ - $(PKGROOT)/opt/csw/lib/sparcv9/; \ - gchmod 0755 $(PKGROOT)/opt/csw/lib/sparcv9/*.so*; \ - fi ) - @$(MAKECOOKIE) + $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ + $(PKGROOT)/opt/csw/gcc4/lib/ ) + $(_DBG)$(MAKECOOKIE) test-skip: - @$(MAKECOOKIE) + $(_DBG)$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 16 16:18:42 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:18:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4349] csw/mgar/pkg/gcc4/trunk/files/test-results Message-ID: Revision: 4349 http://gar.svn.sourceforge.net/gar/?rev=4349&view=rev Author: valholla Date: 2009-04-16 14:18:42 +0000 (Thu, 16 Apr 2009) Log Message: ----------- remove s9 test result directories Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/test-results/i386s9/ csw/mgar/pkg/gcc4/trunk/files/test-results/sparcs9/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 16 16:19:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:19:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4350] csw/mgar/pkg/gcc4/trunk/files/test-results/ gcc4-sparc Message-ID: Revision: 4350 http://gar.svn.sourceforge.net/gar/?rev=4350&view=rev Author: valholla Date: 2009-04-16 14:19:57 +0000 (Thu, 16 Apr 2009) Log Message: ----------- remove s9 test result directories Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc Deleted: csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc 2009-04-16 14:18:42 UTC (rev 4349) +++ csw/mgar/pkg/gcc4/trunk/files/test-results/gcc4-sparc 2009-04-16 14:19:57 UTC (rev 4350) @@ -1,410 +0,0 @@ -$ make check -Making a new config file... -echo "set tmpdir /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite" >> ./tmp0 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gcc || mkdir testsuite/gcc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gcc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gcc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 13:48:45 2009 -Native configuration is sparc-sun-solaris2.8 - - === gcc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... - -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/autopar/autopar.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/cpp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/cpp/trad/trad.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dfp/dfp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/dg.exp ... -WARNING: program timed out. -FAIL: gcc.dg/pr28796-2.c execution test -FAIL: gcc.dg/pthread-init-1.c (test for excess errors) -FAIL: gcc.dg/pthread-init-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-2.c (test for excess errors) -XPASS: gcc.dg/ucnid-3.c (test for excess errors) -XPASS: gcc.dg/ucnid-4.c (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/format/format.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/ipa/ipa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/matrix/matrix.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/mips-abi.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/special/special.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/struct/struct-reorg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vect/vect.exp ... -FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/pr33804.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 -FAIL: gcc.dg/vect/vect-35.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-iv-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-multitypes-5.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-multitypes-6.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 -FAIL: gcc.dg/vect/vect-outer-5.c scan-tree-dump-times vect "zero step in outer loop." 1 -FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 -FAIL: gcc.dg/vect/vect-outer-6.c scan-tree-dump-times vect "zero step in outer loop." 1 -FAIL: gcc.dg/vect/vect-vfa-slp.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/slp-15.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 -FAIL: gcc.dg/vect/slp-25.c scan-tree-dump-times vect "Alignment of access forced using peeling" 2 -FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorized 3 loops" 1 -FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorizing stmts using SLP" 3 -FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 0 loops" 2 -FAIL: gcc.dg/vect/no-vfa-pr29145.c scan-tree-dump-times vect "vectorized 1 loops" 1 -FAIL: gcc.dg/vect/no-vfa-vect-depend-1.c scan-tree-dump-times vect "vectorized 1 loops" 1 -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vmx/vmx.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/vxworks/vxworks.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.dg/weak/weak.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/acker1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/arm-isr.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dectest.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/dhry.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/linkage.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/matrix1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg-2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/mg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/options.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sieve.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.misc-tests/sort2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/alpha/alpha.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/arm.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/arm/neon/neon.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/bfin/bfin.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/cris.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/frv/frv.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/i386.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/ia64/ia64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/m68k/m68k.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/mips/mips.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/powerpc/powerpc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/s390/s390.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sh/sh.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/sparc/sparc.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/spu/spu.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gcc.test-framework/test-framework.exp ... -skipping test framework tests, CHECK_TEST_FRAMEWORK is not defined - - === gcc Summary === - -# of expected passes 46968 -# of unexpected failures 21 -# of unexpected successes 3 -# of expected failures 192 -# of untested testcases 35 -# of unsupported tests 531 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gcc] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' - === acats configuration === -target gcc is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc -B/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/ -Reading specs from /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/specs Target: sparc-sun-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) -host=sparc-sun-solaris2.8 -target=sparc-sun-solaris2.8 -gnatmake is /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/gnatmake - - === acats support === -Generating support files... done. -Compiling support files... done. - - === acats tests === -Running chapter a ... -Running chapter c2 ... -Running chapter c3 ... -Running chapter c4 ... -Running chapter c5 ... -Running chapter c6 ... -Running chapter c7 ... -Running chapter c8 ... -Running chapter c9 ... -Running chapter ca ... -Running chapter cb ... -Running chapter cc ... -Running chapter cd ... -Running chapter ce ... -Running chapter cxa ... -Running chapter cxb ... -Running chapter cxf ... -Running chapter cxg ... -Running chapter cxh ... -Running chapter cz ... -Running chapter d ... -Running chapter e ... -Running chapter gcc ... -Running chapter l ... - === acats Summary === -# of expected passes 2315 -# of unexpected failures 0 -test -d testsuite || mkdir testsuite -test -d testsuite/gnat || mkdir testsuite/gnat -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gnat; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gnat|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gnat ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 18:48:17 2009 -Native configuration is sparc-sun-solaris2.8 - - === gnat tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/specs/specs.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gnat.dg/style/style.exp ... - - === gnat Summary === - -# of expected passes 375 -# of expected failures 1 -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/g++ || mkdir testsuite/g++ -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/g++; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/g++|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 18:52:36 2009 -Native configuration is sparc-sun-solaris2.8 - - === g++ tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/bprob/bprob.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/charset/charset.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/compat.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/debug.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/dg.exp ... -FAIL: g++.dg/opt/anchor1.C execution test -XPASS: g++.dg/other/ucnid-1.C (test for excess errors) -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gcov/gcov.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/special/ecos.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tls/tls.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/torture/dg-torture.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/g++.old-deja/old-deja.exp ... -XPASS: g++.old-deja/g++.other/init19.C execution test - - === g++ Summary === - -# of expected passes 17327 -# of unexpected failures 1 -# of unexpected successes 2 -# of expected failures 84 -# of unsupported tests 227 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/g++/../../g++ version 4.3.3 (GCC) - -gmake[1]: [check-parallel-g++] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -gmake[1]: Entering directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/gfortran || mkdir testsuite/gfortran -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/gfortran; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - runtestflags= ; \ - if [ -n "" ] ; then \ - runtestflags=""; \ - elif [ -n "" ] ; then \ - parts="`echo ' ' \ - | sed 's/=[^ ]* / /g'`"; \ - for part in `find $srcdir/testsuite/gfortran* -name \*.exp` ; do \ - part=`basename $part` ; \ - case " $parts $runtestflags " in \ - *" $part "*) ;; \ - *) runtestflags="$runtestflags $part" ;; \ - esac ; \ - done ; \ - fi ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran $runtestflags) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 19:59:55 2009 -Native configuration is sparc-sun-solaris2.8 - - === gfortran tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/dg.exp ... -FAIL: gfortran.dg/nint_2.f90 -O0 execution test -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.dg/vect/vect.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... - - === gfortran Summary === - -# of expected passes 24901 -# of unexpected failures 1 -# of expected failures 5 -# of unsupported tests 171 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/testsuite/gfortran/../../gfortran version 4.3.3 (GCC) - -gmake[1]: [check-parallel-gfortran] Error 1 (ignored) -gmake[1]: Leaving directory `/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc' -test -d testsuite || mkdir testsuite -test -d testsuite/objc || mkdir testsuite/objc -(rootme=`${PWDCMD-pwd}`; export rootme; \ - srcdir=`cd ../../gcc-4.3.3/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ - cd testsuite/objc; \ - rm -f tmp-site.exp; \ - sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ - < ../../site.exp > tmp-site.exp; \ - /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ - EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ - if [ -f ${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ - export TCL_LIBRARY ; fi ; \ - GCC_EXEC_PREFIX="/opt/csw/gcc4/lib/gcc/" ; export GCC_EXEC_PREFIX ; \ - `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc ) -WARNING: Couldn't find the global config file. -Test Run By mwatters on Sat Apr 4 22:13:33 2009 -Native configuration is sparc-sun-solaris2.8 - - === objc tests === - -Schedule of variations: - unix - -Running target unix -Using /opt/csw/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /opt/csw/share/dejagnu/config/unix.exp as generic interface file for target. -Using /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/compile/compile.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc/execute/execute.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/dg.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/pch/pch.exp ... -Running /home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/gcc-4.3.3/gcc/testsuite/objc.dg/special/special.exp ... - - === objc Summary === - -# of expected passes 1812 -# of expected failures 7 -# of unsupported tests 24 -/home/mwatters/mgar/pkg/gcc4/trunk/work/build-isa-sparcv8-5.8-sparc/objdir/gcc/xgcc version 4.3.3 (GCC) - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From harpchad at users.sourceforge.net Thu Apr 16 16:42:26 2009 From: harpchad at users.sourceforge.net (harpchad at users.sourceforge.net) Date: Thu, 16 Apr 2009 14:42:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4351] csw/mgar/pkg/freetype/trunk Message-ID: Revision: 4351 http://gar.svn.sourceforge.net/gar/?rev=4351&view=rev Author: harpchad Date: 2009-04-16 14:42:26 +0000 (Thu, 16 Apr 2009) Log Message: ----------- Bump to 2.3.9 Modified Paths: -------------- csw/mgar/pkg/freetype/trunk/Makefile csw/mgar/pkg/freetype/trunk/checksums Modified: csw/mgar/pkg/freetype/trunk/Makefile =================================================================== --- csw/mgar/pkg/freetype/trunk/Makefile 2009-04-16 14:19:57 UTC (rev 4350) +++ csw/mgar/pkg/freetype/trunk/Makefile 2009-04-16 14:42:26 UTC (rev 4351) @@ -1,5 +1,5 @@ GARNAME = freetype -GARVERSION = 2.3.8 +GARVERSION = 2.3.9 CATEGORIES = lib DESCRIPTION = A free and portable TrueType font rendering engine Modified: csw/mgar/pkg/freetype/trunk/checksums =================================================================== --- csw/mgar/pkg/freetype/trunk/checksums 2009-04-16 14:19:57 UTC (rev 4350) +++ csw/mgar/pkg/freetype/trunk/checksums 2009-04-16 14:42:26 UTC (rev 4351) @@ -1,2 +1,2 @@ +d76233108aca9c9606cdbd341562ad9a download/freetype-2.3.9.tar.bz2 4155af32f82cb784be209147eb8b67ee download/COPYING -6cf31a08826715a0d16ae366da9c7d3b download/freetype-2.3.8.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 17:27:28 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 15:27:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4352] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4352 http://gar.svn.sourceforge.net/gar/?rev=4352&view=rev Author: idogan23 Date: 2009-04-16 15:27:28 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: changed ownder and group for /var/opt/csw/nsd Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 14:42:26 UTC (rev 4351) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 15:27:28 UTC (rev 4352) @@ -14,7 +14,7 @@ DISTFILES += cswusergroup SPKG_CLASSES = none cswusergroup cswcpsampleconf -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' REQUIRED_PKGS = CSWcswclassutils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 16 17:57:13 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 16 Apr 2009 15:57:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4353] csw/mgar/pkg/nsd/trunk Message-ID: Revision: 4353 http://gar.svn.sourceforge.net/gar/?rev=4353&view=rev Author: idogan23 Date: 2009-04-16 15:57:13 +0000 (Thu, 16 Apr 2009) Log Message: ----------- nsd: fixed MASTER_SITES, init script handled by cswinitsmf class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile csw/mgar/pkg/nsd/trunk/checksums Added Paths: ----------- csw/mgar/pkg/nsd/trunk/files/cswnsd Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 15:27:28 UTC (rev 4352) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-16 15:57:13 UTC (rev 4353) @@ -8,23 +8,25 @@ authoritative DNS nameserver. endef -MASTER_SITES = http://ww$(GARNAME)w.nlnetlabs.nl/downloads/nsd/ +MASTER_SITES = http://www.nlnetlabs.nl/projects/nsd/ + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +UPSTREAM_MASTER_SITES = http://www.nlnetlabs.nl/downloads/nsd/ + DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnsd,) DISTFILES += cswusergroup +DISTFILES += cswnsd -SPKG_CLASSES = none cswusergroup cswcpsampleconf -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' +SPKG_CLASSES = none cswusergroup cswcpsampleconf cswinitsmf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' REQUIRED_PKGS = CSWcswclassutils # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -# If the url used to check for software update is different of MASTER_SITES, then -# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES -# UPSTREAM_MASTER_SITES = - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid @@ -35,6 +37,8 @@ post-install-modulated: @ginstall -d $(DESTDIR)/var/opt/csw/nsd + @ginstall -d $(DESTDIR)/etc/opt/csw/init.d + @ginstall -m 755 $(FILEDIR)/cswnsd $(DESTDIR)/etc/opt/csw/init.d/cswnsd @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup Modified: csw/mgar/pkg/nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/nsd/trunk/checksums 2009-04-16 15:27:28 UTC (rev 4352) +++ csw/mgar/pkg/nsd/trunk/checksums 2009-04-16 15:57:13 UTC (rev 4353) @@ -1,3 +1,4 @@ 193710012704d807e85445886c72aca8 download/CSWnsd.gspec +0eece57abde9d1cef8a962461b453d03 download/cswnsd 7a7560acb5d56847ea16fb8cd77b6ca5 download/cswusergroup 66b602a793b851ad109403d3d2654fad download/nsd-3.2.1.tar.gz Added: csw/mgar/pkg/nsd/trunk/files/cswnsd =================================================================== --- csw/mgar/pkg/nsd/trunk/files/cswnsd (rev 0) +++ csw/mgar/pkg/nsd/trunk/files/cswnsd 2009-04-16 15:57:13 UTC (rev 4353) @@ -0,0 +1,30 @@ +#!/sbin/sh + +case "$1" in + start) + echo "Starting nsd." + if [ ! -f /var/opt/csw/nsd/nsd.db ]; then + /opt/csw/sbin/nsdc rebuild >/dev/null 2>/dev/null + fi + /opt/csw/sbin/nsdc start + ;; + stop) + echo "Stopping nsd." + /opt/csw/sbin/nsdc stop + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + refresh) + echo "Refreshing nsd." + /opt/csw/sbin/nsdc reload + ;; + *) + echo "Usage: $0 { start | stop | restart | refresh }" + exit 1 + ;; +esac + +exit 0 Property changes on: csw/mgar/pkg/nsd/trunk/files/cswnsd ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 16 19:50:35 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 16 Apr 2009 17:50:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4354] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4354 http://gar.svn.sourceforge.net/gar/?rev=4354&view=rev Author: valholla Date: 2009-04-16 17:50:35 +0000 (Thu, 16 Apr 2009) Log Message: ----------- update to 1.6.1 upstream Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-16 15:57:13 UTC (rev 4353) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-16 17:50:35 UTC (rev 4354) @@ -1,5 +1,5 @@ GARNAME = subversion -DISTVERSION = 1.5.6 +DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 20:02:54 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 18:02:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4355] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4355 http://gar.svn.sourceforge.net/gar/?rev=4355&view=rev Author: bdwalton Date: 2009-04-16 18:02:54 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Updated to included the 4.5 sgml/xml dtds. - Updated to include the 5.0 schemas (xml only: rng, dtd, etc). - Steps up to install work. Still need to handle the adm scripts. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/Makefile csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch Modified: csw/mgar/pkg/docbook-dtds/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 17:50:35 UTC (rev 4354) +++ csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 18:02:54 UTC (rev 4355) @@ -8,9 +8,8 @@ # NOTE NOTE NOTE GARNAME = docbookdtds -GARVERSION = 1.0 +GARVERSION = 5.0 -PATCHLEVEL = 30.1 CATEGORIES = xtra REQUIRED_PKGS = CSWsgmlcommon CSWxmlcommon CSWlibxml2 @@ -48,12 +47,14 @@ O_SRC += $(OASIS)/sgml/4.1/ $(OASIS)/xml/4.1.2/ $(OASIS)/sgml/4.2/ O_SRC += $(OASIS)/xml/4.2/ D_SRC = $(DOCBOOK)/sgml/4.3/ $(DOCBOOK)/xml/4.3/ $(DOCBOOK)/sgml/4.4/ -D_SRC += $(DOCBOOK)/xml/4.4/ +D_SRC += $(DOCBOOK)/xml/4.4/ $(DOCBOOK)/sgml/4.5/ $(DOCBOOK)/xml/4.5/ +D_SRC += $(DOCBOOK)/xml/5.0/ # the various files we'll need to fetch from the various sources DBFILES = docbk30.zip docbk31.zip docbk40.zip docbk41.zip docbkx412.zip DBFILES += docbook-4.2.zip docbook-xml-4.2.zip docbook-4.3.zip DBFILES += docbook-xml-4.3.zip docbook-4.4.zip docbook-xml-4.4.zip +DBFILES += docbook-4.5.zip docbook-xml-4.5.zip docbook-5.0.zip MASTER_SITES = $(O_SRC) $(D_SRC) DISTFILES = $(DBFILES) @@ -75,7 +76,7 @@ # nothing to build either... BUILD_SCRIPTS = -INSTALL_ARGS = DESTDIR=$(DESTDIR) GARVERSION=$(GARVERSION) PATCHLEVEL=$(PATCHLEVEL) +INSTALL_ARGS = DESTDIR=$(DESTDIR) include gar/category.mk @@ -111,7 +112,6 @@ unzip $(DOWNLOADDIR)/docbkx412.zip -d $(WORKSRC)/4.1.2-xml @$(MAKECOOKIE) - zip-extract-docbook-4.3.zip: ginstall -d $(WORKSRC)/4.3-sgml unzip $(DOWNLOADDIR)/docbook-4.3.zip -d $(WORKSRC)/4.3-sgml @@ -122,6 +122,11 @@ unzip $(DOWNLOADDIR)/docbook-4.4.zip -d $(WORKSRC)/4.4-sgml @$(MAKECOOKIE) +zip-extract-docbook-4.5.zip: + ginstall -d $(WORKSRC)/4.5-sgml + unzip $(DOWNLOADDIR)/docbook-4.5.zip -d $(WORKSRC)/4.5-sgml + @$(MAKECOOKIE) + zip-extract-docbook-xml-4.2.zip: ginstall -d $(WORKSRC)/4.2-xml unzip $(DOWNLOADDIR)/docbook-xml-4.2.zip -d $(WORKSRC)/4.2-xml @@ -137,6 +142,18 @@ unzip $(DOWNLOADDIR)/docbook-xml-4.4.zip -d $(WORKSRC)/4.4-xml @$(MAKECOOKIE) +zip-extract-docbook-xml-4.5.zip: + ginstall -d $(WORKSRC)/4.5-xml + unzip $(DOWNLOADDIR)/docbook-4.5.zip -d $(WORKSRC)/4.5-xml + @$(MAKECOOKIE) + +zip-extract-docbook-5.0.zip: + ginstall -d $(WORKSRC)/5.0-xml + unzip $(DOWNLOADDIR)/docbook-5.0.zip -d $(WORKSRC)/5.0-xml + mv $(WORKSRC)/5.0-xml/docbook-5.0/* $(WORKSRC)/5.0-xml/ + rmdir $(WORKSRC)/5.0-xml/docbook-5.0 + @$(MAKECOOKIE) + post-extract: # Increase NAMELEN (bug #36058, bug #159382). [bug references from # rpm .spec file] Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 17:50:35 UTC (rev 4354) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 18:02:54 UTC (rev 4355) @@ -1,3 +1,7 @@ +536104a1ab1e8eac583cf27f4f8844a4 download/CSWdocbookdtds.gspec +58c926e94c472fd0842d7850732cbcc8 download/CSWdocbookdtds.postinstall +81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove +d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip 432749c0c806dbae81c8bcb70da3b5d3 download/docbk31.zip fabcf7dd1d88b94797b7e5344389eab9 download/docbk40.zip @@ -3,14 +7,10 @@ 489f6ff2a2173eb1e14216c10533ede2 download/docbk41.zip 900d7609fb7e6d78901b357e4acfbc17 download/docbkx412.zip +318742d3a6648a6905727f071cbc9847 download/docbook-4.2-euro.patch 0dfeb94569334dd22a62d90d99fc0630 download/docbook-4.2.zip -73fe50dfe74ca631c1602f558ed8961f download/docbook-xml-4.2.zip e3beb1b0b2923c24fa55a68e88654b01 download/docbook-4.3.zip -ab200202b9e136a144db1e0864c45074 download/docbook-xml-4.3.zip f89e1bd0b2c7a361e3f1f739e16b5d0d download/docbook-4.4.zip -cbb04e9a700955d88c50962ef22c1634 download/docbook-xml-4.4.zip -536104a1ab1e8eac583cf27f4f8844a4 download/CSWdocbookdtds.gspec -58c926e94c472fd0842d7850732cbcc8 download/CSWdocbookdtds.postinstall -81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove -318742d3a6648a6905727f071cbc9847 download/docbook-4.2-euro.patch +07c581f4bbcba6d3aac85360a19f95f7 download/docbook-4.5.zip +2411c19ed4fb141f3fa3d389fae40736 download/docbook-5.0.zip e3067045964536cc7445d5c3f1e99916 download/docbook-dtd30-sgml-1.0.catalog.patch 856d40f5d1e3fc8fd939b88bf5fedc87 download/docbook-dtd31-sgml-1.0.catalog.patch @@ -19,4 +19,7 @@ e976c302070ec2e14316d4a601c224cb download/docbook-dtd41-sgml-1.0.catalog.patch 0ee42c28835cd448b6b47b2345394b28 download/docbook-dtd42-sgml-1.0.catalog.patch 1dae3f33fe7dda3fd68a4d4a3df2c653 download/docbook-dtds-ents.patch -e95f2615b1a3f50b9d14efdb4d188f3d download/add_makefile.patch +73fe50dfe74ca631c1602f558ed8961f download/docbook-xml-4.2.zip +ab200202b9e136a144db1e0864c45074 download/docbook-xml-4.3.zip +cbb04e9a700955d88c50962ef22c1634 download/docbook-xml-4.4.zip +03083e288e87a7e829e437358da7ef9e download/docbook-xml-4.5.zip Modified: csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch 2009-04-16 17:50:35 UTC (rev 4354) +++ csw/mgar/pkg/docbook-dtds/trunk/files/add_makefile.patch 2009-04-16 18:02:54 UTC (rev 4355) @@ -1,6 +1,6 @@ --- /dev/null 2008-12-15 18:41:04.000000000 +0100 -+++ docbookdtds-1.0/Makefile 2008-12-15 18:55:18.651895350 +0100 -@@ -0,0 +1,81 @@ ++++ docbookdtds-5.0/Makefile 2008-12-15 18:55:18.651895350 +0100 +@@ -0,0 +1,96 @@ +prefix = /opt/csw +sysconfdir = $(prefix)/etc +datadir = $(prefix)/share @@ -19,6 +19,9 @@ +SGMLTARG = $(patsubst %,inst-%,$(SGML)) +XMLTARG = $(patsubst %,inst-%,$(XML)) + ++CUR_SGML = $(lastword $(sort $(subst -sgml,,$(SGMLTARG)))) ++CUR_XML = $(lastword $(sort $(subst -xml,,$(XMLTARG)))) ++ +.PHONY: $(SGML) $(XMLT) + +all: build @@ -30,10 +33,10 @@ + @( $(INSTALL_DIR) $(DESTDIR)/$(sysconfdir)/sgml; \ + cd $(DESTDIR)/$(sysconfdir)/sgml; \ + [ -h $(DESTDIR)/$(sysconfdir)/sgml/sgml-docbook.cat ] || \ -+ ln -s sgml-docbook-4.4-$(GARVERSION)-$(PATCHLEVEL).cat \ ++ ln -s sgml-docbook-$(CUR_SGML).cat \ + $(DESTDIR)/$(sysconfdir)/sgml/sgml-docbook.cat; \ + [ -h $(DESTDIR)/$(sysconfdir)/sgml/xml-docbook.cat ] || \ -+ ln -s xml-docbook-4.4-$(GARVERSION)-$(PATCHLEVEL).cat \ ++ ln -s xml-docbook-$(CUR_XML).cat \ + $(DESTDIR)/$(sysconfdir)/sgml/xml-docbook.cat ) + +docs: @@ -50,8 +53,10 @@ + [ -d $$dir ] || $(INSTALL_DIR) $$dir; \ + $(INSTALL_DATA) $$x.1-sgml/ChangeLog $$dir/; \ + done ++ $(INSTALL_DIR) $(DESTDIR)/$(docdir)/5.0 ++ cp -R 5.0-xml/docs/ $(DESTDIR)/$(docdir)/5.0/ + -+inst-%-sgml: DD=$(DESTDIR)/$(docbookdir)/sgml-dtd-$*-$(GARVERSION)-$(PATCHLEVEL) ++inst-%-sgml: DD=$(DESTDIR)/$(docbookdir)/sgml-dtd-$* +inst-%-sgml: + @echo Installing $*-sgml + @( cd $*-sgml; \ @@ -64,7 +69,7 @@ + $(INSTALL_DATA) ent/* $(DD)/ent/; \ + fi ) + -+inst-%-xml: DD=$(DESTDIR)/$(docbookdir)/xml-dtd-$*-$(GARVERSION)-$(PATCHLEVEL) ++inst-%-xml: DD=$(DESTDIR)/$(docbookdir)/xml-dtd-$* +inst-%-xml: + @echo Installing $*-xml + @( cd $*-xml; \ @@ -77,6 +82,16 @@ + $(INSTALL_DATA) ent/* $(DD)/ent/; \ + fi ) + ++inst-5.0-xml: DD=$(DESTDIR)/$(docbookdir)/xml-schemas-5.0 ++inst-5.0-xml: ++ @echo Installing 5.0-xml ++ @( cd 5.0-xml/; \ ++ gmkdir -p $(DD); \ ++ for d in dtd rng sch xsd; do \ ++ cp -R $$d $(DD); \ ++ done; \ ++ $(INSTALL_DATA) catalog.xml $(DD)/catalog; ) ++ +build: + @echo Nothing to build...dummy statement in action. + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 21:11:00 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 19:11:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4356] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4356 http://gar.svn.sourceforge.net/gar/?rev=4356&view=rev Author: bdwalton Date: 2009-04-16 19:10:59 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Convert to dynamic gspec. - Remove package version specific identifiers from filenames in postinstall. - Remove unnecessary depend and gspec files. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/Makefile csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall Removed Paths: ------------- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec Modified: csw/mgar/pkg/docbook-dtds/trunk/Makefile =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/Makefile 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,18 +1,17 @@ # Replicate the RHEL5 docbook-dtds-1.0.30.1 rpm for CSW. Patches are taken # from that srpm and modified (so paths work for GAR). +# As of 20090416, we're no longer tracking the rhel5 package. We'll add +# 4.5 and 5.0 support and have our version number track the highest docbook +# version supplied in the package. -# NOTE NOTE NOTE -# If these version numbers change, you'll need to update the postinstall -# and preremove scripts also. -# 20081204 -bw -# NOTE NOTE NOTE - GARNAME = docbookdtds GARVERSION = 5.0 CATEGORIES = xtra +PACKAGES = CSWdocbookdtds REQUIRED_PKGS = CSWsgmlcommon CSWxmlcommon CSWlibxml2 +ARCHALL = 1 DESCRIPTION = SGML and XML document type definitions for DocBook. define BLURB @@ -58,7 +57,7 @@ MASTER_SITES = $(O_SRC) $(D_SRC) DISTFILES = $(DBFILES) -DISTFILES += $(call admfiles,CSWdocbookdtds,postinstall preremove) +DISTFILES += CSWdocbookdtds.postinstall CSWdocbookdtds.preremove PATCHFILES = docbook-4.2-euro.patch docbook-dtd30-sgml-1.0.catalog.patch PATCHFILES += docbook-dtd31-sgml-1.0.catalog.patch @@ -144,7 +143,7 @@ zip-extract-docbook-xml-4.5.zip: ginstall -d $(WORKSRC)/4.5-xml - unzip $(DOWNLOADDIR)/docbook-4.5.zip -d $(WORKSRC)/4.5-xml + unzip $(DOWNLOADDIR)/docbook-xml-4.5.zip -d $(WORKSRC)/4.5-xml @$(MAKECOOKIE) zip-extract-docbook-5.0.zip: Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,5 +1,4 @@ -536104a1ab1e8eac583cf27f4f8844a4 download/CSWdocbookdtds.gspec -58c926e94c472fd0842d7850732cbcc8 download/CSWdocbookdtds.postinstall +d1da7c5cc43dbc23ea0b149d597a48a3 download/CSWdocbookdtds.postinstall 81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip Deleted: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.depend 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,6 +0,0 @@ -P CSWcommon common - common files and dirs for CSW packages -P CSWsgmlcommon sgmlcommon - A collection of entities and DTDs -P CSWxmlcommon xmlcommon - A collection of entities and DTDs -P CSWopenjade openjade - A DSSSL implementation -P CSWlibxml2 libxml2 - A library providing XML and HTML support - Deleted: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.gspec 2009-04-16 19:10:59 UTC (rev 4356) @@ -1,4 +0,0 @@ -%var bitname docbookdtds -%var pkgname CSWdocbookdtds -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 18:02:54 UTC (rev 4355) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 19:10:59 UTC (rev 4356) @@ -13,9 +13,6 @@ CSWSGMLCNF=/opt/csw/etc/sgml CSWSGML=/opt/csw/share/sgml -VERSION=1.0 -RELEASE=30.1 - ## ## SGML catalog ## @@ -23,92 +20,116 @@ # Update the centralized catalog corresponding to this version of the DTD # DocBook V3.0 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-3.0.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-3.0-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-3.0.cat \ + $CSWSGML/docbook/sgml-dtd-3.0/catalog # DocBook V3.1 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-3.1.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-3.1-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-3.1.cat \ + $CSWSGML/docbook/sgml-dtd-3.1/catalog # DocBook V4.0 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.0.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.0-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.0.cat \ + $CSWSGML/docbook/sgml-dtd-4.0/catalog # DocBook V4.1 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.1.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.1-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.1.cat \ + $CSWSGML/docbook/sgml-dtd-4.1/catalog # DocBook XML V4.1.2 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.1.2.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.1.2-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.1.2.cat \ + $CSWSGML/docbook/xml-dtd-4.1.2/catalog # DocBook V4.2 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.2.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.2-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.2.cat \ + $CSWSGML/docbook/sgml-dtd-4.2/catalog # DocBook XML V4.2 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.2.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.2-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.2.cat \ + $CSWSGML/docbook/xml-dtd-4.2/catalog # DocBook V4.3 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.3.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.3-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.3.cat \ + $CSWSGML/docbook/sgml-dtd-4.3/catalog # DocBook XML V4.3 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.3.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.3-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.3.cat \ + $CSWSGML/docbook/xml-dtd-4.3/catalog # DocBook V4.4 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/sgml-docbook-4.4.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/sgml-dtd-4.4-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/sgml-docbook-4.4.cat \ + $CSWSGML/docbook/sgml-dtd-4.4/catalog # DocBook XML V4.4 $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat \ + $CSWSGMLCNF/xml-docbook-4.4.cat \ $CSWSGML/sgml-iso-entities-8879.1986/catalog $PREFIX $XMLCAT --sgml --noout --add \ - $CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat \ - $CSWSGML/docbook/xml-dtd-4.4-$VERSION-$RELEASE/catalog + $CSWSGMLCNF/xml-docbook-4.4.cat \ + $CSWSGML/docbook/xml-dtd-4.4/catalog +# DocBook V4.5 +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/sgml-docbook-4.5.cat \ + $CSWSGML/sgml-iso-entities-8879.1986/catalog +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/sgml-docbook-4.5.cat \ + $CSWSGML/docbook/sgml-dtd-4.5/catalog + +# DocBook XML V4.5 +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-4.5.cat \ + $CSWSGML/sgml-iso-entities-8879.1986/catalog +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-4.5.cat \ + $CSWSGML/docbook/xml-dtd-4.5/catalog + +# DocBook 5.0 +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-5.0.cat \ + $CSWSGML/sgml-iso-entities-8879.1986/catalog +$PREFIX $XMLCAT --sgml --noout --add \ + $CSWSGMLCNF/xml-docbook-5.0.cat \ + $CSWSGML/docbook/xml-schemas-5.0/catalog + # Fix up SGML super catalog so that there isn't an XML DTD before an # SGML one. We need to do this (*sigh*) because xmlcatalog messes up # the order of the lines, and SGML tools don't like to see XML things @@ -142,358 +163,358 @@ # DocBook XML V4.1.2 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.1.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.1.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.1.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.1.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.1.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.1.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.1.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.1.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.1.2" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ - "xml-dtd-4.1.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.1.2" $CATALOG # DocBook XML V4.2 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.2" \ - "xml-dtd-4.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.2" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.2" \ - "xml-dtd-4.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.2" $CATALOG # DocBook XML V4.3 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.3/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.3/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.3/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.3/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.3/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.3/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.3/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.3/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.3/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.3/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.3/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.3/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.3//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.3/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.3" \ - "xml-dtd-4.3-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.3" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.3" \ - "xml-dtd-4.3-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.3" $CATALOG # DocBook XML V4.4 $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Publishing//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.4/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Letters//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.4/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.4/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.4/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.4/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.4/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.4/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.4/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.4/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.4/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES General Technical//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.4/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.4/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.4//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.4/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --add "public" \ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.4" \ - "xml-dtd-4.4-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.4" $CATALOG $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.4" \ - "xml-dtd-4.4-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.4" $CATALOG fi # Finally, make sure everything in $CSWSGMLCNF is readable! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 21:42:25 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 19:42:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4357] csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds .postinstall Message-ID: Revision: 4357 http://gar.svn.sourceforge.net/gar/?rev=4357&view=rev Author: bdwalton Date: 2009-04-16 19:42:25 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Add registrations for the 4.5 stuff to the postinstall script. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 19:10:59 UTC (rev 4356) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.postinstall 2009-04-16 19:42:25 UTC (rev 4357) @@ -515,6 +515,89 @@ $PREFIX $XMLCAT --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.4" \ "xml-dtd-4.4" $CATALOG + + # DocBook XML V4.5 + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML" \ + "xml-dtd-4.5/ent/isoamsa.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML" \ + "xml-dtd-4.5/ent/isoamsb.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML" \ + "xml-dtd-4.5/ent/isoamsc.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML" \ + "xml-dtd-4.5/ent/isoamsn.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML" \ + "xml-dtd-4.5/ent/isoamso.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" \ + "xml-dtd-4.5/ent/isoamsr.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML" \ + "xml-dtd-4.5/ent/isobox.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML" \ + "xml-dtd-4.5/ent/isocyr1.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" \ + "xml-dtd-4.5/ent/isocyr2.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML" \ + "xml-dtd-4.5/ent/isodia.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Greek Letters//EN//XML" \ + "xml-dtd-4.5/ent/isogrk1.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML" \ + "xml-dtd-4.5/ent/isogrk2.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Greek Symbols//EN//XML" \ + "xml-dtd-4.5/ent/isogrk3.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML" \ + "xml-dtd-4.5/ent/isogrk4.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" \ + "xml-dtd-4.5/ent/isolat1.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Added Latin 2//EN//XML" \ + "xml-dtd-4.5/ent/isolat2.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" \ + "xml-dtd-4.5/ent/isonum.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES Publishing//EN//XML" \ + "xml-dtd-4.5/ent/isopub.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "ISO 8879:1986//ENTITIES General Technical//EN//XML" \ + "xml-dtd-4.5/ent/isotech.ent" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Character Entities V4.5//EN" \ + "xml-dtd-4.5/dbcentx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN" \ + "xml-dtd-4.5/dbgenent.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN" \ + "xml-dtd-4.5/dbhierx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Notations V4.5//EN" \ + "xml-dtd-4.5/dbnotnx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \ + "xml-dtd-4.5/dbpoolx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \ + "xml-dtd-4.5/htmltblx.mod" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//DTD DocBook XML V4.5//EN" \ + "xml-dtd-4.5/docbookx.dtd" $CATALOG + $PREFIX $XMLCAT --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "xml-dtd-4.5/soextblx.dtd" $CATALOG fi # Finally, make sure everything in $CSWSGMLCNF is readable! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 21:44:23 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 19:44:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4358] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4358 http://gar.svn.sourceforge.net/gar/?rev=4358&view=rev Author: bdwalton Date: 2009-04-16 19:44:23 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Remove version specific things from paths in preremove script. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:42:25 UTC (rev 4357) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:44:23 UTC (rev 4358) @@ -1,5 +1,5 @@ -d1da7c5cc43dbc23ea0b149d597a48a3 download/CSWdocbookdtds.postinstall -81e9ec3839d7fc7585515aaf6d412135 download/CSWdocbookdtds.preremove +6be301db3001ff1ff49ce22187502c29 download/CSWdocbookdtds.postinstall +ebff690d6182d2009222cf5c1c685eeb download/CSWdocbookdtds.preremove d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip 432749c0c806dbae81c8bcb70da3b5d3 download/docbk31.zip Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 19:42:25 UTC (rev 4357) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 19:44:23 UTC (rev 4358) @@ -13,9 +13,6 @@ CSWSGMLCNF=/opt/csw/etc/sgml CSWSGML=/opt/csw/share/sgml -VERSION=1.0 -RELEASE=30.1 - ## ## SGML catalog ## @@ -23,58 +20,58 @@ # Update the centralized catalog corresponding to this version of the DTD # DocBook V3.0 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.0-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-3.0.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.0.cat # DocBook V3.1 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.1-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-3.1.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-3.1.cat # DocBook V4.0 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.0-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.0.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.0.cat # DocBook V4.1 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.1-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.1.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.1.cat # DocBook XML V4.1.2 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.1.2-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.1.2.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.1.2.cat # DocBook V4.2 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.2-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.2.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.2.cat # DocBook XML V4.2 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.2-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.2.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.2.cat # DocBook V4.3 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.3-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.3.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.3.cat # DocBook XML V4.3 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.3-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.3.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.3.cat # DocBook V4.4 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.4-$VERSION-$RELEASE.cat + $CSWSGMLCNF/sgml-docbook-4.4.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.4.cat # DocBook XML V4.4 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ - $CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat -rm -f $PKG_INSTALL_ROOT/$PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4-$VERSION-$RELEASE.cat + $CSWSGMLCNF/xml-docbook-4.4.cat +rm -f $PKG_INSTALL_ROOT/$PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4.cat # Fix up SGML super catalog so that there isn't an XML DTD before an # SGML one. We need to do this (*sigh*) because xmlcatalog messes up @@ -104,233 +101,233 @@ then # DocBook XML V4.1.2 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.1.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.1.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.1.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.1.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.1.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.1.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.1.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.1.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.1.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.1.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.1.2" $CATALOG # DocBook XML V4.2 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.2/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.2/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.2/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.2/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.2/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.2/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.2/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.2/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.2/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.2/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.2/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.2/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.2/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.2/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.2/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.2-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.2" $CATALOG # DocBook XML V4.3 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.3/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.3/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.3/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.3/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.3/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.3/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.3/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.3/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.3/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.3/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.3/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.3/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.3/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.3/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.3/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.3-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.3" $CATALOG # DocBook XML V4.4 $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-pub.ent" $CATALOG + "xml-dtd-4.4/ent/iso-pub.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbpoolx.mod" $CATALOG + "xml-dtd-4.4/dbpoolx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-box.ent" $CATALOG + "xml-dtd-4.4/ent/iso-box.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/docbookx.dtd" $CATALOG + "xml-dtd-4.4/docbookx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk3.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk3.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsn.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsn.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-num.ent" $CATALOG + "xml-dtd-4.4/ent/iso-num.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbcentx.mod" $CATALOG + "xml-dtd-4.4/dbcentx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk4.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk4.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbnotnx.mod" $CATALOG + "xml-dtd-4.4/dbnotnx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-dia.ent" $CATALOG + "xml-dtd-4.4/ent/iso-dia.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-grk2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-grk2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbgenent.mod" $CATALOG + "xml-dtd-4.4/dbgenent.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/dbhierx.mod" $CATALOG + "xml-dtd-4.4/dbhierx.mod" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsa.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsa.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amso.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amso.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyrl.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyrl.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-tech.ent" $CATALOG + "xml-dtd-4.4/ent/iso-tech.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsc.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsc.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/soextblx.dtd" $CATALOG + "xml-dtd-4.4/soextblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/calstblx.dtd" $CATALOG + "xml-dtd-4.4/calstblx.dtd" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat1.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat1.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsb.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsb.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-lat2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-lat2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-amsr.ent" $CATALOG + "xml-dtd-4.4/ent/iso-amsr.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE/ent/iso-cyr2.ent" $CATALOG + "xml-dtd-4.4/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ - "xml-dtd-4.4-$VERSION-$RELEASE" $CATALOG + "xml-dtd-4.4" $CATALOG fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 16 22:02:23 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 16 Apr 2009 20:02:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4359] csw/mgar/pkg/docbook-dtds/trunk Message-ID: Revision: 4359 http://gar.svn.sourceforge.net/gar/?rev=4359&view=rev Author: bdwalton Date: 2009-04-16 20:02:23 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - Added 4.5 deregistration. - Need 5.0 register/deregister still. Modified Paths: -------------- csw/mgar/pkg/docbook-dtds/trunk/checksums csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 19:44:23 UTC (rev 4358) +++ csw/mgar/pkg/docbook-dtds/trunk/checksums 2009-04-16 20:02:23 UTC (rev 4359) @@ -1,5 +1,5 @@ 6be301db3001ff1ff49ce22187502c29 download/CSWdocbookdtds.postinstall -ebff690d6182d2009222cf5c1c685eeb download/CSWdocbookdtds.preremove +b531bfd5f43d49469f1bfe2daba471cf download/CSWdocbookdtds.preremove d22f42e2f4d073461f202a12fabb5b8a download/add_makefile.patch 9a7f5b1b7dd52d0ca4fb080619f0459c download/docbk30.zip 432749c0c806dbae81c8bcb70da3b5d3 download/docbk31.zip Modified: csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove =================================================================== --- csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 19:44:23 UTC (rev 4358) +++ csw/mgar/pkg/docbook-dtds/trunk/files/CSWdocbookdtds.preremove 2009-04-16 20:02:23 UTC (rev 4359) @@ -71,8 +71,23 @@ # DocBook XML V4.4 $PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ $CSWSGMLCNF/xml-docbook-4.4.cat -rm -f $PKG_INSTALL_ROOT/$PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.4.cat +# DocBook V4.5 +$PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ + $CSWSGMLCNF/sgml-docbook-4.5.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/sgml-docbook-4.5.cat + +# DocBook XML V4.5 +$PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ + $CSWSGMLCNF/xml-docbook-4.5.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-4.5.cat + +# DocBook XML V5.0 +$PREFIX $XMLCAT --sgml --noout --del $CSWSGMLCNF/catalog \ + $CSWSGMLCNF/xml-docbook-5.0.cat +rm -f $PKG_INSTALL_ROOT/$CSWSGMLCNF/xml-docbook-5.0.cat + # Fix up SGML super catalog so that there isn't an XML DTD before an # SGML one. We need to do this (*sigh*) because xmlcatalog messes up # the order of the lines, and SGML tools don't like to see XML things @@ -330,4 +345,60 @@ "xml-dtd-4.4/ent/iso-cyr2.ent" $CATALOG $PREFIX $XMLCAT --noout --del \ "xml-dtd-4.4" $CATALOG + + # DocBook XML V4.4 + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsa.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsb.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsc.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsn.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isoamsr.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isobox.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isocyr1.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isocyr2.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isodia.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk1.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk2.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk3.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isogrk4.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isolat1.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isolat2.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isonum.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isopub.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/ent/isotech.ent" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbcentx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbgenent.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbhierx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbnotnx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/dbpoolx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/htmltblx.mod" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/docbookx.dtd" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5/soextblx.dtd" $CATALOG + $PREFIX $XMLCAT --noout --del \ + "xml-dtd-4.5" $CATALOG fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 05:15:42 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 03:15:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4360] csw/mgar/pkg/pysqlite2/trunk Message-ID: Revision: 4360 http://gar.svn.sourceforge.net/gar/?rev=4360&view=rev Author: valholla Date: 2009-04-17 03:15:41 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update to 2.4.0 Modified Paths: -------------- csw/mgar/pkg/pysqlite2/trunk/Makefile csw/mgar/pkg/pysqlite2/trunk/checksums Modified: csw/mgar/pkg/pysqlite2/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-16 20:02:23 UTC (rev 4359) +++ csw/mgar/pkg/pysqlite2/trunk/Makefile 2009-04-17 03:15:41 UTC (rev 4360) @@ -1,13 +1,15 @@ GARNAME = pysqlite -GARVERSION = 2.3.5 +GARVERSION = 2.4.0 CATEGORIES = lang +RELVER = $(shell echo $(GARVERSION) |gsed 's/\(^[0-9].*\)\.[0-9]*/\1/') + DESCRIPTION = SQLite3 support for Python define BLURB SQLite support for Python endef -MASTER_SITES = http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/ +MASTER_SITES = http://initd.org/pub/software/pysqlite/releases/$(RELVER)/$(GARVERSION)/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpysqlite2 @@ -28,7 +30,7 @@ include gar/category.mk -post-install: +post-install-modulated: install -d $(DESTDIR)$(docdir) mv $(DESTDIR)$(prefix)/pysqlite2-doc $(DESTDIR)$(docdir)/pysqlite2 $(DONADA) Modified: csw/mgar/pkg/pysqlite2/trunk/checksums =================================================================== --- csw/mgar/pkg/pysqlite2/trunk/checksums 2009-04-16 20:02:23 UTC (rev 4359) +++ csw/mgar/pkg/pysqlite2/trunk/checksums 2009-04-17 03:15:41 UTC (rev 4360) @@ -1 +1 @@ -b4a185e936848370fcc1a5b17755b641 download/pysqlite-2.3.5.tar.gz +46b4590c51b9fb62cd0be1439646549e download/pysqlite-2.4.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Fri Apr 17 12:47:28 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Fri, 17 Apr 2009 10:47:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4361] csw/mgar/pkg Message-ID: Revision: 4361 http://gar.svn.sourceforge.net/gar/?rev=4361&view=rev Author: idogan23 Date: 2009-04-17 10:47:28 +0000 (Fri, 17 Apr 2009) Log Message: ----------- bind2nsd: initial commit Added Paths: ----------- csw/mgar/pkg/bind2nsd/ csw/mgar/pkg/bind2nsd/branches/ csw/mgar/pkg/bind2nsd/tags/ csw/mgar/pkg/bind2nsd/trunk/ csw/mgar/pkg/bind2nsd/trunk/Makefile csw/mgar/pkg/bind2nsd/trunk/files/ Property changes on: csw/mgar/pkg/bind2nsd/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-17 10:47:28 UTC (rev 4361) @@ -0,0 +1,36 @@ +GARNAME = bind2nsd +GARVERSION = 0.7.2 +CATEGORIES = utils + +DESCRIPTION = scripts to translate DNS information in BIND format to NSD format +define BLURB + This project builds scripts that translate DNS information in BIND format to NSD + format, and then copy that translation to an NSD server. The goal is to make it + simple to run redundant BIND and NSD servers and keep them in sync, using only + the BIND configuration files. +endef + +MASTER_SITES = http://bind2nsd.sourceforge.net/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +# UPSTREAM_MASTER_SITES = + +PACKAGES = CSWbind2nsd +REQUIRED_PKGS = CSWpython +CATALOGNAME = bind2nsd +SPKG_DESC = scripts to translate DNS information in BIND format to NSD format + +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = $(WORKSRC)/setup.py +TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/setup.py + +INSTALL_ARGS += --root=$(DESTDIR) +INSTALL_ARGS += --prefix=$(prefix) + +include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Fri Apr 17 14:29:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Fri, 17 Apr 2009 12:29:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4362] csw/mgar/pkg/libtasn1/trunk Message-ID: Revision: 4362 http://gar.svn.sourceforge.net/gar/?rev=4362&view=rev Author: dmichelsen Date: 2009-04-17 12:29:26 +0000 (Fri, 17 Apr 2009) Log Message: ----------- libtasn1: Update to 2.1 Modified Paths: -------------- csw/mgar/pkg/libtasn1/trunk/Makefile csw/mgar/pkg/libtasn1/trunk/checksums Modified: csw/mgar/pkg/libtasn1/trunk/Makefile =================================================================== --- csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-17 10:47:28 UTC (rev 4361) +++ csw/mgar/pkg/libtasn1/trunk/Makefile 2009-04-17 12:29:26 UTC (rev 4362) @@ -1,5 +1,5 @@ GARNAME = libtasn1 -GARVERSION = 2.0 +GARVERSION = 2.1 CATEGORIES = lib DESCRIPTION = GNU ASN1 library Modified: csw/mgar/pkg/libtasn1/trunk/checksums =================================================================== --- csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-17 10:47:28 UTC (rev 4361) +++ csw/mgar/pkg/libtasn1/trunk/checksums 2009-04-17 12:29:26 UTC (rev 4362) @@ -1 +1 @@ -e9b1462f04b2586b03905b0ed9528261 download/libtasn1-2.0.tar.gz +9c6869cca08b7392415c7939ffd2bbae download/libtasn1-2.1.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Fri Apr 17 18:23:47 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Fri, 17 Apr 2009 16:23:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4363] csw/mgar/pkg/git/trunk/Makefile Message-ID: Revision: 4363 http://gar.svn.sourceforge.net/gar/?rev=4363&view=rev Author: bdwalton Date: 2009-04-17 16:23:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- Depend on openssh_client now that it's available. Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-17 12:29:26 UTC (rev 4362) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-17 16:23:47 UTC (rev 4363) @@ -28,7 +28,7 @@ PREREQUISITE_PKGS += CSWautoconf REQUIRED_PKGS_CSWgit = CSWzlib CSWperl CSWrsync CSWcurlrt CSWosslrt -REQUIRED_PKGS_CSWgit += CSWossh CSWiconv CSWexpat CSWbash CSWpmerror +REQUIRED_PKGS_CSWgit += CSWosshclient CSWiconv CSWexpat CSWbash CSWpmerror REQUIRED_PKGS_CSWgit += CSWpmtermreadkey REQUIRED_PKGS_CSWgitk = CSWgit CSWtk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 19:41:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 17:41:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4364] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4364 http://gar.svn.sourceforge.net/gar/?rev=4364&view=rev Author: valholla Date: 2009-04-17 17:41:05 +0000 (Fri, 17 Apr 2009) Log Message: ----------- checkin current Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 16:23:47 UTC (rev 4363) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 17:41:05 UTC (rev 4364) @@ -26,23 +26,22 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/bin $(PKGROOT)) - $(_DBG)(gmv -f $(PPREFIX)/bin/i386-pc* $(PPREFIX)/bin/i386/) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/include $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/info $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/man $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/share $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/lib $(PKGROOT)) - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw $(MPREFIX)/libexec $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/share $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/lib $(PKGROOT)) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/libexec $(PKGROOT)) $(_DBG)$(MAKECOOKIE) merge-amd64-files: @echo "[===== Merging isa-amd64 =====]" $(_DBG)(cd $(AMD_BASE); \ for dir in `gfind . -name "*solaris2\.10*" -type d` ; do \ - /usr/bin/pax -rw $$dir $(PKGROOT); done ) - $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw $(MPREFIX)/lib/amd64 $(PKGROOT)) - $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw * $(PPREFIX)/bin/amd64) + /usr/bin/pax -rw -v $$dir $(PKGROOT); done ) + $(_DBG)(cd $(AMD_BASE); /usr/bin/pax -rw -v $(MPREFIX)/lib/amd64 $(PKGROOT)) + $(_DBG)(cd $(APREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/amd64) $(_DBG)$(MAKECOOKIE) ifeq ($(shell uname -p), i386) Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-17 16:23:47 UTC (rev 4363) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-17 17:41:05 UTC (rev 4364) @@ -73,7 +73,8 @@ REQUIRED_PKGS_CSWgcc4gfortran = CSWgcc4core CSWgcc4corert REQUIRED_PKGS_CSWgcc4gfortran += CSWgcc4gfortranrt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4javart = CSWgcc4corert CSWgcc4g++rt $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWgcc4corert CSWjavart CSWzlib +REQUIRED_PKGS_CSWgcc4java = CSWgcc4core CSWgcc4corert +REQUIRED_PKGS_CSWgcc4java += CSWgcc4javart CSWzlib REQUIRED_PKGS_CSWgcc4java += CSWgcc4g++ CSWgcc4g++rt $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4objcrt = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4objc = CSWgcc4core CSWgcc4corert This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 20:04:22 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 18:04:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4365] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4365 http://gar.svn.sourceforge.net/gar/?rev=4365&view=rev Author: valholla Date: 2009-04-17 18:04:22 +0000 (Fri, 17 Apr 2009) Log Message: ----------- add os branded files to isaexec_files Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 17:41:05 UTC (rev 4364) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 18:04:22 UTC (rev 4365) @@ -87,4 +87,16 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref +ISAEXEC_FILES += i386-pc-solaris2.8-c++ +ISAEXEC_FILES += i386-pc-solaris2.8-g++ +ISAEXEC_FILES += i386-pc-solaris2.8-gcc +ISAEXEC_FILES += i386-pc-solaris2.8-gcc-4.3.3 +ISAEXEC_FILES += i386-pc-solaris2.8-gcj +ISAEXEC_FILES += i386-pc-solaris2.8-gfortran +ISAEXEC_FILES += i386-pc-solaris2.10-c++ +ISAEXEC_FILES += i386-pc-solaris2.10-g++ +ISAEXEC_FILES += i386-pc-solaris2.10-gcc +ISAEXEC_FILES += i386-pc-solaris2.10-gcc-4.3.3 +ISAEXEC_FILES += i386-pc-solaris2.10-gcj +ISAEXEC_FILES += i386-pc-solaris2.10-gfortran endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 20:15:26 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 18:15:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4366] csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Message-ID: Revision: 4366 http://gar.svn.sourceforge.net/gar/?rev=4366&view=rev Author: valholla Date: 2009-04-17 18:15:26 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove ~ backup files Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-17 18:04:22 UTC (rev 4365) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-17 18:15:26 UTC (rev 4366) @@ -30,6 +30,7 @@ post-merge-modulated: $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ $(PKGROOT)/opt/csw/gcc4/lib/ ) + $(_DBG)( gfind $(PKGROOT) -type f -name "*.*~" -exec grm -f {} \; ) $(_DBG)$(MAKECOOKIE) test-skip: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 20:44:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 18:44:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4367] csw/mgar/pkg/sudo/trunk/Makefile Message-ID: Revision: 4367 http://gar.svn.sourceforge.net/gar/?rev=4367&view=rev Author: valholla Date: 2009-04-17 18:44:37 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove incompatables Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 18:15:26 UTC (rev 4366) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 18:44:37 UTC (rev 4367) @@ -23,7 +23,6 @@ CATALOGNAME_CSWsudo = sudo SPKG_DESC_CSWsudo = $(DESCRIPTION) SPKG_SOURCEURL_CSWsudo = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudo = CSWsudo-ldap REQUIRED_PKGS_CSWsudo = CSWsudo-common CSWggettextrt CATALOGNAME_CSWsudo-common = sudo_common This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:00:35 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:00:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4368] csw/mgar/pkg/sudo_ldap/trunk/Makefile Message-ID: Revision: 4368 http://gar.svn.sourceforge.net/gar/?rev=4368&view=rev Author: valholla Date: 2009-04-17 19:00:34 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove incompatibles Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-17 18:44:37 UTC (rev 4367) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-17 19:00:34 UTC (rev 4368) @@ -25,7 +25,6 @@ CATALOGNAME_CSWsudoldap = sudo_ldap SPKG_DESC_CSWsudoldap = $(DESCRIPTION) SPKG_SOURCEURL_CSWsudoldap = http://www.sudo.ws -INCOMPATIBLE_PKGS_CSWsudoldap = CSWsudo REQUIRED_PKGS_CSWsudoldap = CSWsudo-common CSWggettextrt CSWoldaprt CONFIGURE_ARGS = $(DIRPATHS) @@ -40,9 +39,10 @@ include gar/category.mk -PKGFILES_CSWsudoldap = .*/bin/sudo.ldap +PKGFILES_CSWsudoldap = .*$(bindir)/sudo.ldap post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.ldap ) + @( cd $(PKGROOT)$(bindir) ; gmv sudo sudo.ldap ) + @( cd $(PKGROOT)$(bindir) ; grm sudoedit ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo.ldap ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:08:40 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:08:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4369] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4369 http://gar.svn.sourceforge.net/gar/?rev=4369&view=rev Author: valholla Date: 2009-04-17 19:08:40 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix postremove Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 19:00:34 UTC (rev 4368) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-17 19:08:40 UTC (rev 4369) @@ -45,10 +45,11 @@ include gar/category.mk -PKGFILES_CSWsudo = .*/bin/sudo.minimal +PKGFILES_CSWsudo = .*$(bindir)/sudo.minimal post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; mv sudo sudo.minimal ) - @( cd $(PKGROOT)$(sysconfdir) ; mv sudoers sudoers.CSW ) + @( cd $(PKGROOT)$(bindir) ; gmv sudo sudo.minimal ) + @( cd $(PKGROOT)$(bindir) ; grm sudoedit ) + @( cd $(PKGROOT)$(sysconfdir) ; gmv sudoers sudoers.CSW ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Modified: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-17 19:00:34 UTC (rev 4368) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-17 19:08:40 UTC (rev 4369) @@ -2,10 +2,11 @@ BINDIR=$BASEDIR/opt/csw/bin +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit + if [ -f ${BINDIR}/sudo.ldap ]; then chmod 4755 ${BINDIR}/sudo.ldap - rm -f ${BINDIR}/sudo - rm -f ${BINDIR}/sudoedit ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:09:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:09:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4370] csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap. postremove Message-ID: Revision: 4370 http://gar.svn.sourceforge.net/gar/?rev=4370&view=rev Author: valholla Date: 2009-04-17 19:09:49 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix postremove Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Modified: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-17 19:08:40 UTC (rev 4369) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-17 19:09:49 UTC (rev 4370) @@ -2,9 +2,10 @@ BINDIR=$BASEDIR/opt/csw/bin +rm -f ${BINDIR}/sudo +rm -f ${BINDIR}/sudoedit + if [ -f ${BINDIR}/sudo.minimal ]; then - rm -f ${BINDIR}/sudo - rm -f ${BINDIR}/sudoedit ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:19:09 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:19:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4371] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4371 http://gar.svn.sourceforge.net/gar/?rev=4371&view=rev Author: valholla Date: 2009-04-17 19:19:01 +0000 (Fri, 17 Apr 2009) Log Message: ----------- remove duplicate isaexec_file Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 19:09:49 UTC (rev 4370) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-17 19:19:01 UTC (rev 4371) @@ -79,7 +79,6 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:20:28 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:20:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4372] csw/mgar/pkg/sudo/trunk/checksums Message-ID: Revision: 4372 http://gar.svn.sourceforge.net/gar/?rev=4372&view=rev Author: valholla Date: 2009-04-17 19:20:28 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update checksum Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/checksums Modified: csw/mgar/pkg/sudo/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo/trunk/checksums 2009-04-17 19:19:01 UTC (rev 4371) +++ csw/mgar/pkg/sudo/trunk/checksums 2009-04-17 19:20:28 UTC (rev 4372) @@ -1,5 +1,5 @@ 955d99eda1432c7b7e00d98b91e35a79 download/CSWsudo-common.postinstall ca867ca77bda965a44bcd665bae7dc6c download/CSWsudo.postinstall -2324b0bb3e9cf71398aaab1751aa63c5 download/CSWsudo.postremove +880c6c8b92f9c3ef3b5014a0b29c0b02 download/CSWsudo.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 21:30:48 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 19:30:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4373] csw/mgar/pkg/sudo_ldap/trunk/checksums Message-ID: Revision: 4373 http://gar.svn.sourceforge.net/gar/?rev=4373&view=rev Author: valholla Date: 2009-04-17 19:30:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update checksums Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/checksums Modified: csw/mgar/pkg/sudo_ldap/trunk/checksums =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-17 19:20:28 UTC (rev 4372) +++ csw/mgar/pkg/sudo_ldap/trunk/checksums 2009-04-17 19:30:47 UTC (rev 4373) @@ -1,4 +1,4 @@ 05fb6b46e36528fb889aca7f53106708 download/CSWsudoldap.postinstall -f727decc2c3a7189614b657584b8e45f download/CSWsudoldap.postremove +4fcbbf0054c3d2e5f73f83a8730554f1 download/CSWsudoldap.postremove 157b2e5e38ca54eb36e0364706bd0292 download/install.diff 5fd96bba35fe29b464f7aa6ad255f0a6 download/sudo-1.7.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:09:34 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:09:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4374] csw/mgar/pkg/php5_apc/trunk Message-ID: Revision: 4374 http://gar.svn.sourceforge.net/gar/?rev=4374&view=rev Author: valholla Date: 2009-04-17 20:09:29 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/php5_apc/trunk/Makefile csw/mgar/pkg/php5_apc/trunk/checksums Modified: csw/mgar/pkg/php5_apc/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5_apc/trunk/Makefile 2009-04-17 19:30:47 UTC (rev 4373) +++ csw/mgar/pkg/php5_apc/trunk/Makefile 2009-04-17 20:09:29 UTC (rev 4374) @@ -20,9 +20,9 @@ PATCHFILES = apc_pool.diff PACKAGES = CSWphp5apc -MASTER_SITES = http://us.php.net/apc -SPKG_SOURCEURL = http://pecl.php.net/package/apc -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tgz +SPKG_SOURCEURL = http://us.php.net/apc/ +MASTER_SITES = http://pecl.php.net/package/apc/ +UFILES_REGEX = (\d+(?:\.\d+)*).tgz DISTFILES = $(DISTNAME).tgz Modified: csw/mgar/pkg/php5_apc/trunk/checksums =================================================================== --- csw/mgar/pkg/php5_apc/trunk/checksums 2009-04-17 19:30:47 UTC (rev 4373) +++ csw/mgar/pkg/php5_apc/trunk/checksums 2009-04-17 20:09:29 UTC (rev 4374) @@ -1,2 +1,2 @@ -951f43d2873e3572f5d5ae71a9b66f90 download/APC-3.0.19.tgz +36ad5ca094eed387be1d98341d06d4fd download/APC-3.0.19.tgz 945e5502e45a48f47ed2521d3142afdd download/apc_pool.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:20:49 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:20:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4375] csw/mgar/pkg/mysql-python/trunk Message-ID: Revision: 4375 http://gar.svn.sourceforge.net/gar/?rev=4375&view=rev Author: valholla Date: 2009-04-17 20:20:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/mysql-python/trunk/Makefile csw/mgar/pkg/mysql-python/trunk/checksums Modified: csw/mgar/pkg/mysql-python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-17 20:09:29 UTC (rev 4374) +++ csw/mgar/pkg/mysql-python/trunk/Makefile 2009-04-17 20:20:47 UTC (rev 4375) @@ -7,7 +7,8 @@ MySQL support for Python endef -MASTER_SITES = $(SF_MIRROR)/$(call TOLOWER,$(GARNAME))/ +SF_PROJ = $(call TOLOWER,$(GARNAME)) +MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpymysql @@ -15,9 +16,8 @@ CATALOGNAME_CSWpymysql = pymysql SPKG_DESC = MySQL Support for Python -# We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=22307 -UPSTREAM_USE_SF = 1 +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) CONFIGURE_SCRIPTS = @@ -33,9 +33,7 @@ mysql_prefix = $(prefix)/mysql5 mysql_bindir = $(mysql_prefix)/bin -NOISALIST = 1 -LD_OPTIONS := -R/opt/csw/mysql5/lib/mysql/\$$ISALIST:/opt/csw/lib/\$$ISALIST +EXTRA_LD_OPTIONS = -R/opt/csw/mysql5/lib/mysql/\$$ISALIST PATH := $(mysql_bindir):$(PATH) -LDFLAGS = -export LD_OPTIONS PATH LDFLAGS +export PATH Modified: csw/mgar/pkg/mysql-python/trunk/checksums =================================================================== --- csw/mgar/pkg/mysql-python/trunk/checksums 2009-04-17 20:09:29 UTC (rev 4374) +++ csw/mgar/pkg/mysql-python/trunk/checksums 2009-04-17 20:20:47 UTC (rev 4375) @@ -1,3 +1 @@ 532268f02870bea18c1d465e88afff30 download/MySQL-python-1.2.2.tar.gz -ca37b1ff16fa2ede6e19383e7b59245a download/setuptools-0.6c9-py2.6.egg -fba3b56e42a61b562ea4b9a5eb37a1d3 download/setup.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:29:18 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:29:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4376] csw/mgar/pkg Message-ID: Revision: 4376 http://gar.svn.sourceforge.net/gar/?rev=4376&view=rev Author: valholla Date: 2009-04-17 20:29:18 +0000 (Fri, 17 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/python3/ csw/mgar/pkg/python3/Makefile csw/mgar/pkg/python3/branches/ csw/mgar/pkg/python3/tags/ csw/mgar/pkg/python3/trunk/ csw/mgar/pkg/python3/trunk/Makefile csw/mgar/pkg/python3/trunk/checksums csw/mgar/pkg/python3/trunk/files/ Added: csw/mgar/pkg/python3/Makefile =================================================================== --- csw/mgar/pkg/python3/Makefile (rev 0) +++ csw/mgar/pkg/python3/Makefile 2009-04-17 20:29:18 UTC (rev 4376) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/python3/trunk/Makefile =================================================================== --- csw/mgar/pkg/python3/trunk/Makefile (rev 0) +++ csw/mgar/pkg/python3/trunk/Makefile 2009-04-17 20:29:18 UTC (rev 4376) @@ -0,0 +1,56 @@ +GARNAME = Python +GARVERSION = 3.0 +CATEGORIES = lang +PACKAGES = CSWpython3 CSWpython3-tk CSWidle3 + +DESCRIPTION = A high-level scripting language. +define BLURB + Python is an interpreted, interactive, object-oriented programming language. + It combines remarkable power with very clear syntax, and isnt difficult to + learn. It has modules, classes, exceptions, very high level data types, and + dynamic typing. There are interfaces to many system calls and libraries, as + well as to various windowing systems (Tk, Mac, MFC, GTK+, Qt, wxWindows). + Newbuilt-in modules are easily written in C or C++. Python is also usable as + an extension language for applications that need a programmable interface. +endef + +SPKG_SOURCEURL = http://www.python.org/ +MASTER_SITES = http://www.python.org/ftp/python/$(GARVERSION)/ + +DISTFILES = $(DISTNAME).tar.bz2 + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +# Patches +PATCHFILES += + +# Test for sunaudiodev fails. +SKIPTEST = 1 + +CONFIGURE_ARGS = $(DIRPATHS) + +PKGFILES_CSWidle = $(libdir)/python(\d+(?:\.\d+)*)/idlelib/.* +PKGFILES_CSWidle += $(bindir)/idle +PKGFILES_CSWpython-tk = $(libdir)/python(\d+(?:\.\d+)*)/lib-tk/.* +PKGFILES_CSWpython-tk += $(libdir)/python(\d+(?:\.\d+)*)/lib-dynload/_tkinter.so.* + +REQUIRED_PKGS_CSWpython = CSWbdb44 CSWbzip2 CSWgdbm CSWggettextrt +REQUIRED_PKGS_CSWpython += CSWncurses CSWosslrt CSWreadline CSWzlib +REQUIRED_PKGS_CSWpython += CSWsqlite3 CSWtcl CSWtk +REQUIRED_PKGS_CSWpython-tk = CSWpython CSWtcl CSWtk +REQUIRED_PKGS_CSWidle = CSWpython CSWpython-tk + +CATALOGNAME_CSWpython = python +CATALOGNAME_CSWpython-tk = python_tk +CATALOGNAME_CSWidle = idle + +SPKG_DESC_CSWpython = A high-level scripting language. +SPKG_DESC_CSWpython-tk = Python Tk Interface (TkInter) +SPKG_DESC_CSWidle = Python IDE + +include gar/category.mk + + + Added: csw/mgar/pkg/python3/trunk/checksums =================================================================== --- csw/mgar/pkg/python3/trunk/checksums (rev 0) +++ csw/mgar/pkg/python3/trunk/checksums 2009-04-17 20:29:18 UTC (rev 4376) @@ -0,0 +1 @@ +d31a19f8ef795bec0ea1f69a19410f63 download/Python-3.0.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:30:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:30:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4377] csw/mgar/pkg/python3/trunk/ Message-ID: Revision: 4377 http://gar.svn.sourceforge.net/gar/?rev=4377&view=rev Author: valholla Date: 2009-04-17 20:30:05 +0000 (Fri, 17 Apr 2009) Log Message: ----------- external propset Property Changed: ---------------- csw/mgar/pkg/python3/trunk/ Property changes on: csw/mgar/pkg/python3/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:37:55 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:37:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4378] csw/mgar/pkg/silvercity/trunk/Makefile Message-ID: Revision: 4378 http://gar.svn.sourceforge.net/gar/?rev=4378&view=rev Author: valholla Date: 2009-04-17 20:37:55 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/silvercity/trunk/Makefile Modified: csw/mgar/pkg/silvercity/trunk/Makefile =================================================================== --- csw/mgar/pkg/silvercity/trunk/Makefile 2009-04-17 20:30:05 UTC (rev 4377) +++ csw/mgar/pkg/silvercity/trunk/Makefile 2009-04-17 20:37:55 UTC (rev 4378) @@ -8,7 +8,8 @@ analysis for over 20 programming and markup langauges. endef -MASTER_SITES = $(SF_MIRROR)/silvercity/ +SF_PROJ = $(call TOLOWER,$(GARNAME)) +MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWsilvercity @@ -16,11 +17,11 @@ CATALOGNAME_CSWsilvercity = silvercity SPKG_DESC_CSWsilvercity = Lexical analysis package for Python -# We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=45693 -UPSTREAM_USE_SF = 1 +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) +NOISALIST = 1 CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:40:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:40:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4379] csw/mgar/pkg/alpine/trunk/Makefile Message-ID: Revision: 4379 http://gar.svn.sourceforge.net/gar/?rev=4379&view=rev Author: valholla Date: 2009-04-17 20:40:56 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/alpine/trunk/Makefile Modified: csw/mgar/pkg/alpine/trunk/Makefile =================================================================== --- csw/mgar/pkg/alpine/trunk/Makefile 2009-04-17 20:37:55 UTC (rev 4378) +++ csw/mgar/pkg/alpine/trunk/Makefile 2009-04-17 20:40:56 UTC (rev 4379) @@ -12,13 +12,13 @@ is highly customizable through the use of the Alpine Setup command. endef -MASTER_SITES = http://www.washington.edu/alpine/ -UPSTREAM_MASTER_SITES = ftp://ftp.cac.washington.edu/alpine/ +MASTER_SITES = ftp://ftp.cac.washington.edu/alpine/ +SPKG_SOURCEURL = http://www.washington.edu/alpine/ DISTFILES = $(GARNAME).tar.bz2 PACKAGES = CSWalpine -CATALOGNAME_CSWgd = alpine -SPKG_DESC_CSWgd = $(DESCRIPTION) +CATALOGNAME_CSWalpine = alpine +SPKG_DESC_CSWalpine = $(DESCRIPTION) # We define upstream file regex so we can be notifed of new # upstream software release @@ -29,26 +29,28 @@ ## GCC4 thows the following errors: ## warning: pointer targets in passing argument 2 of 'compare_cstring' ## differ in signedness -GARCOMPILER = GCC3 +GARCOMPILER = GCC4 # Patch for solaris explained in the following thread # http://mailman2.u.washington.edu/pipermail/alpine-info/2007-December/000047.html PATCHFILES = pubcookie.diff +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --enable-quotas CONFIGURE_ARGS += --enable-from-encoding -CONFIGURE_ARGS += --with-libiconv-prefix=$(prefix) -CONFIGURE_ARGS += --with-libintl-prefix=$(prefix) +CONFIGURE_ARGS += --with-libiconv-prefix=/opt/csw +CONFIGURE_ARGS += --with-libintl-prefix=/opt/csw +CONFIGURE_ARGS += --with-system-pinerc=$(prefix)/etc/pine.conf +CONFIGURE_ARGS += --with-system-fixed-pinercc=$(prefix)/etc/pine.conf.fixed +CONFIGURE_ARGS += --with-ssl-dir=/opt/csw +CONFIGURE_ARGS += --with-krb5-dir=/opt/csw +CONFIGURE_ARGS += --with-ldap-dir=/opt/csw +CONFIGURE_ARGS += --with-tcl-lib=/opt/csw/lib/tcl8.4 +CONFIGURE_ARGS += --with-c-client-target=gso CONFIGURE_ARGS += --with-pubcookie -CONFIGURE_ARGS += --with-system-pinerc=$(libdir)/pine.conf -CONFIGURE_ARGS += --with-system-fixed-pinercc=$(libdir)/pine.conf.fixed -CONFIGURE_ARGS += --with-ssl-dir=$(prefix) -CONFIGURE_ARGS += --with-krb5-dir=$(prefix) -CONFIGURE_ARGS += --with-ldap-dir=$(prefix) -CONFIGURE_ARGS += --with-tcl-lib=$(libdir)/tcl8.4 -CONFIGURE_ARGS += --with-c-client-target=gso CONFIGURE_ARGS += --with-web-bin=$(libexecdir)/alpine/bin +CONFIGURE_ARGS += --with-spellcheck-prog=$(bindir)/aspell ## Libs that are not get set correctly in Makefiles LIBS += -lm -lgssapi_krb5 -lkrb5 -lintl -liconv @@ -56,4 +58,9 @@ TEST_TARGET = check +REQUIRED_PKGS = CSWgcc3corert CSWggettextrt CSWiconv +REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWaspell +REQUIRED_PKGS += CSWoldaprt CSWosslrt CSWsasl CSWtcl + +include files/install_scripts.mk include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:49:54 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:49:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4380] csw/mgar/pkg/chrpath/trunk/Makefile Message-ID: Revision: 4380 http://gar.svn.sourceforge.net/gar/?rev=4380&view=rev Author: valholla Date: 2009-04-17 20:49:54 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/chrpath/trunk/Makefile Modified: csw/mgar/pkg/chrpath/trunk/Makefile =================================================================== --- csw/mgar/pkg/chrpath/trunk/Makefile 2009-04-17 20:40:56 UTC (rev 4379) +++ csw/mgar/pkg/chrpath/trunk/Makefile 2009-04-17 20:49:54 UTC (rev 4380) @@ -6,7 +6,8 @@ define BLURB endef -MASTER_SITES = http://directory.fsf.org/project/chrpath/ +SPKG_SOURCEURL = http://directory.fsf.org/project/chrpath/ +MASTER_SITES = http://ftp.tux.org/pub/X-Windows/ftp.hungry.com/chrpath/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWchrpath @@ -19,7 +20,7 @@ # We define upstream file regex so we can be notifed of # new upstream software release -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +UFILES_REGEX = (\d+(?:\.\d+)*).tar.gz BUILD64 = 1 NOISALIST = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 22:51:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:51:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4381] csw/mgar/pkg/clearsilver/trunk Message-ID: Revision: 4381 http://gar.svn.sourceforge.net/gar/?rev=4381&view=rev Author: valholla Date: 2009-04-17 20:51:31 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/clearsilver/trunk/Makefile csw/mgar/pkg/clearsilver/trunk/checksums Modified: csw/mgar/pkg/clearsilver/trunk/Makefile =================================================================== --- csw/mgar/pkg/clearsilver/trunk/Makefile 2009-04-17 20:49:54 UTC (rev 4380) +++ csw/mgar/pkg/clearsilver/trunk/Makefile 2009-04-17 20:51:31 UTC (rev 4381) @@ -21,7 +21,7 @@ CATALOGNAME_CSWcs = clearsilver CATALOGNAME_CSWpmcs = pm_clearsilver -CATALOGNAME_CSWpycs = py_clearsilver +CATALOGNAME_CSWpycs = pyclearsilver SPKG_DESC_CSWcs = Language-neutral HTML template system SPKG_DESC_CSWpmcs = Clearsilver Perl language binding @@ -29,12 +29,13 @@ PKGFILES_CSWpmcs = $(libdir)/perl/.* PKGFILES_CSWpmcs += $(mandir)/.*perl.* -PKGFILES_CSWpycs = $(libdir)/python*/.* +PKGFILES_CSWpycs = $(libdir)/python.*/.* PKGFILES_CSWpycs += $(mandir)/.*python.* -GARCOMPILER = GNU +#GARCOMPILER = GNU -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*) PATCHFILES += perlbuild.diff Modified: csw/mgar/pkg/clearsilver/trunk/checksums =================================================================== --- csw/mgar/pkg/clearsilver/trunk/checksums 2009-04-17 20:49:54 UTC (rev 4380) +++ csw/mgar/pkg/clearsilver/trunk/checksums 2009-04-17 20:51:31 UTC (rev 4381) @@ -1,4 +1,2 @@ b8c0c7fbe0ef5e06e0c935f134304d44 download/clearsilver-0.10.5.tar.gz 1c25fda8bb2666658d8ddcf3ad9b7235 download/perlbuild.diff -f951221b633994f85c45fe78008d8965 download/pybuild.diff -64cd57ea3f54da10c45046578b767d12 download/rules.mk.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Fri Apr 17 22:58:03 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Fri, 17 Apr 2009 20:58:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4382] csw/mgar/pkg/amavisd-new/trunk Message-ID: Revision: 4382 http://gar.svn.sourceforge.net/gar/?rev=4382&view=rev Author: idogan23 Date: 2009-04-17 20:58:03 +0000 (Fri, 17 Apr 2009) Log Message: ----------- amavisd_new: fixed typo in config file patch Modified Paths: -------------- csw/mgar/pkg/amavisd-new/trunk/checksums csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff Modified: csw/mgar/pkg/amavisd-new/trunk/checksums =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-17 20:51:31 UTC (rev 4381) +++ csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-17 20:58:03 UTC (rev 4382) @@ -7,6 +7,6 @@ b9cafe6715bc2703ac9411f24f248cd3 download/amavisd-agent.diff 3e81998c8b933129870e3cab68d40261 download/amavisd-nanny.diff f218d10e5280940268a3ffaa125a00ae download/amavisd-release.diff -721d0037d0dfcdbe254a76becad8ad25 download/amavisd.conf.diff +9c3d4118cf3837e559a6026d6b89b377 download/amavisd.conf.diff 071af9fb79ee5e9d045905043fea2b96 download/amavisd.diff befafc9594d5e1c1c8710b7d4d129d0b download/p0f-analyzer.pl.diff Modified: csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff 2009-04-17 20:51:31 UTC (rev 4381) +++ csw/mgar/pkg/amavisd-new/trunk/files/amavisd.conf.diff 2009-04-17 20:58:03 UTC (rev 4382) @@ -1,6 +1,6 @@ -diff --speed-large-files --minimal -Nru amavisd-new-2.6.0.orig/amavisd.conf amavisd-new-2.6.0/amavisd.conf ---- amavisd-new-2.6.0.orig/amavisd.conf 2008-04-23 20:49:58.000000000 +0200 -+++ amavisd-new-2.6.0/amavisd.conf 2008-11-09 22:45:24.947430600 +0100 +diff --speed-large-files --minimal -Nru amavisd-new-2.6.2.orig/amavisd.conf amavisd-new-2.6.2/amavisd.conf +--- amavisd-new-2.6.2.orig/amavisd.conf 2008-12-15 01:50:03.000000000 +0100 ++++ amavisd-new-2.6.2/amavisd.conf 2009-04-17 22:51:46.060535660 +0200 @@ -15,12 +15,12 @@ # $bypass_decode_parts = 1; # controls running of decoders&dearchivers @@ -22,7 +22,7 @@ # when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+ -$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; -+$path = '/opt/csw/bin:/opt/csw/sbin:/usr/sfw/bin:/usr/sfw/sbin::/sbin:/usr/bin:/bin'; ++$path = '/opt/csw/bin:/opt/csw/sbin:/usr/sfw/bin:/usr/sfw/sbin:/sbin:/usr/bin:/bin'; # $dspam = 'dspam'; $MAXLEVELS = 14; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:00:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:00:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4383] csw/mgar/pkg/cmake/trunk Message-ID: Revision: 4383 http://gar.svn.sourceforge.net/gar/?rev=4383&view=rev Author: valholla Date: 2009-04-17 21:00:21 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/cmake/trunk/Makefile csw/mgar/pkg/cmake/trunk/checksums Modified: csw/mgar/pkg/cmake/trunk/Makefile =================================================================== --- csw/mgar/pkg/cmake/trunk/Makefile 2009-04-17 20:58:03 UTC (rev 4382) +++ csw/mgar/pkg/cmake/trunk/Makefile 2009-04-17 21:00:21 UTC (rev 4383) @@ -12,8 +12,9 @@ generation, code generation, and template instantiation. endef -UPSTREAM_MASTER_SITES = http://www.cmake.org/files/ -MASTER_SITES = http://www.cmake.org/files/v2.6/ +RELVER = $(shell echo $(GARVERSION) |gsed 's/\(^[0-9].*\)\.[0-9]*/\1/') +SPKG_SOURCEURL = http://www.cmake.org/ +MASTER_SITES = http://www.cmake.org/files/v$(RELVER)/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWcmake Modified: csw/mgar/pkg/cmake/trunk/checksums =================================================================== --- csw/mgar/pkg/cmake/trunk/checksums 2009-04-17 20:58:03 UTC (rev 4382) +++ csw/mgar/pkg/cmake/trunk/checksums 2009-04-17 21:00:21 UTC (rev 4383) @@ -1,2 +1 @@ 5ba47a94ce276f326abca1fd72a7e7c6 download/cmake-2.6.3.tar.gz -871d267960a850d05e99246f5c438e62 download/CSWcmake.gspec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:06:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:06:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4384] csw/mgar/pkg/gnupg2/trunk/Makefile Message-ID: Revision: 4384 http://gar.svn.sourceforge.net/gar/?rev=4384&view=rev Author: valholla Date: 2009-04-17 21:06:23 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/gnupg2/trunk/Makefile Modified: csw/mgar/pkg/gnupg2/trunk/Makefile =================================================================== --- csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-17 21:00:21 UTC (rev 4383) +++ csw/mgar/pkg/gnupg2/trunk/Makefile 2009-04-17 21:06:23 UTC (rev 4384) @@ -25,7 +25,7 @@ # new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) -RUNPATHQUOTE = 1 +NOISALIST = 1 BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:09:25 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:09:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4385] csw/mgar/pkg/mod_python/trunk Message-ID: Revision: 4385 http://gar.svn.sourceforge.net/gar/?rev=4385&view=rev Author: valholla Date: 2009-04-17 21:09:25 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/mod_python/trunk/Makefile csw/mgar/pkg/mod_python/trunk/checksums Modified: csw/mgar/pkg/mod_python/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-17 21:06:23 UTC (rev 4384) +++ csw/mgar/pkg/mod_python/trunk/Makefile 2009-04-17 21:09:25 UTC (rev 4385) @@ -18,15 +18,13 @@ REQUIRED_PKGS_CSWap2modpython = CSWap2prefork CSWpython CATALOGNAME_CSWap2modpython = ap2_modpython SPKG_DESC_CSWap2modpython = an Apache/Python integration module +DISTFILES += fixme.sh PATCHFILES += connobject.diff # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) -LD_OPTIONS = -LDFLAGS = -L/opt/csw/lib -NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-apxs=$(prefix)/apache2/sbin/apxs CONFIGURE_ARGS += --with-python=$(bindir)/python @@ -36,8 +34,8 @@ include gar/category.mk DESTDOC = $(DESTDIR)$(docdir)/ap2_modpython -DISTFILES += fixme.sh + post-configure-modulated: @echo " ==> Fixing libtool files" @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) Modified: csw/mgar/pkg/mod_python/trunk/checksums =================================================================== --- csw/mgar/pkg/mod_python/trunk/checksums 2009-04-17 21:06:23 UTC (rev 4384) +++ csw/mgar/pkg/mod_python/trunk/checksums 2009-04-17 21:09:25 UTC (rev 4385) @@ -2,4 +2,5 @@ 6fda2f740f138af54536b87fb598426b download/postinstall 6892dd209d16d2c565581e9de272cf3e download/preremove 0dd379f20ceb32fc77bb3a9bf045097f download/space +34f5b20f6caf282b2533784fbb1b4395 download/fixme.sh 44e80c5a863ba40809ad889f9c5d0307 download/connobject.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:15:28 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:15:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4386] csw/mgar/pkg/mod_wsgi/trunk Message-ID: Revision: 4386 http://gar.svn.sourceforge.net/gar/?rev=4386&view=rev Author: valholla Date: 2009-04-17 21:15:28 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/mod_wsgi/trunk/Makefile csw/mgar/pkg/mod_wsgi/trunk/checksums Modified: csw/mgar/pkg/mod_wsgi/trunk/Makefile =================================================================== --- csw/mgar/pkg/mod_wsgi/trunk/Makefile 2009-04-17 21:09:25 UTC (rev 4385) +++ csw/mgar/pkg/mod_wsgi/trunk/Makefile 2009-04-17 21:15:28 UTC (rev 4386) @@ -1,5 +1,5 @@ GARNAME = mod_wsgi -GARVERSION = 2.3 +GARVERSION = 2.4 CATEGORIES = lib DESCRIPTION = an Apache/Python WSGI adapter module @@ -7,7 +7,7 @@ Mod_wsgi is a python WSGI adapter module for Apache. endef -MASTER_SITES = http://code.google.com/p/modwsgi +MASTER_SITES = http://modwsgi.googlecode.com/files/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += postinstall preremove space Modified: csw/mgar/pkg/mod_wsgi/trunk/checksums =================================================================== --- csw/mgar/pkg/mod_wsgi/trunk/checksums 2009-04-17 21:09:25 UTC (rev 4385) +++ csw/mgar/pkg/mod_wsgi/trunk/checksums 2009-04-17 21:15:28 UTC (rev 4386) @@ -1,4 +1,4 @@ -c686e1c498dbe5753fe491c3cf61cff4 download/mod_wsgi-2.3.tar.gz +a2b964cc51d6ff86c38c74db5748eab5 download/mod_wsgi-2.4.tar.gz a2e8679f45232e56efbc352597ffe456 download/postinstall a67766841dedbaba0d7b15e7f08c8658 download/preremove 0dd379f20ceb32fc77bb3a9bf045097f download/space This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:26:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:26:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4387] csw/mgar/pkg/pysqlite/trunk/Makefile Message-ID: Revision: 4387 http://gar.svn.sourceforge.net/gar/?rev=4387&view=rev Author: valholla Date: 2009-04-17 21:26:34 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/pysqlite/trunk/Makefile Modified: csw/mgar/pkg/pysqlite/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-17 21:15:28 UTC (rev 4386) +++ csw/mgar/pkg/pysqlite/trunk/Makefile 2009-04-17 21:26:34 UTC (rev 4387) @@ -10,7 +10,8 @@ SQLite support for Python endef -MASTER_SITES = $(SF_MIRROR)/$(call TOLOWER,$(GARNAME))/ +MASTER_SITES = $(SF_MIRRORS) + WORKSRC = $(WORKDIR)/$(GARNAME) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz @@ -19,9 +20,8 @@ SPKG_DESC_CSWpysqlite = SQLite 1.x support for Python REQUIRED_PKGS_CSWpysqlite = CSWpython CSWsqlite3rt -# We define upstream file regex so we can be notifed of new upstream software release -UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=54058 -UPSTREAM_USE_SF = 1 +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = (\d+(?:\.\d+)*) EXTRA_CPPFLAGS = -I/opt/csw/include This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:28:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:28:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4388] csw/mgar/pkg/pysetuptools/trunk Message-ID: Revision: 4388 http://gar.svn.sourceforge.net/gar/?rev=4388&view=rev Author: valholla Date: 2009-04-17 21:28:24 +0000 (Fri, 17 Apr 2009) Log Message: ----------- update to 0.6c9 Modified Paths: -------------- csw/mgar/pkg/pysetuptools/trunk/Makefile csw/mgar/pkg/pysetuptools/trunk/checksums Modified: csw/mgar/pkg/pysetuptools/trunk/Makefile =================================================================== --- csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-17 21:26:34 UTC (rev 4387) +++ csw/mgar/pkg/pysetuptools/trunk/Makefile 2009-04-17 21:28:24 UTC (rev 4388) @@ -1,5 +1,5 @@ GARNAME = setuptools -GARVERSION = 0.6c7 +GARVERSION = 0.6c9 CATEGORIES = lang SPKG_SOURCEURL = http://peak.telecommunity.com/DevCenter/setuptools Modified: csw/mgar/pkg/pysetuptools/trunk/checksums =================================================================== --- csw/mgar/pkg/pysetuptools/trunk/checksums 2009-04-17 21:26:34 UTC (rev 4387) +++ csw/mgar/pkg/pysetuptools/trunk/checksums 2009-04-17 21:28:24 UTC (rev 4388) @@ -1 +1 @@ -dedbf6a4f71cd6deaf13ee885054f16b download/setuptools-0.6c7.tar.gz +3864c01d9c719c8924c455714492295e download/setuptools-0.6c9.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:30:25 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:30:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4389] csw/mgar/pkg/php5_xdebug/trunk/Makefile Message-ID: Revision: 4389 http://gar.svn.sourceforge.net/gar/?rev=4389&view=rev Author: valholla Date: 2009-04-17 21:30:23 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/php5_xdebug/trunk/Makefile Modified: csw/mgar/pkg/php5_xdebug/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5_xdebug/trunk/Makefile 2009-04-17 21:28:24 UTC (rev 4388) +++ csw/mgar/pkg/php5_xdebug/trunk/Makefile 2009-04-17 21:30:23 UTC (rev 4389) @@ -26,8 +26,7 @@ PACKAGES = CSWphp5xdebug -MASTER_SITES = http://www.xdebug.org/ -SPKG_SOURCEURL = http://www.xdebug.org/files/ +MASTER_SITES = http://www.xdebug.org/files/ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tgz DISTFILES = $(DISTNAME).tgz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:33:26 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:33:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4390] csw/mgar/pkg Message-ID: Revision: 4390 http://gar.svn.sourceforge.net/gar/?rev=4390&view=rev Author: valholla Date: 2009-04-17 21:33:24 +0000 (Fri, 17 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/ss5/ csw/mgar/pkg/ss5/Makefile csw/mgar/pkg/ss5/branch/ csw/mgar/pkg/ss5/tags/ csw/mgar/pkg/ss5/trunk/ csw/mgar/pkg/ss5/trunk/Makefile csw/mgar/pkg/ss5/trunk/checksums csw/mgar/pkg/ss5/trunk/files/ csw/mgar/pkg/ss5/trunk/files/ss5.init Added: csw/mgar/pkg/ss5/Makefile =================================================================== --- csw/mgar/pkg/ss5/Makefile (rev 0) +++ csw/mgar/pkg/ss5/Makefile 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/ss5/trunk/Makefile =================================================================== --- csw/mgar/pkg/ss5/trunk/Makefile (rev 0) +++ csw/mgar/pkg/ss5/trunk/Makefile 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1,59 @@ +GARNAME = ss5 +GARVERSION = 3.6.7-1 +CATEGORIES = lib + +DESCRIPTION = A SOCKS server that implements SOCKS v4 and v5 protocol +define BLURB + SS5 is a socks server that implements the SOCKS v4 and v5 protocol. + As a proxy server, SS5 authenticates, profiles and processes network + requests for clients. It establishes connections to application + hosts for client applications. When the client attempts to access + the network, the client connects to the SS5 daemon instead of the + application host. +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +DISTNAME = $(GARNAME)-$(shell gecho $(GARVERSION) |gsed -e 's/-[0-9]//') + +PACKAGES = CSWss5 +CATALOGNAME_CSWss5 = ss5 +SPKG_DESC_CSWss5 = $(DESCRIPTION) + +#REQUIRED_PKGS_CSWss5 = + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*(-\d)*).tar.bz2 + +GARCOMPILER = GNU +TEST_SCRIPTS = skip + +test-skip: + @$(DONADA) + +#BUILD64 = 1 +#NO_ISAEXEC = 1 + +prefix = $(DESTDIR) + +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --with-configfile=/opt/csw/etc/ss5/ss5.conf +CONFIGURE_ARGS += --with-passwordfile=/opt/csw/etc/ss5/ss5.passwd +CONFIGURE_ARGS += --with-logfile=/opt/csw/var/log/ss5/ss5.log +CONFIGURE_ARGS += --with-profilepath=/opt/csw/etc/ss5 +CONFIGURE_ARGS += --with-libpath=/opt/csw/lib +CONFIGURE_ARGS += --with-tracepath=/opt/csw/var/log/ss5 + +CONFIGURE_ARGS += --with-confpathbase=/opt/csw/etc +CONFIGURE_ARGS += --with-binpathbase=/opt/csw/sbin +CONFIGURE_ARGS += --with-docpathbase=/opt/csw/share/doc +CONFIGURE_ARGS += --with-manpathbase=/opt/csw/man +CONFIGURE_ARGS += --with-logpathbase=/opt/csw/var/log/ss5 +CONFIGURE_ARGS += --with-tracepathbase=/opt/csw/var/log/ss5 + +post-install-modulated: + @(gcp downlad/ss5.init $(DESTDIR)/etc/init.d/ss5 + +include gar/category.mk Added: csw/mgar/pkg/ss5/trunk/checksums =================================================================== --- csw/mgar/pkg/ss5/trunk/checksums (rev 0) +++ csw/mgar/pkg/ss5/trunk/checksums 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1 @@ +34c8188c28b25a393e51f6938e4b7806 download/ss5-3.6.7-1.tar.gz Added: csw/mgar/pkg/ss5/trunk/files/ss5.init =================================================================== --- csw/mgar/pkg/ss5/trunk/files/ss5.init (rev 0) +++ csw/mgar/pkg/ss5/trunk/files/ss5.init 2009-04-17 21:33:24 UTC (rev 4390) @@ -0,0 +1,27 @@ +#!/bin/sh + +case "$1" in + start) + # Start daemon + echo -n "Starting ss5... " + /opt/csw/sbin/ss5 -t + ;; + stop) + # Stop daemon + /usr/sbin/killall ss5 + ;; + reload) + # Reload configuration + /usr/bin/pkill -HUP ss5 + ;; + restart) + # restart daemon + $0 stop + $0 start + ;; + *) + echo "Usage: ss5 {start|stop|restart|reload}" + exit 1 + ;; +esac +exit 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:34:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:34:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4391] csw/mgar/pkg/ss5/trunk/ Message-ID: Revision: 4391 http://gar.svn.sourceforge.net/gar/?rev=4391&view=rev Author: valholla Date: 2009-04-17 21:34:04 +0000 (Fri, 17 Apr 2009) Log Message: ----------- external propset Property Changed: ---------------- csw/mgar/pkg/ss5/trunk/ Property changes on: csw/mgar/pkg/ss5/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:35:47 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:35:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4392] csw/mgar/pkg/pydocutils/trunk/Makefile Message-ID: Revision: 4392 http://gar.svn.sourceforge.net/gar/?rev=4392&view=rev Author: valholla Date: 2009-04-17 21:35:47 +0000 (Fri, 17 Apr 2009) Log Message: ----------- fix upstream download url Modified Paths: -------------- csw/mgar/pkg/pydocutils/trunk/Makefile Modified: csw/mgar/pkg/pydocutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/pydocutils/trunk/Makefile 2009-04-17 21:34:04 UTC (rev 4391) +++ csw/mgar/pkg/pydocutils/trunk/Makefile 2009-04-17 21:35:47 UTC (rev 4392) @@ -7,7 +7,7 @@ Documentation Utilities for Python endef -MASTER_SITES = $(SF_MIRROR)/$(GARNAME)/ +MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PACKAGES = CSWpydocutils @@ -15,7 +15,8 @@ CATALOGNAME_CSWpydocutils = pydocutils SPKG_DESC = Documentation Utiltiies for Python -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz CONFIGURE_SCRIPTS = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 17 23:41:24 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 17 Apr 2009 21:41:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4393] csw/mgar/pkg/libffi/trunk Message-ID: Revision: 4393 http://gar.svn.sourceforge.net/gar/?rev=4393&view=rev Author: valholla Date: 2009-04-17 21:41:24 +0000 (Fri, 17 Apr 2009) Log Message: ----------- checkin Added Paths: ----------- csw/mgar/pkg/libffi/trunk/checksums csw/mgar/pkg/libffi/trunk/files/ Added: csw/mgar/pkg/libffi/trunk/checksums =================================================================== --- csw/mgar/pkg/libffi/trunk/checksums (rev 0) +++ csw/mgar/pkg/libffi/trunk/checksums 2009-04-17 21:41:24 UTC (rev 4393) @@ -0,0 +1 @@ +188a4f79fdac2310044b44b7d3918ef9 download/libffi-3.0.8.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 05:23:56 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 03:23:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4394] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4394 http://gar.svn.sourceforge.net/gar/?rev=4394&view=rev Author: valholla Date: 2009-04-18 03:23:56 +0000 (Sat, 18 Apr 2009) Log Message: ----------- remove static libraries Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -102,6 +102,7 @@ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc @(grm -fr $(DESTDIR)/.[a-z]*) + @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/extensions/php5_dba/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -13,7 +13,6 @@ PKGFILES_CSWphp5dba = .*/lib/php/extensions/.*/dba\.so -PKGFILES_CSWphp5dba += .*/lib/php/extensions/.*/dba\.a define CSWphp5dba_postinstall #!/bin/sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/extensions/php5_mysql/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -9,7 +9,6 @@ CONFIGURE_ARGS += --with-mysql=shared,$(prefix) PKGFILES_CSWphp5mysql = .*/lib/php/extensions/.*/mysql\.so -PKGFILES_CSWphp5mysql += .*/lib/php/extensions/.*/mysql\.a define CSWphp5mysql_postinstall #!/bin/sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-17 21:41:24 UTC (rev 4393) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-18 03:23:56 UTC (rev 4394) @@ -7,7 +7,6 @@ REQUIRED_PKGS_CSWphp5pdo = CSWphp5 PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* -PKGFILES_CSWphp5pdo += .*/lib/php/extensions/.*/pdo\.a* define CSWphp5pdo_postinstall #!/bin/sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 11:59:22 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 09:59:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4395] csw/mgar/pkg/bind2nsd/trunk Message-ID: Revision: 4395 http://gar.svn.sourceforge.net/gar/?rev=4395&view=rev Author: idogan23 Date: 2009-04-18 09:59:21 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: added patches to fix file locations Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 03:23:56 UTC (rev 4394) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 09:59:21 UTC (rev 4395) @@ -12,7 +12,12 @@ MASTER_SITES = http://bind2nsd.sourceforge.net/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +DISTFILES += setup.py.diff +DISTFILES += Config.py.diff +PATCHFILES = setup.py.diff +PATCHFILES += Config.py.diff + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Added: csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/Config.py.diff 2009-04-18 09:59:21 UTC (rev 4395) @@ -0,0 +1,62 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Config.py bind2nsd-0.7.2/bind2nsd/Config.py +--- bind2nsd-0.7.2.orig/bind2nsd/Config.py 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Config.py 2009-04-18 11:50:52.347203690 +0200 +@@ -53,7 +53,7 @@ + self.fname = '' + self.config = \ + { 'acl_list' : 'acl_list', +- 'bind2nsd' : '/usr/bin/bind2nsd', ++ 'bind2nsd' : '/opt/csw/bin/bind2nsd', + 'database' : '"nsd.db"', + 'DEBUG' : False, + 'DEMO-MODE' : False, +@@ -70,28 +70,28 @@ + 'masters_for_slaves' : '127.0.0.1', + 'named-checkconf' : '/usr/sbin/named-checkconf', + 'named-checkzone' : '/usr/sbin/named-checkzone', +- 'named_root' : '/etc/bind9', ++ 'named_root' : '/etc', + 'named_conf' : 'named.conf', + 'named_watchlist' : '/etc/named.conf', +- 'nsd-checkconf' : '/usr/sbin/nsd-checkconf', ++ 'nsd-checkconf' : '/opt/csw/sbin/nsd-checkconf', + 'nsd_conf' : 'nsd.conf', +- 'nsd_conf_dir' : '/etc/nsd/', ++ 'nsd_conf_dir' : '/etc/opt/csw/nsd/', + 'nsd_preamble' : 'nsd.conf-preamble', +- 'password_file' : '/etc/bind2nsd/passwd', +- 'pidfile' : '"nsd.pid"', ++ 'password_file' : '/etc/opt/csw/bind2nsd/passwd', ++ 'pidfile' : '"/var/run/nsd.pid"', + 'port' : '53', +- 'rebuild_cmd' : '/etc/init.d/nsdc rebuild', +- 'restart_cmd' : '/etc/init.d/nsdc restart', ++ 'rebuild_cmd' : '/opt/csw/sbin/nsdc rebuild', ++ 'restart_cmd' : '/opt/csw/sbin/nsdc restart', + 'sleep_time' : '5', +- 'start_cmd' : '/etc/init.d/nsdc start', ++ 'start_cmd' : '/opt/csw/sbin/nsdc start', + 'statistics' : '3600', +- 'stop_cmd' : '/etc/init.d/nsdc stop', ++ 'stop_cmd' : '/opt/csw/sbin/nsdc stop', + 'syspw' : 'iforgot', + 'tmpdir' : '/tmp/secure64/', # must have trailing '/' + 'username' : 'nsd', + 'version' : '0.7.2', + 'xfrd-reload-timeout' : '10', +- 'zonec_cmd' : '/etc/init.d/zonec', ++ 'zonec_cmd' : '/opt/csw/sbin/zonec', + } + + self.init() +@@ -110,8 +110,8 @@ + if os.path.exists(fname): + self.fname = fname + else: +- if os.path.exists('/etc/bind2nsd/bind2nsd.conf'): +- self.fname = '/etc/bind2nsd/bind2nsd.conf' ++ if os.path.exists('/etc/opt/csw/bind2nsd/bind2nsd.conf'): ++ self.fname = '/etc/opt/csw/bind2nsd/bind2nsd.conf' + else: + print '? hrm. no config file found -- did you _mean_ that?' + Added: csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/setup.py.diff 2009-04-18 09:59:21 UTC (rev 4395) @@ -0,0 +1,14 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/setup.py bind2nsd-0.7.2/setup.py +--- bind2nsd-0.7.2.orig/setup.py 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/setup.py 2009-04-18 11:22:14.530664816 +0200 +@@ -37,8 +37,8 @@ + packages = [ 'bind2nsd' ], + scripts = [ 'scripts/bind2nsd', 'scripts/s64-sync', 'scripts/nsd-sync', + 'scripts/s64-mkpw', 'scripts/bind2nsd-slave', ], +- data_files = [ ('/usr/share/doc/bind2nsd', ['./README', './TODO']), +- ('/etc/bind2nsd', ['etc/bind2nsd.conf']), ++ data_files = [ ('/opt/csw/share/doc/bind2nsd', ['./README', './TODO']), ++ ('/etc/opt/csw/bind2nsd', ['etc/bind2nsd.conf']), + ] + ) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 12:59:21 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 10:59:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4396] csw/mgar/pkg Message-ID: Revision: 4396 http://gar.svn.sourceforge.net/gar/?rev=4396&view=rev Author: idogan23 Date: 2009-04-18 10:59:19 +0000 (Sat, 18 Apr 2009) Log Message: ----------- pydes: initial commit Added Paths: ----------- csw/mgar/pkg/pydes/ csw/mgar/pkg/pydes/branches/ csw/mgar/pkg/pydes/tags/ csw/mgar/pkg/pydes/trunk/ csw/mgar/pkg/pydes/trunk/Makefile csw/mgar/pkg/pydes/trunk/files/ Property changes on: csw/mgar/pkg/pydes/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/pydes/trunk/Makefile =================================================================== --- csw/mgar/pkg/pydes/trunk/Makefile (rev 0) +++ csw/mgar/pkg/pydes/trunk/Makefile 2009-04-18 10:59:19 UTC (rev 4396) @@ -0,0 +1,34 @@ +GARNAME = pyDes +GARVERSION = 2.0.0 +CATEGORIES = lang + +DESCRIPTION = implementation of the DES encryption algorithm +define BLURB + implementation of the DES encryption algorithm +endef + +MASTER_SITES = http://pydes.sourceforge.net/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = (\d+(?:\.\d+)*).tar.gz + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +# UPSTREAM_MASTER_SITES = + +PACKAGES = CSWpydes +REQUIRED_PKGS = CSWpython +CATALOGNAME = pydes +SPKG_DESC = implementation of the DES encryption algorithm + +ARCHALL = 1 + +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = $(WORKSRC)/setup.py +TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/setup.py + +INSTALL_ARGS += --root=$(DESTDIR) +INSTALL_ARGS += --prefix=$(prefix) +include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 13:28:22 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 11:28:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4397] csw/mgar/pkg/pydes/trunk/checksums Message-ID: Revision: 4397 http://gar.svn.sourceforge.net/gar/?rev=4397&view=rev Author: idogan23 Date: 2009-04-18 11:28:22 +0000 (Sat, 18 Apr 2009) Log Message: ----------- pydes: checksum was not in svn Added Paths: ----------- csw/mgar/pkg/pydes/trunk/checksums Added: csw/mgar/pkg/pydes/trunk/checksums =================================================================== --- csw/mgar/pkg/pydes/trunk/checksums (rev 0) +++ csw/mgar/pkg/pydes/trunk/checksums 2009-04-18 11:28:22 UTC (rev 4397) @@ -0,0 +1 @@ +b61d69acc89e19220fcf8efe82e33438 download/pyDes-2.0.0.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 17:34:16 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 15:34:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4398] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4398 http://gar.svn.sourceforge.net/gar/?rev=4398&view=rev Author: valholla Date: 2009-04-18 15:34:16 +0000 (Sat, 18 Apr 2009) Log Message: ----------- checkin changes Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/gcc4/trunk/files/package_files.mk Removed Paths: ------------- csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-18 15:34:16 UTC (rev 4398) @@ -86,16 +86,10 @@ ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref -ISAEXEC_FILES += i386-pc-solaris2.8-c++ -ISAEXEC_FILES += i386-pc-solaris2.8-g++ -ISAEXEC_FILES += i386-pc-solaris2.8-gcc -ISAEXEC_FILES += i386-pc-solaris2.8-gcc-4.3.3 -ISAEXEC_FILES += i386-pc-solaris2.8-gcj -ISAEXEC_FILES += i386-pc-solaris2.8-gfortran -ISAEXEC_FILES += i386-pc-solaris2.10-c++ -ISAEXEC_FILES += i386-pc-solaris2.10-g++ -ISAEXEC_FILES += i386-pc-solaris2.10-gcc -ISAEXEC_FILES += i386-pc-solaris2.10-gcc-4.3.3 -ISAEXEC_FILES += i386-pc-solaris2.10-gcj -ISAEXEC_FILES += i386-pc-solaris2.10-gfortran +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-c++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-g++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc-4.3.3 +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcj +ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gfortran endif Modified: csw/mgar/pkg/gcc4/trunk/files/package_files.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-18 15:34:16 UTC (rev 4398) @@ -86,7 +86,7 @@ PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.*a PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* - +EXTRA_PKGFILES_EXCLUDED_CSWgcc4objc = /opt/csw/gcc4/lib/gcc/.*/(\d+(?:\.\d+)*)/include ####### RunTime Packages ## gcc4adart Deleted: csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/re-enable-alloc.diff 2009-04-18 15:34:16 UTC (rev 4398) @@ -1,55 +0,0 @@ ---- gcc-4.3.3/include/libiberty.h.o 2009-03-26 11:20:58.286509650 -0500 -+++ gcc-4.3.3/include/libiberty.h 2009-03-26 11:18:37.103118030 -0500 -@@ -48,6 +48,17 @@ - - #include - -+# ifndef alloca -+/* Make alloca work the best possible way. */ -+# ifdef __GNUC__ -+# define alloca __builtin_alloca -+# else /* not __GNUC__ */ -+# if HAVE_ALLOCA_H -+# include -+# endif /* HAVE_ALLOCA_H */ -+# endif /* not __GNUC__ */ -+# endif /* not alloca */ -+ - /* If the OS supports it, ensure that the supplied stream is setup to - avoid any multi-threaded locking. Otherwise leave the FILE pointer - unchanged. If the stream is NULL do nothing. */ -@@ -621,8 +632,8 @@ - also set/unset as it is often used to indicate whether code needs - to call alloca(0). */ - extern void *C_alloca (size_t) ATTRIBUTE_MALLOC; --#undef alloca - #if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA -+#undef alloca - # define alloca(x) __builtin_alloca(x) - # undef C_ALLOCA - # define ASTRDUP(X) \ -@@ -631,11 +642,14 @@ - char *const libiberty_nptr = (char *const) alloca (libiberty_len); \ - (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); })) - #else -+#if defined USE_C_ALLOCA || !defined HAVE_ALLOCA -+# undef alloca - # define alloca(x) C_alloca(x) - # undef USE_C_ALLOCA - # define USE_C_ALLOCA 1 - # undef C_ALLOCA - # define C_ALLOCA 1 -+#endif - extern const char *libiberty_optr; - extern char *libiberty_nptr; - extern unsigned long libiberty_len; ---- gcc-4.3.3/gcc/configure.ac.o 2009-03-26 11:19:37.352289013 -0500 -+++ gcc-4.3.3/gcc/configure.ac 2009-03-26 11:20:24.112575128 -0500 -@@ -1011,6 +1011,7 @@ - sysconf strsignal getrusage nl_langinfo scandir alphasort \ - gettimeofday mbstowcs wcswidth mmap mincore setlocale \ - gcc_UNLOCKED_FUNCS) -+AC_FUNC_ALLOCA - - if test x$ac_cv_func_mbstowcs = xyes; then - AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works, Deleted: csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff 2009-04-18 11:28:22 UTC (rev 4397) +++ csw/mgar/pkg/gcc4/trunk/files/split-insn-attrtab.diff 2009-04-18 15:34:16 UTC (rev 4398) @@ -1,224 +0,0 @@ ---- gcc-4.3.3/gcc/Makefile.in.o 2009-03-26 10:54:05.816690285 -0500 -+++ gcc-4.3.3/gcc/Makefile.in 2009-03-26 10:53:26.456066920 -0500 -@@ -1010,6 +1010,8 @@ - # last objects to finish building. - OBJS-common = \ - insn-attrtab.o \ -+ insn-dfatab.o \ -+ insn-latencytab.o \ - insn-automata.o \ - insn-emit.o \ - insn-extract.o \ -@@ -1270,12 +1272,13 @@ - - OBJS-onestep = libbackend.o $(OBJS-archive) - --BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER) -+BACKEND = libbackend.a main.o @TREEBROWSER@ $(CPPLIB) $(LIBDECNUMBER) -+ - - MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ - insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ -- insn-attr.h insn-attrtab.c insn-opinit.c insn-preds.c insn-constants.h \ -- tm-preds.h tm-constrs.h \ -+ insn-attr.h insn-attrtab.c insn-dfatab.c insn-latencytab.c insn-opinit.c \ -+ insn-preds.c insn-constants.h tm-preds.h tm-constrs.h \ - tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \ - genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \ - xgcc$(exeext) cpp$(exeext) cc1$(exeext) cc1*-dummy$(exeext) $(EXTRA_PASSES) \ -@@ -2937,8 +2940,9 @@ - # and compile them. - - .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \ -- insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \ -- insn-attr.h insn-attrtab.c insn-preds.c -+ insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \ -+ insn-attr.h insn-attrtab.c insn-dfatab.c insn-latencytab.c insn-preds.c -+ - - # Dependencies for the md file. The first time through, we just assume - # the md file itself and the generated dependency file (in order to get -@@ -2957,6 +2961,12 @@ - insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ - insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) -+insn-dfatab.o : insn-dfatab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ -+ $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ -+ insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) -+insn-latencytab.o : insn-latencytab.c $(CONFIG_H) $(SYSTEM_H) \ -+ coretypes.h $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h \ -+ $(INSN_ATTR_H) insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) - insn-automata.o : insn-automata.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ - insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) -@@ -2997,9 +3007,9 @@ - - simple_generated_h = insn-attr.h insn-codes.h insn-config.h insn-flags.h - --simple_generated_c = insn-attrtab.c insn-automata.c insn-emit.c \ -- insn-extract.c insn-opinit.c insn-output.c \ -- insn-peep.c insn-recog.c -+simple_generated_c = insn-automata.c insn-emit.c \ -+ insn-extract.c insn-opinit.c insn-output.c \ -+ insn-peep.c insn-recog.c - - $(simple_generated_h): insn-%.h: s-%; @true - -@@ -3018,6 +3028,20 @@ - $(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c - $(STAMP) s-$* - -+# genattrtab produces three files. -+insn-attrtab.c insn-dfatab.c insn-latencytab.c: insn-%.c: s-%; @true -+ -+s-attrtab s-dfatab s-latencytab: build/genattrtab$(build_exeext) \ -+ $(MD_DEPS) insn-conditions.md -+ $(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) \ -+ insn-conditions.md -atmp-attrtab.c -dtmp-dfatab.c > tmp-latencytab.c -+ $(SHELL) $(srcdir)/../move-if-change tmp-attrtab.c insn-attrtab.c -+ $(SHELL) $(srcdir)/../move-if-change tmp-dfatab.c insn-dfatab.c -+ $(SHELL) $(srcdir)/../move-if-change tmp-latencytab.c insn-latencytab.c -+ $(STAMP) s-attrtab -+ $(STAMP) s-dfatab -+ $(STAMP) s-latencytab -+ - # genconstants needs to run before insn-conditions.md is available - # (because the constants may be used in the conditions). - insn-constants.h: s-constants; @true - ---- gcc-4.3.3/gcc/genattrtab.c.o 2009-03-25 20:32:28.189775642 -0500 -+++ gcc-4.3.3/gcc/genattrtab.c 2009-03-25 20:39:51.459202637 -0500 -@@ -4433,6 +4433,61 @@ - make_internal_attr ("*bypass_p", byps_exp, ATTR_NONE); - } - -+static void -+write_header (void) -+{ -+ printf ("/* Generated automatically by the program `genattrtab'\n\ -+from the machine description file `md'. */\n\n"); -+ -+ printf ("#include \"config.h\"\n"); -+ printf ("#include \"system.h\"\n"); -+ printf ("#include \"coretypes.h\"\n"); -+ printf ("#include \"tm.h\"\n"); -+ printf ("#include \"rtl.h\"\n"); -+ printf ("#include \"insn-attr.h\"\n"); -+ printf ("#include \"tm_p.h\"\n"); -+ printf ("#include \"insn-config.h\"\n"); -+ printf ("#include \"recog.h\"\n"); -+ printf ("#include \"regs.h\"\n"); -+ printf ("#include \"real.h\"\n"); -+ printf ("#include \"output.h\"\n"); -+ printf ("#include \"toplev.h\"\n"); -+ printf ("#include \"flags.h\"\n"); -+ printf ("#include \"function.h\"\n"); -+ printf ("\n"); -+ printf ("#define operands recog_data.operand\n\n"); -+} -+ -+static void -+switch_stdout (const char *file_name) -+{ -+ if (fflush (stdout) || ferror (stdout)) -+ exit (FATAL_EXIT_CODE); -+ if (!freopen (file_name, "w", stdout)) -+ fatal ("cannot open file %s: %s", file_name, strerror (errno)); -+ write_header (); -+} -+ -+static const char *dfa_file_name = 0; -+static const char *attr_file_name = 0; -+ -+static bool -+handle_arg (const char *arg) -+{ -+ switch (arg[1]) -+ { -+ case 'a': -+ attr_file_name = &arg[2]; -+ return true; -+ case 'd': -+ dfa_file_name = &arg[2]; -+ return true; -+ default: -+ return false; -+ } -+} -+ -+ - int - main (int argc, char **argv) - { -@@ -4444,7 +4499,7 @@ - - progname = "genattrtab"; - -- if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE) -+ if (init_md_reader_args_cb (argc, argv, handle_arg) != SUCCESS_EXIT_CODE) - return (FATAL_EXIT_CODE); - - obstack_init (hash_obstack); -@@ -4464,9 +4519,6 @@ - delay_1_0_str = DEF_ATTR_STRING ("*delay_1_0"); - num_delay_slots_str = DEF_ATTR_STRING ("*num_delay_slots"); - -- printf ("/* Generated automatically by the program `genattrtab'\n\ --from the machine description file `md'. */\n\n"); -- - /* Read the machine description. */ - - while (1) -@@ -4525,24 +4577,6 @@ - if (num_delays) - expand_delays (); - -- printf ("#include \"config.h\"\n"); -- printf ("#include \"system.h\"\n"); -- printf ("#include \"coretypes.h\"\n"); -- printf ("#include \"tm.h\"\n"); -- printf ("#include \"rtl.h\"\n"); -- printf ("#include \"insn-attr.h\"\n"); -- printf ("#include \"tm_p.h\"\n"); -- printf ("#include \"insn-config.h\"\n"); -- printf ("#include \"recog.h\"\n"); -- printf ("#include \"regs.h\"\n"); -- printf ("#include \"real.h\"\n"); -- printf ("#include \"output.h\"\n"); -- printf ("#include \"toplev.h\"\n"); -- printf ("#include \"flags.h\"\n"); -- printf ("#include \"function.h\"\n"); -- printf ("\n"); -- printf ("#define operands recog_data.operand\n\n"); -- - /* Make `insn_alternatives'. */ - insn_alternatives = oballoc (insn_code_number * sizeof (int)); - for (id = defs; id; id = id->next) -@@ -4582,13 +4616,26 @@ - optimize_attrs (); - - /* Now write out all the `gen_attr_...' routines. Do these before the -- special routines so that they get defined before they are used. */ -+ special routines so that they get defined before they are used. -+ Because GCC has problems compiling two large functions in the same file -+ (PR other/29442), "*insn_default_latency" and "*internal_dfa_insn_code" -+ can be output to separate files, stdout and DFA_FILE_NAME respectively. -+ The remaining attributes can be output to ATTR_FILE_NAME. */ - -+ write_header (); - for (i = 0; i < MAX_ATTRS_INDEX; i++) - for (attr = attrs[i]; attr; attr = attr->next) - { -+ if (dfa_file_name -+ && !strcmp ("*internal_dfa_insn_code", attr->name)) -+ switch_stdout (dfa_file_name); -+ - if (! attr->is_special && ! attr->is_const) - write_attr_get (attr); -+ -+ if (attr_file_name -+ && !strcmp ("*internal_dfa_insn_code", attr->name)) -+ switch_stdout (attr_file_name); - } - - /* Write out delay eligibility information, if DEFINE_DELAY present. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 18:24:15 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 16:24:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4399] csw/mgar/pkg/bind2nsd/trunk Message-ID: Revision: 4399 http://gar.svn.sourceforge.net/gar/?rev=4399&view=rev Author: idogan23 Date: 2009-04-18 16:24:14 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: set ARCHALL to 1 Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/bind2nsd/trunk/checksums Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 15:34:16 UTC (rev 4398) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:14 UTC (rev 4399) @@ -30,6 +30,8 @@ CATALOGNAME = bind2nsd SPKG_DESC = scripts to translate DNS information in BIND format to NSD format +ARCHALL = 1 + CONFIGURE_SCRIPTS = BUILD_SCRIPTS = $(WORKSRC)/setup.py TEST_SCRIPTS = Added: csw/mgar/pkg/bind2nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/checksums (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/checksums 2009-04-18 16:24:14 UTC (rev 4399) @@ -0,0 +1,3 @@ +e10f1d313e9e8c3e7cc54eb9419813a8 download/Config.py.diff +dc9af6382fa609b5d5d3a8ee666f0c4c download/bind2nsd-0.7.2.tar.gz +5fb22ed4998cab39a9d5fc99891f1a5d download/setup.py.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 18:24:52 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 16:24:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4400] csw/mgar/pkg/bind2nsd/trunk/Makefile Message-ID: Revision: 4400 http://gar.svn.sourceforge.net/gar/?rev=4400&view=rev Author: idogan23 Date: 2009-04-18 16:24:52 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: set a dependency on CSWpydes Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:14 UTC (rev 4399) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:52 UTC (rev 4400) @@ -26,7 +26,7 @@ # UPSTREAM_MASTER_SITES = PACKAGES = CSWbind2nsd -REQUIRED_PKGS = CSWpython +REQUIRED_PKGS = CSWpython CSWpydes CATALOGNAME = bind2nsd SPKG_DESC = scripts to translate DNS information in BIND format to NSD format This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 18:52:23 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 16:52:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4401] csw/mgar/pkg/bind2nsd/trunk/Makefile Message-ID: Revision: 4401 http://gar.svn.sourceforge.net/gar/?rev=4401&view=rev Author: idogan23 Date: 2009-04-18 16:52:23 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: change shebang to /opt/csw/bin/python Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:24:52 UTC (rev 4400) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 16:52:23 UTC (rev 4401) @@ -40,4 +40,10 @@ INSTALL_ARGS += --root=$(DESTDIR) INSTALL_ARGS += --prefix=$(prefix) +post-configure-modulated: + @echo " ==> Fixing Shebang" + @cd $(WORKSRC) + @perl -pi -e 's/\/usr\/bin\/env\ python/\/opt\/csw\/bin\/python/g' `find . -name '*.py'` + @$(MAKECOOKIE) + include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 19:17:56 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 17:17:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4402] csw/mgar/pkg/pixman/trunk Message-ID: Revision: 4402 http://gar.svn.sourceforge.net/gar/?rev=4402&view=rev Author: wbonnet Date: 2009-04-18 17:17:55 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Upgrade to 0.15.2 Add 64 bits support Modified Paths: -------------- csw/mgar/pkg/pixman/trunk/Makefile csw/mgar/pkg/pixman/trunk/checksums Modified: csw/mgar/pkg/pixman/trunk/Makefile =================================================================== --- csw/mgar/pkg/pixman/trunk/Makefile 2009-04-18 16:52:23 UTC (rev 4401) +++ csw/mgar/pkg/pixman/trunk/Makefile 2009-04-18 17:17:55 UTC (rev 4402) @@ -1,5 +1,5 @@ GARNAME = pixman -GARVERSION = 0.14.0 +GARVERSION = 0.15.2 CATEGORIES = lib DESCRIPTION = The pixel-manipulation library for X and cairo @@ -20,6 +20,8 @@ #REQUIRED_PKGS_CSWpixman = CSWlibx11 +BUILD64 = 1 + CFLAGS += -xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION CXXFLAGS += -xlibmil -xlibmopt -features=tmplife -norunpath LDFLAGS += -L/opt/csw/lib -R/opt/csw/lib Modified: csw/mgar/pkg/pixman/trunk/checksums =================================================================== --- csw/mgar/pkg/pixman/trunk/checksums 2009-04-18 16:52:23 UTC (rev 4401) +++ csw/mgar/pkg/pixman/trunk/checksums 2009-04-18 17:17:55 UTC (rev 4402) @@ -1,4 +1,3 @@ -da330524bbd975271974378b1c5e7b5d download/pixman-0.14.0.tar.gz 09e58b9e029eb63c896ad2ff70fc7915 download/CSWpixman.gspec 89d81c718f669974964dd9c62217c191 download/license.txt -770ffe9900749190af335cbe2e897232 download/CSWpixmandevel.gspec +ac7d687548f02b384d0cab1021d91ce5 download/pixman-0.15.2.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sat Apr 18 19:38:45 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sat, 18 Apr 2009 17:38:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4403] csw/mgar/pkg/bind2nsd/trunk Message-ID: Revision: 4403 http://gar.svn.sourceforge.net/gar/?rev=4403&view=rev Author: idogan23 Date: 2009-04-18 17:38:44 +0000 (Sat, 18 Apr 2009) Log Message: ----------- bind2nsd: patches to supress warnings about the deprecated popen2 module Modified Paths: -------------- csw/mgar/pkg/bind2nsd/trunk/Makefile csw/mgar/pkg/bind2nsd/trunk/checksums Added Paths: ----------- csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff Modified: csw/mgar/pkg/bind2nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 17:17:55 UTC (rev 4402) +++ csw/mgar/pkg/bind2nsd/trunk/Makefile 2009-04-18 17:38:44 UTC (rev 4403) @@ -12,11 +12,12 @@ MASTER_SITES = http://bind2nsd.sourceforge.net/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += setup.py.diff -DISTFILES += Config.py.diff PATCHFILES = setup.py.diff PATCHFILES += Config.py.diff +PATCHFILES += Utils.py.diff +PATCHFILES += nsd-sync.diff +PATCHFILES += s64-sync.diff # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/bind2nsd/trunk/checksums =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/checksums 2009-04-18 17:17:55 UTC (rev 4402) +++ csw/mgar/pkg/bind2nsd/trunk/checksums 2009-04-18 17:38:44 UTC (rev 4403) @@ -1,3 +1,6 @@ e10f1d313e9e8c3e7cc54eb9419813a8 download/Config.py.diff +a7a1f92612ca18cd6b6fefca830e88fa download/Utils.py.diff dc9af6382fa609b5d5d3a8ee666f0c4c download/bind2nsd-0.7.2.tar.gz +c6f85a06db20f215325568745af56fd1 download/nsd-sync.diff +6f98e9122403d06ecfb1ca07681b3bea download/s64-sync.diff 5fb22ed4998cab39a9d5fc99891f1a5d download/setup.py.diff Added: csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/Utils.py.diff 2009-04-18 17:38:44 UTC (rev 4403) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Utils.py bind2nsd-0.7.2/bind2nsd/Utils.py +--- bind2nsd-0.7.2.orig/bind2nsd/Utils.py 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Utils.py 2009-04-18 18:54:31.424687047 +0200 +@@ -25,7 +25,7 @@ + # + # + +-import popen2 ++import subprocess + import sys + + VERBOSE = False Added: csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/nsd-sync.diff 2009-04-18 17:38:44 UTC (rev 4403) @@ -0,0 +1,100 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Config.py bind2nsd-0.7.2/bind2nsd/Config.py +--- bind2nsd-0.7.2.orig/bind2nsd/Config.py 2009-04-18 19:25:48.872147165 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Config.py 2008-06-27 02:22:28.000000000 +0200 +@@ -53,7 +53,7 @@ + self.fname = '' + self.config = \ + { 'acl_list' : 'acl_list', +- 'bind2nsd' : '/opt/csw/bin/bind2nsd', ++ 'bind2nsd' : '/usr/bin/bind2nsd', + 'database' : '"nsd.db"', + 'DEBUG' : False, + 'DEMO-MODE' : False, +@@ -70,28 +70,28 @@ + 'masters_for_slaves' : '127.0.0.1', + 'named-checkconf' : '/usr/sbin/named-checkconf', + 'named-checkzone' : '/usr/sbin/named-checkzone', +- 'named_root' : '/etc', ++ 'named_root' : '/etc/bind9', + 'named_conf' : 'named.conf', + 'named_watchlist' : '/etc/named.conf', +- 'nsd-checkconf' : '/opt/csw/sbin/nsd-checkconf', ++ 'nsd-checkconf' : '/usr/sbin/nsd-checkconf', + 'nsd_conf' : 'nsd.conf', +- 'nsd_conf_dir' : '/etc/opt/csw/nsd/', ++ 'nsd_conf_dir' : '/etc/nsd/', + 'nsd_preamble' : 'nsd.conf-preamble', +- 'password_file' : '/etc/opt/csw/bind2nsd/passwd', +- 'pidfile' : '"/var/run/nsd.pid"', ++ 'password_file' : '/etc/bind2nsd/passwd', ++ 'pidfile' : '"nsd.pid"', + 'port' : '53', +- 'rebuild_cmd' : '/opt/csw/sbin/nsdc rebuild', +- 'restart_cmd' : '/opt/csw/sbin/nsdc restart', ++ 'rebuild_cmd' : '/etc/init.d/nsdc rebuild', ++ 'restart_cmd' : '/etc/init.d/nsdc restart', + 'sleep_time' : '5', +- 'start_cmd' : '/opt/csw/sbin/nsdc start', ++ 'start_cmd' : '/etc/init.d/nsdc start', + 'statistics' : '3600', +- 'stop_cmd' : '/opt/csw/sbin/nsdc stop', ++ 'stop_cmd' : '/etc/init.d/nsdc stop', + 'syspw' : 'iforgot', + 'tmpdir' : '/tmp/secure64/', # must have trailing '/' + 'username' : 'nsd', + 'version' : '0.7.2', + 'xfrd-reload-timeout' : '10', +- 'zonec_cmd' : '/opt/csw/sbin/zonec', ++ 'zonec_cmd' : '/etc/init.d/zonec', + } + + self.init() +@@ -110,8 +110,8 @@ + if os.path.exists(fname): + self.fname = fname + else: +- if os.path.exists('/etc/opt/csw/bind2nsd/bind2nsd.conf'): +- self.fname = '/etc/opt/csw/bind2nsd/bind2nsd.conf' ++ if os.path.exists('/etc/bind2nsd/bind2nsd.conf'): ++ self.fname = '/etc/bind2nsd/bind2nsd.conf' + else: + print '? hrm. no config file found -- did you _mean_ that?' + +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/bind2nsd/Utils.py bind2nsd-0.7.2/bind2nsd/Utils.py +--- bind2nsd-0.7.2.orig/bind2nsd/Utils.py 2009-04-18 19:25:49.078055018 +0200 ++++ bind2nsd-0.7.2/bind2nsd/Utils.py 2008-06-27 02:22:28.000000000 +0200 +@@ -25,7 +25,7 @@ + # + # + +-import subprocess ++import popen2 + import sys + + VERBOSE = False +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/scripts/nsd-sync bind2nsd-0.7.2/scripts/nsd-sync +--- bind2nsd-0.7.2.orig/scripts/nsd-sync 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/scripts/nsd-sync 2009-04-18 19:25:22.718953474 +0200 +@@ -29,7 +29,7 @@ + import getopt + import os + import os.path +-import popen2 ++import subprocess + import re + import sys + import time +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/setup.py bind2nsd-0.7.2/setup.py +--- bind2nsd-0.7.2.orig/setup.py 2009-04-18 19:25:48.666639442 +0200 ++++ bind2nsd-0.7.2/setup.py 2008-06-27 02:22:28.000000000 +0200 +@@ -37,8 +37,8 @@ + packages = [ 'bind2nsd' ], + scripts = [ 'scripts/bind2nsd', 'scripts/s64-sync', 'scripts/nsd-sync', + 'scripts/s64-mkpw', 'scripts/bind2nsd-slave', ], +- data_files = [ ('/opt/csw/share/doc/bind2nsd', ['./README', './TODO']), +- ('/etc/opt/csw/bind2nsd', ['etc/bind2nsd.conf']), ++ data_files = [ ('/usr/share/doc/bind2nsd', ['./README', './TODO']), ++ ('/etc/bind2nsd', ['etc/bind2nsd.conf']), + ] + ) + Added: csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff =================================================================== --- csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff (rev 0) +++ csw/mgar/pkg/bind2nsd/trunk/files/s64-sync.diff 2009-04-18 17:38:44 UTC (rev 4403) @@ -0,0 +1,24 @@ +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/scripts/nsd-sync bind2nsd-0.7.2/scripts/nsd-sync +--- bind2nsd-0.7.2.orig/scripts/nsd-sync 2009-04-18 19:30:56.806373967 +0200 ++++ bind2nsd-0.7.2/scripts/nsd-sync 2008-06-27 02:22:28.000000000 +0200 +@@ -29,7 +29,7 @@ + import getopt + import os + import os.path +-import subprocess ++import popen2 + import re + import sys + import time +diff --speed-large-files --minimal -Nru bind2nsd-0.7.2.orig/scripts/s64-sync bind2nsd-0.7.2/scripts/s64-sync +--- bind2nsd-0.7.2.orig/scripts/s64-sync 2008-06-27 02:22:28.000000000 +0200 ++++ bind2nsd-0.7.2/scripts/s64-sync 2009-04-18 19:30:30.873594761 +0200 +@@ -29,7 +29,7 @@ + import getopt + import os + import os.path +-import popen2 ++import subprocess + import re + import sys + import time This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 19:53:08 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 17:53:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4404] csw/mgar/pkg/php5/trunk/extensions/php5_recode/ README Message-ID: Revision: 4404 http://gar.svn.sourceforge.net/gar/?rev=4404&view=rev Author: valholla Date: 2009-04-18 17:53:08 +0000 (Sat, 18 Apr 2009) Log Message: ----------- commit changes Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_recode/README Added: csw/mgar/pkg/php5/trunk/extensions/php5_recode/README =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_recode/README (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_recode/README 2009-04-18 17:53:08 UTC (rev 4404) @@ -0,0 +1,2 @@ +recode can not be configured with imap and mysql extensions +compile and enable this module seperately This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 21:12:09 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 19:12:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4405] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4405 http://gar.svn.sourceforge.net/gar/?rev=4405&view=rev Author: valholla Date: 2009-04-18 19:12:08 +0000 (Sat, 18 Apr 2009) Log Message: ----------- adding files Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff Added: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/files/pdopgsql.diff 2009-04-18 19:12:08 UTC (rev 4405) @@ -0,0 +1,13 @@ +--- php-5.2.6/ext/pdo_pgsql/config.m4.orig 2009-02-19 15:57:33.757262166 -0600 ++++ php-5.2.6/ext/pdo_pgsql/config.m4 2009-02-19 15:58:15.092308743 -0600 +@@ -13,8 +13,8 @@ + + AC_MSG_CHECKING(for pg_config) + for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do +- if test -x $i/pg_config; then +- PG_CONFIG="$i/pg_config" ++ if test -x $i/pg_config32; then ++ PG_CONFIG="$i/pg_config32" + break; + fi + done Added: csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pgsql/files/pgsql.diff 2009-04-18 19:12:08 UTC (rev 4405) @@ -0,0 +1,13 @@ +--- php-5.2.6/ext/pgsql/config.m4.orig 2009-02-25 11:46:48.919725515 -0600 ++++ php-5.2.6/ext/pgsql/config.m4 2009-02-25 11:48:01.054898559 -0600 +@@ -11,8 +11,8 @@ + + AC_MSG_CHECKING(for pg_config) + for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do +- if test -x $i/pg_config; then +- PG_CONFIG="$i/pg_config" ++ if test -x $i/pg_config32; then ++ PG_CONFIG="$i/pg_config32" + break; + fi + done This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 22:39:03 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 20:39:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4406] csw/mgar/pkg/x11/xrender/trunk/Makefile Message-ID: Revision: 4406 http://gar.svn.sourceforge.net/gar/?rev=4406&view=rev Author: wbonnet Date: 2009-04-18 20:39:03 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Add 64bits support Modified Paths: -------------- csw/mgar/pkg/x11/xrender/trunk/Makefile Modified: csw/mgar/pkg/x11/xrender/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-18 19:12:08 UTC (rev 4405) +++ csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-18 20:39:03 UTC (rev 4406) @@ -28,6 +28,8 @@ REQUIRED_PKGS_CSWrenderdev = CSWlibxrender REQUIRED_PKGS_CSWlibxrender = CSWlibx11 +BUILD64 = 1 + post-extract: ( cd $(WORKROOTDIR)/build-$(firstword $(MODULATIONS)) ; \ mv libXrender-$(GARVERSION) $(DISTNAME) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 23:28:20 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:28:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4407] csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Message-ID: Revision: 4407 http://gar.svn.sourceforge.net/gar/?rev=4407&view=rev Author: wbonnet Date: 2009-04-18 21:28:19 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 20:39:03 UTC (rev 4406) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 21:28:19 UTC (rev 4407) @@ -31,7 +31,7 @@ @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License-devel.txt -EXTRA_PKG_CONFIG_DIRS += /opt/csw/X11/pkgconfig -PKG_CONFIG_PATH += /opt/csw/X11/pkgconfig +PKG_CONFIG_PATH += /opt/csw/X11/lib/pkgconfig include gar/category.mk + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sat Apr 18 23:33:34 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:33:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4408] csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Message-ID: Revision: 4408 http://gar.svn.sourceforge.net/gar/?rev=4408&view=rev Author: valholla Date: 2009-04-18 21:33:34 +0000 (Sat, 18 Apr 2009) Log Message: ----------- commit changes Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-18 21:28:19 UTC (rev 4407) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-18 21:33:34 UTC (rev 4408) @@ -30,7 +30,6 @@ post-merge-modulated: $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ $(PKGROOT)/opt/csw/gcc4/lib/ ) - $(_DBG)( gfind $(PKGROOT) -type f -name "*.*~" -exec grm -f {} \; ) $(_DBG)$(MAKECOOKIE) test-skip: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 23:52:55 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:52:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4409] csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Message-ID: Revision: 4409 http://gar.svn.sourceforge.net/gar/?rev=4409&view=rev Author: wbonnet Date: 2009-04-18 21:52:55 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Update Makefile Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 21:33:34 UTC (rev 4408) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-18 21:52:55 UTC (rev 4409) @@ -24,6 +24,8 @@ PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/lib/pkgconfig/.* PKGFILES_CSWlibxdmcpdevel += $(prefix)/share/doc/$(GARNAME)/License-devel.txt +BUILD64 = 1 + CONFIGURE_ARGS = $(DIRPATHS) pre-install: @@ -31,7 +33,5 @@ @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License-devel.txt -PKG_CONFIG_PATH += /opt/csw/X11/lib/pkgconfig - include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sat Apr 18 23:54:12 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sat, 18 Apr 2009 21:54:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4410] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4410 http://gar.svn.sourceforge.net/gar/?rev=4410&view=rev Author: wbonnet Date: 2009-04-18 21:54:12 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Replace use of PKG_CONFIG_PATH by EXTRA_PKGCONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-18 21:52:55 UTC (rev 4409) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-18 21:54:12 UTC (rev 4410) @@ -23,9 +23,12 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +EXTRA_PKGCONFIG_PATH = /opt/csw/X11/lib/pkgconfig +EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig +EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +export PKG_CONFIG_PATH + # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sun Apr 19 10:37:44 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sun, 19 Apr 2009 08:37:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4411] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4411 http://gar.svn.sourceforge.net/gar/?rev=4411&view=rev Author: wbonnet Date: 2009-04-19 08:37:44 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Switch back to PKG_CONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-18 21:54:12 UTC (rev 4410) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 08:37:44 UTC (rev 4411) @@ -23,9 +23,9 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -EXTRA_PKGCONFIG_PATH = /opt/csw/X11/lib/pkgconfig -EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig -EXTRA_PKGCONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +PKG_CONFIG_PATH = /opt/csw/X11/lib/pkgconfig +PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig +PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig export PKG_CONFIG_PATH This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From wbonnet at users.sourceforge.net Sun Apr 19 11:24:38 2009 From: wbonnet at users.sourceforge.net (wbonnet at users.sourceforge.net) Date: Sun, 19 Apr 2009 09:24:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4412] csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Message-ID: Revision: 4412 http://gar.svn.sourceforge.net/gar/?rev=4412&view=rev Author: wbonnet Date: 2009-04-19 09:24:38 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Update pkgconfigpath Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-19 08:37:44 UTC (rev 4411) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-19 09:24:38 UTC (rev 4412) @@ -35,3 +35,4 @@ include gar/category.mk + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:01:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:01:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4413] csw/mgar/gar/v2 Message-ID: Revision: 4413 http://gar.svn.sourceforge.net/gar/?rev=4413&view=rev Author: dmichelsen Date: 2009-04-19 20:01:09 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Added _CATEGORY_PKG_CONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 09:24:38 UTC (rev 4412) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:01:09 UTC (rev 4413) @@ -23,12 +23,8 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -PKG_CONFIG_PATH = /opt/csw/X11/lib/pkgconfig -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig -PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig +_CATEGORY_PKG_CONFIG_PATH = $(libdir)/X11/pkgconfig -export PKG_CONFIG_PATH - # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-19 09:24:38 UTC (rev 4412) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-19 20:01:09 UTC (rev 4413) @@ -494,7 +494,7 @@ # This is for foo-config chaos PKG_CONFIG_DIRS ?= $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) -PKG_CONFIG_PATH ?= $(call MAKEPATH,$(foreach D,$(PKG_CONFIG_DIRS),$(abspath $D/$(MM_LIBDIR)/pkgconfig)) $(EXTRA_PKGCONFIG_PATH)) +PKG_CONFIG_PATH ?= $(call MAKEPATH,$(foreach D,$(PKG_CONFIG_DIRS),$(abspath $D/$(MM_LIBDIR)/pkgconfig)) $(_CATEGORY_PKG_CONFIG_PATH) $(EXTRA_PKG_CONFIG_PATH)) # # Mirror Sites This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:24:10 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:24:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4414] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4414 http://gar.svn.sourceforge.net/gar/?rev=4414&view=rev Author: dmichelsen Date: 2009-04-19 20:24:10 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Fix x11 category PKG_CONFIG_PATH Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:01:09 UTC (rev 4413) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:24:10 UTC (rev 4414) @@ -23,7 +23,7 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -_CATEGORY_PKG_CONFIG_PATH = $(libdir)/X11/pkgconfig +_CATEGORY_PKG_CONFIG_PATH = $(abspath $(libdir_install)/X11/$(MM_LIBDIR)/pkgconfig) # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:42:04 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:42:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4415] csw/mgar/gar/v2/gar.conf.mk Message-ID: Revision: 4415 http://gar.svn.sourceforge.net/gar/?rev=4415&view=rev Author: dmichelsen Date: 2009-04-19 20:42:04 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Undo un-export of PKG_CONFIG_PATH from r2471 Modified Paths: -------------- csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-19 20:24:10 UTC (rev 4414) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-19 20:42:04 UTC (rev 4415) @@ -588,8 +588,7 @@ INSTALL_SCRIPTS ?= $(WORKSRC)/Makefile # Global environment -#export PATH PKG_CONFIG_PATH -export PATH +export PATH PKG_CONFIG_PATH # prepend the local file listing FILE_SITES = $(foreach DIR,$(FILEDIR) $(GARCHIVEPATH),file://$(DIR)/) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Sun Apr 19 22:43:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:43:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4416] csw/mgar/gar/v2/categories/x11/category.mk Message-ID: Revision: 4416 http://gar.svn.sourceforge.net/gar/?rev=4416&view=rev Author: dmichelsen Date: 2009-04-19 20:43:06 +0000 (Sun, 19 Apr 2009) Log Message: ----------- mGAR v2: Fix pkgconfig again in category x11 Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:42:04 UTC (rev 4415) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-19 20:43:06 UTC (rev 4416) @@ -23,7 +23,7 @@ export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -_CATEGORY_PKG_CONFIG_PATH = $(abspath $(libdir_install)/X11/$(MM_LIBDIR)/pkgconfig) +_CATEGORY_PKG_CONFIG_PATH = $(abspath $(prefix)/X11/lib/$(MM_LIBDIR)/pkgconfig) # Configure common options CONFIGURE_ARGS = --prefix=/opt/csw/X11 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Sun Apr 19 22:44:06 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Sun, 19 Apr 2009 20:44:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4417] csw/mgar/pkg/nsd/trunk/Makefile Message-ID: Revision: 4417 http://gar.svn.sourceforge.net/gar/?rev=4417&view=rev Author: idogan23 Date: 2009-04-19 20:44:05 +0000 (Sun, 19 Apr 2009) Log Message: ----------- nsd: certain directories hanlded by the ugfiles class Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-19 20:43:06 UTC (rev 4416) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-19 20:44:05 UTC (rev 4417) @@ -19,8 +19,8 @@ DISTFILES += cswusergroup DISTFILES += cswnsd -SPKG_CLASSES = none cswusergroup cswcpsampleconf cswinitsmf -PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/nsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' +SPKG_CLASSES = none cswusergroup ugfiles cswcpsampleconf cswinitsmf +PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/CSWnsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$2 = "ugfiles" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' REQUIRED_PKGS = CSWcswclassutils @@ -40,6 +40,7 @@ @ginstall -d $(DESTDIR)/etc/opt/csw/init.d @ginstall -m 755 $(FILEDIR)/cswnsd $(DESTDIR)/etc/opt/csw/init.d/cswnsd @mv $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.sample $(DESTDIR)/etc/opt/csw/nsd/nsd.conf.CSW - @ginstall -m 755 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/nsd/cswusergroup + @ginstall -d $(DESTDIR)/etc/opt/csw/pkg/CSWnsd + @ginstall -m 644 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/pkg/CSWnsd/cswusergroup include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 20 11:31:44 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 20 Apr 2009 09:31:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4418] csw/mgar/gar/v2/gar.pkg.mk Message-ID: Revision: 4418 http://gar.svn.sourceforge.net/gar/?rev=4418&view=rev Author: dmichelsen Date: 2009-04-20 09:31:44 +0000 (Mon, 20 Apr 2009) Log Message: ----------- mGAR v2: Add PRESERVECONF for CSWcswclassutils Modified Paths: -------------- csw/mgar/gar/v2/gar.pkg.mk Modified: csw/mgar/gar/v2/gar.pkg.mk =================================================================== --- csw/mgar/gar/v2/gar.pkg.mk 2009-04-19 20:44:05 UTC (rev 4417) +++ csw/mgar/gar/v2/gar.pkg.mk 2009-04-20 09:31:44 UTC (rev 4418) @@ -114,6 +114,15 @@ SPKG_PKGFILE ?= %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg +# Handle cswclassutils +# - prepend cswpreserveconf if it is not already in SPKG_CLASSES +SPKG_CLASSES := $(if $(PRESERVECONF),$(if $(filter cswpreserveconf,$(SPKG_CLASSES)),,cswpreserveconf)) $(SPKG_CLASSES) +# - set class for all config files +ifneq ($(PRESERVECONF),) +_CSWCLASS_FILTER = | perl -ane '$(foreach CONF,$(PRESERVECONF),$$F[1] = "cswpreserveconf" if( $$F[2] =~ m(^$(CONF)$$) );)print join(" ", at F),"\n";' +_EXTRA_GAR_PKGS += CSWcswclassutils +endif + PKGGET_DESTDIR ?= DEPMAKER_EXTRA_ARGS = --noscript --nodep SUNW @@ -249,9 +258,9 @@ ) \ <$(PROTOTYPE); \ if [ -n "$(EXTRA_PKGFILES_$*)" ]; then echo "$(EXTRA_PKGFILES_$*)"; fi \ - ) $(_PROTOTYPE_FILTER_$*) >$@; \ + ) $(_CSWCLASS_FILTER) $(_PROTOTYPE_FILTER_$*) >$@; \ else \ - cat $(PROTOTYPE) $(_PROTOTYPE_FILTER_$*) >$@; \ + cat $(PROTOTYPE) $(_CSWCLASS_FILTER) $(_PROTOTYPE_FILTER_$*) >$@; \ fi $(WORKDIR)/%.prototype-$(GARCH): | $(WORKDIR)/%.prototype @@ -278,7 +287,7 @@ ($(foreach PKG,$(INCOMPATIBLE_PKGS_$*) $(INCOMPATIBLE_PKGS),\ echo "I $(PKG)";\ )\ - $(foreach PKG,$(_EXTRA_GAR_PKGS) $(REQUIRED_PKGS_$*) $(REQUIRED_PKGS),\ + $(foreach PKG,$(sort $(_EXTRA_GAR_PKGS)) $(REQUIRED_PKGS_$*) $(REQUIRED_PKGS),\ $(if $(SPKG_DESC_$(PKG)), \ echo "P $(PKG) $(call catalogname,$(PKG)) - $(SPKG_DESC_$(PKG))";, \ echo "$(shell (/usr/bin/pkginfo $(PKG) || echo "P $(PKG) - ") | awk '{ $$1 = "P"; print } ')"; \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 11:57:45 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 09:57:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4419] csw/mgar/pkg/clamav/trunk Message-ID: Revision: 4419 http://gar.svn.sourceforge.net/gar/?rev=4419&view=rev Author: bonivart Date: 2009-04-20 09:57:44 +0000 (Mon, 20 Apr 2009) Log Message: ----------- clamav: update to 0.95.1 Modified Paths: -------------- csw/mgar/pkg/clamav/trunk/Makefile csw/mgar/pkg/clamav/trunk/checksums csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW Modified: csw/mgar/pkg/clamav/trunk/Makefile =================================================================== --- csw/mgar/pkg/clamav/trunk/Makefile 2009-04-20 09:31:44 UTC (rev 4418) +++ csw/mgar/pkg/clamav/trunk/Makefile 2009-04-20 09:57:44 UTC (rev 4419) @@ -1,5 +1,5 @@ GARNAME = clamav -GARVERSION = 0.95 +GARVERSION = 0.95.1 #DISTNAME = $(GARNAME)-devel-latest CATEGORIES = apps Modified: csw/mgar/pkg/clamav/trunk/checksums =================================================================== --- csw/mgar/pkg/clamav/trunk/checksums 2009-04-20 09:31:44 UTC (rev 4418) +++ csw/mgar/pkg/clamav/trunk/checksums 2009-04-20 09:57:44 UTC (rev 4419) @@ -1 +1 @@ -98590386ba9a69039580b1bf48ca038b download/clamav-0.95.tar.gz +c802d4b372e455849cfcb0d776fc72d8 download/clamav-0.95.1.tar.gz Modified: csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW =================================================================== --- csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW 2009-04-20 09:31:44 UTC (rev 4418) +++ csw/mgar/pkg/clamav/trunk/files/CSWclamav.README.CSW 2009-04-20 09:57:44 UTC (rev 4419) @@ -1,3 +1,6 @@ +# 2009-04-20 +Version 0.95.1 released. + # 2009-03-25 Version 0.95 released. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 12:33:47 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 10:33:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4420] csw/mgar/pkg/lzop/trunk/Makefile Message-ID: Revision: 4420 http://gar.svn.sourceforge.net/gar/?rev=4420&view=rev Author: bonivart Date: 2009-04-20 10:33:47 +0000 (Mon, 20 Apr 2009) Log Message: ----------- lzop: remove ISALIST Modified Paths: -------------- csw/mgar/pkg/lzop/trunk/Makefile Modified: csw/mgar/pkg/lzop/trunk/Makefile =================================================================== --- csw/mgar/pkg/lzop/trunk/Makefile 2009-04-20 09:57:44 UTC (rev 4419) +++ csw/mgar/pkg/lzop/trunk/Makefile 2009-04-20 10:33:47 UTC (rev 4420) @@ -30,6 +30,8 @@ CONFIGURE_ARGS = $(DIRPATHS) +NOISALIST = 1 + include gar/category.mk SPKG_REVSTAMP := $(SPKG_REVSTAMP)_rev=$(RELEASE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 12:47:47 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 10:47:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4421] csw/mgar/pkg/tnef/trunk/Makefile Message-ID: Revision: 4421 http://gar.svn.sourceforge.net/gar/?rev=4421&view=rev Author: bonivart Date: 2009-04-20 10:47:47 +0000 (Mon, 20 Apr 2009) Log Message: ----------- tnef: remove ISALIST Modified Paths: -------------- csw/mgar/pkg/tnef/trunk/Makefile Modified: csw/mgar/pkg/tnef/trunk/Makefile =================================================================== --- csw/mgar/pkg/tnef/trunk/Makefile 2009-04-20 10:33:47 UTC (rev 4420) +++ csw/mgar/pkg/tnef/trunk/Makefile 2009-04-20 10:47:47 UTC (rev 4421) @@ -21,6 +21,8 @@ CONFIGURE_ARGS = $(DIRPATHS) +NOISALIST = 1 + TEST_TARGET = check INSTALL_SCRIPTS = custom This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 15:34:07 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 13:34:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4422] csw/mgar/pkg/spamassassin/trunk Message-ID: Revision: 4422 http://gar.svn.sourceforge.net/gar/?rev=4422&view=rev Author: bonivart Date: 2009-04-20 13:34:07 +0000 (Mon, 20 Apr 2009) Log Message: ----------- spamassassin: move to mgar v2, fix minor issues Modified Paths: -------------- csw/mgar/pkg/spamassassin/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup Property Changed: ---------------- csw/mgar/pkg/spamassassin/trunk/ Property changes on: csw/mgar/pkg/spamassassin/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/spamassassin/trunk/Makefile =================================================================== --- csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 10:47:47 UTC (rev 4421) +++ csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 13:34:07 UTC (rev 4422) @@ -12,16 +12,29 @@ MASTER_SITES = http://apache.jumper.nu/spamassassin/source/ DISTFILES = $(SPKG_NAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWspamassassin,checkinstall depend postinstall) +#DISTFILES += $(call admfiles,CSWspamassassin,checkinstall depend postinstall) +LICENSE = $(WORKDIR)/$(SPKG_NAME)-$(GARVERSION)/LICENSE + +REQUIRED_PKGS = CSWosslrt CSWperl CSWpmarchivetar CSWpmdbi CSWpmdigestsha1 CSWpmiosocketinet6 CSWpmiosocketssl CSWpmiozlib CSWpmipcountry CSWpmldap CSWpmlibwww CSWpmmaildkim CSWpmmailspf CSWpmmailtools CSWpmmimebase64 CSWpmnetdns CSWpmuri CSWpmhtmlparser CSWzlib CSWcswclassutils + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(SPKG_NAME)-(\d+(?:\.\d+)*).tar.gz +SPKG_CLASSES_CSWspamassassin = none cswusergroup cswcpsampleconf cswinitsmf + CONFIGURE_SCRIPTS = custom BUILD_SCRIPTS = custom TEST_SCRIPTS = custom INSTALL_SCRIPTS = custom +PROTOTYPE_FILTER = awk ' \ + $$$$3 ~ /\/opt\/csw\/etc\/spamassassin\/.+\.pre\.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \ + $$$$3 ~ /\/opt\/csw\/etc\/spamassassin\/local\.cf\.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \ + $$$$3 ~ /\/opt\/csw\/etc\/CSWspamassassin\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } \ + $$$$3 ~ /\/init.d\/cswspamd$$$$/ { $$$$2 = "cswinitsmf" } \ + { print }' + include gar/category.mk WORKSRC = $(WORKDIR)/$(SPKG_NAME)-$(GARVERSION) @@ -50,15 +63,19 @@ @rm -rf $(DESTDIR) @ginstall -d $(DESTDIR)$(docdir)/$(GARNAME) @ginstall -d $(DESTDIR)/var/opt/csw/$(GARNAME) + @ginstall -d $(DESTDIR)$(sysconfdir)/CSWspamassassin + @ginstall -d $(DESTDIR)/etc/opt/csw/init.d + @ginstall -m 755 $(FILEDIR)/CSWspamassassin.cswspamd $(DESTDIR)/etc/opt/csw/init.d/cswspamd + @ginstall -m 644 $(FILEDIR)/CSWspamassassin.cswusergroup $(DESTDIR)$(sysconfdir)/CSWspamassassin/cswusergroup @cp $(FILEDIR)/CSWspamassassin.README.CSW $(DESTDIR)$(docdir)/$(GARNAME)/README.CSW @cp $(FILEDIR)/CSWspamassassin.README.spamd $(DESTDIR)$(docdir)/$(GARNAME)/README.spamd - @cp $(FILEDIR)/CSWspamassassin.cswspamd $(DESTDIR)$(docdir)/$(GARNAME)/cswspamd - @cp $(FILEDIR)/CSWspamassassin.spamd.xml.CSW $(DESTDIR)$(docdir)/$(GARNAME)/spamd.xml.CSW - @cp $(FILEDIR)/CSWspamassassin.svc-spamd.CSW $(DESTDIR)$(docdir)/$(GARNAME)/svc-spamd.CSW +# @cp $(FILEDIR)/CSWspamassassin.cswspamd $(DESTDIR)$(docdir)/$(GARNAME)/cswspamd +# @cp $(FILEDIR)/CSWspamassassin.spamd.xml.CSW $(DESTDIR)$(docdir)/$(GARNAME)/spamd.xml.CSW +# @cp $(FILEDIR)/CSWspamassassin.svc-spamd.CSW $(DESTDIR)$(docdir)/$(GARNAME)/svc-spamd.CSW @( cd $(WORKSRC) ; \ gmake install ) @( cd $(WORKSRC) ; \ - cp -r C* INSTALL LICENSE NOTICE README TRADEMARK U* ldap/ sql/ procmailrc.example sample-* $(DESTDIR)$(docdir)/$(GARNAME)/ ) + cp -r C* INSTALL NOTICE README TRADEMARK U* ldap/ sql/ procmailrc.example sample-* $(DESTDIR)$(docdir)/$(GARNAME)/ ) @( cd $(DESTDIR)/opt/csw/etc/spamassassin ; \ mv local.cf local.cf.CSW ; \ mv init.pre init.pre.CSW ; \ Added: csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup =================================================================== --- csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup (rev 0) +++ csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswusergroup 2009-04-20 13:34:07 UTC (rev 4422) @@ -0,0 +1 @@ +spamd:spamd:SpamAssassin::/bin/false:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 16:20:59 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 14:20:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4423] csw/mgar/pkg/spamassassin/trunk/Makefile Message-ID: Revision: 4423 http://gar.svn.sourceforge.net/gar/?rev=4423&view=rev Author: bonivart Date: 2009-04-20 14:20:59 +0000 (Mon, 20 Apr 2009) Log Message: ----------- spamassassin: fix spamc xarch=v8 Modified Paths: -------------- csw/mgar/pkg/spamassassin/trunk/Makefile Modified: csw/mgar/pkg/spamassassin/trunk/Makefile =================================================================== --- csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 13:34:07 UTC (rev 4422) +++ csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 14:20:59 UTC (rev 4423) @@ -46,6 +46,14 @@ perl Makefile.PL INSTALLDIRS=vendor DESTDIR=$(DESTDIR) CONFDIR=/opt/csw/etc/spamassassin LOCALSTATEDIR=/var/opt/csw/spamassassin CONTACT_ADDRESS=postmaster ) @$(MAKECOOKIE) +pre-build-modulated: + @echo " ==> Pre-build $(GARNAME) (custom)" + @( cd $(WORKSRC)/spamc ; \ + pwd ; \ + sed 's/CFLAGS = /CFLAGS = -xarch=v8 /' Makefile.in > Makefile.tmp ; \ + cp Makefile.tmp Makefile.in ) + @$(MAKECOOKIE) + build-custom: @echo " ==> Building $(GARNAME) (custom)" @( cd $(WORKSRC) ; \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Mon Apr 20 16:53:52 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Mon, 20 Apr 2009 14:53:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4424] csw/mgar/pkg/spamassassin/trunk/Makefile Message-ID: Revision: 4424 http://gar.svn.sourceforge.net/gar/?rev=4424&view=rev Author: bonivart Date: 2009-04-20 14:53:52 +0000 (Mon, 20 Apr 2009) Log Message: ----------- spamassassin: cleanup Modified Paths: -------------- csw/mgar/pkg/spamassassin/trunk/Makefile Modified: csw/mgar/pkg/spamassassin/trunk/Makefile =================================================================== --- csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 14:20:59 UTC (rev 4423) +++ csw/mgar/pkg/spamassassin/trunk/Makefile 2009-04-20 14:53:52 UTC (rev 4424) @@ -49,7 +49,6 @@ pre-build-modulated: @echo " ==> Pre-build $(GARNAME) (custom)" @( cd $(WORKSRC)/spamc ; \ - pwd ; \ sed 's/CFLAGS = /CFLAGS = -xarch=v8 /' Makefile.in > Makefile.tmp ; \ cp Makefile.tmp Makefile.in ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 20 20:13:09 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 20 Apr 2009 18:13:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4425] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4425 http://gar.svn.sourceforge.net/gar/?rev=4425&view=rev Author: valholla Date: 2009-04-20 18:13:08 +0000 (Mon, 20 Apr 2009) Log Message: ----------- fix pkgdesc for pdo* and readline depend Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdo CATALOGNAME_CSWphp5pdo = php5_pdo -SPKG_DESC_CSWphp5pdo = pdo Extention for PHP5 +SPKG_DESC_CSWphp5pdo = PHP Data Object Abstraction Base Extention for PHP5 REQUIRED_PKGS_CSWphp5pdo = CSWphp5 PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdomysql CATALOGNAME_CSWphp5pdomysql = php5_pdomysql -SPKG_DESC_CSWphp5pdomysql = pdomysql Extention for PHP5 +SPKG_DESC_CSWphp5pdomysql = MySQL PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib CSWphp5pdo CONFIGURE_ARGS += --with-pdo-mysql=shared,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdoodbc CATALOGNAME_CSWphp5pdoodbc = php5_pdoodbc -SPKG_DESC_CSWphp5pdoodbc = pdoodbc Extention for PHP5 +SPKG_DESC_CSWphp5pdoodbc = ODBC PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc CSWphp5pdo CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdopgsql CATALOGNAME_CSWphp5pdopgsql = php5_pdopgsql -SPKG_DESC_CSWphp5pdopgsql = pdopgsql Extention for PHP5 +SPKG_DESC_CSWphp5pdopgsql = PgSQL PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq CSWphp5pdo PATCHFILES += pdopgsql.diff Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdosqlite CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite -SPKG_DESC_CSWphp5pdosqlite = pdosqlite Extention for PHP5 +SPKG_DESC_CSWphp5pdoSqlite = Sqlite PHP Data Object Abstraction Extention for PHP5 REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 14:53:52 UTC (rev 4424) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 18:13:08 UTC (rev 4425) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5readline = php5_readline SPKG_DESC_CSWphp5readline = readline Extention for PHP5 -REQUIRED_PKGS_CSWphp5readline = CSWphp5 +REQUIRED_PKGS_CSWphp5readline = CSWphp5 CSWreadline CONFIGURE_ARGS += --with-libedit=no CONFIGURE_ARGS += --with-readline=shared,/opt/csw This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 20 23:22:07 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 20 Apr 2009 21:22:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4426] csw/mgar/pkg/php5/trunk/extensions/php5_readline/ Makefile Message-ID: Revision: 4426 http://gar.svn.sourceforge.net/gar/?rev=4426&view=rev Author: valholla Date: 2009-04-20 21:22:07 +0000 (Mon, 20 Apr 2009) Log Message: ----------- curses depend Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 18:13:08 UTC (rev 4425) +++ csw/mgar/pkg/php5/trunk/extensions/php5_readline/Makefile 2009-04-20 21:22:07 UTC (rev 4426) @@ -4,7 +4,7 @@ CATALOGNAME_CSWphp5readline = php5_readline SPKG_DESC_CSWphp5readline = readline Extention for PHP5 -REQUIRED_PKGS_CSWphp5readline = CSWphp5 CSWreadline +REQUIRED_PKGS_CSWphp5readline = CSWphp5 CSWreadline CSWncurses CONFIGURE_ARGS += --with-libedit=no CONFIGURE_ARGS += --with-readline=shared,/opt/csw This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 03:43:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 01:43:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4427] csw/mgar/pkg/php5/trunk/extensions/php5_pdo Message-ID: Revision: 4427 http://gar.svn.sourceforge.net/gar/?rev=4427&view=rev Author: valholla Date: 2009-04-21 01:43:05 +0000 (Tue, 21 Apr 2009) Log Message: ----------- more descritptive description for php5_pdo* packages Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdo/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdo CATALOGNAME_CSWphp5pdo = php5_pdo -SPKG_DESC_CSWphp5pdo = PHP Data Object Abstraction Base Extention for PHP5 +SPKG_DESC_CSWphp5pdo = A database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdo = CSWphp5 PKGFILES_CSWphp5pdo = .*/lib/php/extensions/.*/pdo\.so* Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdomysql/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdomysql CATALOGNAME_CSWphp5pdomysql = php5_pdomysql -SPKG_DESC_CSWphp5pdomysql = MySQL PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdomysql = A MySQL specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdomysql = CSWphp5 CSWmysql5rt CSWzlib CSWphp5pdo CONFIGURE_ARGS += --with-pdo-mysql=shared,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdoodbc/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdoodbc CATALOGNAME_CSWphp5pdoodbc = php5_pdoodbc -SPKG_DESC_CSWphp5pdoodbc = ODBC PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdoodbc = An ODBC specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdoodbc = CSWphp5 CSWunixodbc CSWphp5pdo CONFIGURE_ARGS += --with-pdo-odbc=shared,unixODBC,$(prefix) Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdopgsql/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdopgsql CATALOGNAME_CSWphp5pdopgsql = php5_pdopgsql -SPKG_DESC_CSWphp5pdopgsql = PgSQL PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdopgsql = A PgSQL specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdopgsql = CSWphp5 CSWlibpq CSWphp5pdo PATCHFILES += pdopgsql.diff Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-20 21:22:07 UTC (rev 4426) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-21 01:43:05 UTC (rev 4427) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdosqlite CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite -SPKG_DESC_CSWphp5pdoSqlite = Sqlite PHP Data Object Abstraction Extention for PHP5 +SPKG_DESC_CSWphp5pdoSqlite = A Sqlite specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 21 13:46:00 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 21 Apr 2009 11:46:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4428] csw/mgar/pkg/clamav/trunk/Makefile Message-ID: Revision: 4428 http://gar.svn.sourceforge.net/gar/?rev=4428&view=rev Author: bonivart Date: 2009-04-21 11:46:00 +0000 (Tue, 21 Apr 2009) Log Message: ----------- clamav: added libtoolrt as dep Modified Paths: -------------- csw/mgar/pkg/clamav/trunk/Makefile Modified: csw/mgar/pkg/clamav/trunk/Makefile =================================================================== --- csw/mgar/pkg/clamav/trunk/Makefile 2009-04-21 01:43:05 UTC (rev 4427) +++ csw/mgar/pkg/clamav/trunk/Makefile 2009-04-21 11:46:00 UTC (rev 4428) @@ -24,7 +24,7 @@ CATALOGNAME_CSWlibclamav = libclamav SPKG_DESC_CSWlibclamav = $(DESCRIPTION) Library -REQUIRED_PKGS_CSWclamav = CSWlibclamav CSWzlib CSWbzip2 CSWiconv CSWcswclassutils CSWncurses +REQUIRED_PKGS_CSWclamav = CSWlibclamav CSWzlib CSWbzip2 CSWiconv CSWcswclassutils CSWncurses CSWlibtoolrt REQUIRED_PKGS_CSWlibclamav = CSWzlib CSWbzip2 CSWiconv # We define upstream file regex so we can be notifed of new upstream software release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 17:46:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 15:46:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4429] csw/mgar/pkg/gcc4/trunk/files Message-ID: Revision: 4429 http://gar.svn.sourceforge.net/gar/?rev=4429&view=rev Author: valholla Date: 2009-04-21 15:46:20 +0000 (Tue, 21 Apr 2009) Log Message: ----------- force remove of ~ backup files Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_files.mk csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_files.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-21 11:46:00 UTC (rev 4428) +++ csw/mgar/pkg/gcc4/trunk/files/package_files.mk 2009-04-21 15:46:20 UTC (rev 4429) @@ -86,7 +86,6 @@ PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*libobjc.*a PKGFILES_CSWgcc4objc += .*/gcc4/include/.*objc/.* PKGFILES_CSWgcc4objc += .*/gcc4/lib/.*/include/objc/.* -EXTRA_PKGFILES_EXCLUDED_CSWgcc4objc = /opt/csw/gcc4/lib/gcc/.*/(\d+(?:\.\d+)*)/include ####### RunTime Packages ## gcc4adart Modified: csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-21 11:46:00 UTC (rev 4428) +++ csw/mgar/pkg/gcc4/trunk/files/pkg_scripts.mk 2009-04-21 15:46:20 UTC (rev 4429) @@ -30,6 +30,7 @@ post-merge-modulated: $(_DBG)( gmv $(PKGROOT)/opt/csw/gcc4/lib/gcc/*/*/adalib/*.so* \ $(PKGROOT)/opt/csw/gcc4/lib/ ) + $(_DBG)( gfind $(PKGROOT) -name \*~ -exec grm -f {} \; ) $(_DBG)$(MAKECOOKIE) test-skip: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 21 18:26:56 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 21 Apr 2009 16:26:56 +0000 Subject: [csw-devel] SF.net SVN: gar:[4430] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4430 http://gar.svn.sourceforge.net/gar/?rev=4430&view=rev Author: bonivart Date: 2009-04-21 16:26:56 +0000 (Tue, 21 Apr 2009) Log Message: ----------- cswclassutils: fix bug 3632, 3633, 3634 Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-21 15:46:20 UTC (rev 4429) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-21 16:26:56 UTC (rev 4430) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.5 +GARVERSION = 1.6 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-21 15:46:20 UTC (rev 4429) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-21 16:26:56 UTC (rev 4430) @@ -7,10 +7,28 @@ # # 2008-04-21 First release # 2009-03-28 Added support for refresh +# 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), + Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc +SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" + +# retrieve the previous state of a service identified by the given FRMI +load_smf_service_state () +{ + SMF_STATE="disabled" + + if [ -f "$SMF_STATE_FILE" ]; then + set -- `/usr/bin/awk " \\\$1 == \"$1\" { print \\\$2 } " "$SMF_STATE_FILE"` + if [ "$1" = "enabled" ]; then + SMF_STATE="enabled" + fi + fi +} + # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -34,6 +52,19 @@ echo PACKAGE: $PKGINST SMF: $smf fi +# Determine if service should be started or not +daemon=yes + +if [ "$autoenable_daemons" = "no" ]; then + daemon=no +fi + +if [ "$autoenable_$service" = "no" ]; then + daemon=no +elif [ "$autoenable_$service" = "yes" ]; then + daemon=yes +fi + # Copy files, set up SMF echo "Installing class ..." @@ -176,74 +207,66 @@ /usr/bin/ln -s $dest /etc/init.d/$service /usr/sbin/installf -c cswinitsmf $PKGINST /etc/init.d/$service=$dest s - # Create rc-symlinks - RC_KNUM= - if [ "`grep '^#RC_KNUM' $dest`" ]; then - RC_KNUM=`grep '^#RC_KNUM' $dest | awk '{print $2}'` + # Create rc-symlinks if enabled + if [ "$daemon" = "yes" ]; then + RC_KNUM= + if [ "`grep '^#RC_KNUM' $dest`" ]; then + RC_KNUM=`grep '^#RC_KNUM' $dest | awk '{print $2}'` + fi + RC_SNUM= + if [ "`grep '^#RC_SNUM' $dest`" ]; then + RC_SNUM=`grep '^#RC_SNUM' $dest | awk '{print $2}'` + fi + RC_KLEV= + if [ "`grep '^#RC_KLEV' $dest`" ]; then + RC_KLEV=`grep '^#RC_KLEV' $dest | awk '{print $2}'` + RC_KLEV=`echo $RC_KLEV | sed 's/,/ /g'` + fi + RC_SLEV= + if [ "`grep '^#RC_SLEV' $dest`" ]; then + RC_SLEV=`grep '^#RC_SLEV' $dest | awk '{print $2}'` + RC_SLEV=`echo $RC_SLEV | sed 's/,/ /g'` + fi + if [ ! "$RC_KNUM" ]; then + RC_KNUM=20 + fi + if [ ! "$RC_SNUM" ]; then + RC_SNUM=80 + fi + if [ ! "$RC_KLEV" ]; then + RC_KLEV="0 1 2 S" + fi + if [ ! "$RC_SLEV" ]; then + RC_SLEV=3 + fi + if [ "$DEBUG" ]; then + echo RC_KNUM: $RC_KNUM + echo RC_SNUM: $RC_SNUM + echo RC_KLEV: $RC_KLEV + echo RC_SLEV: $RC_SLEV + fi + for i in $RC_KLEV; do + echo /etc/rc$i.d/K$RC_KNUM$service + /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/K$RC_KNUM$service=/etc/init.d/$service s + /bin/ln -s /etc/init.d/$service /etc/rc$i.d/K$RC_KNUM$service + done + for i in $RC_SLEV; do + echo /etc/rc$i.d/S$RC_SNUM$service + /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/S$RC_SNUM$service=/etc/init.d/$service s + /bin/ln -s /etc/init.d/$service /etc/rc$i.d/S$RC_SNUM$service + done fi - RC_SNUM= - if [ "`grep '^#RC_SNUM' $dest`" ]; then - RC_SNUM=`grep '^#RC_SNUM' $dest | awk '{print $2}'` - fi - RC_KLEV= - if [ "`grep '^#RC_KLEV' $dest`" ]; then - RC_KLEV=`grep '^#RC_KLEV' $dest | awk '{print $2}'` - RC_KLEV=`echo $RC_KLEV | sed 's/,/ /g'` - fi - RC_SLEV= - if [ "`grep '^#RC_SLEV' $dest`" ]; then - RC_SLEV=`grep '^#RC_SLEV' $dest | awk '{print $2}'` - RC_SLEV=`echo $RC_SLEV | sed 's/,/ /g'` - fi - if [ ! "$RC_KNUM" ]; then - RC_KNUM=20 - fi - if [ ! "$RC_SNUM" ]; then - RC_SNUM=80 - fi - if [ ! "$RC_KLEV" ]; then - RC_KLEV="0 1 2 S" - fi - if [ ! "$RC_SLEV" ]; then - RC_SLEV=3 - fi - if [ "$DEBUG" ]; then - echo RC_KNUM: $RC_KNUM - echo RC_SNUM: $RC_SNUM - echo RC_KLEV: $RC_KLEV - echo RC_SLEV: $RC_SLEV - fi - for i in $RC_KLEV; do - echo /etc/rc$i.d/K$RC_KNUM$service - /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/K$RC_KNUM$service=/etc/init.d/$service s - /bin/ln -s /etc/init.d/$service /etc/rc$i.d/K$RC_KNUM$service - done - for i in $RC_SLEV; do - echo /etc/rc$i.d/S$RC_SNUM$service - /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/S$RC_SNUM$service=/etc/init.d/$service s - /bin/ln -s /etc/init.d/$service /etc/rc$i.d/S$RC_SNUM$service - done fi done -# Determine if service should be started or not -daemon=yes - -if [ "$autoenable_daemons" = "no" ]; then - daemon=no -fi - -if [ "$autoenable_$service" = "no" ]; then - daemon=no -elif [ "$autoenable_$service" = "yes" ]; then - daemon=yes -fi - # Start service if [ "$daemon" = "yes" ]; then echo Starting $PKGINST ... if [ "$smf" = "yes" ]; then - /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 + load_smf_service_state "$FMRI/$service" + if [ "$SMF_STATE" = "enabled" ]; then + /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 + fi else # fix permissions temporarily since 644 is used until verification /usr/bin/chmod 744 /etc/init.d/$service @@ -251,6 +274,9 @@ fi fi +# we delete the smf state file as we don't need it anymore +rm -f "$SMF_STATE_FILE" + /usr/sbin/installf -f $PKGINST exit 0 Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-21 15:46:20 UTC (rev 4429) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-21 16:26:56 UTC (rev 4430) @@ -8,9 +8,35 @@ # 2008-04-21 First release # 2008-11-23 Fixed grep bug for FMRI # 2009-01-07 Fixed bug with multiple services per package +# 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), + Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable +# The following file is used to save the state of smf service upon +# package removal +# This allows to restore the service state across package upgrades. +SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" + +# The smf state file shouldn't be there at this time but we +# delete it to be sure +rm -f "$SMF_STATE_FILE" + +# save the current service state for the given frmi +save_smf_state () +{ + SMF_STATE=`/usr/sbin/svccfg -s "$1:default" listprop general/enabled | /usr/bin/awk '{ print $3 }'` + if [ "$SMF_STATE" != "true" ]; then + SMF_STATE="disabled" + else + SMF_STATE="enabled" + fi + [ -d "$SMF_STATE_DIR" ] || mkdir -p "$SMF_STATE_DIR" + echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" +} + + # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -41,8 +67,8 @@ for i in `echo $FMRI | tr '\n' ' '` do if [ "$smf" = "yes" ]; then - /usr/sbin/svcadm disable svc:/$i - sleep 1 + save_smf_state + /usr/sbin/svcadm -s disable svc:/$i # Unregister with SMF echo Unregister svc:/${i}:default with SMF ... /usr/sbin/svccfg delete -f svc:/${i}:default This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 18:36:14 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 16:36:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4431] csw/mgar/pkg/gcc4/trunk/ Message-ID: Revision: 4431 http://gar.svn.sourceforge.net/gar/?rev=4431&view=rev Author: valholla Date: 2009-04-21 16:36:14 +0000 (Tue, 21 Apr 2009) Log Message: ----------- add work cookies and download to ignore Property Changed: ---------------- csw/mgar/pkg/gcc4/trunk/ Property changes on: csw/mgar/pkg/gcc4/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Tue Apr 21 18:44:49 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Tue, 21 Apr 2009 16:44:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4432] csw/mgar/pkg/cswclassutils/trunk/files/ Message-ID: Revision: 4432 http://gar.svn.sourceforge.net/gar/?rev=4432&view=rev Author: bonivart Date: 2009-04-21 16:44:49 +0000 (Tue, 21 Apr 2009) Log Message: ----------- cswclassutils: set svn:ignore Property Changed: ---------------- csw/mgar/pkg/cswclassutils/trunk/files/ Property changes on: csw/mgar/pkg/cswclassutils/trunk/files ___________________________________________________________________ Added: svn:ignore + tmp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 19:56:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 17:56:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4433] csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/ Makefile Message-ID: Revision: 4433 http://gar.svn.sourceforge.net/gar/?rev=4433&view=rev Author: valholla Date: 2009-04-21 17:56:57 +0000 (Tue, 21 Apr 2009) Log Message: ----------- fix typo in description assignment Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-21 16:44:49 UTC (rev 4432) +++ csw/mgar/pkg/php5/trunk/extensions/php5_pdosqlite/Makefile 2009-04-21 17:56:57 UTC (rev 4433) @@ -3,7 +3,7 @@ PACKAGES += CSWphp5pdosqlite CATALOGNAME_CSWphp5pdosqlite = php5_pdosqlite -SPKG_DESC_CSWphp5pdoSqlite = A Sqlite specific database access abstraction module for PHP applications +SPKG_DESC_CSWphp5pdosqlite = A Sqlite specific database access abstraction module for PHP applications REQUIRED_PKGS_CSWphp5pdosqlite = CSWphp5 CSWphp5pdo CONFIGURE_ARGS += --with-pdo-sqlite=shared This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 19:59:49 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 17:59:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4434] csw/mgar/pkg/gcc4/trunk/files/package_def.mk Message-ID: Revision: 4434 http://gar.svn.sourceforge.net/gar/?rev=4434&view=rev Author: valholla Date: 2009-04-21 17:59:49 +0000 (Tue, 21 Apr 2009) Log Message: ----------- remove duplicate dependencies Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/package_def.mk Modified: csw/mgar/pkg/gcc4/trunk/files/package_def.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-21 17:56:57 UTC (rev 4433) +++ csw/mgar/pkg/gcc4/trunk/files/package_def.mk 2009-04-21 17:59:49 UTC (rev 4434) @@ -61,10 +61,10 @@ ## Define Dependencies COMMON_REQUIRE = CSWiconv CSWlibgmp CSWlibmpfr CSWggettextrt -REQUIRED_PKGS_CSWgcc4adart = CSWgcc4corert CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4adart = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4ada = CSWgcc4core CSWgcc4corert REQUIRED_PKGS_CSWgcc4ada += CSWgcc4adart $(COMMON_REQUIRE) -REQUIRED_PKGS_CSWgcc4corert = CSWggettextrt $(COMMON_REQUIRE) +REQUIRED_PKGS_CSWgcc4corert = $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4core = CSWgcc4corert CSWbinutils $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4g++rt = CSWgcc4corert $(COMMON_REQUIRE) REQUIRED_PKGS_CSWgcc4g++ = CSWgcc4core CSWgcc4corert This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 20:35:54 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 18:35:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4435] csw/mgar/pkg/sudo/trunk Message-ID: Revision: 4435 http://gar.svn.sourceforge.net/gar/?rev=4435&view=rev Author: valholla Date: 2009-04-21 18:35:54 +0000 (Tue, 21 Apr 2009) Log Message: ----------- package tweak Modified Paths: -------------- csw/mgar/pkg/sudo/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove Modified: csw/mgar/pkg/sudo/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo/trunk/Makefile 2009-04-21 17:59:49 UTC (rev 4434) +++ csw/mgar/pkg/sudo/trunk/Makefile 2009-04-21 18:35:54 UTC (rev 4435) @@ -31,8 +31,6 @@ REQUIRED_PKGS_CSWsudo-common = CSWggettextrt DISTFILES += CSWsudo-common.postinstall -DISTFILES += CSWsudo.postinstall -DISTFILES += CSWsudo.postremove CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-pam @@ -45,11 +43,10 @@ include gar/category.mk -PKGFILES_CSWsudo = .*$(bindir)/sudo.minimal +PKGFILES_CSWsudo = .*$(bindir)/sudo.* post-merge-modulated: - @( cd $(PKGROOT)$(bindir) ; gmv sudo sudo.minimal ) - @( cd $(PKGROOT)$(bindir) ; grm sudoedit ) + @( cd $(PKGROOT)$(bindir) ; gln -f sudo sudo.minimal ) @( cd $(PKGROOT)$(sysconfdir) ; gmv sudoers sudoers.CSW ) @( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* ) @$(MAKECOOKIE) Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-21 17:59:49 UTC (rev 4434) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall 2009-04-21 18:35:54 UTC (rev 4435) @@ -1,24 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -## First check to see if sudo.ldap is installed -## If it is make sure the liks are in place -## and permissions are set accordingly -if [ -f ${BINDIR}/sudo.ldap ]; then - chmod 4755 ${BINDIR}/sudo.ldap - if [ ! -f ${BINDIR}/sudo ]; then - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo - fi - if [ ! -f ${BINDIR}/sudoedit ]; then - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit - fi -else - rm -f ${BINDIR}/sudo - rm -f ${BINDIR}/sudoedit - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit -fi - -exit 0 - Deleted: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove =================================================================== --- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-21 17:59:49 UTC (rev 4434) +++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove 2009-04-21 18:35:54 UTC (rev 4435) @@ -1,15 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -rm -f ${BINDIR}/sudo -rm -f ${BINDIR}/sudoedit - -if [ -f ${BINDIR}/sudo.ldap ]; then - chmod 4755 ${BINDIR}/sudo.ldap - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo - ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit -fi - -exit 0 - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 21 20:40:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 21 Apr 2009 18:40:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4436] csw/mgar/pkg/sudo_ldap/trunk Message-ID: Revision: 4436 http://gar.svn.sourceforge.net/gar/?rev=4436&view=rev Author: valholla Date: 2009-04-21 18:40:11 +0000 (Tue, 21 Apr 2009) Log Message: ----------- package tweak Modified Paths: -------------- csw/mgar/pkg/sudo_ldap/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove Modified: csw/mgar/pkg/sudo_ldap/trunk/Makefile =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-21 18:35:54 UTC (rev 4435) +++ csw/mgar/pkg/sudo_ldap/trunk/Makefile 2009-04-21 18:40:11 UTC (rev 4436) @@ -12,8 +12,6 @@ MASTER_SITES = ftp://ftp.sudo.ws/pub/sudo/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += CSWsudoldap.postinstall -DISTFILES += CSWsudoldap.postremove PATCHFILES = install.diff # We define upstream file regex so we can be notifed of new Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall 2009-04-21 18:35:54 UTC (rev 4435) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postinstall 2009-04-21 18:40:11 UTC (rev 4436) @@ -1,11 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -rm -f ${BINDIR}/sudo -rm -f ${BINDIR}/sudoedit -ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo -ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit - -exit 0 - Deleted: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove =================================================================== --- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-21 18:35:54 UTC (rev 4435) +++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove 2009-04-21 18:40:11 UTC (rev 4436) @@ -1,14 +0,0 @@ -#!/bin/sh - -BINDIR=$BASEDIR/opt/csw/bin - -rm -f ${BINDIR}/sudo -rm -f ${BINDIR}/sudoedit - -if [ -f ${BINDIR}/sudo.minimal ]; then - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo - ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit -fi - -exit 0 - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Wed Apr 22 09:59:44 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Wed, 22 Apr 2009 07:59:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4437] csw/mgar/pkg/nsd/trunk Message-ID: Revision: 4437 http://gar.svn.sourceforge.net/gar/?rev=4437&view=rev Author: idogan23 Date: 2009-04-22 07:59:44 +0000 (Wed, 22 Apr 2009) Log Message: ----------- nsd: switched to dynamic gspec Modified Paths: -------------- csw/mgar/pkg/nsd/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec Modified: csw/mgar/pkg/nsd/trunk/Makefile =================================================================== --- csw/mgar/pkg/nsd/trunk/Makefile 2009-04-21 18:40:11 UTC (rev 4436) +++ csw/mgar/pkg/nsd/trunk/Makefile 2009-04-22 07:59:44 UTC (rev 4437) @@ -14,19 +14,21 @@ # uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES UPSTREAM_MASTER_SITES = http://www.nlnetlabs.nl/downloads/nsd/ +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +PACKAGES = CSWnsd +REQUIRED_PKGS = CSWcswclassutils CSWosslrt +CATALOGNAME = nsd +SPKG_DESC = An authoritative only non-recursive name server + DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWnsd,) DISTFILES += cswusergroup DISTFILES += cswnsd SPKG_CLASSES = none cswusergroup ugfiles cswcpsampleconf cswinitsmf PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswnsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/CSWnsd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } $$$$3 ~ /\/nsd\/nsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$2 = "ugfiles" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$5 = "nsd" } $$$$3 ~ /\/var\/opt\/csw\/nsd/ { $$$$6 = "nsd" } { print }' -REQUIRED_PKGS = CSWcswclassutils - -# We define upstream file regex so we can be notifed of new upstream software release -UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz - CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-ssl=/opt/csw CONFIGURE_ARGS += --with-pidfile=/var/run/nsd.pid Deleted: csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec =================================================================== --- csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec 2009-04-21 18:40:11 UTC (rev 4436) +++ csw/mgar/pkg/nsd/trunk/files/CSWnsd.gspec 2009-04-22 07:59:44 UTC (rev 4437) @@ -1,4 +0,0 @@ -%var bitname nsd -%var pkgname CSWnsd -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/LICENSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 22 10:09:54 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 22 Apr 2009 08:09:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4438] csw/mgar/pkg/geolitedb/trunk Message-ID: Revision: 4438 http://gar.svn.sourceforge.net/gar/?rev=4438&view=rev Author: bonivart Date: 2009-04-22 08:09:54 +0000 (Wed, 22 Apr 2009) Log Message: ----------- geolitedb: update to april db Modified Paths: -------------- csw/mgar/pkg/geolitedb/trunk/Makefile csw/mgar/pkg/geolitedb/trunk/checksums Added Paths: ----------- csw/mgar/pkg/geolitedb/trunk/files/COPYING Removed Paths: ------------- csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec Modified: csw/mgar/pkg/geolitedb/trunk/Makefile =================================================================== --- csw/mgar/pkg/geolitedb/trunk/Makefile 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/Makefile 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,13 +1,15 @@ GARNAME = geolitedb -GARVERSION = 090102 +GARVERSION = 090422 CATEGORIES = net DESCRIPTION = geolite country database MASTER_SITES = http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/ DISTFILES = GeoIP.dat.gz -DISTFILES += $(call admfiles,CSWgeolitedb) +DISTFILES += COPYING +ARCHALL = 1 + CONFIGURE_SCRIPTS = BUILD_SCRIPTS = TEST_SCRIPTS = @@ -16,12 +18,11 @@ include gar/category.mk WORKSRC = $(WORKDIR) -SPKG_SOURCEURL = http://www.maxmind.com/app/geolitecountry/ +SPKG_SOURCEURL = http://www.maxmind.com/app/geolitecountry install-custom: @echo " ==> Installing $(GARNAME)" @ginstall -d $(DESTDIR)/opt/csw/share/GeoIP @ginstall -d $(DESTDIR)/opt/csw/share/doc/geolitedb @cp -r $(WORKSRC)/GeoIP.dat $(DESTDIR)/opt/csw/share/GeoIP/ - @cp -r $(FILEDIR)/CSWgeolitedb.copyright $(DESTDIR)/opt/csw/share/doc/geolitedb/LICENSE @$(MAKECOOKIE) Modified: csw/mgar/pkg/geolitedb/trunk/checksums =================================================================== --- csw/mgar/pkg/geolitedb/trunk/checksums 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/checksums 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,2 +1,2 @@ -2a4efeae0f1326a2095aefe4d8428efd download/GeoIP.dat.gz -9b11bd2d3e31bab9229c369e6f9c8bb7 download/CSWgeolitedb.gspec +cd8d7820bebbb6f274fa426c12485f9e download/GeoIP.dat.gz +ed834df1fb6cb5056f5310b98fc71811 download/COPYING Added: csw/mgar/pkg/geolitedb/trunk/files/COPYING =================================================================== --- csw/mgar/pkg/geolitedb/trunk/files/COPYING (rev 0) +++ csw/mgar/pkg/geolitedb/trunk/files/COPYING 2009-04-22 08:09:54 UTC (rev 4438) @@ -0,0 +1,39 @@ +There are two licenses, one for the C library software, and one for +the database. + +SOFTWARE LICENSE (C library) + +The GeoIP C Library is licensed under the LGPL. For details see +the COPYING file. + +OPEN DATA LICENSE (GeoLite Country and GeoLite City databases) + +Copyright (c) 2008 MaxMind, Inc. All Rights Reserved. + +All advertising materials and documentation mentioning features or use of +this database must display the following acknowledgment: +"This product includes GeoLite data created by MaxMind, available from +http://maxmind.com/" + +Redistribution and use with or without modification, are permitted provided +that the following conditions are met: +1. Redistributions must retain the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other +materials provided with the distribution. +2. All advertising materials and documentation mentioning features or use of +this database must display the following acknowledgement: +"This product includes GeoLite data created by MaxMind, available from +http://maxmind.com/" +3. "MaxMind" may not be used to endorse or promote products derived from this +database without specific prior written permission. + +THIS DATABASE IS PROVIDED BY MAXMIND.COM ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MAXMIND.COM BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Deleted: csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright =================================================================== --- csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.copyright 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,39 +0,0 @@ -There are two licenses, one for the C library software, and one for -the database. - -SOFTWARE LICENSE (C library) - -The GeoIP C Library is licensed under the LGPL. For details see -the COPYING file. - -OPEN DATA LICENSE (GeoLite Country and GeoLite City databases) - -Copyright (c) 2008 MaxMind, Inc. All Rights Reserved. - -All advertising materials and documentation mentioning features or use of -this database must display the following acknowledgment: -"This product includes GeoLite data created by MaxMind, available from -http://maxmind.com/" - -Redistribution and use with or without modification, are permitted provided -that the following conditions are met: -1. Redistributions must retain the above copyright notice, this list of -conditions and the following disclaimer in the documentation and/or other -materials provided with the distribution. -2. All advertising materials and documentation mentioning features or use of -this database must display the following acknowledgement: -"This product includes GeoLite data created by MaxMind, available from -http://maxmind.com/" -3. "MaxMind" may not be used to endorse or promote products derived from this -database without specific prior written permission. - -THIS DATABASE IS PROVIDED BY MAXMIND.COM ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MAXMIND.COM BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Deleted: csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec =================================================================== --- csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec 2009-04-22 07:59:44 UTC (rev 4437) +++ csw/mgar/pkg/geolitedb/trunk/files/CSWgeolitedb.gspec 2009-04-22 08:09:54 UTC (rev 4438) @@ -1,8 +0,0 @@ -%var bitname geolitedb -%var pkgname CSWgeolitedb -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/geolitedb/LICENSE for license information. - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 22 15:34:01 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 22 Apr 2009 13:34:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4439] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4439 http://gar.svn.sourceforge.net/gar/?rev=4439&view=rev Author: bonivart Date: 2009-04-22 13:34:00 +0000 (Wed, 22 Apr 2009) Log Message: ----------- cswclassutils: minor fixes Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-22 13:34:00 UTC (rev 4439) @@ -29,6 +29,6 @@ @ginstall -d $(DESTDIR)/var/opt/csw/svc/method @cp $(FILEDIR)/CSW$(GARNAME).csw.smf.sample $(DESTDIR)/etc/opt/csw/init.d/csw.smf.sample @cp $(FILEDIR)/CSW$(GARNAME).README.CSW $(DESTDIR)$(docdir)/$(GARNAME)/README.CSW - @cp $(FILEDIR)/CSW$(GARNAME).copyright $(DESTDIR)$(docdir)/$(GARNAME)/LICENSE + @cp $(FILEDIR)/CSW$(GARNAME).copyright $(DESTDIR)$(docdir)/$(GARNAME)/license @$(foreach CAS,$(CASLIST),cp $(FILEDIR)/CSW$(GARNAME).i.$(CAS) $(DESTDIR)/usr/sadm/install/scripts/i.$(CAS);cp $(FILEDIR)/CSW$(GARNAME).r.$(CAS) $(DESTDIR)/usr/sadm/install/scripts/r.$(CAS);) @$(MAKECOOKIE) Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.gspec 2009-04-22 13:34:00 UTC (rev 4439) @@ -7,5 +7,5 @@ %depend %copyright -Please see /opt/csw/share/doc/cswclassutils/LICENSE for license information. +Please see /opt/csw/share/doc/cswclassutils/license for license information. Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-22 13:34:00 UTC (rev 4439) @@ -8,7 +8,7 @@ # 2008-04-21 First release # 2009-03-28 Added support for refresh # 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), - Persistent state across upgrades (Bug ID 0003634) +# Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.prototype 2009-04-22 13:34:00 UTC (rev 4439) @@ -19,4 +19,4 @@ d none /opt/csw/share/doc 0755 root bin d none /opt/csw/share/doc/cswclassutils 0755 root bin f none /opt/csw/share/doc/cswclassutils/README.CSW 0444 root bin -f none /opt/csw/share/doc/cswclassutils/LICENSE 0444 root bin +f none /opt/csw/share/doc/cswclassutils/license 0444 root bin Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-22 08:09:54 UTC (rev 4438) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-22 13:34:00 UTC (rev 4439) @@ -9,7 +9,7 @@ # 2008-11-23 Fixed grep bug for FMRI # 2009-01-07 Fixed bug with multiple services per package # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), - Persistent state across upgrades (Bug ID 0003634) +# Persistent state across upgrades (Bug ID 0003634) DEBUG= # clear to disable debug, set to anything to enable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Wed Apr 22 15:35:54 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Wed, 22 Apr 2009 13:35:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4440] csw/mgar/pkg/cswclassutils/trunk/checksums Message-ID: Revision: 4440 http://gar.svn.sourceforge.net/gar/?rev=4440&view=rev Author: bonivart Date: 2009-04-22 13:35:53 +0000 (Wed, 22 Apr 2009) Log Message: ----------- cswclassutils: checksum Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/checksums Modified: csw/mgar/pkg/cswclassutils/trunk/checksums =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/checksums 2009-04-22 13:34:00 UTC (rev 4439) +++ csw/mgar/pkg/cswclassutils/trunk/checksums 2009-04-22 13:35:53 UTC (rev 4440) @@ -1,2 +1,2 @@ -15e48f60e16862b94755b3205b666ab8 download/CSWcswclassutils.gspec -4527cc9b2dc1458845b55edff5b381bb download/CSWcswclassutils.prototype +38e0bf6e204e003254ed246df2b4e1f9 download/CSWcswclassutils.gspec +2779acb0e9549f5e3de16759f59d2e53 download/CSWcswclassutils.prototype This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 23 01:47:54 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 22 Apr 2009 23:47:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4441] csw/mgar/pkg/docbook-style-xsl/trunk/files/ CSWdocbookxsl.depend Message-ID: Revision: 4441 http://gar.svn.sourceforge.net/gar/?rev=4441&view=rev Author: bdwalton Date: 2009-04-22 23:47:54 +0000 (Wed, 22 Apr 2009) Log Message: ----------- remove old depend file (was unused) Removed Paths: ------------- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend Deleted: csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend =================================================================== --- csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend 2009-04-22 13:35:53 UTC (rev 4440) +++ csw/mgar/pkg/docbook-style-xsl/trunk/files/CSWdocbookxsl.depend 2009-04-22 23:47:54 UTC (rev 4441) @@ -1,6 +0,0 @@ -P CSWcommon common - common files and dirs for CSW packages -P CSWsgmlcommon sgmlcommon - A collection of entities and DTDs -P CSWxmlcommon xmlcommon - A collection of entities and DTDs -P CSWlibxml2 libxml2 - A library providing XML and HTML support -P CSWdocbookdtds docbookdtds - SGML and XML document type definitions for DocBook. - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Thu Apr 23 02:17:10 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Thu, 23 Apr 2009 00:17:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4442] csw/mgar/gar/v2/gar.lib.mk Message-ID: Revision: 4442 http://gar.svn.sourceforge.net/gar/?rev=4442&view=rev Author: bdwalton Date: 2009-04-23 00:17:10 +0000 (Thu, 23 Apr 2009) Log Message: ----------- When dynamic adm scripts are used, and the script is generated on a gmake run where the initial target was greater than extract, nested gmake calls were used. This saw the gmake[$nestlevel]: $path lines inserted in the script output files. The recursive gmake call now passes --no-print-directory explicitly to prevent this. Modified Paths: -------------- csw/mgar/gar/v2/gar.lib.mk Modified: csw/mgar/gar/v2/gar.lib.mk =================================================================== --- csw/mgar/gar/v2/gar.lib.mk 2009-04-22 23:47:54 UTC (rev 4441) +++ csw/mgar/gar/v2/gar.lib.mk 2009-04-23 00:17:10 UTC (rev 4442) @@ -86,7 +86,7 @@ $($(subst .,_,$*)) dynscr//%: - $(MAKE) -n _$@ > $(PARTIALDIR)/$* + $(MAKE) --no-print-directory -n _$@ > $(PARTIALDIR)/$* # download an http URL (colons omitted) http//%: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 10:07:46 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 08:07:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4443] csw/mgar/pkg/zsh/trunk/Makefile Message-ID: Revision: 4443 http://gar.svn.sourceforge.net/gar/?rev=4443&view=rev Author: dmichelsen Date: 2009-04-23 08:07:45 +0000 (Thu, 23 Apr 2009) Log Message: ----------- zsh: Fix CPPFLAGS Modified Paths: -------------- csw/mgar/pkg/zsh/trunk/Makefile Modified: csw/mgar/pkg/zsh/trunk/Makefile =================================================================== --- csw/mgar/pkg/zsh/trunk/Makefile 2009-04-23 00:17:10 UTC (rev 4442) +++ csw/mgar/pkg/zsh/trunk/Makefile 2009-04-23 08:07:45 UTC (rev 4443) @@ -31,4 +31,4 @@ # Use term.h from ncurses or we get compile errors # http://www.zsh.org/mla/workers/2007/msg01236.html -CFLAGS := -I$(includedir)/ncurses $(CFLAGS) +CPPFLAGS := -I$(includedir)/ncursesw $(CPPFLAGS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 23 10:49:15 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 23 Apr 2009 08:49:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4444] csw/mgar/pkg/amavisd-new/trunk Message-ID: Revision: 4444 http://gar.svn.sourceforge.net/gar/?rev=4444&view=rev Author: idogan23 Date: 2009-04-23 08:49:15 +0000 (Thu, 23 Apr 2009) Log Message: ----------- amavisd_new: update to 2.6.3 Modified Paths: -------------- csw/mgar/pkg/amavisd-new/trunk/Makefile csw/mgar/pkg/amavisd-new/trunk/checksums Modified: csw/mgar/pkg/amavisd-new/trunk/Makefile =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/Makefile 2009-04-23 08:07:45 UTC (rev 4443) +++ csw/mgar/pkg/amavisd-new/trunk/Makefile 2009-04-23 08:49:15 UTC (rev 4444) @@ -1,5 +1,5 @@ GARNAME = amavisd-new -GARVERSION = 2.6.2 +GARVERSION = 2.6.3 CATEGORIES = server DESCRIPTION = Interface between MTA and content checkers Modified: csw/mgar/pkg/amavisd-new/trunk/checksums =================================================================== --- csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-23 08:07:45 UTC (rev 4443) +++ csw/mgar/pkg/amavisd-new/trunk/checksums 2009-04-23 08:49:15 UTC (rev 4444) @@ -1,4 +1,4 @@ -0b3b0ef8771af8e4a950e7381d42adbd download/amavisd-new-2.6.2.tar.gz +02b0bd38b40258841c60479603dc6842 download/amavisd-new-2.6.3.tar.gz 979fd28f16513f660912311c3566786d download/CSWamavisdnew.gspec 1a54bc6b9d92afadc704c394cb93fa00 download/CSWamavisdnew.depend 65f66fb3036b7949057733aa99cff724 download/CSWamavisdnew.postinstall This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 23 12:03:59 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 23 Apr 2009 10:03:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4445] csw/mgar/pkg Message-ID: Revision: 4445 http://gar.svn.sourceforge.net/gar/?rev=4445&view=rev Author: idogan23 Date: 2009-04-23 10:03:59 +0000 (Thu, 23 Apr 2009) Log Message: ----------- pyzor: initial commit Added Paths: ----------- csw/mgar/pkg/pyzor/ csw/mgar/pkg/pyzor/branches/ csw/mgar/pkg/pyzor/tags/ csw/mgar/pkg/pyzor/trunk/ csw/mgar/pkg/pyzor/trunk/Makefile csw/mgar/pkg/pyzor/trunk/checksums csw/mgar/pkg/pyzor/trunk/files/ Property changes on: csw/mgar/pkg/pyzor/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/pyzor/trunk/Makefile =================================================================== --- csw/mgar/pkg/pyzor/trunk/Makefile (rev 0) +++ csw/mgar/pkg/pyzor/trunk/Makefile 2009-04-23 10:03:59 UTC (rev 4445) @@ -0,0 +1,36 @@ +GARNAME = pyzor +GARVERSION = 0.4.0 +CATEGORIES = utils + +DESCRIPTION = A collaborative, networked system to detect and block spam +define BLURB + Pyzor is a collaborative, networked system to detect and block spam using + identifying digests of messages. +endef + +MASTER_SITES = http://www.pyzor.org/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +# If the url used to check for software update is different of MASTER_SITES, then +# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES +# UPSTREAM_MASTER_SITES = + +PACKAGES = CSWpyzor +REQUIRED_PKGS = CSWpython +CATALOGNAME = pyzor +SPKG_DESC = A collaborative, networked system to detect and block spam + +ARCHALL = 1 + +CONFIGURE_SCRIPTS = +BUILD_SCRIPTS = $(WORKSRC)/setup.py +TEST_SCRIPTS = +INSTALL_SCRIPTS = $(WORKSRC)/setup.py + +INSTALL_ARGS += --root=$(DESTDIR) +INSTALL_ARGS += --prefix=$(prefix) + +include gar/category.mk Added: csw/mgar/pkg/pyzor/trunk/checksums =================================================================== --- csw/mgar/pkg/pyzor/trunk/checksums (rev 0) +++ csw/mgar/pkg/pyzor/trunk/checksums 2009-04-23 10:03:59 UTC (rev 4445) @@ -0,0 +1 @@ +ee7afe4cc9d419bce5f29250a01c4374 download/pyzor-0.4.0.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 13:30:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 11:30:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4446] csw/mgar/pkg/pkgconfig/trunk Message-ID: Revision: 4446 http://gar.svn.sourceforge.net/gar/?rev=4446&view=rev Author: dmichelsen Date: 2009-04-23 11:30:21 +0000 (Thu, 23 Apr 2009) Log Message: ----------- pkgconfig: Remove macro on manpage that breaks nroff. This fixes again #1747 Modified Paths: -------------- csw/mgar/pkg/pkgconfig/trunk/Makefile csw/mgar/pkg/pkgconfig/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch Modified: csw/mgar/pkg/pkgconfig/trunk/Makefile =================================================================== --- csw/mgar/pkg/pkgconfig/trunk/Makefile 2009-04-23 10:03:59 UTC (rev 4445) +++ csw/mgar/pkg/pkgconfig/trunk/Makefile 2009-04-23 11:30:21 UTC (rev 4446) @@ -23,7 +23,8 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -PATCHFILES = gsed-check.patch +PATCHFILES = gsed-check.patch +PATCHFILES += manpage-macro.patch REQUIRED_PKGS = CSWggettextrt CSWglib2 Modified: csw/mgar/pkg/pkgconfig/trunk/checksums =================================================================== --- csw/mgar/pkg/pkgconfig/trunk/checksums 2009-04-23 10:03:59 UTC (rev 4445) +++ csw/mgar/pkg/pkgconfig/trunk/checksums 2009-04-23 11:30:21 UTC (rev 4446) @@ -1,3 +1,4 @@ -d922a88782b64441d06547632fd85744 download/pkg-config-0.23.tar.gz 64d266fb8acf7df52088b9796f928b60 download/fixme.sh 8d47301467b9f5932f56562585ebc068 download/gsed-check.patch +73a8bc0d5ab5236dcb183460bc0311e4 download/manpage-macro.patch +d922a88782b64441d06547632fd85744 download/pkg-config-0.23.tar.gz Added: csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch =================================================================== --- csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch (rev 0) +++ csw/mgar/pkg/pkgconfig/trunk/files/manpage-macro.patch 2009-04-23 11:30:21 UTC (rev 4446) @@ -0,0 +1,29 @@ +diff -Naur pkg-config-0.23.orig/pkg-config.1 pkg-config-0.23.patched/pkg-config.1 +--- pkg-config-0.23.orig/pkg-config.1 2008-01-16 22:26:50.000000000 +0100 ++++ pkg-config-0.23.patched/pkg-config.1 2009-04-23 13:25:15.372832618 +0200 +@@ -3,25 +3,6 @@ + .\" (C) Red Hat, Inc. based on gnome-config man page (C) Miguel de Icaza (miguel at gnu.org) + .\" + . +-.\" Macros to disable groff line adjustment warnings that we can't easily +-.\" fix in the text. +-.ie \n(.g \{\ +-. de DW +-. nr .oldwarn \n[.warn] +-. warn 0 +-. . +-. de EW +-. warn \n[.oldwarn] +-. . +-.\} +-.el \ +-.\{ \ +-. de DW +-. . +-. de EW +-. . +-.\} +-. + .TH pkg-config 1 + .SH NAME + pkg-config \- Return metainformation about installed libraries This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 23 16:10:50 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 23 Apr 2009 14:10:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4447] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4447 http://gar.svn.sourceforge.net/gar/?rev=4447&view=rev Author: bonivart Date: 2009-04-23 14:10:50 +0000 (Thu, 23 Apr 2009) Log Message: ----------- cswclassutils: fix bugs in cswinitsmf Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 11:30:21 UTC (rev 4446) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 14:10:50 UTC (rev 4447) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.6 +GARVERSION = 1.7 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 11:30:21 UTC (rev 4446) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 14:10:50 UTC (rev 4447) @@ -9,6 +9,7 @@ # 2009-03-28 Added support for refresh # 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), # Persistent state across upgrades (Bug ID 0003634) +# 2009-04-22 Fix bug when starting packages with multiple services (Ihsan Dogan) DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc @@ -52,19 +53,6 @@ echo PACKAGE: $PKGINST SMF: $smf fi -# Determine if service should be started or not -daemon=yes - -if [ "$autoenable_daemons" = "no" ]; then - daemon=no -fi - -if [ "$autoenable_$service" = "no" ]; then - daemon=no -elif [ "$autoenable_$service" = "yes" ]; then - daemon=yes -fi - # Copy files, set up SMF echo "Installing class ..." @@ -74,6 +62,18 @@ echo SRC: $src DEST: $dest fi service="`basename $dest`" + + # Determine if service should be started or not + daemon=yes + if [ "$autoenable_daemons" = "no" ]; then + daemon=no + fi + if [ "$autoenable_$service" = "no" ]; then + daemon=no + elif [ "$autoenable_$service" = "yes" ]; then + daemon=yes + fi + if [ "$smf" = "yes" ]; then # Copy the service script /usr/bin/cp $src $dest || exit 2 @@ -197,6 +197,15 @@ /usr/sbin/svccfg import $SVCDIR/manifest/$FMRI/$service.xml > /dev/null 2>&1 /usr/sbin/svcadm disable svc:/$FMRI/$service > /dev/null 2>&1 echo $PKGINST is using Service Management Facility. The FMRI is svc:/$FMRI/$service:default + + # Start service + if [ "$daemon" = "yes" ]; then + load_smf_service_state "$FMRI/$service" + if [ "$SMF_STATE" = "enabled" ]; then + echo Enabling svc:/$FMRI/$service ... + /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 + fi + fi else # Copy the service script echo $dest @@ -255,25 +264,16 @@ /usr/sbin/installf -c cswinitsmf $PKGINST /etc/rc$i.d/S$RC_SNUM$service=/etc/init.d/$service s /bin/ln -s /etc/init.d/$service /etc/rc$i.d/S$RC_SNUM$service done + + # Start service + echo Starting $service ... + # fix permissions temporarily since 644 is used until verification + /usr/bin/chmod 744 /etc/init.d/$service + /etc/init.d/$service start > /dev/null 2>&1 fi fi done -# Start service -if [ "$daemon" = "yes" ]; then - echo Starting $PKGINST ... - if [ "$smf" = "yes" ]; then - load_smf_service_state "$FMRI/$service" - if [ "$SMF_STATE" = "enabled" ]; then - /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 - fi - else - # fix permissions temporarily since 644 is used until verification - /usr/bin/chmod 744 /etc/init.d/$service - /etc/init.d/$service start > /dev/null 2>&1 - fi -fi - # we delete the smf state file as we don't need it anymore rm -f "$SMF_STATE_FILE" Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 11:30:21 UTC (rev 4446) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 14:10:50 UTC (rev 4447) @@ -10,6 +10,7 @@ # 2009-01-07 Fixed bug with multiple services per package # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), # Persistent state across upgrades (Bug ID 0003634) +# 2009-04-22 Fixed bug when stopping non-SMF services DEBUG= # clear to disable debug, set to anything to enable @@ -36,7 +37,6 @@ echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" } - # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -61,21 +61,26 @@ fi # Stop service -echo Stopping $PKGINST ... -# Find out FMRI complete with service name -FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'` -for i in `echo $FMRI | tr '\n' ' '` -do - if [ "$smf" = "yes" ]; then +if [ "$smf" = "yes" ]; then + # Find out FMRI complete with service name + FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'` + for i in `echo $FMRI | tr '\n' ' '` + do save_smf_state + echo "Disabling svc:/$i ..." /usr/sbin/svcadm -s disable svc:/$i # Unregister with SMF echo Unregister svc:/${i}:default with SMF ... /usr/sbin/svccfg delete -f svc:/${i}:default - else - /etc/init.d/`basename $i` stop > /dev/null 2>&1 - fi -done + done +else + RC=`cat /var/sadm/install/contents | grep "s cswinitsmf" | grep ${PKGINST}$ | awk -F'=' '{print $1}'` + for i in `echo $RC | tr '\n' ' '` + do + echo Stopping $i ... + "$i" stop > /dev/null 2>&1 + done +fi # Remove files in class cswinitsmf echo "Removing class ..." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From idogan23 at users.sourceforge.net Thu Apr 23 17:34:14 2009 From: idogan23 at users.sourceforge.net (idogan23 at users.sourceforge.net) Date: Thu, 23 Apr 2009 15:34:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4448] csw/mgar/pkg/pyzor/trunk Message-ID: Revision: 4448 http://gar.svn.sourceforge.net/gar/?rev=4448&view=rev Author: idogan23 Date: 2009-04-23 15:34:14 +0000 (Thu, 23 Apr 2009) Log Message: ----------- pyzor: added patches to address several issues Modified Paths: -------------- csw/mgar/pkg/pyzor/trunk/Makefile csw/mgar/pkg/pyzor/trunk/checksums Added Paths: ----------- csw/mgar/pkg/pyzor/trunk/files/client.py.diff csw/mgar/pkg/pyzor/trunk/files/pyzor.diff csw/mgar/pkg/pyzor/trunk/files/pyzord.diff Modified: csw/mgar/pkg/pyzor/trunk/Makefile =================================================================== --- csw/mgar/pkg/pyzor/trunk/Makefile 2009-04-23 14:10:50 UTC (rev 4447) +++ csw/mgar/pkg/pyzor/trunk/Makefile 2009-04-23 15:34:14 UTC (rev 4448) @@ -11,6 +11,10 @@ MASTER_SITES = http://www.pyzor.org/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 +PATCHFILES = client.py.diff +PATCHFILES += pyzor.diff +PATCHFILES += pyzord.diff + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz Modified: csw/mgar/pkg/pyzor/trunk/checksums =================================================================== --- csw/mgar/pkg/pyzor/trunk/checksums 2009-04-23 14:10:50 UTC (rev 4447) +++ csw/mgar/pkg/pyzor/trunk/checksums 2009-04-23 15:34:14 UTC (rev 4448) @@ -1 +1,4 @@ +d933f0cc0013222f457cbe91ac400c75 download/client.py.diff ee7afe4cc9d419bce5f29250a01c4374 download/pyzor-0.4.0.tar.bz2 +7cf7db0609c5fcbca08e93d4521a964c download/pyzor.diff +b9d3960264af0633c8f784c36577920b download/pyzord.diff Added: csw/mgar/pkg/pyzor/trunk/files/client.py.diff =================================================================== --- csw/mgar/pkg/pyzor/trunk/files/client.py.diff (rev 0) +++ csw/mgar/pkg/pyzor/trunk/files/client.py.diff 2009-04-23 15:34:14 UTC (rev 4448) @@ -0,0 +1,490 @@ +diff --speed-large-files --minimal -Nru pyzor-0.4.0.orig/lib/pyzor/client.py pyzor-0.4.0/lib/pyzor/client.py +--- pyzor-0.4.0.orig/lib/pyzor/client.py 2002-09-08 22:37:15.000000000 +0200 ++++ pyzor-0.4.0/lib/pyzor/client.py 2009-04-23 16:48:08.485649396 +0200 +@@ -8,11 +8,21 @@ + import getopt + import tempfile + import mimetools ++import multifile + import sha + + import pyzor + from pyzor import * + ++import warnings ++ ++def fxn(): ++ warnings.warn("deprecated", DeprecationWarning) ++ ++with warnings.catch_warnings(): ++ warnings.simplefilter("ignore") ++ fxn() ++ + __author__ = pyzor.__author__ + __version__ = pyzor.__version__ + __revision__ = "$Id: client.py,v 1.41 2002/09/08 20:37:15 ftobin Exp $" +@@ -58,11 +68,6 @@ + self.send(msg, address) + return self.read_response(msg.get_thread()) + +- def shutdown(self, address): +- msg = ShutdownRequest() +- self.send(msg, address) +- return self.read_response(msg.get_thread()) +- + def build_socket(self): + self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + +@@ -132,39 +137,50 @@ + + def run(self): + debug = 0 +- (options, args) = getopt.getopt(sys.argv[1:], 'dh:', ['homedir=']) +- if len(args) < 1: +- self.usage() +- + specified_homedir = None ++ options = None ++ log = None ++ ++ try: ++ (options, args) = getopt.getopt(sys.argv[1:], 'd', ['homedir=', 'log']) ++ except getopt.GetoptError: ++ self.usage() ++ ++ if len(args) < 1: ++ self.usage() + + for (o, v) in options: + if o == '-d': + debug = 1 +- elif o == '-h': +- self.usage() + elif o == '--homedir': + specified_homedir = v ++ elif o == '--log': ++ log = 1 + + self.output = Output(debug=debug) +- + homedir = pyzor.get_homedir(specified_homedir) +- ++ ++ if log: ++ sys.stderr = open(homedir + "/pyzor.log", 'a') ++ sys.stderr.write("\npyzor[" + repr (os.getpid()) + "]:\n") ++ + config = pyzor.Config(homedir) + config.add_section('client') + +- defaults = {'ServersFile': 'servers', ++ defaults = {'ServersFile': 'servers', + 'DiscoverServersURL': ServerList.inform_url, +- 'AccountsFile' : 'accounts', ++ 'AccountsFile': 'accounts', ++ 'Timeout': str(Client.timeout), + } + + for k, v in defaults.items(): + config.set('client', k, v) +- ++ + config.read(os.path.join(homedir, 'config')) + + servers_fn = config.get_filename('client', 'ServersFile') +- ++ Client.timeout = config.getint('client', 'Timeout') ++ + if not os.path.exists(homedir): + os.mkdir(homedir) + +@@ -197,10 +213,13 @@ + def usage(self, s=None): + if s is not None: + sys.stderr.write("%s\n" % s) +- sys.stderr.write("""usage: %s [-d] [--homedir dir] command [cmd_opts] ++ sys.stderr.write(""" ++usage: %s [-d] [--homedir dir] command [cmd_opts] + command is one of: check, report, discover, ping, digest, predigest, +- genkey, shutdown ++ genkey ++ + Data is read on standard input (stdin). ++ + """ + % sys.argv[0]) + sys.exit(2) +@@ -208,9 +227,9 @@ + + + def ping(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ getopt.getopt(args[1:], '') ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + + runner = ClientRunner(self.client.ping) +@@ -221,30 +240,23 @@ + return runner.all_ok + + +- def shutdown(self, args): +- (opts, args2) = getopt.getopt(args[1:], '') +- +- if len(args2) > 1: ++ def info(self, args): ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + +- runner = ClientRunner(self.client.shutdown) +- +- for arg in args2: +- server = Address.from_str(arg) +- runner.run(server, (server,)) +- +- return runner.all_ok +- ++ do_mbox = 'msg' + +- def info(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: +- self.usage("%s does not take any non-option arguments" % args[0]) ++ for (o, v) in options: ++ if o == '--mbox': ++ do_mbox = 'mbox' + + runner = InfoClientRunner(self.client.info) + +- for digest in FileDigester(sys.stdin, self.digest_spec): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + for server in self.servers: + response = runner.run(server, (digest, server)) + +@@ -252,34 +264,45 @@ + + + def check(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + ++ do_mbox = 'msg' ++ ++ for (o, v) in options: ++ if o == '--mbox': ++ do_mbox = 'mbox' ++ + runner = CheckClientRunner(self.client.check) + +- for digest in FileDigester(sys.stdin, self.digest_spec): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + for server in self.servers: +- response = runner.run(server, (digest, server)) ++ runner.run(server, (digest, server)) + + return (runner.found_hit and not runner.whitelisted) + + + def report(self, args): +- (options, args2) = getopt.getopt(args[1:], '', ['mbox']) +- do_mbox = False +- +- if len(args2) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + ++ do_mbox = 'msg' ++ + for (o, v) in options: + if o == '--mbox': +- do_mbox = True ++ do_mbox = 'mbox' + + all_ok = True + +- for digest in FileDigester(sys.stdin, self.digest_spec, do_mbox): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + if not self.send_digest(digest, self.digest_spec, + self.client.report): + all_ok = False +@@ -302,20 +325,22 @@ + + + def whitelist(self, args): +- (options, args2) = getopt.getopt(args[1:], '', ['mbox']) +- +- if len(args2) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + +- do_mbox = False ++ do_mbox = 'msg' + + for (o, v) in options: + if o == '--mbox': +- do_mbox = True ++ do_mbox = 'mbox' + + all_ok = True + +- for digest in FileDigester(sys.stdin, self.digest_spec, do_mbox): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + if not self.send_digest(digest, self.digest_spec, + self.client.whitelist): + all_ok = False +@@ -324,32 +349,34 @@ + + + def digest(self, args): +- (options, args2) = getopt.getopt(args[1:], '', ['mbox']) +- +- if len(args2) > 1: ++ try: ++ (options, args2) = getopt.getopt(args[1:], '', ['mbox']) ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + +- +- do_mbox = False ++ do_mbox = 'msg' + + for (o, v) in options: + if o == '--mbox': +- do_mbox = True ++ do_mbox = 'mbox' + +- for digest in FileDigester(sys.stdin, self.digest_spec, do_mbox): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): ++ if digest is None: ++ continue + sys.stdout.write("%s\n" % digest) + + return True + + + def print_digested(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ getopt.getopt(args[1:], '') ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + ++ do_mbox = 'msg' + def loop(): +- for digest in FileDigester(sys.stdin, self.digest_spec): ++ for digest in get_input_handler(sys.stdin, self.digest_spec, do_mbox): + pass + + modglobal_apply(globals(), {'DataDigester': PrintingDataDigester}, +@@ -358,9 +385,9 @@ + return True + + def genkey(self, args): +- getopt.getopt(args[1:], '') +- +- if len(args) > 1: ++ try: ++ getopt.getopt(args[1:], '') ++ except getopt.GetoptError: + self.usage("%s does not take any non-option arguments" % args[0]) + + import getpass +@@ -414,7 +441,6 @@ + 'report': report, + 'ping' : ping, + 'genkey': genkey, +- 'shutdown': shutdown, + 'info': info, + 'whitelist': whitelist, + 'digest': digest, +@@ -466,7 +492,7 @@ + + (fp, offsets) = self.get_line_offsets(fp) + +- # did we get an empty file? ++ # did we get an empty (parsed output)file? + if len(offsets) == 0: + return + +@@ -608,30 +634,36 @@ + + + +-class FileDigester(BasicIterator): +- __slots__ = ['digester'] +- +- def __init__(self, fp, spec, mbox=False): +- self.digester = iter(get_file_digester(fp, spec, mbox)) +- self.output = pyzor.Output() +- +- def next(self): +- digest = self.digester.next() +- self.output.debug("calculated digest: %s" % digest) +- return digest +- +- +- +-def get_file_digester(fp, spec, mbox, seekable=False): ++def get_input_handler(fp, spec, style='msg', seekable=False): + """Return an object that can be iterated over + to get all the digests from fp according to spec. + mbox is a boolean""" +- if mbox: ++ if style == 'msg': ++ return filter(lambda x: x is not None, ++ (DataDigester(rfc822BodyCleaner(fp), ++ spec, seekable).get_digest(),) ++ ) ++ ++ elif style =='mbox': + return MailboxDigester(fp, spec) + +- return (DataDigester(rfc822BodyCleaner(fp), +- spec, seekable).get_digest(),) ++ elif style == 'digests': ++ return JustDigestsIterator(fp) ++ ++ raise ValueError, "unknown input style" ++ ++ ++class JustDigestsIterator(BasicIterator): ++ __slots__ = ['fp'] ++ ++ def __init__(self, fp): ++ self.fp = fp + ++ def next(self): ++ l = fp.readline() ++ if not l: ++ raise StopIteration ++ return l.rstrip() + + + class MailboxDigester(BasicIterator): +@@ -645,7 +677,12 @@ + self.seekable = seekable + + def next(self): +- next_msg = self.mbox.next() ++ try: ++ next_msg = self.mbox.next() ++ except IOError: ++ print "Error: Please feed mailbox files in on stdin, i.e." ++ print " pyzor digest --mbox < my_mbox_file" ++ next_msg = None + if next_msg is None: + raise StopIteration + return DataDigester(next_msg, self.digest_spec, +@@ -662,39 +699,69 @@ + self.multifile = None + self.curfile = None + ++ # Check if we got a mail or not. Set type to binary if there is no 'From:' header and ++ # type text/plain with encoding 7bit. 7bit is passed trough anyway so nobody cares. ++ if (not msg.has_key("From") and self.type == 'text' and msg.subtype == 'plain' and msg.getencoding() == '7bit'): ++ self.type = 'binary'; ++ ++ if self.type is '': ++ self.type = 'text'; ++ + if self.type == 'text': + encoding = msg.getencoding() +- if encoding == '7bit': +- self.curfile = msg.fp +- else: +- self.curfile = tempfile.TemporaryFile() +- mimetools.decode(msg.fp, self.curfile, encoding) +- self.curfile.seek(0) +- ++ self.curfile = msg.fp ++ if encoding != '7bit': ++ # fix bad encoding name ++ if encoding == '8bits': ++ encoding = '8bit' ++ try: ++ newcurfile = tempfile.TemporaryFile() ++ mimetools.decode(msg.fp, newcurfile, encoding) ++ newcurfile.seek(0) ++ self.curfile = newcurfile ++ except: ++ # ignore encoding on errors, pass msg as is ++ pass ++ + elif self.type == 'multipart': + import multifile + self.multifile = multifile.MultiFile(msg.fp, seekable=False) + self.multifile.push(msg.getparam('boundary')) +- self.multifile.next() +- self.curfile = self.__class__(self.multifile) +- ++ try: ++ self.multifile.next() ++ self.curfile = self.__class__(self.multifile) ++ except: ++ # ++ # Catch multipart decoding errors ++ # ++ fp.seek(0) ++ self.curfile = fp ++ self.type = 'binary' + + if self.type == 'text' or self.type == 'multipart': + assert self.curfile is not None ++ elif self.type == 'binary': ++ try: ++ fp.seek(0) ++ except: ++ pass ++ self.curfile = fp + else: + assert self.curfile is None + + + def readline(self): + l = '' +- if self.type in ('text', 'multipart'): +- l = self.curfile.readline() +- +- if self.type == 'multipart' and not l and self.multifile.next(): +- self.curfile = self.__class__(self.multifile) +- # recursion. Could get messy if +- # we get a bunch of empty multifile parts +- l = self.readline() ++ try: ++ if self.type in ('text', 'multipart', 'binary'): ++ l = self.curfile.readline() ++ if self.type == 'multipart' and not l and self.multifile.next(): ++ self.curfile = self.__class__(self.multifile) ++ # recursion. Could get messy if ++ # we get a bunch of empty multifile parts ++ l = self.readline() ++ except (TypeError, multifile.Error): ++ pass + return l + + Added: csw/mgar/pkg/pyzor/trunk/files/pyzor.diff =================================================================== --- csw/mgar/pkg/pyzor/trunk/files/pyzor.diff (rev 0) +++ csw/mgar/pkg/pyzor/trunk/files/pyzor.diff 2009-04-23 15:34:14 UTC (rev 4448) @@ -0,0 +1,9 @@ +diff --speed-large-files --minimal -Nru pyzor-0.4.0.orig/scripts/pyzor pyzor-0.4.0/scripts/pyzor +--- pyzor-0.4.0.orig/scripts/pyzor 2002-06-09 01:24:20.000000000 +0200 ++++ pyzor-0.4.0/scripts/pyzor 2009-04-23 17:24:58.103657953 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2 ++#!/usr/bin/python2 -Wignore::DeprecationWarning + + import pyzor.client + pyzor.client.run() Added: csw/mgar/pkg/pyzor/trunk/files/pyzord.diff =================================================================== --- csw/mgar/pkg/pyzor/trunk/files/pyzord.diff (rev 0) +++ csw/mgar/pkg/pyzor/trunk/files/pyzord.diff 2009-04-23 15:34:14 UTC (rev 4448) @@ -0,0 +1,9 @@ +diff --speed-large-files --minimal -Nru pyzor-0.4.0.orig/scripts/pyzord pyzor-0.4.0/scripts/pyzord +--- pyzor-0.4.0.orig/scripts/pyzord 2002-09-08 05:33:44.000000000 +0200 ++++ pyzor-0.4.0/scripts/pyzord 2009-04-23 17:30:57.922301138 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2 ++#!/usr/bin/python2 -Wignore::DeprecationWarning + + import os + import os.path This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 23 18:19:07 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 23 Apr 2009 16:19:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4449] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4449 http://gar.svn.sourceforge.net/gar/?rev=4449&view=rev Author: bonivart Date: 2009-04-23 16:19:06 +0000 (Thu, 23 Apr 2009) Log Message: ----------- cswclassutils: add Id tags Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-23 16:19:06 UTC (rev 4449) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.7 +GARVERSION = 1.8 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW 2009-04-23 16:19:06 UTC (rev 4449) @@ -36,3 +36,6 @@ the home directories to be created and/or removed during install/remove. Read more on the wiki: http://wiki.opencsw.org/cswclassutils-package. + +-- +$Id$ Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # Sample init script # +# $Id$ +# # Original concept by Philip Brown # Written by Peter Bonivart # Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # i.cswinitsmf - Class action script for CSW SMF support # +# $Id$ +# # Original concept by Philip Brown # Written by Peter Bonivart # Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # i.cswusergroup - Class action script for creating users and groups # +# $Id$ +# # Written by Peter Bonivart # # 2009-02-10 First release Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # r.cswinitsmf - Class action script for CSW SMF support # +# $Id$ +# # Original concept by Philip Brown # Written by Peter Bonivart # @@ -10,7 +12,7 @@ # 2009-01-07 Fixed bug with multiple services per package # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), # Persistent state across upgrades (Bug ID 0003634) -# 2009-04-22 Fixed bug when stopping non-SMF services +# 2009-04-23 Fixed bug when stopping non-SMF services DEBUG= # clear to disable debug, set to anything to enable @@ -74,7 +76,7 @@ /usr/sbin/svccfg delete -f svc:/${i}:default done else - RC=`cat /var/sadm/install/contents | grep "s cswinitsmf" | grep ${PKGINST}$ | awk -F'=' '{print $1}'` + RC=`cat /var/sadm/install/contents | grep "^/etc/init.d" | grep "s cswinitsmf" | grep ${PKGINST}$ | awk -F'=' '{print $1}'` for i in `echo $RC | tr '\n' ' '` do echo Stopping $i ... Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup 2009-04-23 15:34:14 UTC (rev 4448) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup 2009-04-23 16:19:06 UTC (rev 4449) @@ -2,6 +2,8 @@ # # r.cswusergroup - Class action script for removing users and groups # +# $Id$ +# # Written by Peter Bonivart # # 2009-02-10 First release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Thu Apr 23 18:28:16 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Thu, 23 Apr 2009 16:28:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4450] csw/mgar/pkg/cswclassutils/trunk/files Message-ID: Revision: 4450 http://gar.svn.sourceforge.net/gar/?rev=4450&view=rev Author: bonivart Date: 2009-04-23 16:28:16 +0000 (Thu, 23 Apr 2009) Log Message: ----------- cswclassutils: set keyword prop Property Changed: ---------------- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.README.CSW ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswusergroup ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf ___________________________________________________________________ Added: svn:keywords + Id Property changes on: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswusergroup ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 22:36:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 20:36:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4451] csw/mgar/pkg Message-ID: Revision: 4451 http://gar.svn.sourceforge.net/gar/?rev=4451&view=rev Author: dmichelsen Date: 2009-04-23 20:36:05 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Initial checkin Added Paths: ----------- csw/mgar/pkg/rcs/ csw/mgar/pkg/rcs/branches/ csw/mgar/pkg/rcs/tags/ csw/mgar/pkg/rcs/trunk/ csw/mgar/pkg/rcs/trunk/Makefile csw/mgar/pkg/rcs/trunk/checksums csw/mgar/pkg/rcs/trunk/files/ Property changes on: csw/mgar/pkg/rcs/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile (rev 0) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 20:36:05 UTC (rev 4451) @@ -0,0 +1,17 @@ +GARNAME = rcs +GARVERSION = 5.7 +CATEGORIES = apps + +DESCRIPTION = GNU Revision Control System +define BLURB +endef + +MASTER_SITES = http://www.cs.purdue.edu/homes/trinkle/RCS/ +DISTFILES = $(GARNAME)-$(GARVERSION).tar.Z + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +CONFIGURE_ARGS = --prefix=$(prefix) + +include gar/category.mk Added: csw/mgar/pkg/rcs/trunk/checksums =================================================================== --- csw/mgar/pkg/rcs/trunk/checksums (rev 0) +++ csw/mgar/pkg/rcs/trunk/checksums 2009-04-23 20:36:05 UTC (rev 4451) @@ -0,0 +1 @@ +423282f0edb353296d9f3498ab683abf /root/mgar/pkg/rcs/trunk/work-i386/download/rcs-5.7.tar.Z This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 23:07:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:07:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4452] csw/mgar/pkg/rcs/trunk Message-ID: Revision: 4452 http://gar.svn.sourceforge.net/gar/?rev=4452&view=rev Author: dmichelsen Date: 2009-04-23 21:07:31 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Minor fixes Modified Paths: -------------- csw/mgar/pkg/rcs/trunk/Makefile csw/mgar/pkg/rcs/trunk/checksums Modified: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 20:36:05 UTC (rev 4451) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:07:31 UTC (rev 4452) @@ -12,6 +12,13 @@ # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +man1dir = $(mandir)/man1 +man5dir = $(mandir)/man5 + CONFIGURE_ARGS = --prefix=$(prefix) +TEST_TARGET = + +INSTALL_OVERRIDE_DIRS = prefix man1dir man5dir + include gar/category.mk Modified: csw/mgar/pkg/rcs/trunk/checksums =================================================================== --- csw/mgar/pkg/rcs/trunk/checksums 2009-04-23 20:36:05 UTC (rev 4451) +++ csw/mgar/pkg/rcs/trunk/checksums 2009-04-23 21:07:31 UTC (rev 4452) @@ -1 +1 @@ -423282f0edb353296d9f3498ab683abf /root/mgar/pkg/rcs/trunk/work-i386/download/rcs-5.7.tar.Z +423282f0edb353296d9f3498ab683abf download/rcs-5.7.tar.Z This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 23:11:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:11:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4453] csw/mgar/pkg/rcs/trunk/Makefile Message-ID: Revision: 4453 http://gar.svn.sourceforge.net/gar/?rev=4453&view=rev Author: dmichelsen Date: 2009-04-23 21:11:01 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Skip runpath Modified Paths: -------------- csw/mgar/pkg/rcs/trunk/Makefile Modified: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:07:31 UTC (rev 4452) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:11:01 UTC (rev 4453) @@ -15,9 +15,10 @@ man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 +NORUNPATH = 1 CONFIGURE_ARGS = --prefix=$(prefix) -TEST_TARGET = +TEST_TARGET = check INSTALL_OVERRIDE_DIRS = prefix man1dir man5dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 23 23:18:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:18:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4454] csw/mgar/pkg/rcs/trunk/Makefile Message-ID: Revision: 4454 http://gar.svn.sourceforge.net/gar/?rev=4454&view=rev Author: dmichelsen Date: 2009-04-23 21:18:09 +0000 (Thu, 23 Apr 2009) Log Message: ----------- rcs: Fix test target Modified Paths: -------------- csw/mgar/pkg/rcs/trunk/Makefile Modified: csw/mgar/pkg/rcs/trunk/Makefile =================================================================== --- csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:11:01 UTC (rev 4453) +++ csw/mgar/pkg/rcs/trunk/Makefile 2009-04-23 21:18:09 UTC (rev 4454) @@ -18,7 +18,7 @@ NORUNPATH = 1 CONFIGURE_ARGS = --prefix=$(prefix) -TEST_TARGET = check +TEST_TARGET = INSTALL_OVERRIDE_DIRS = prefix man1dir man5dir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 23 23:19:20 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:19:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4455] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4455 http://gar.svn.sourceforge.net/gar/?rev=4455&view=rev Author: valholla Date: 2009-04-23 21:19:20 +0000 (Thu, 23 Apr 2009) Log Message: ----------- checkin for php5_apache2 Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.preremove csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.space csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/httpd-php5.conf.CSW Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend 2009-04-23 21:19:20 UTC (rev 4455) @@ -0,0 +1,9 @@ +P CSWap2prefork ap2_prefork - Apache 2.2 prefork MPM +P CSWbdb44 berkeleydb44 - embedded database libraries and utilities +P CSWiconv libiconv - GNU iconv library +P CSWkrb5lib krb5_lib - MIT Kerberos 5 core libraries +P CSWlibmm libmm - Shared Memory Allocation abstraction library +P CSWlibxml2 libxml2 - XML Parser Library +P CSWosslrt openssl_rt - Openssl runtime libraries +P CSWphp5 php5 - PHP Hypertext Processor 5 +P CSWzlib zlib - Zlib Data Compression Library Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall 2009-04-23 21:19:20 UTC (rev 4455) @@ -0,0 +1,50 @@ +#!/bin/sh + +CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw +AP2_PREFIX=$CSW_PREFIX/apache2 +AP2_BINDIR=$AP2_PREFIX/sbin +AP2_LIBEXEC=$AP2_PREFIX/libexec +AP2_CONFDIR=$AP2_PREFIX/etc +AP2_EXTRADIR=$AP2_CONFDIR/extra +AP2_CONFIG=$AP2_CONFDIR/httpd.conf + +# Enable the PHP module +PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'} +chroot $PKG_INSTALL_ROOT \ + $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -a -n php5 libphp5.so + +# Configure mod_php5 in httpd.conf +if [ -n "`egrep 'IfModule (mod_php|php_module)' $AP2_CONFIG`" ] +then + echo "Existing mod_php5 configuration detected" +elif [ -n "`egrep '#Include etc/extra/httpd-php5.conf' $AP2_CONFIG`" ]; then + echo "Re-enabling existing config" + perl -i -plne 's,^#(Include etc/extra/httpd-php5.conf),$1,' $AP2_CONFIG +else + echo "Adding Include for extra/http-php5.conf to httpd.conf" + cat << END >> $AP2_CONFIG + +Include etc/extra/httpd-php5.conf +END +fi + +# Copy templates +for file in $AP2_EXTRADIR/httpd-php5.conf +do + if [ ! -f $file ]; then + echo "Creating $file" + cp $file.CSW $file + else + echo "Preserving existing $file" + fi +done + +# Finito +cat < + + AddType application/x-httpd-php .php + AddType application/x-httpd-php-source .phps + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 23 23:51:13 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 21:51:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4456] csw/mgar/pkg/php5/trunk/extensions Message-ID: Revision: 4456 http://gar.svn.sourceforge.net/gar/?rev=4456&view=rev Author: valholla Date: 2009-04-23 21:51:13 +0000 (Thu, 23 Apr 2009) Log Message: ----------- commit php5_apache Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/ csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.preremove csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.space Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:51:13 UTC (rev 4456) @@ -0,0 +1,14 @@ +PHP5EXT_NAME = ap2_modphp5 + +PACKAGES += CSWap2modphp5 + +CATALOGNAME_CSWap2modphp5 = ap2_modphp5 +SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 1.3.x Module +REQUIRED_PKGS_CSWap2modphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib + + +CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs + +PKGFILES_CSWap2modphp5 = .*/csw/apache/.* + Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/files/CSWmodphp5.postinstall 2009-04-23 21:51:13 UTC (rev 4456) @@ -0,0 +1,41 @@ +#!/bin/sh + +CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw +AP_PREFIX=$CSW_PREFIX/apache +AP_BINDIR=$AP_PREFIX/bin +AP_LIBEXEC=$AP_PREFIX/libexec +AP_CONFDIR=$AP_PREFIX/conf +AP_CONFIG=$AP_CONFDIR/httpd.conf + +# Enable the PHP module +PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'} +chroot $PKG_INSTALL_ROOT \ + $AP_BINDIR/apxs -S LIBEXECDIR=$AP_LIBEXEC -e -a -n php5 libphp5.so + +# Add a configuration sample +if [ -z "`grep 'IfModule mod_php5.c' $AP_CONFIG`" ]; then + cp $AP_CONFIG $AP_CONFIG.pre-PHP5 + + echo "Adding libphp5 configuration to $AP_CONFIG..." + cat <> $AP_CONFIG + +# Added by $PKGINST + + + AddType application/x-httpd-php .php + AddType application/x-httpd-php-source .phps + + +CONFIG + +fi + +# Finito +cat < Revision: 4457 http://gar.svn.sourceforge.net/gar/?rev=4457&view=rev Author: valholla Date: 2009-04-23 21:54:16 +0000 (Thu, 23 Apr 2009) Log Message: ----------- fix package name for mod_php5 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:51:13 UTC (rev 4456) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:54:16 UTC (rev 4457) @@ -1,14 +1,14 @@ -PHP5EXT_NAME = ap2_modphp5 +PHP5EXT_NAME = mod_php5 -PACKAGES += CSWap2modphp5 +PACKAGES += CSWmodphp5 -CATALOGNAME_CSWap2modphp5 = ap2_modphp5 -SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 1.3.x Module -REQUIRED_PKGS_CSWap2modphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib -REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +CATALOGNAME_CSWmodphp5 = mod_php5 +SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module +REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs -PKGFILES_CSWap2modphp5 = .*/csw/apache/.* +PKGFILES_CSWmodphp5 = .*/csw/apache/.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 00:17:30 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 22:17:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4458] csw/mgar/pkg/php5/trunk/extensions/php5_apache/ Makefile Message-ID: Revision: 4458 http://gar.svn.sourceforge.net/gar/?rev=4458&view=rev Author: valholla Date: 2009-04-23 22:17:30 +0000 (Thu, 23 Apr 2009) Log Message: ----------- can't compile apache 1 and 2 modules together ;( Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 21:54:16 UTC (rev 4457) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 22:17:30 UTC (rev 4458) @@ -1,14 +1,13 @@ PHP5EXT_NAME = mod_php5 -PACKAGES += CSWmodphp5 +#PACKAGES += CSWmodphp5 CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +#DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space +#CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs +#PKGFILES_CSWmodphp5 = .*/csw/apache/.* -CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs - -PKGFILES_CSWmodphp5 = .*/csw/apache/.* - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 00:18:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 23 Apr 2009 22:18:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4459] csw/mgar/pkg/php5/trunk/checksums Message-ID: Revision: 4459 http://gar.svn.sourceforge.net/gar/?rev=4459&view=rev Author: valholla Date: 2009-04-23 22:18:12 +0000 (Thu, 23 Apr 2009) Log Message: ----------- can't compile apache 1 and 2 modules together ;( Modified Paths: -------------- csw/mgar/pkg/php5/trunk/checksums Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-23 22:17:30 UTC (rev 4458) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-23 22:18:12 UTC (rev 4459) @@ -1,13 +1,18 @@ -280d6cda7f72a4fc6de42fda21ac2db7 download/php-5.2.9.tar.bz2 -160963de6006c558963e5bc37584bf15 download/php.ini.CSW -90ae3cef3692d7e566c47d89fe39c43d download/phpext -d4c93751890b989c5a7b04acb5845fd9 download/pear.conf.CSW +77076f9a0bab2777c15b84c4c0bd7ba4 download/CSWap2modphp5.depend +632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall +e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove +0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space +8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall +89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh de56d3571f4484284d106af158bffc38 download/CSWphp5_ext_enable.sh -89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh -8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall +ab08e2ba62667bf13fa236099e433e84 download/configure.diff 41ec540885de7c34625768aa1fb9682b download/fixme.sh -ab08e2ba62667bf13fa236099e433e84 download/configure.diff -a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff +a71677d80f5cfd1aeb03547dfdeb705a download/httpd-php5.conf.CSW 2206431e47c2075c0b9c4a12de5cf791 download/odbc.diff 230126f76ee6400ccf225bb6a8243532 download/pdopgsql.diff +d4c93751890b989c5a7b04acb5845fd9 download/pear.conf.CSW 13db46097c9686302bebf160e2d26ed2 download/pgsql.diff +280d6cda7f72a4fc6de42fda21ac2db7 download/php-5.2.9.tar.bz2 +a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff +160963de6006c558963e5bc37584bf15 download/php.ini.CSW +90ae3cef3692d7e566c47d89fe39c43d download/phpext This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:13:14 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:13:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4460] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4460 http://gar.svn.sourceforge.net/gar/?rev=4460&view=rev Author: valholla Date: 2009-04-24 02:13:14 +0000 (Fri, 24 Apr 2009) Log Message: ----------- mod_php added to extensions to build with base php Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/checksums csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-23 22:18:12 UTC (rev 4459) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 02:13:14 UTC (rev 4460) @@ -88,6 +88,10 @@ # SAPI Specific Rules STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec +# Rebuild Configure Args to build mod_php5 +NEW_CONFIGURE_ARGS = $(shell echo $(CONFIGURE_ARGS) |sed -e 's/apxs2/apxs/' \ + -e 's/apache2\/sbin\/apxs/apache\/bin\/apxs/') + # Copy over template config files and utility scripts post-install-modulated: @@ -103,6 +107,12 @@ $(DESTDIR)$(prefix)/php5/etc @(grm -fr $(DESTDIR)/.[a-z]*) @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) + @( echo " ==> Now Building mod_php5 <==" ) + @( if [ -f $(WORKSRC)/Makefile ]; then \ + $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi) + cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) + @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) + @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/checksums =================================================================== --- csw/mgar/pkg/php5/trunk/checksums 2009-04-23 22:18:12 UTC (rev 4459) +++ csw/mgar/pkg/php5/trunk/checksums 2009-04-24 02:13:14 UTC (rev 4460) @@ -2,6 +2,9 @@ 632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove 0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space +5f0046fe1b3f8e2228fdb165bdbbe73a download/CSWmodphp5.postinstall +2e5dbed2c9dd5e24c331753984946822 download/CSWmodphp5.preremove +0dd379f20ceb32fc77bb3a9bf045097f download/CSWmodphp5.space 8139c9c02a2f62bac64041fdd0e90bf6 download/CSWphp5.postinstall 89e79becc9d7698c5c561581f2b098bc download/CSWphp5_ext_disable.sh de56d3571f4484284d106af158bffc38 download/CSWphp5_ext_enable.sh Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-23 22:18:12 UTC (rev 4459) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-24 02:13:14 UTC (rev 4460) @@ -1,13 +1,13 @@ PHP5EXT_NAME = mod_php5 -#PACKAGES += CSWmodphp5 +PACKAGES += CSWmodphp5 CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib -#DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space -#CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs -#PKGFILES_CSWmodphp5 = .*/csw/apache/.* +DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space +PKGFILES_CSWmodphp5 = .*/csw/apache/.* + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:35:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:35:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4461] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4461 http://gar.svn.sourceforge.net/gar/?rev=4461&view=rev Author: valholla Date: 2009-04-24 02:35:22 +0000 (Fri, 24 Apr 2009) Log Message: ----------- trim mod_php* to only needed files Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 02:13:14 UTC (rev 4460) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 02:35:22 UTC (rev 4461) @@ -113,6 +113,8 @@ cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) + @( gfind $(DESTDIR)$(prefix)/apache* + -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) @$(MAKECOOKIE) post-configure-modulated: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:39:08 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:39:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4462] csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ Makefile Message-ID: Revision: 4462 http://gar.svn.sourceforge.net/gar/?rev=4462&view=rev Author: valholla Date: 2009-04-24 02:39:08 +0000 (Fri, 24 Apr 2009) Log Message: ----------- checkin missed file Added Paths: ----------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 02:39:08 UTC (rev 4462) @@ -0,0 +1,16 @@ +PHP5EXT_NAME = ap2_modphp5 + +PACKAGES += CSWap2modphp5 + +CATALOGNAME_CSWap2modphp5 = ap2_modphp5 +SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 2.2.x Module +REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib + +DISTFILES += CSWap2modphp5.depend CSWap2modphp5.preremove httpd-php5.conf.CSW +DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space + +CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs + +PKGFILES_CSWap2modphp5 = .*/csw/apache2/.* + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 04:56:01 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 02:56:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4463] csw/mgar/pkg/php5/trunk/extensions/php5_apache Message-ID: Revision: 4463 http://gar.svn.sourceforge.net/gar/?rev=4463&view=rev Author: valholla Date: 2009-04-24 02:56:00 +0000 (Fri, 24 Apr 2009) Log Message: ----------- Missing Dependency for the modphps Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-24 02:39:08 UTC (rev 4462) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-24 02:56:00 UTC (rev 4463) @@ -4,7 +4,7 @@ CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module -REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib +REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib CSWexpat REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 02:39:08 UTC (rev 4462) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 02:56:00 UTC (rev 4463) @@ -4,8 +4,9 @@ CATALOGNAME_CSWap2modphp5 = ap2_modphp5 SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 2.2.x Module -REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv CSWkrb5lib -REQUIRED_PKGS_CSWap2modphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv +REQUIRED_PKGS_CSWap2modphp5 += CSWkrb5lib CSWexpat CSWlibmm +REQUIRED_PKGS_CSWap2modphp5 += CSWlibxml2 CSWosslrt CSWphp5 CSWzlib DISTFILES += CSWap2modphp5.depend CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 05:08:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 03:08:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4464] csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ files/CSWap2modphp5.depend Message-ID: Revision: 4464 http://gar.svn.sourceforge.net/gar/?rev=4464&view=rev Author: valholla Date: 2009-04-24 03:08:50 +0000 (Fri, 24 Apr 2009) Log Message: ----------- make depend dynamic for php5_apache2 Removed Paths: ------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend Deleted: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend 2009-04-24 02:56:00 UTC (rev 4463) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend 2009-04-24 03:08:50 UTC (rev 4464) @@ -1,9 +0,0 @@ -P CSWap2prefork ap2_prefork - Apache 2.2 prefork MPM -P CSWbdb44 berkeleydb44 - embedded database libraries and utilities -P CSWiconv libiconv - GNU iconv library -P CSWkrb5lib krb5_lib - MIT Kerberos 5 core libraries -P CSWlibmm libmm - Shared Memory Allocation abstraction library -P CSWlibxml2 libxml2 - XML Parser Library -P CSWosslrt openssl_rt - Openssl runtime libraries -P CSWphp5 php5 - PHP Hypertext Processor 5 -P CSWzlib zlib - Zlib Data Compression Library This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 05:11:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 03:11:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4465] csw/mgar/pkg/php5/trunk/extensions/php5_apache2/ Makefile Message-ID: Revision: 4465 http://gar.svn.sourceforge.net/gar/?rev=4465&view=rev Author: valholla Date: 2009-04-24 03:11:57 +0000 (Fri, 24 Apr 2009) Log Message: ----------- make depend dynamic for php5_apache2 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 03:08:50 UTC (rev 4464) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-24 03:11:57 UTC (rev 4465) @@ -8,7 +8,7 @@ REQUIRED_PKGS_CSWap2modphp5 += CSWkrb5lib CSWexpat CSWlibmm REQUIRED_PKGS_CSWap2modphp5 += CSWlibxml2 CSWosslrt CSWphp5 CSWzlib -DISTFILES += CSWap2modphp5.depend CSWap2modphp5.preremove httpd-php5.conf.CSW +DISTFILES += CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Fri Apr 24 06:11:04 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Fri, 24 Apr 2009 04:11:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4466] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4466 http://gar.svn.sourceforge.net/gar/?rev=4466&view=rev Author: valholla Date: 2009-04-24 04:11:04 +0000 (Fri, 24 Apr 2009) Log Message: ----------- typo in post-install modulated Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 03:11:57 UTC (rev 4465) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-24 04:11:04 UTC (rev 4466) @@ -113,7 +113,7 @@ cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) - @( gfind $(DESTDIR)$(prefix)/apache* + @( gfind $(DESTDIR)$(prefix)/apache* \ -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From a_o_m at users.sourceforge.net Fri Apr 24 13:59:04 2009 From: a_o_m at users.sourceforge.net (a_o_m at users.sourceforge.net) Date: Fri, 24 Apr 2009 11:59:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4467] csw/mgar/pkg/fontconfig/trunk Message-ID: Revision: 4467 http://gar.svn.sourceforge.net/gar/?rev=4467&view=rev Author: a_o_m Date: 2009-04-24 11:59:04 +0000 (Fri, 24 Apr 2009) Log Message: ----------- fontconfig: added csw prefix to fonts.cache files again Modified Paths: -------------- csw/mgar/pkg/fontconfig/trunk/Makefile csw/mgar/pkg/fontconfig/trunk/checksums Added Paths: ----------- csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff Modified: csw/mgar/pkg/fontconfig/trunk/Makefile =================================================================== --- csw/mgar/pkg/fontconfig/trunk/Makefile 2009-04-24 04:11:04 UTC (rev 4466) +++ csw/mgar/pkg/fontconfig/trunk/Makefile 2009-04-24 11:59:04 UTC (rev 4467) @@ -12,7 +12,6 @@ MASTER_SITES = http://www.fontconfig.org/release/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -#DISTFILES += $(call admfiles,postinstall) DISTFILES += CSWfconfig.postinstall DISTFILES += CSWfconfig.checkinstall @@ -27,10 +26,11 @@ CONFIGURE_ARGS = $(DIRPATHS) CONFIGURE_ARGS += --with-default-fonts=/usr/openwin/lib/X11/fonts -CONFIGURE_ARGS += --with-add-fonts=/usr/openwin/lib/locale,/usr/share/fonts +CONFIGURE_ARGS += --with-add-fonts=/usr/openwin/lib/locale,/usr/share/fonts,/opt/csw/share/fonts CONFIGURE_ARGS += --with-cache-dir=/var/opt/csw/cache/fontconfig CONFIGURE_ARGS += --with-confdir=/opt/csw/etc/fontconfig +PATCHFILES = fontconfig.h.diff pre-package: @rm -f $(DESTDIR)$(libdir)/libfontconfig.la* @rm -f $(DESTDIR)/opt/csw/etc/fonts/fonts.conf.bak Modified: csw/mgar/pkg/fontconfig/trunk/checksums =================================================================== --- csw/mgar/pkg/fontconfig/trunk/checksums 2009-04-24 04:11:04 UTC (rev 4466) +++ csw/mgar/pkg/fontconfig/trunk/checksums 2009-04-24 11:59:04 UTC (rev 4467) @@ -1,3 +1,4 @@ +21481d18c2100203177ccab5b51e50d7 download/CSWfconfig.checkinstall +5a5b382b4a5e579cfc869bcffd7c034e download/CSWfconfig.postinstall ab54ec1d4ddd836313fdbc0cd5299d6d download/fontconfig-2.6.0.tar.gz -5a5b382b4a5e579cfc869bcffd7c034e download/CSWfconfig.postinstall -21481d18c2100203177ccab5b51e50d7 download/CSWfconfig.checkinstall +0fb83ca9bf9a7b99ab7601347e8c855d download/fontconfig.h.diff Added: csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff =================================================================== --- csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff (rev 0) +++ csw/mgar/pkg/fontconfig/trunk/files/fontconfig.h.diff 2009-04-24 11:59:04 UTC (rev 4467) @@ -0,0 +1,15 @@ +--- fontconfig-2.6.0/fontconfig/fontconfig.h_orig 2008-06-01 04:24:34.000000000 +0200 ++++ fontconfig-2.6.0/fontconfig/fontconfig.h 2009-04-24 12:14:14.404366000 +0200 +@@ -113,9 +113,9 @@ + #define FC_DECORATIVE "decorative" /* Bool - true if style is a decorative variant */ + #define FC_LCD_FILTER "lcdfilter" /* Int */ + +-#define FC_CACHE_SUFFIX ".cache-"FC_CACHE_VERSION +-#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION +-#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION ++#define FC_CACHE_SUFFIX ".cache-csw-"FC_CACHE_VERSION ++#define FC_DIR_CACHE_FILE "fonts.cache-csw-"FC_CACHE_VERSION ++#define FC_USER_CACHE_FILE ".fonts.cache-csw-"FC_CACHE_VERSION + + /* Adjust outline rasterizer */ + #define FC_CHAR_WIDTH "charwidth" /* Int */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bonivart at users.sourceforge.net Fri Apr 24 19:25:44 2009 From: bonivart at users.sourceforge.net (bonivart at users.sourceforge.net) Date: Fri, 24 Apr 2009 17:25:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4468] csw/mgar/pkg/cswclassutils/trunk Message-ID: Revision: 4468 http://gar.svn.sourceforge.net/gar/?rev=4468&view=rev Author: bonivart Date: 2009-04-24 17:25:44 +0000 (Fri, 24 Apr 2009) Log Message: ----------- cswclassutils: disable persistent state code Modified Paths: -------------- csw/mgar/pkg/cswclassutils/trunk/Makefile csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-24 11:59:04 UTC (rev 4467) +++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-04-24 17:25:44 UTC (rev 4468) @@ -1,5 +1,5 @@ GARNAME = cswclassutils -GARVERSION = 1.8 +GARVERSION = 1.9 CATEGORIES = utils DESCRIPTION = CSW class action utilities Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-24 11:59:04 UTC (rev 4467) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-04-24 17:25:44 UTC (rev 4468) @@ -12,26 +12,28 @@ # 2009-04-21 Do not create rc links unless enabled (Bug ID 0003633), # Persistent state across upgrades (Bug ID 0003634) # 2009-04-22 Fix bug when starting packages with multiple services (Ihsan Dogan) +# 2009-04-24 Temporarily disabled the "persistent state" code until it can be used +# per service, not just per package DEBUG= # clear to disable debug, set to anything to enable SVCDIR=/var/opt/csw/svc -SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" -SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" +#SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +#SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" # retrieve the previous state of a service identified by the given FRMI -load_smf_service_state () -{ - SMF_STATE="disabled" +#load_smf_service_state () +#{ +# SMF_STATE="disabled" +# +# if [ -f "$SMF_STATE_FILE" ]; then +# set -- `/usr/bin/awk " \\\$1 == \"$1\" { print \\\$2 } " "$SMF_STATE_FILE"` +# if [ "$1" = "enabled" ]; then +# SMF_STATE="enabled" +# fi +# fi +#} - if [ -f "$SMF_STATE_FILE" ]; then - set -- `/usr/bin/awk " \\\$1 == \"$1\" { print \\\$2 } " "$SMF_STATE_FILE"` - if [ "$1" = "enabled" ]; then - SMF_STATE="enabled" - fi - fi -} - # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf @@ -202,11 +204,11 @@ # Start service if [ "$daemon" = "yes" ]; then - load_smf_service_state "$FMRI/$service" - if [ "$SMF_STATE" = "enabled" ]; then +# load_smf_service_state "$FMRI/$service" +# if [ "$SMF_STATE" = "enabled" ]; then echo Enabling svc:/$FMRI/$service ... /usr/sbin/svcadm enable svc:/$FMRI/$service > /dev/null 2>&1 - fi +# fi fi else # Copy the service script @@ -277,7 +279,7 @@ done # we delete the smf state file as we don't need it anymore -rm -f "$SMF_STATE_FILE" +#rm -f "$SMF_STATE_FILE" /usr/sbin/installf -f $PKGINST Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf =================================================================== --- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-24 11:59:04 UTC (rev 4467) +++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf 2009-04-24 17:25:44 UTC (rev 4468) @@ -13,31 +13,33 @@ # 2009-04-21 Added -s to svcadm disable, removed sleep (Bug ID 0003632), # Persistent state across upgrades (Bug ID 0003634) # 2009-04-23 Fixed bug when stopping non-SMF services +# 2009-04-24 Temporarily disabled the "persistent state" code until it can be used +# per service, not just per package DEBUG= # clear to disable debug, set to anything to enable # The following file is used to save the state of smf service upon # package removal # This allows to restore the service state across package upgrades. -SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" -SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" +#SMF_STATE_DIR="$PKG_INSTALL_ROOT/etc/opt/csw/preserve/$PKG" +#SMF_STATE_FILE="$SMF_STATE_DIR/smf.state" # The smf state file shouldn't be there at this time but we # delete it to be sure -rm -f "$SMF_STATE_FILE" +#rm -f "$SMF_STATE_FILE" # save the current service state for the given frmi -save_smf_state () -{ - SMF_STATE=`/usr/sbin/svccfg -s "$1:default" listprop general/enabled | /usr/bin/awk '{ print $3 }'` - if [ "$SMF_STATE" != "true" ]; then - SMF_STATE="disabled" - else - SMF_STATE="enabled" - fi - [ -d "$SMF_STATE_DIR" ] || mkdir -p "$SMF_STATE_DIR" - echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" -} +#save_smf_state () +#{ +# SMF_STATE=`/usr/sbin/svccfg -s "$1:default" listprop general/enabled | /usr/bin/awk '{ print $3 }'` +# if [ "$SMF_STATE" != "true" ]; then +# SMF_STATE="disabled" +# else +# SMF_STATE="enabled" +# fi +# [ -d "$SMF_STATE_DIR" ] || mkdir -p "$SMF_STATE_DIR" +# echo "$1 $SMF_STATE" >> "$SMF_STATE_FILE" +#} # Source csw.conf, if it exists if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then @@ -68,9 +70,9 @@ FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'` for i in `echo $FMRI | tr '\n' ' '` do - save_smf_state +# save_smf_state "$i" echo "Disabling svc:/$i ..." - /usr/sbin/svcadm -s disable svc:/$i + /usr/sbin/svcadm disable -s svc:/$i # Unregister with SMF echo Unregister svc:/${i}:default with SMF ... /usr/sbin/svccfg delete -f svc:/${i}:default This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 05:22:15 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 03:22:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4469] csw/mgar/pkg/subversion/trunk Message-ID: Revision: 4469 http://gar.svn.sourceforge.net/gar/?rev=4469&view=rev Author: valholla Date: 2009-04-26 03:22:15 +0000 (Sun, 26 Apr 2009) Log Message: ----------- compiling update to version 1.6.1 Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile csw/mgar/pkg/subversion/trunk/checksums Added Paths: ----------- csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff Removed Paths: ------------- csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:22:15 UTC (rev 4469) @@ -86,20 +86,22 @@ SVNLIB = $(prefix)/lib/svn NOISALIST = 1 -LDFLAGS = +LDFLAGS = -R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/apache2/lib +LDFLAGS += -L/opt/csw/apache2/lib -L$(SVNLIB) -lintl -liconv +export LDFLAGS + CONFIGURE_ARGS = $(DIRPATHS) --libdir=$(SVNLIB) --libexecdir=$(SVNLIB) -CONFIGURE_ARGS += --with-gnu-ld=yes +CONFIGURE_ARGS += --disable-mod-activation +CONFIGURE_ARGS += --disable-static +CONFIGURE_ARGS += --enable-javahl CONFIGURE_ARGS += --with-apr=$(prefix)/apache2/bin/apr-config CONFIGURE_ARGS += --with-apr-util=$(prefix)/apache2/bin/apu-config CONFIGURE_ARGS += --with-apxs=$(prefix)/apache2/sbin/apxs -CONFIGURE_ARGS += --disable-mod-activation CONFIGURE_ARGS += --with-jdk=$(JDK) -CONFIGURE_ARGS += --enable-javahl -CONFIGURE_ARGS += --with-neon=$(prefix) -CONFIGURE_ARGS += --with-zlib=$(prefix) +#CONFIGURE_ARGS += --with-neon=$(prefix) CONFIGURE_ARGS += --with-sasl=$(prefix) CONFIGURE_ARGS += --with-ssl=$(prefix) -CONFIGURE_ARGS += --disable-static +CONFIGURE_ARGS += --with-zlib=$(prefix) TEST_TARGET = check # Tests take *forever* @@ -108,12 +110,10 @@ test-skip: @$(DONADA) -# Add libintl when linking -EXTRA_LINKER_FLAGS += -lintl -liconv - include gar/category.mk -BINDING_LANGS = java perl python ruby +#BINDING_LANGS = java perl python ruby +BINDING_LANGS = ruby perl python java BINDING_TARGETS = $(foreach LANG,$(BINDING_LANGS),svn-$(LANG)) PI_DEPENDS = $(BINDING_TARGETS) @@ -124,11 +124,25 @@ $(DONADA) post-configure-modulated: - @(echo "~~~ Fixing Libtool ~~~") + @echo "~~~ Fixing Libtool ~~~" @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) - @(gcp $(WORKSRC)/Makefile $(WORKSRC)/Makefile.gcc) - @(gcp $(WORKSRC)/libtool $(WORKSRC)/libtool.gcc) - @(gpatch -d $(WORKSRC) -p0 -F2 < $(DOWNLOADDIR)/$(GARCH)-gcc.diff) + @gcp $(WORKSRC)/Makefile $(WORKSRC)/Makefile.gcc + @gcp $(WORKSRC)/libtool $(WORKSRC)/libtool.gcc + @perl -i -pe 's/-mt\|*//' $(WORKSRC)/*.gcc + @perl -i -pe 's|-xO3|-pipe -O2|' $(WORKSRC)/*.gcc + @perl -i -pe 's|/opt/studio/SOS11/SUNWspro/bin/cc|/opt/csw/gcc4/bin/gcc|' \ + $(WORKSRC)/*.gcc + @perl -i -pe 's|/opt/studio/SOS11/SUNWspro/bin/CC|/opt/csw/gcc4/bin/g++|' \ + $(WORKSRC)/*.gcc + @perl -i -pe 's|libtool|libtool.gcc|' $(WORKSRC)/Makefile.gcc + @perl -i -pe 's|KPIC|fPIC|' $(WORKSRC)/libtool.gcc + @perl -i -pe 's|postdeps=.*|postdeps=""|' $(WORKSRC)/libtool.gcc + + @( if [ "`uname -p`" = "sparc" ]; then \ + perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ + else \ + perl -i -pe 's|-xarch=i386|-mcpu=i386|' $(WORKSRC)/*.gcc; \ + fi ) $(DONADA) fix-install: @@ -167,7 +181,7 @@ svn-ruby: @echo " ==> Building Ruby bindings" @touch $(WORKSRC)/subversion/bindings/swig/ruby/*.c - @$(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) swig-rb + $(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) swig-rb #@$(TEST_ENV) gmake -f Makefile.gcc -C $(WORKSRC) check-swig-rb @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-swig-rb $(DONADA) Modified: csw/mgar/pkg/subversion/trunk/checksums =================================================================== --- csw/mgar/pkg/subversion/trunk/checksums 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/checksums 2009-04-26 03:22:15 UTC (rev 4469) @@ -1,11 +1,11 @@ -3d1dabbbcacf262e3e0baa3de79220d7 download/subversion-1.5.6.tar.bz2 -395ec6d1bfe07efadc1c0aa8816673fa download/CSWsvn.checkinstall 1e19681e6d988d35cfc6d708883ab7aa download/CSWap2svn.postinstall 586b9c9924c1547d44451a84d2aca702 download/CSWap2svn.preremove +395ec6d1bfe07efadc1c0aa8816673fa download/CSWsvn.checkinstall +41ec540885de7c34625768aa1fb9682b download/fixme.sh f107831ad0c702ff32e51df6a207237b download/httpd-svn.conf.CSW -1b532d3055708a97771f5cd959983628 download/svn_access.conf.CSW -41ec540885de7c34625768aa1fb9682b download/fixme.sh -91d4c5a963192f113602b1bd1917d0cb download/sparc-gcc.diff 6caa3c518b84c2b3f6a33b61d1b022e3 download/i386-gcc.diff f0aa58c145ae99f8e4d72499ab826169 download/javahl_headers_for_nested_classes.diff +91d4c5a963192f113602b1bd1917d0cb download/sparc-gcc.diff +95708b96b920faeffca017f43ec96777 download/subversion-1.6.1.tar.bz2 f7d05c59656dcf01fb844295c9912f78 download/subversion156.diff +1b532d3055708a97771f5cd959983628 download/svn_access.conf.CSW Added: csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff (rev 0) +++ csw/mgar/pkg/subversion/trunk/files/Makefile_in.diff 2009-04-26 03:22:15 UTC (rev 4469) @@ -0,0 +1,43 @@ +--- subversion-1.6.1/Makefile.in.o 2009-04-19 14:13:16.639723533 -0500 ++++ subversion-1.6.1/Makefile.in 2009-04-19 14:14:27.736377714 -0500 +@@ -38,8 +38,8 @@ + SCHEMA_DIR = subversion/svn/schema + + NEON_LIBS = @NEON_LIBS@ +-SVN_APR_LIBS = @SVN_APR_LIBS@ +-SVN_APRUTIL_LIBS = @SVN_APRUTIL_LIBS@ ++SVN_APR_LIBS = -L/opt/csw/lib -L/opt/csw/apache2/lib -lintl -liconv @SVN_APR_LIBS@ ++SVN_APRUTIL_LIBS = -L/opt/csw/lib -L/opt/csw/apache2/lib @SVN_APRUTIL_LIBS@ + SVN_APR_MEMCACHE_LIBS = @SVN_APR_MEMCACHE_LIBS@ + SVN_DB_LIBS = @SVN_DB_LIBS@ + SVN_GNOME_KEYRING_LIBS = @SVN_GNOME_KEYRING_LIBS@ +@@ -49,7 +49,7 @@ + SVN_SQLITE_LIBS = @SVN_SQLITE_LIBS@ + SVN_ZLIB_LIBS = @SVN_ZLIB_LIBS@ + +-LIBS = @LIBS@ ++LIBS = -L/opt/csw/lib -L/opt/csw/apache2/lib -lintl -liconv -lsocket -lz @LIBS@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -76,15 +76,15 @@ + swig_rb_libdir = @libdir@ + + ### these possibly need further discussion +-swig_pydir = @libdir@/svn-python/libsvn +-swig_pydir_extra = @libdir@/svn-python/svn +-swig_pldir = @libdir@/svn-perl ++swig_pydir = @prefix@/lib/python/site-packages/libsvn ++swig_pydir_extra = @prefix@/lib/python/site-packages/svn ++#swig_pldir = @libdir@/svn-perl + swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext + contribdir = @bindir@/svn-contrib + toolsdir = @bindir@/svn-tools + +-javahl_javadir = @libdir@/svn-javahl +-javahl_javahdir = @libdir@/svn-javahl/include ++javahl_javadir = @libdir@ ++javahl_javahdir = @libdir@/include + javahl_libdir = @libdir@ + javahl_test_rootdir=$(abs_builddir)/subversion/bindings/javahl/test-work + Deleted: csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/files/i386-gcc.diff 2009-04-26 03:22:15 UTC (rev 4469) @@ -1,172 +0,0 @@ ---- libtool.gcc.o 2009-03-11 21:48:23.343791369 -0500 -+++ libtool.gcc 2009-03-11 21:48:50.846784450 -0500 -@@ -82,13 +82,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -m32 -march=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/cc" -+CC="/opt/csw/gcc3/bin/gcc" - - # Is the compiler the GNU C compiler? - with_gcc= -@@ -143,7 +143,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -1989,7 +1989,7 @@ - continue - ;; - -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" -@@ -2003,7 +2003,7 @@ - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler -- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -+ # -march=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC -@@ -2012,7 +2012,7 @@ - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files -- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -64|-mips[0-9]|-r[0-9][0-9]*|-march=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need -@@ -2484,7 +2484,7 @@ - lib= - found=no - case $deplib in -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" -@@ -7318,13 +7318,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -m32 -march=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/CC" -+CC="/opt/csw/gcc3/bin/g++" - - # Is the compiler the GNU C compiler? - with_gcc=no -@@ -7379,7 +7379,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -7475,7 +7475,7 @@ - - # Dependencies to place after the objects being linked to create a - # shared library. --postdeps="-library=Cstd -library=Crun" -+postdeps="" - - # The library search path used internally by the compiler when linking - # a shared library. -@@ -7624,10 +7624,10 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -m32 -march=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. - CC="f77" -@@ -7685,7 +7685,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC" -+pic_flag=" -fPIC" - pic_mode=default - - # What is the maximum length of a command? ---- Makefile.gcc.o 2009-03-11 21:48:17.524971502 -0500 -+++ Makefile.gcc 2009-03-11 21:49:06.704433498 -0500 -@@ -89,12 +89,12 @@ - PACKAGE_NAME=subversion - PACKAGE_VERSION=1.5.6 - --CC = /opt/studio/SOS11/SUNWspro/bin/cc --CXX = /opt/studio/SOS11/SUNWspro/bin/CC -+CC = /opt/csw/gcc3/bin/gc -+CXX = /opt/csw/gcc3/bin/g++ - EXEEXT = - - SHELL = /bin/bash --LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-i386/subversion-1.5.6/libtool -+LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-i386/subversion-1.5.6/libtool.gcc - LTFLAGS = --tag=CC --silent - LTCXXFLAGS = --tag=CXX --silent - LT_LDFLAGS = -@@ -113,10 +113,10 @@ - - SWIG = none - SWIG_PY_INCLUDES = $(SWIG_INCLUDES) -I/opt/csw/include/python2.6 -I$(SWIG_SRC_DIR)/python/libsvn_swig_py --SWIG_PY_COMPILE = /opt/studio/SOS11/SUNWspro/bin/cc -DNDEBUG -O -Kpic --SWIG_PY_LINK = /opt/studio/SOS11/SUNWspro/bin/cc -G -+SWIG_PY_COMPILE = /opt/csw/gcc3/bin/gc -DNDEBUG -O -fpic -+SWIG_PY_LINK = /opt/csw/gcc3/bin/gc -G - SWIG_PY_LIBS = --SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -xO3 -xtarget=generic -xarch=generic -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE -+SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -O2 -pipe -m32 -xtarget=generic -march=generic -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE - SWIG_RB_INCLUDES = $(SWIG_INCLUDES) -I. -I/opt/csw/lib/ruby/1.8/i386-solaris2.8 -I$(SWIG_SRC_DIR)/ruby/libsvn_swig_ruby - SWIG_RB_COMPILE = /opt/csw/gcc4/bin/gcc -mtune=i686 -O2 -pipe -m32 -march=i386 -I/opt/csw/include -fPIC - SWIG_RB_LINK = /opt/csw/gcc4/bin/gcc -shared -shrext .so -@@ -142,14 +142,14 @@ - MKDIR = /opt/csw/bin/ginstall -c -d - - # The EXTRA_ parameters can be used to pass extra flags at 'make' time. --CFLAGS = -xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) --CXXFLAGS = -xO3 -xarch=386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) -+CFLAGS = -O2 -pipe -m32 -march=i386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) -+CXXFLAGS = -O2 -pipe -m32 -march=i386 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) - ### A few of the CFLAGS (e.g. -Wmissing-prototypes, -Wstrict-prototypes, - ### -Wmissing-declarations) are not valid for C++, and should be somehow - ### suppressed (but they may come from httpd or APR). - CPPFLAGS = -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -I/opt/csw/bdb44/include -I/opt/csw/include -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE $(EXTRA_CPPFLAGS) --LDFLAGS = -xarch=386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) --SWIG_LDFLAGS = -xarch=386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) -+LDFLAGS = -march=i386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) -+SWIG_LDFLAGS = -march=i386 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) - - COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) - COMPILE_CXX = $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) Deleted: csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff 2009-04-24 17:25:44 UTC (rev 4468) +++ csw/mgar/pkg/subversion/trunk/files/sparc-gcc.diff 2009-04-26 03:22:15 UTC (rev 4469) @@ -1,172 +0,0 @@ ---- libtool.gcc.o 2009-03-11 21:45:55.799166272 -0500 -+++ libtool.gcc 2009-03-11 21:46:43.392646721 -0500 -@@ -82,13 +82,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/cc" -+CC="/opt/csw/gcc3/bin/gcc" - - # Is the compiler the GNU C compiler? - with_gcc= -@@ -143,7 +143,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -1989,7 +1989,7 @@ - continue - ;; - -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" -@@ -2003,7 +2003,7 @@ - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler -- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -+ # -mcpu=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC -@@ -2012,7 +2012,7 @@ - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files -- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -64|-mips[0-9]|-r[0-9][0-9]*|-mcpu=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need -@@ -2484,7 +2484,7 @@ - lib= - found=no - case $deplib in -- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ -mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" -@@ -7318,13 +7318,13 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. --CC="/opt/studio/SOS11/SUNWspro/bin/CC" -+CC="/opt/csw/gcc3/bin/gcc" - - # Is the compiler the GNU C compiler? - with_gcc=no -@@ -7379,7 +7379,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC -DPIC" -+pic_flag=" -fPIC -DPIC" - pic_mode=default - - # What is the maximum length of a command? -@@ -7475,7 +7475,7 @@ - - # Dependencies to place after the objects being linked to create a - # shared library. --postdeps="-library=Cstd -library=Crun" -+postdeps="" - - # The library search path used internally by the compiler when linking - # a shared library. -@@ -7624,10 +7624,10 @@ - AR_FLAGS="cru" - - # A C compiler. --LTCC="/opt/studio/SOS11/SUNWspro/bin/cc" -+LTCC="/opt/csw/gcc3/bin/gcc" - - # LTCC compiler flags. --LTCFLAGS="-xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS" -+LTCFLAGS="-O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS" - - # A language-specific compiler. - CC="f77" -@@ -7685,7 +7685,7 @@ - exeext="" - - # Additional compiler flags for building library objects. --pic_flag=" -KPIC" -+pic_flag=" -fPIC" - pic_mode=default - - # What is the maximum length of a command? ---- Makefile.gcc.o 2009-03-11 21:45:44.001600884 -0500 -+++ Makefile.gcc 2009-03-11 21:46:14.602732752 -0500 -@@ -89,12 +89,12 @@ - PACKAGE_NAME=subversion - PACKAGE_VERSION=1.5.6 - --CC = /opt/studio/SOS11/SUNWspro/bin/cc --CXX = /opt/studio/SOS11/SUNWspro/bin/CC -+CC = /opt/csw/gcc3/bin/gcc -+CXX = /opt/csw/gcc3/bin/g++ - EXEEXT = - - SHELL = /bin/bash --LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-sparcv8/subversion-1.5.6/libtool -+LIBTOOL = $(SHELL) /home/mwatters/mgar/pkg/subversion/trunk/work/build-isa-sparcv8/subversion-1.5.6/libtool.gcc - LTFLAGS = --tag=CC --silent - LTCXXFLAGS = --tag=CXX --silent - LT_LDFLAGS = -@@ -113,10 +113,10 @@ - - SWIG = none - SWIG_PY_INCLUDES = $(SWIG_INCLUDES) -I/opt/csw/include/python2.6 -I$(SWIG_SRC_DIR)/python/libsvn_swig_py --SWIG_PY_COMPILE = /opt/studio/SOS11/SUNWspro/bin/cc -DNDEBUG -O -xO3 -xarch=v8 --SWIG_PY_LINK = /opt/studio/SOS11/SUNWspro/bin/cc -G -+SWIG_PY_COMPILE = /opt/csw/gcc3/bin/gcc -DNDEBUG -O -O2 -pipe -mcpu=v8 -+SWIG_PY_LINK = /opt/csw/gcc3/bin/gcc -G - SWIG_PY_LIBS = --SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE -+SWIG_PL_INCLUDES = $(SWIG_INCLUDES) -D_REENTRANT -O2 -pipe -xtarget=ultra -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/csw/lib/perl/5.8.8/CORE - SWIG_RB_INCLUDES = $(SWIG_INCLUDES) -I. -I/opt/csw/lib/ruby/1.8/sparc-solaris2.8 -I$(SWIG_SRC_DIR)/ruby/libsvn_swig_ruby - SWIG_RB_COMPILE = /opt/csw/gcc4/bin/gcc -O2 -pipe -mcpu=v8 -I/opt/csw/include -fPIC - SWIG_RB_LINK = /opt/csw/gcc4/bin/gcc -shared -shrext .so -@@ -142,14 +142,14 @@ - MKDIR = /opt/csw/bin/ginstall -c -d - - # The EXTRA_ parameters can be used to pass extra flags at 'make' time. --CFLAGS = -xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -mt -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) --CXXFLAGS = -xO3 -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) -+CFLAGS = -O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -D_LARGEFILE64_SOURCE -DNE_LFS $(EXTRA_CFLAGS) -+CXXFLAGS = -O2 -pipe -mcpu=v8 -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include $(EXTRA_CXXFLAGS) - ### A few of the CFLAGS (e.g. -Wmissing-prototypes, -Wstrict-prototypes, - ### -Wmissing-declarations) are not valid for C++, and should be somehow - ### suppressed (but they may come from httpd or APR). - CPPFLAGS = -I/opt/csw/bdb44/include -I/opt/csw/apache2/include -I/usr/jdk1.5.0_15/include -I/opt/csw/include -I/opt/csw/bdb44/include -I/opt/csw/include -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE $(EXTRA_CPPFLAGS) --LDFLAGS = -xarch=v8 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) --SWIG_LDFLAGS = -xarch=v8 -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) -+LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib $(EXTRA_LDFLAGS) -+SWIG_LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib/\\\$$ISALIST -R/opt/csw/lib -L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib/\\\$$ISALIST -R/opt/csw/bdb44/lib -L/opt/csw/lib/svn -R/opt/csw/lib/svn/\\\$$ISALIST -R/opt/csw/lib/svn -L/opt/csw/apache2/lib -R/opt/csw/apache2/lib/\\\$$ISALIST -R/opt/csw/apache2/lib -lintl -liconv $(EXTRA_SWIG_LDFLAGS) - - COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) - COMPILE_CXX = $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 05:39:05 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 03:39:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4470] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4470 http://gar.svn.sourceforge.net/gar/?rev=4470&view=rev Author: valholla Date: 2009-04-26 03:39:05 +0000 (Sun, 26 Apr 2009) Log Message: ----------- cleanup Makefile Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:22:15 UTC (rev 4469) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:39:05 UTC (rev 4470) @@ -17,7 +17,8 @@ DISTFILES = $(GARNAME)-$(DISTVERSION).tar.bz2 -# We define upstream file regex so we can be notifed of new upstream software release +# We define upstream file regex so we can be notifed of +# new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 EXTRA_LIB = $(prefix)/bdb44/lib $(SVNLIB) @@ -112,8 +113,7 @@ include gar/category.mk -#BINDING_LANGS = java perl python ruby -BINDING_LANGS = ruby perl python java +BINDING_LANGS = java perl python ruby BINDING_TARGETS = $(foreach LANG,$(BINDING_LANGS),svn-$(LANG)) PI_DEPENDS = $(BINDING_TARGETS) @@ -126,6 +126,7 @@ post-configure-modulated: @echo "~~~ Fixing Libtool ~~~" @$(DOWNLOADDIR)/fixme.sh $(WORKSRC) + @echo "~~~ Creating GCC Makefile and libtool for javahl and ruby ~~~" @gcp $(WORKSRC)/Makefile $(WORKSRC)/Makefile.gcc @gcp $(WORKSRC)/libtool $(WORKSRC)/libtool.gcc @perl -i -pe 's/-mt\|*//' $(WORKSRC)/*.gcc @@ -137,7 +138,6 @@ @perl -i -pe 's|libtool|libtool.gcc|' $(WORKSRC)/Makefile.gcc @perl -i -pe 's|KPIC|fPIC|' $(WORKSRC)/libtool.gcc @perl -i -pe 's|postdeps=.*|postdeps=""|' $(WORKSRC)/libtool.gcc - @( if [ "`uname -p`" = "sparc" ]; then \ perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ else \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 05:52:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 03:52:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4471] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4471 http://gar.svn.sourceforge.net/gar/?rev=4471&view=rev Author: valholla Date: 2009-04-26 03:52:06 +0000 (Sun, 26 Apr 2009) Log Message: ----------- cleanup Makefile Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:39:05 UTC (rev 4470) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:52:06 UTC (rev 4471) @@ -70,8 +70,6 @@ DISTFILES += CSWap2svn.postinstall CSWap2svn.preremove DISTFILES += httpd-svn.conf.CSW svn_access.conf.CSW DISTFILES += fixme.sh -DISTFILES += sparc-gcc.diff -DISTFILES += i386-gcc.diff # Fix: Add java headers for nested classes # https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-June/004633.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:03:21 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:03:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4472] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4472 http://gar.svn.sourceforge.net/gar/?rev=4472&view=rev Author: valholla Date: 2009-04-26 05:03:21 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Update Dependencies Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 03:52:06 UTC (rev 4471) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:03:21 UTC (rev 4472) @@ -1,5 +1,4 @@ -GARNAME = subversion -DISTVERSION = 1.6.1 +GARNAME = subversion DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils @@ -35,25 +34,31 @@ CATALOGNAME_CSWsvn = subversion REQUIRED_PKGS_CSWsvn = CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt REQUIRED_PKGS_CSWsvn += CSWiconv CSWkrb5lib CSWlibnet CSWneon CSWoldaprt -REQUIRED_PKGS_CSWsvn += CSWosslrt CSWsasl CSWsqlite3 CSWzlib +REQUIRED_PKGS_CSWsvn += CSWosslrt CSWsasl CSWzlib CSWsqlite3rt SPKG_DESC_CSWsvn-devel = Subversion Development Support CATALOGNAME_CSWsvn-devel = subversion_devel REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 CATALOGNAME_CSWap2svn = ap2svn -REQUIRED_PKGS_CSWap2svn = CSWsvn +REQUIRED_PKGS_CSWap2svn = CSWsvn CSWgettextrt SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn -REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt +REQUIRED_PKGS_CSWjavasvn += CSWbdb44 CSWexpat CSWggettextrt CSWiconv +REQUIRED_PKGS_CSWjavasvn += CSWneon CSWoldaprt SPKG_DESC_CSWpmsvn = Subversion Perl Language Binding CATALOGNAME_CSWpmsvn = pmsvn -REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl +REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl CSWapache2rt CSWbdb44 CSWexpat +REQUIRED_PKGS_CSWpmsvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWpysvn = Subversion Python Language Binding CATALOGNAME_CSWpysvn = pysvn -REQUIRED_PKGS_CSWpysvn = CSWsvn CSWpython +REQUIRED_PKGS_CSWpysvn = CSWsvn CSWpython CSWapache2rt CSWbdb44 CSWexpat +REQUIRED_PKGS_CSWpysvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWrbsvn = Subversion Ruby Language Binding CATALOGNAME_CSWrbsvn = rbsvn -REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWrbsvn += CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt +REQUIRED_PKGS_CSWrbsvn += CSWiconv PKGFILES_CSWsvn-devel = $(PKGFILES_DEVEL) PKGFILES_CSWap2svn = $(prefix)/apache2.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:05:12 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:05:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4473] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4473 http://gar.svn.sourceforge.net/gar/?rev=4473&view=rev Author: valholla Date: 2009-04-26 05:05:12 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:03:21 UTC (rev 4472) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:12 UTC (rev 4473) @@ -1,4 +1,5 @@ -GARNAME = subversion DISTVERSION = 1.6.1 +GARNAME = subversion +DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:05:41 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:05:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4474] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4474 http://gar.svn.sourceforge.net/gar/?rev=4474&view=rev Author: valholla Date: 2009-04-26 05:05:41 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:12 UTC (rev 4473) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:41 UTC (rev 4474) @@ -1,4 +1,4 @@ -GARNAME = subversion +GARNAME = subversion DISTVERSION = 1.6.1 GARVERSION = $(subst -,,$(DISTVERSION)) CATEGORIES = utils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:07:40 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:07:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4475] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4475 http://gar.svn.sourceforge.net/gar/?rev=4475&view=rev Author: valholla Date: 2009-04-26 05:07:40 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:05:41 UTC (rev 4474) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:07:40 UTC (rev 4475) @@ -41,7 +41,7 @@ REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 CATALOGNAME_CSWap2svn = ap2svn -REQUIRED_PKGS_CSWap2svn = CSWsvn CSWgettextrt +REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:08:55 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:08:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4476] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4476 http://gar.svn.sourceforge.net/gar/?rev=4476&view=rev Author: valholla Date: 2009-04-26 05:08:55 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Update Dependencies Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:07:40 UTC (rev 4475) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:08:55 UTC (rev 4476) @@ -41,7 +41,7 @@ REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 CATALOGNAME_CSWap2svn = ap2svn -REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt +REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt CSWiconv SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:13:51 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:13:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4477] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4477 http://gar.svn.sourceforge.net/gar/?rev=4477&view=rev Author: valholla Date: 2009-04-26 05:13:51 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix depend Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:08:55 UTC (rev 4476) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:13:51 UTC (rev 4477) @@ -59,7 +59,7 @@ CATALOGNAME_CSWrbsvn = rbsvn REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert REQUIRED_PKGS_CSWrbsvn += CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt -REQUIRED_PKGS_CSWrbsvn += CSWiconv +REQUIRED_PKGS_CSWrbsvn += CSWiconv CSWoldaprt PKGFILES_CSWsvn-devel = $(PKGFILES_DEVEL) PKGFILES_CSWap2svn = $(prefix)/apache2.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Sun Apr 26 07:38:23 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Sun, 26 Apr 2009 05:38:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4478] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4478 http://gar.svn.sourceforge.net/gar/?rev=4478&view=rev Author: valholla Date: 2009-04-26 05:38:22 +0000 (Sun, 26 Apr 2009) Log Message: ----------- fix x86 flags Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:13:51 UTC (rev 4477) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-26 05:38:22 UTC (rev 4478) @@ -145,7 +145,7 @@ @( if [ "`uname -p`" = "sparc" ]; then \ perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ else \ - perl -i -pe 's|-xarch=i386|-mcpu=i386|' $(WORKSRC)/*.gcc; \ + perl -i -pe 's|-xarch=386|-m32 -march=i386|' $(WORKSRC)/*.gcc; \ fi ) $(DONADA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From j_arndt at users.sourceforge.net Sun Apr 26 10:16:50 2009 From: j_arndt at users.sourceforge.net (j_arndt at users.sourceforge.net) Date: Sun, 26 Apr 2009 08:16:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4479] csw/mgar/pkg/nagios_plugins/trunk Message-ID: Revision: 4479 http://gar.svn.sourceforge.net/gar/?rev=4479&view=rev Author: j_arndt Date: 2009-04-26 08:16:50 +0000 (Sun, 26 Apr 2009) Log Message: ----------- nagios_plugins: fix for #3494, added patch for check_procs Modified Paths: -------------- csw/mgar/pkg/nagios_plugins/trunk/Makefile csw/mgar/pkg/nagios_plugins/trunk/checksums Added Paths: ----------- csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff Modified: csw/mgar/pkg/nagios_plugins/trunk/Makefile =================================================================== --- csw/mgar/pkg/nagios_plugins/trunk/Makefile 2009-04-26 05:38:22 UTC (rev 4478) +++ csw/mgar/pkg/nagios_plugins/trunk/Makefile 2009-04-26 08:16:50 UTC (rev 4479) @@ -11,10 +11,14 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz DISTFILES += $(call admfiles,CSWnagiosp,prototype ) +PATCHFILES += check_procs.c.diff + REQUIRED_PKGS_CSWnagiosp = CSWggettextrt CSWiconv CSWlibnet CSWlibpq REQUIRED_PKGS_CSWnagiosp += CSWmysql5rt CSWoldaprt CSWosslrt CSWsasl REQUIRED_PKGS_CSWnagiosp += CSWzlib CSWperl +NOISALIST = 1 + CFLAGS += -I /opt/csw/postgresql/include/ CONFIGURE_ARGS = $(DIRPATHS) Modified: csw/mgar/pkg/nagios_plugins/trunk/checksums =================================================================== --- csw/mgar/pkg/nagios_plugins/trunk/checksums 2009-04-26 05:38:22 UTC (rev 4478) +++ csw/mgar/pkg/nagios_plugins/trunk/checksums 2009-04-26 08:16:50 UTC (rev 4479) @@ -1,3 +1,4 @@ be6cc7699fff3ee29d1fd4d562377386 download/nagios-plugins-1.4.13.tar.gz 61f490e92b603ac8628fb0c6cebb39ce download/CSWnagiosp.gspec 65bdf1c84228ccd98397837636004761 download/CSWnagiosp.prototype +4e1d82a9b3b21ade03ad39652352857e download/check_procs.c.diff Added: csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff =================================================================== --- csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff (rev 0) +++ csw/mgar/pkg/nagios_plugins/trunk/files/check_procs.c.diff 2009-04-26 08:16:50 UTC (rev 4479) @@ -0,0 +1,12 @@ +diff --speed-large-files --minimal -Nru nagios-plugins-1.4.13.orig/plugins/check_procs.c nagios-plugins-1.4.13/plugins/check_procs.c +--- nagios-plugins-1.4.13.orig/plugins/check_procs.c 2008-07-08 11:31:04.000000000 +0200 ++++ nagios-plugins-1.4.13/plugins/check_procs.c 2009-03-26 20:30:33.322034506 +0100 +@@ -194,7 +194,7 @@ + strip (procargs); + + /* Some ps return full pathname for command. This removes path */ +- strcpy(procprog, base_name(procprog)); ++ /* strcpy(procprog, base_name(procprog)); */ + + /* we need to convert the elapsed time to seconds */ + procseconds = convert_to_seconds(procetime); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 02:26:42 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 00:26:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4480] csw/mgar/pkg Message-ID: Revision: 4480 http://gar.svn.sourceforge.net/gar/?rev=4480&view=rev Author: valholla Date: 2009-04-27 00:26:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- initial checkin Added Paths: ----------- csw/mgar/pkg/squirrelmail/ csw/mgar/pkg/squirrelmail/Makefile csw/mgar/pkg/squirrelmail/branches/ csw/mgar/pkg/squirrelmail/tags/ csw/mgar/pkg/squirrelmail/trunk/ csw/mgar/pkg/squirrelmail/trunk/Makefile csw/mgar/pkg/squirrelmail/trunk/checksums csw/mgar/pkg/squirrelmail/trunk/files/ Added: csw/mgar/pkg/squirrelmail/Makefile =================================================================== --- csw/mgar/pkg/squirrelmail/Makefile (rev 0) +++ csw/mgar/pkg/squirrelmail/Makefile 2009-04-27 00:26:42 UTC (rev 4480) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Added: csw/mgar/pkg/squirrelmail/trunk/Makefile =================================================================== --- csw/mgar/pkg/squirrelmail/trunk/Makefile (rev 0) +++ csw/mgar/pkg/squirrelmail/trunk/Makefile 2009-04-27 00:26:42 UTC (rev 4480) @@ -0,0 +1,32 @@ +GARNAME = squirrelmail +GARVERSION = 1.4.17 +CATEGORIES = apps + +DESCRIPTION = A standards-based webmail package written in PHP. +define BLURB + SquirrelMail is a standards-based webmail package written in PHP. + It includes built-in pure PHP support for the IMAP and SMTP protocols, + and all pages render in pure HTML 4.0 (with no JavaScript required) + for maximum compatibility across browsers. It has very few requirements + and is very easy to configure and install. SquirrelMail has all the + functionality you would want from an email client, including strong + MIME support, address books, and folder manipulation. +endef + +MASTER_SITES = $(SF_MIRRORS) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 + +PACKAGES = CSWsquirrelmail +CATALOGNAME_CSWsquirrelmail = squirrelmail +SPKG_DESC_CSWsquirrelmail = $(DESCRIPTION) + +REQUIRED_PKGS_CSWsquirrelmail = CSWimaprt + +# We define upstream file regex so we can be notifed of +# new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 + +CONFIGURE_ARGS = $(DIRPATHS) + + +include gar/category.mk Added: csw/mgar/pkg/squirrelmail/trunk/checksums =================================================================== --- csw/mgar/pkg/squirrelmail/trunk/checksums (rev 0) +++ csw/mgar/pkg/squirrelmail/trunk/checksums 2009-04-27 00:26:42 UTC (rev 4480) @@ -0,0 +1 @@ +6ff0df8ae0e7f13418ed37ea1c93f6f3 download/squirrelmail-1.4.17.tar.bz2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 02:27:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 00:27:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4481] csw/mgar/pkg/squirrelmail/trunk/ Message-ID: Revision: 4481 http://gar.svn.sourceforge.net/gar/?rev=4481&view=rev Author: valholla Date: 2009-04-27 00:27:27 +0000 (Mon, 27 Apr 2009) Log Message: ----------- propset externals garv2 Property Changed: ---------------- csw/mgar/pkg/squirrelmail/trunk/ Property changes on: csw/mgar/pkg/squirrelmail/trunk ___________________________________________________________________ Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 04:44:14 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 02:44:14 +0000 Subject: [csw-devel] SF.net SVN: gar:[4482] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4482 http://gar.svn.sourceforge.net/gar/?rev=4482&view=rev Author: valholla Date: 2009-04-27 02:44:14 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fix javahl compile Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-27 00:27:27 UTC (rev 4481) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-27 02:44:14 UTC (rev 4482) @@ -145,7 +145,7 @@ @( if [ "`uname -p`" = "sparc" ]; then \ perl -i -pe 's|-xarch=v8|-mcpu=v8|' $(WORKSRC)/*.gcc; \ else \ - perl -i -pe 's|-xarch=386|-m32 -march=i386|' $(WORKSRC)/*.gcc; \ + perl -i -pe 's|-xarch=386|-march=i386|' $(WORKSRC)/*.gcc; \ fi ) $(DONADA) @@ -190,13 +190,11 @@ @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-swig-rb $(DONADA) -## The test can only be run "after" you have it installed. svn-java: @echo " ==> Building Java bindings" @touch $(WORKSRC)/subversion/bindings/javahl/native/*.c - @$(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) javahl - #@$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) check-javahl - @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-javahl + $(BUILD_ENV) gmake -C $(WORKSRC) javahl; + $(INSTALL_ENV) gmake -C $(WORKSRC) install-javahl; $(DONADA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4483] csw/mgar/pkg Message-ID: Revision: 4483 http://gar.svn.sourceforge.net/gar/?rev=4483&view=rev Author: dmichelsen Date: 2009-04-27 12:36:01 +0000 (Mon, 27 Apr 2009) Log Message: ----------- S10gnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/S10gnome/ csw/mgar/pkg/S10gnome/trunk/ csw/mgar/pkg/S10gnome/trunk/legacy/ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/S10gnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/S10gnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/S10gnome/trunk/legacy/sources/ csw/mgar/pkg/S10gnome/trunk/legacy/specs/ csw/mgar/pkg/S10gnome/trunk/legacy/specs/Makefile csw/mgar/pkg/S10gnome/trunk/legacy/specs/S10gnome Added: csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:36:01 UTC (rev 4483) @@ -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/S10gnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/human.pl 2009-04-27 12:36:01 UTC (rev 4483) @@ -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 () { + 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 + +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 + +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/S10gnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:36:01 UTC (rev 4483) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/S10gnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/specs/Makefile 2009-04-27 12:36:01 UTC (rev 4483) @@ -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/S10gnome/trunk/legacy/specs/S10gnome =================================================================== --- csw/mgar/pkg/S10gnome/trunk/legacy/specs/S10gnome (rev 0) +++ csw/mgar/pkg/S10gnome/trunk/legacy/specs/S10gnome 2009-04-27 12:36:01 UTC (rev 4483) @@ -0,0 +1,206 @@ +# vim: ft=perl +# $Id: S10gnome,v 1.3 2004/12/07 18:53:55 simigern Exp $ + +$progname = 'gnome'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnome.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-dtlogin-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ( { + pkgname => "gnomedtlogin", + filename => "gnome_dtlogin", + name => "gnome_dtlogin - GNOME 2 dtlogin integration", + filelist => [qw('etc/dt/appconfig' + 'etc/dt/config/Xinitrc.CSWgnome' + 'etc/dt/config/Xsession.CSWgnome' + 'etc/dt/config/Xsession2.CSWgnome' + 'etc/dt/config/C/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar_EG.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de_AT.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_GB.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_IE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he_IL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.PCK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.eucJP/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.ISO8859-11/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.TIS620/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.GBK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_HK.BIG5HK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.BIG5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.UTF-8/Xresources.d/Xresources.CSWgnome')] + + }); + +push @csw_ignore, 'etc/dt'; +push @csw_ignore, 'etc/dt/appconfig'; +push @csw_ignore, 'etc/dt/appconfig/icons'; +push @csw_ignore, 'etc/dt/appconfig/icons/C'; +push @csw_ignore, 'etc/dt/config'; + +push @csw_dirs, 'etc/dt/config/C'; +push @csw_dirs, 'etc/dt/config/ar'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/de'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/de.UTF-8'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8'; +push @csw_dirs, 'etc/dt/config/es'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/es.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/he'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/it'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/it.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP'; +push @csw_dirs, 'etc/dt/config/ko'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8'; +push @csw_dirs, 'etc/dt/config/pt_BR'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8'; +push @csw_dirs, 'etc/dt/config/sv'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8'; +push @csw_dirs, 'etc/dt/config/th_TH'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh'; +push @csw_dirs, 'etc/dt/config/zh.GBK'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK'; +push @csw_dirs, 'etc/dt/config/zh_TW'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8'; + +push @csw_dirs, 'etc/dt/config/C/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.GBK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8/Xresources.d'; + +#'CSWgnomemedia', + +$copyright = "${progname}-dtlogin-${version}/COPYING"; + +$arch="all"; +$osversion="5.10"; + +$build = <<"EOF"; +cd ${progname}-dtlogin-${version} +mkdir -p ${buildroot} +gcp -vax * ${buildroot}/ +cat >COPYING <<__EOF__ +See dependancies for license-informations +__EOF__ +perl -p -i -e 's/\\+kb //;' etc/dt/config/C/Xresources.d/Xresources.CSWgnome +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:18 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4484] csw/mgar/pkg Message-ID: 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 () { + 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 + +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 + +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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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 + #include + #include +-#include ++//#include + #include + #include + #include +@@ -38,6 +38,91 @@ + #include "anjuta.h" + + #define FILE_BUFFER_SIZE 1024 ++#define __MAX_BAUD B460800 ++ ++/* Forkpty */ ++#include ++#include ++#include ++#include ++ ++/* 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; nbnb_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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:34 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4485] csw/mgar/pkg Message-ID: Revision: 4485 http://gar.svn.sourceforge.net/gar/?rev=4485&view=rev Author: dmichelsen Date: 2009-04-27 12:36:34 +0000 (Mon, 27 Apr 2009) Log Message: ----------- atspi: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/atspi/ csw/mgar/pkg/atspi/trunk/ csw/mgar/pkg/atspi/trunk/legacy/ csw/mgar/pkg/atspi/trunk/legacy/scripts/ csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/atspi/trunk/legacy/scripts/human.pl csw/mgar/pkg/atspi/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/atspi/trunk/legacy/sources/ csw/mgar/pkg/atspi/trunk/legacy/specs/ csw/mgar/pkg/atspi/trunk/legacy/specs/Makefile csw/mgar/pkg/atspi/trunk/legacy/specs/atspi Added: csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:36:34 UTC (rev 4485) @@ -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/atspi/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/scripts/human.pl 2009-04-27 12:36:34 UTC (rev 4485) @@ -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 () { + 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 + +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 + +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/atspi/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:36:34 UTC (rev 4485) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/atspi/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/specs/Makefile 2009-04-27 12:36:34 UTC (rev 4485) @@ -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/atspi/trunk/legacy/specs/atspi =================================================================== --- csw/mgar/pkg/atspi/trunk/legacy/specs/atspi (rev 0) +++ csw/mgar/pkg/atspi/trunk/legacy/specs/atspi 2009-04-27 12:36:34 UTC (rev 4485) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: atspi,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'at-spi'; +$version = '1.6.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/at-spi packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "atspi", + filename => "atspi", + name => "atspi - An Assistive Technology Service Provider Interface", + 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 -I/usr/openwin/include" +export CPPFLAGS='-I/opt/csw/include -I/usr/openwin/include' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib -L/usr/openwin/lib -R/usr/openwin/lib' +cd ${progname}-${version} +./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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:36:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:36:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4486] csw/mgar/pkg Message-ID: Revision: 4486 http://gar.svn.sourceforge.net/gar/?rev=4486&view=rev Author: dmichelsen Date: 2009-04-27 12:36:49 +0000 (Mon, 27 Apr 2009) Log Message: ----------- bass: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/bass/ csw/mgar/pkg/bass/trunk/ csw/mgar/pkg/bass/trunk/legacy/ csw/mgar/pkg/bass/trunk/legacy/scripts/ csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/bass/trunk/legacy/scripts/human.pl csw/mgar/pkg/bass/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/bass/trunk/legacy/sources/ csw/mgar/pkg/bass/trunk/legacy/specs/ csw/mgar/pkg/bass/trunk/legacy/specs/Makefile csw/mgar/pkg/bass/trunk/legacy/specs/bass Added: csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:36:49 UTC (rev 4486) @@ -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/bass/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/scripts/human.pl 2009-04-27 12:36:49 UTC (rev 4486) @@ -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 () { + 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 + +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 + +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/bass/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:36:49 UTC (rev 4486) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/bass/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/specs/Makefile 2009-04-27 12:36:49 UTC (rev 4486) @@ -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/bass/trunk/legacy/specs/bass =================================================================== --- csw/mgar/pkg/bass/trunk/legacy/specs/bass (rev 0) +++ csw/mgar/pkg/bass/trunk/legacy/specs/bass 2009-04-27 12:36:49 UTC (rev 4486) @@ -0,0 +1,85 @@ +# vim: ft=perl +# $Id: bass,v 1.2 2005/01/09 14:42:06 simigern Exp $ + +$progname = 'bass'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.revolution.co.uk/ packaged for CSW by Michael Gernoth'; + + at sources = (); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Beneath a Steel Sky, a science fiction adventure game", + dependencies => ['CSWcommon','CSWscummvm'], + filelist => [qw(opt)] + }); + +$arch="all"; +$osversion="5.8"; + +$copyright = "sky-cd/COPYING"; + +$build = <<"EOF"; +unzip ${RealBin}/../sources/BASS-CD.zip +cd sky-cd +cat >COPYING <<__EOF__ +Preamble: + Basically, give this game away, share it with your friends. Don't remove this +Readme, or pretend you wrote it. You can include it in a software collection, +like a linux distribution or coverdisk (which may be sold), but using it in +things like commercial adventure game collections without asking is just playing +dirty. This preamble is not legally binding, but is to clarify the intent of the +following license. + +License: + 1) You may distribute this game for free on any medium, provided this readme +and all associated copyright notices and disclaimers are left intact. + + 2) You may charge a reasonable copying fee for this archive, and may distribute +it in aggregate as part of a larger & possibly commercial software distribution +(such as a Linux distribution or magazine coverdisk). You must provide proper +attribution and ensure this readme and all associated copyright notices, and +disclaimers are left intact. + + 3) You may not charge a fee for the game itself. This includes reselling the +game as an individual item. + +4) All game content is (C) Revolution Software Ltd. The ScummVM engine is (C) +The ScummVM Team (www.scummvm.org) + +5) THE GAMEDATA IN THIS ARCHIVE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING AND NOT LIMITED TO ANY IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. +__EOF__ +mkdir -p ${buildroot}/opt/csw/share/bass ${buildroot}/opt/csw/share/doc/bass ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/share/applications +cp sky.dnr sky.dsk ${buildroot}/opt/csw/share/bass/ +cp readme.txt ${buildroot}/opt/csw/share/doc/bass/ +chmod 644 ${buildroot}/opt/csw/share/bass/* ${buildroot}/opt/csw/share/doc/bass/* +cat >${buildroot}/opt/csw/bin/bass <<__EOF__ +#!/bin/sh + +exec /opt/csw/bin/scummvm -p /opt/csw/share/bass "\\\$@" sky +__EOF__ +chmod 755 ${buildroot}/opt/csw/bin/bass + +cat >${buildroot}/opt/csw/share/applications/bass.desktop <<__EOF__ +[Desktop Entry] +Encoding=UTF-8 +Name=Beneath a Steel Sky +Comment=A science fiction adventure game +Exec=bass +Icon=scummvm.xpm +Terminal=false +Type=Application +Categories=Application;Game;AdventureGame; +StartupNotify=false +__EOF__ + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4487] csw/mgar/pkg Message-ID: Revision: 4487 http://gar.svn.sourceforge.net/gar/?rev=4487&view=rev Author: dmichelsen Date: 2009-04-27 12:37:05 +0000 (Mon, 27 Apr 2009) Log Message: ----------- bluefish: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/bluefish/ csw/mgar/pkg/bluefish/trunk/ csw/mgar/pkg/bluefish/trunk/legacy/ csw/mgar/pkg/bluefish/trunk/legacy/scripts/ csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/bluefish/trunk/legacy/scripts/human.pl csw/mgar/pkg/bluefish/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/bluefish/trunk/legacy/sources/ csw/mgar/pkg/bluefish/trunk/legacy/sources/bluefish.solaris.patch csw/mgar/pkg/bluefish/trunk/legacy/specs/ csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile csw/mgar/pkg/bluefish/trunk/legacy/specs/bluefish Added: csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:05 UTC (rev 4487) @@ -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/bluefish/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/scripts/human.pl 2009-04-27 12:37:05 UTC (rev 4487) @@ -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 () { + 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 + +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 + +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/bluefish/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:05 UTC (rev 4487) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/bluefish/trunk/legacy/sources/bluefish.solaris.patch =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/sources/bluefish.solaris.patch (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/sources/bluefish.solaris.patch 2009-04-27 12:37:05 UTC (rev 4487) @@ -0,0 +1,21 @@ +--- src/document.c.orig 2005-01-16 15:10:55.279769000 -0500 ++++ src/document.c 2005-01-16 15:12:02.019827000 -0500 +@@ -23,7 +23,6 @@ + /* this is needed for Solaris to comply with the latest POSIX standard + * regarding the ctime_r() function + * the problem is that it generates a compiler warning on Linux, lstat() undefined.. */ +-#define _POSIX_C_SOURCE 200312L + + #include + #include /* for the keyboard event codes */ +--- src/highlight.c.orig 2005-01-16 15:23:01.659817000 -0500 ++++ src/highlight.c 2005-01-16 15:25:16.529749000 -0500 +@@ -154,7 +154,7 @@ + /*********************************/ + /* debugging */ + /*********************************/ +-#ifdef DEBUG ++#if 1 + + static void print_meta_for_pattern(Tpattern *pat) { + GList *tmplist = g_list_first(highlight.all_highlight_patterns); Added: csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/specs/Makefile 2009-04-27 12:37:05 UTC (rev 4487) @@ -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/bluefish/trunk/legacy/specs/bluefish =================================================================== --- csw/mgar/pkg/bluefish/trunk/legacy/specs/bluefish (rev 0) +++ csw/mgar/pkg/bluefish/trunk/legacy/specs/bluefish 2009-04-27 12:37:05 UTC (rev 4487) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: bluefish,v 1.4 2005/01/16 20:40:33 simigern Exp $ + +$progname = 'bluefish'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://bluefish.openoffice.nl/ packaged for CSW by Michael Gernoth'; + + at patches = (['bluefish.solaris.patch', "${progname}-${version}", '-p0']); + + at sources = ("${progname}-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A GTK-based Web development editor", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall' + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin:${builddir}/${progname}-${version}" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8 -D_POSIX_PTHREAD_SEMANTICS' +else + export CFLAGS='-fast -xarch=386 -D_POSIX_PTHREAD_SEMANTICS' +fi +cd ${progname}-${version} +ln -s /opt/csw/bin/gmsgfmt msgfmt +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --disable-update-databases +gmake || exit 1 +gmake prefix=${buildroot}/opt/csw pixmapsdir=${buildroot}/opt/csw/share/pixmaps iconpath=${buildroot}/opt/csw/share/pixmaps FDMENU=${buildroot}/opt/csw/share/applications FDMIME=${buildroot}/opt/csw/share/mime GMIMEINFO=${buildroot}/opt/csw/share/mime-info GAPPREG=${buildroot}/opt/csw/share/application-registry ICONPATH=${buildroot}/opt/csw/share/pixmaps install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4488] csw/mgar/pkg Message-ID: Revision: 4488 http://gar.svn.sourceforge.net/gar/?rev=4488&view=rev Author: dmichelsen Date: 2009-04-27 12:37:20 +0000 (Mon, 27 Apr 2009) Log Message: ----------- boxbackup: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/boxbackup/ csw/mgar/pkg/boxbackup/trunk/ csw/mgar/pkg/boxbackup/trunk/legacy/ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/boxbackup/trunk/legacy/scripts/human.pl csw/mgar/pkg/boxbackup/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/boxbackup/trunk/legacy/sources/ csw/mgar/pkg/boxbackup/trunk/legacy/sources/boxbackup-locale.diff csw/mgar/pkg/boxbackup/trunk/legacy/specs/ csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile csw/mgar/pkg/boxbackup/trunk/legacy/specs/boxbackup Added: csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:20 UTC (rev 4488) @@ -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/boxbackup/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/human.pl 2009-04-27 12:37:20 UTC (rev 4488) @@ -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 () { + 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 + +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 + +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/boxbackup/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:20 UTC (rev 4488) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/boxbackup/trunk/legacy/sources/boxbackup-locale.diff =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/sources/boxbackup-locale.diff (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/sources/boxbackup-locale.diff 2009-04-27 12:37:20 UTC (rev 4488) @@ -0,0 +1,10 @@ +--- bin/bbackupquery/bbackupquery.cpp.orig Fri Apr 11 16:43:34 2008 ++++ bin/bbackupquery/bbackupquery.cpp Fri Apr 11 16:43:53 2008 +@@ -54,6 +54,7 @@ + + #include + #include ++#include + + #ifdef HAVE_SYS_TYPES_H + #include Added: csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/specs/Makefile 2009-04-27 12:37:20 UTC (rev 4488) @@ -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/boxbackup/trunk/legacy/specs/boxbackup =================================================================== --- csw/mgar/pkg/boxbackup/trunk/legacy/specs/boxbackup (rev 0) +++ csw/mgar/pkg/boxbackup/trunk/legacy/specs/boxbackup 2009-04-27 12:37:20 UTC (rev 4488) @@ -0,0 +1,51 @@ +# vim: ft=perl +# $Id: boxbackup,v 1.3 2008-04-11 14:58:08 simigern Exp $ + +$progname = 'boxbackup'; +$version = '0.11rc2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.boxbackup.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tgz"); + + at patches = (['boxbackup-locale.diff', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An open source, completely automatic on-line backup system for UNIX", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/LICENSE.txt"; + +$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/bdb43/include -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/bdb43/include -I/opt/csw/include' +export LD_OPTIONS='-R/opt/csw/bdb43/lib -L/opt/csw/bdb43/lib -R/opt/csw/lib -L/opt/csw/lib' +export CXXFLAGS="\$CFLAGS \$LD_OPTIONS" +export LIBS='-ldb -lnsl -lsocket' +export LD_RUN_PATH='/opt/csw/bdb43/lib:/opt/csw/lib' +export LC_ALL=C +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-bdb-headers=/opt/csw/bdb43/include --with-bdb-lib=/opt/csw/bdb43/lib --enable-gnu-readline +gmake || exit 1 +export PATH="`pwd`:\${PATH}" +ln -s /opt/csw/bin/ginstall install +mkdir -p ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/lib/svc/{manifest,method} +gmake DESTDIR=${buildroot} install-backup-client +gmake DESTDIR=${buildroot} install-backup-server +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:36 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4489] csw/mgar/pkg Message-ID: Revision: 4489 http://gar.svn.sourceforge.net/gar/?rev=4489&view=rev Author: dmichelsen Date: 2009-04-27 12:37:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- control-center: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/control-center/ csw/mgar/pkg/control-center/trunk/ csw/mgar/pkg/control-center/trunk/legacy/ csw/mgar/pkg/control-center/trunk/legacy/scripts/ csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/control-center/trunk/legacy/scripts/human.pl csw/mgar/pkg/control-center/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/control-center/trunk/legacy/sources/ csw/mgar/pkg/control-center/trunk/legacy/sources/control-center.quiet.patch csw/mgar/pkg/control-center/trunk/legacy/specs/ csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile csw/mgar/pkg/control-center/trunk/legacy/specs/control-center Added: csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:36 UTC (rev 4489) @@ -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/control-center/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/scripts/human.pl 2009-04-27 12:37:36 UTC (rev 4489) @@ -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 () { + 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 + +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 + +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/control-center/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:36 UTC (rev 4489) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/control-center/trunk/legacy/sources/control-center.quiet.patch =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/sources/control-center.quiet.patch (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/sources/control-center.quiet.patch 2009-04-27 12:37:36 UTC (rev 4489) @@ -0,0 +1,10 @@ +--- gnome-settings-daemon/gnome-settings-keyboard-xkb.c.orig 2004-04-10 11:16:52.339997000 -0400 ++++ gnome-settings-daemon/gnome-settings-keyboard-xkb.c 2004-04-10 11:17:04.819995000 -0400 +@@ -51,6 +51,7 @@ + static void + activation_error (void) + { ++ return; + char *vendor = ServerVendor (GDK_DISPLAY ()); + int release = VendorRelease (GDK_DISPLAY ()); + gboolean badXFree430Release = (!strcmp (vendor, Added: csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/specs/Makefile 2009-04-27 12:37:36 UTC (rev 4489) @@ -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/control-center/trunk/legacy/specs/control-center =================================================================== --- csw/mgar/pkg/control-center/trunk/legacy/specs/control-center (rev 0) +++ csw/mgar/pkg/control-center/trunk/legacy/specs/control-center 2009-04-27 12:37:36 UTC (rev 4489) @@ -0,0 +1,66 @@ +# vim: ft=perl +# $Id: control-center,v 1.12 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'control-center'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['control-center.quiet.patch', "${progname}-${version}", '-p0'], + ['xkbrules.h.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "controlcenter", + filename => "control_center", + name => "control_center - The GNOME Control Center for GNOME 2", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-lfontconfig -L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +sed -e 's|-Wall -Werror||' libkbdraw/Makefile.in >libkbdraw/Makefile.innew +mv libkbdraw/Makefile.innew libkbdraw/Makefile.in + +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,window-manager-settings/*.la,gnome-vfs-2.0/modules/*.la,bonobo/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:37:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:37:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4490] csw/mgar/pkg Message-ID: Revision: 4490 http://gar.svn.sourceforge.net/gar/?rev=4490&view=rev Author: dmichelsen Date: 2009-04-27 12:37:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- desktop-file-utils: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/desktop-file-utils/ csw/mgar/pkg/desktop-file-utils/trunk/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/human.pl csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/ csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/desktop-file-utils Added: csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:37:51 UTC (rev 4490) @@ -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/desktop-file-utils/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/human.pl 2009-04-27 12:37:51 UTC (rev 4490) @@ -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 () { + 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 + +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 + +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/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:37:51 UTC (rev 4490) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/sources/desktop-file-utils.postinstall 2009-04-27 12:37:51 UTC (rev 4490) @@ -0,0 +1,11 @@ +#!/bin/sh + +echo 'CSW update-desktop-database running...' + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +chroot "${PKG_ROOT_DIR}" /opt/csw/bin/update-desktop-database /opt/csw/share/applications + +/bin/true Added: csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/Makefile 2009-04-27 12:37:51 UTC (rev 4490) @@ -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/desktop-file-utils/trunk/legacy/specs/desktop-file-utils =================================================================== --- csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/desktop-file-utils (rev 0) +++ csw/mgar/pkg/desktop-file-utils/trunk/legacy/specs/desktop-file-utils 2009-04-27 12:37:51 UTC (rev 4490) @@ -0,0 +1,44 @@ +# vim: ft=perl +# $Id: desktop-file-utils,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'desktop-file-utils'; +$version = '0.10'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/wiki/Software_2fdesktop_2dfile_2dutils packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "dtopfutils", + filename => "desktopfileutils", + name => "desktopfileutils - utilities for working with desktop entries and .menu files", + dependencies => ['CSWcommon'], + postinstall => 'desktop-file-utils.postinstall', + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +mkdir -p ${buildroot}/opt/csw/share/applications +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4491] csw/mgar/pkg/diffstat/trunk Message-ID: Revision: 4491 http://gar.svn.sourceforge.net/gar/?rev=4491&view=rev Author: dmichelsen Date: 2009-04-27 12:38:06 +0000 (Mon, 27 Apr 2009) Log Message: ----------- diffstat: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/diffstat/trunk/legacy/ csw/mgar/pkg/diffstat/trunk/legacy/scripts/ csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/diffstat/trunk/legacy/scripts/human.pl csw/mgar/pkg/diffstat/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/diffstat/trunk/legacy/sources/ csw/mgar/pkg/diffstat/trunk/legacy/specs/ csw/mgar/pkg/diffstat/trunk/legacy/specs/Makefile csw/mgar/pkg/diffstat/trunk/legacy/specs/diffstat Added: csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:06 UTC (rev 4491) @@ -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/diffstat/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/scripts/human.pl 2009-04-27 12:38:06 UTC (rev 4491) @@ -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 () { + 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 + +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 + +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/diffstat/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:06 UTC (rev 4491) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/diffstat/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/specs/Makefile 2009-04-27 12:38:06 UTC (rev 4491) @@ -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/diffstat/trunk/legacy/specs/diffstat =================================================================== --- csw/mgar/pkg/diffstat/trunk/legacy/specs/diffstat (rev 0) +++ csw/mgar/pkg/diffstat/trunk/legacy/specs/diffstat 2009-04-27 12:38:06 UTC (rev 4491) @@ -0,0 +1,41 @@ +# vim: ft=perl +# $Id: diffstat,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'diffstat'; +$version = '1.34'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://invisible-island.net/diffstat/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}.tar.gz"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A utility which provides statistics based on the output of diff", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake || exit 1 +gmake DESTDIR=${buildroot} install +head -20 diffstat.c >COPYING +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4492] csw/mgar/pkg Message-ID: Revision: 4492 http://gar.svn.sourceforge.net/gar/?rev=4492&view=rev Author: dmichelsen Date: 2009-04-27 12:38:21 +0000 (Mon, 27 Apr 2009) Log Message: ----------- enigma: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/enigma/ csw/mgar/pkg/enigma/trunk/ csw/mgar/pkg/enigma/trunk/legacy/ csw/mgar/pkg/enigma/trunk/legacy/scripts/ csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/enigma/trunk/legacy/scripts/human.pl csw/mgar/pkg/enigma/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/enigma/trunk/legacy/sources/ csw/mgar/pkg/enigma/trunk/legacy/specs/ csw/mgar/pkg/enigma/trunk/legacy/specs/Makefile csw/mgar/pkg/enigma/trunk/legacy/specs/enigma Added: csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:21 UTC (rev 4492) @@ -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/enigma/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/scripts/human.pl 2009-04-27 12:38:21 UTC (rev 4492) @@ -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 () { + 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 + +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 + +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/enigma/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:21 UTC (rev 4492) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/enigma/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/specs/Makefile 2009-04-27 12:38:21 UTC (rev 4492) @@ -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/enigma/trunk/legacy/specs/enigma =================================================================== --- csw/mgar/pkg/enigma/trunk/legacy/specs/enigma (rev 0) +++ csw/mgar/pkg/enigma/trunk/legacy/specs/enigma 2009-04-27 12:38:21 UTC (rev 4492) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: enigma,v 1.1 2004/08/06 22:43:40 simigern Exp $ + +$progname = 'enigma'; +$version = '0.81'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.nongnu.org/enigma/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - a puzzle game inspired by Oxyd", + 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 +# #I got bad code with tla... +# #export CFLAGS='-fast -xarch=386' +# export CFLAGS='' +#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' +export CC=gcc +export CXX=g++ +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake prefix=/opt/build/michael/${progname}-${version}-buildroot/opt/csw mandir=/opt/build/michael/${progname}-${version}-buildroot/opt/csw/share/man install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4493] csw/mgar/pkg Message-ID: Revision: 4493 http://gar.svn.sourceforge.net/gar/?rev=4493&view=rev Author: dmichelsen Date: 2009-04-27 12:38:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- eog: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/eog/ csw/mgar/pkg/eog/trunk/ csw/mgar/pkg/eog/trunk/legacy/ csw/mgar/pkg/eog/trunk/legacy/scripts/ csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/eog/trunk/legacy/scripts/human.pl csw/mgar/pkg/eog/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/eog/trunk/legacy/sources/ csw/mgar/pkg/eog/trunk/legacy/specs/ csw/mgar/pkg/eog/trunk/legacy/specs/Makefile csw/mgar/pkg/eog/trunk/legacy/specs/eog Added: csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:36 UTC (rev 4493) @@ -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/eog/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/scripts/human.pl 2009-04-27 12:38:36 UTC (rev 4493) @@ -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 () { + 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 + +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 + +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/eog/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:36 UTC (rev 4493) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/eog/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/specs/Makefile 2009-04-27 12:38:36 UTC (rev 4493) @@ -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/eog/trunk/legacy/specs/eog =================================================================== --- csw/mgar/pkg/eog/trunk/legacy/specs/eog (rev 0) +++ csw/mgar/pkg/eog/trunk/legacy/specs/eog 2009-04-27 12:38:36 UTC (rev 4493) @@ -0,0 +1,52 @@ +# vim: ft=perl +# $Id: eog,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'eog'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/eog/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Eye Of Gnome image viewer", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-ljpeg -L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +##Stop nautilus crashing... +#rm ${buildroot}/opt/csw/lib/bonobo/servers/GNOME_EOG_Collection.server + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:38:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:38:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4494] csw/mgar/pkg Message-ID: Revision: 4494 http://gar.svn.sourceforge.net/gar/?rev=4494&view=rev Author: dmichelsen Date: 2009-04-27 12:38:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- epiphany: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/epiphany/ csw/mgar/pkg/epiphany/trunk/ csw/mgar/pkg/epiphany/trunk/legacy/ csw/mgar/pkg/epiphany/trunk/legacy/scripts/ csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/epiphany/trunk/legacy/scripts/human.pl csw/mgar/pkg/epiphany/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/epiphany/trunk/legacy/sources/ csw/mgar/pkg/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch csw/mgar/pkg/epiphany/trunk/legacy/specs/ csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile csw/mgar/pkg/epiphany/trunk/legacy/specs/epiphany Added: csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:38:53 UTC (rev 4494) @@ -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/epiphany/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/scripts/human.pl 2009-04-27 12:38:53 UTC (rev 4494) @@ -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 () { + 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 + +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 + +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/epiphany/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:38:53 UTC (rev 4494) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/sources/epiphany.nongccglibc.patch 2009-04-27 12:38:53 UTC (rev 4494) @@ -0,0 +1,240 @@ +--- lib/ephy-debug.h.orig 2004-12-08 07:40:23.066402000 -0500 ++++ lib/ephy-debug.h 2004-12-08 07:41:05.026335000 -0500 +@@ -35,12 +35,12 @@ + #endif + + #ifdef DISABLE_LOGGING +-#define LOG(msg, args...) ++#define LOG(msg, ...) + #else +-#define LOG(msg, args...) \ ++#define LOG(msg, ...) \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "[ %s ] " msg, \ +- __FILE__ , ## args); ++ __FILE__ , __VA_ARGS__); + #endif + + #ifdef DISABLE_PROFILING +--- lib/ephy-file-helpers.c.orig 2004-12-08 07:45:24.576366000 -0500 ++++ lib/ephy-file-helpers.c 2004-12-08 07:53:12.186326000 -0500 +@@ -18,6 +18,10 @@ + * $Id: ephy-file-helpers.c,v 1.20.4.1 2004/10/02 14:23:18 chpe Exp $ + */ + ++#ifndef HAVE_MKDTEMP ++#include "mkdtemp.c" ++#endif ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -52,11 +56,7 @@ + "-XXXXXX", NULL); + full_name = g_build_filename (g_get_tmp_dir (), partial_name, + NULL); +-#ifdef HAVE_MKDTEMP + tmp_dir = mkdtemp (full_name); +-#else +-#error no mkdtemp implementation +-#endif + g_free (partial_name); + + if (tmp_dir == NULL) +--- /dev/null 2004-12-08 07:55:48.000000000 -0500 ++++ lib/mkdtemp.c 2004-12-08 07:53:36.776335000 -0500 +@@ -0,0 +1,194 @@ ++/* Copyright (C) 1999, 2001-2002 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public License as ++ published by the Free Software Foundation; either version 2 of the ++ License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with the GNU C Library; see the file COPYING.LIB. If not, ++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ ++ ++/* Extracted from misc/mkdtemp.c and sysdeps/posix/tempname.c. */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#include ++#ifndef __set_errno ++# define __set_errno(Val) errno = (Val) ++#endif ++ ++#include ++#include ++#include ++ ++#include ++#ifndef TMP_MAX ++# define TMP_MAX 238328 ++#endif ++ ++#if HAVE_STDINT_H_WITH_UINTMAX || _LIBC ++# include ++#endif ++ ++#if HAVE_INTTYPES_H_WITH_UINTMAX || _LIBC ++# include ++#endif ++ ++#if HAVE_UNISTD_H || _LIBC ++# include ++#endif ++ ++#if HAVE_GETTIMEOFDAY || _LIBC ++# if HAVE_SYS_TIME_H || _LIBC ++# include ++# endif ++#else ++# if HAVE_TIME_H || _LIBC ++# include ++# endif ++#endif ++ ++#include ++#if STAT_MACROS_BROKEN ++# undef S_ISDIR ++#endif ++#if !defined S_ISDIR && defined S_IFDIR ++# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) ++#endif ++#if !S_IRUSR && S_IREAD ++# define S_IRUSR S_IREAD ++#endif ++#if !S_IRUSR ++# define S_IRUSR 00400 ++#endif ++#if !S_IWUSR && S_IWRITE ++# define S_IWUSR S_IWRITE ++#endif ++#if !S_IWUSR ++# define S_IWUSR 00200 ++#endif ++#if !S_IXUSR && S_IEXEC ++# define S_IXUSR S_IEXEC ++#endif ++#if !S_IXUSR ++# define S_IXUSR 00100 ++#endif ++ ++#if !_LIBC ++# define __getpid getpid ++# define __gettimeofday gettimeofday ++# define __mkdir mkdir ++#endif ++ ++/* Use the widest available unsigned type if uint64_t is not ++ available. The algorithm below extracts a number less than 62**6 ++ (approximately 2**35.725) from uint64_t, so ancient hosts where ++ uintmax_t is only 32 bits lose about 3.725 bits of randomness, ++ which is better than not having mkstemp at all. */ ++#if !defined UINT64_MAX && !defined uint64_t ++# define uint64_t uintmax_t ++#endif ++ ++/* These are the characters used in temporary filenames. */ ++static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; ++ ++/* Generate a temporary file name based on TMPL. TMPL must match the ++ rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed ++ does not exist at the time of the call to __gen_tempname. TMPL is ++ overwritten with the result. ++ ++ KIND is: ++ __GT_DIR: create a directory, which will be mode 0700. ++ ++ We use a clever algorithm to get hard-to-predict names. */ ++static int gen_tempname (char* tmpl) ++{ ++ int len; ++ char *XXXXXX; ++ static uint64_t value; ++ uint64_t random_time_bits; ++ int count, fd = -1; ++ int save_errno = errno; ++ ++ len = strlen (tmpl); ++ if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX")) ++ { ++ __set_errno (EINVAL); ++ return -1; ++ } ++ ++ /* This is where the Xs start. */ ++ XXXXXX = &tmpl[len - 6]; ++ ++ /* Get some more or less random data. */ ++#ifdef RANDOM_BITS ++ RANDOM_BITS (random_time_bits); ++#else ++# if HAVE_GETTIMEOFDAY || _LIBC ++ { ++ struct timeval tv; ++ __gettimeofday (&tv, NULL); ++ random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; ++ } ++# else ++ random_time_bits = time (NULL); ++# endif ++#endif ++ value += random_time_bits ^ __getpid (); ++ ++ for (count = 0; count < TMP_MAX; value += 7777, ++count) ++ { ++ uint64_t v = value; ++ ++ /* Fill in the random bits. */ ++ XXXXXX[0] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[1] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[2] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[3] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[4] = letters[v % 62]; ++ v /= 62; ++ XXXXXX[5] = letters[v % 62]; ++ ++ fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); ++ ++ if (fd >= 0) ++ { ++ __set_errno (save_errno); ++ return fd; ++ } ++ else if (errno != EEXIST) ++ return -1; ++ } ++ ++ /* We got out of the loop because we ran out of combinations to try. */ ++ __set_errno (EEXIST); ++ return -1; ++} ++ ++/* Generate a unique temporary directory from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ The directory is created, mode 700, and its name is returned. ++ (This function comes from OpenBSD.) */ ++char * ++mkdtemp (char *template) ++{ ++ if (gen_tempname (template)) ++ return NULL; ++ else ++ return template; ++} Added: csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/specs/Makefile 2009-04-27 12:38:53 UTC (rev 4494) @@ -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/epiphany/trunk/legacy/specs/epiphany =================================================================== --- csw/mgar/pkg/epiphany/trunk/legacy/specs/epiphany (rev 0) +++ csw/mgar/pkg/epiphany/trunk/legacy/specs/epiphany 2009-04-27 12:38:53 UTC (rev 4494) @@ -0,0 +1,73 @@ +# vim: ft=perl +# $Id: epiphany,v 1.8 2005/03/27 11:23:55 simigern Exp $ + +$progname = 'epiphany'; +$version = '1.4.8'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/epiphany/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['epiphany.nongccglibc.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The web browser for the GNOME Desktop", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/mozilla -L/opt/csw/lib/mozilla -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/mozilla -L/opt/csw/lib/mozilla -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +mkdir -p ${buildroot}/opt/csw/libexec +mv ${buildroot}/opt/csw/bin/epiphany ${buildroot}/opt/csw/libexec/epiphany +cat >${buildroot}/opt/csw/bin/epiphany <<__EOF__ +#!/bin/sh + +LD_LIBRARY_PATH=/opt/csw/lib/mozilla +export LD_LIBRARY_PATH +exec /opt/csw/libexec/epiphany "\\\$@" +__EOF__ +chmod 755 ${buildroot}/opt/csw/bin/epiphany + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +rm -rf ${buildroot}/opt/csw/var/scrollkeeper + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:39:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:39:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4495] csw/mgar/pkg Message-ID: Revision: 4495 http://gar.svn.sourceforge.net/gar/?rev=4495&view=rev Author: dmichelsen Date: 2009-04-27 12:39:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- evolution: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/evolution/ csw/mgar/pkg/evolution/trunk/ csw/mgar/pkg/evolution/trunk/legacy/ csw/mgar/pkg/evolution/trunk/legacy/scripts/ csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/evolution/trunk/legacy/scripts/human.pl csw/mgar/pkg/evolution/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/evolution/trunk/legacy/sources/ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-146-configure.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch csw/mgar/pkg/evolution/trunk/legacy/specs/ csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile csw/mgar/pkg/evolution/trunk/legacy/specs/evolution Added: csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:39:15 UTC (rev 4495) @@ -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/evolution/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/scripts/human.pl 2009-04-27 12:39:15 UTC (rev 4495) @@ -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 () { + 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 + +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 + +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/evolution/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:39:15 UTC (rev 4495) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/evolution/trunk/legacy/sources/evolution-146-configure.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-146-configure.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-146-configure.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,20 @@ +--- configure.orig 2004-03-14 03:52:15.406174060 +0100 ++++ configure 2004-03-14 03:52:36.489888010 +0100 +@@ -11734,7 +11734,7 @@ + ac_cv_db3_ldadd="" + + for name in db db3 db-3.1; do +- LIBS="$LIBS_save $with_db3_libs/lib${name}.a -pthread" ++ LIBS="$LIBS_save $with_db3_libs/lib${name}.a" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ +@@ -11803,7 +11803,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- LIBS="$DB3_LDADD $LIBS -pthread" ++ LIBS="$DB3_LDADD $LIBS" + if test "$cross_compiling" = yes; then + ac_cv_db3_lib_version_match=yes + else Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-camel-pop3-store.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- camel/providers/pop3/camel-pop3-store.c.orig 2004-03-07 13:34:04.219075000 +0100 ++++ camel/providers/pop3/camel-pop3-store.c 2004-03-07 13:34:53.471146000 +0100 +@@ -530,7 +530,7 @@ + _("Unable to connect to POP server %s.\n" + "Error sending password: %s"), + CAMEL_SERVICE (store)->url->host, +- store->engine->line ? store->engine->line : _("Unknown error")); ++ store->engine->line ? (char*)store->engine->line : _("Unknown error")); + + camel_pop3_engine_command_free(store->engine, pcp); + Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,121 @@ +--- evolution-data-server-1.0.0/addressbook/libebook/e-book.c.orig 2004-09-27 05:56:55.328187000 -0400 ++++ evolution-data-server-1.0.0/addressbook/libebook/e-book.c 2004-09-27 05:57:35.848160000 -0400 +@@ -32,16 +32,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_BOOK_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libecal/e-cal.c.orig 2004-09-27 06:02:06.222945000 -0400 ++++ evolution-data-server-1.0.0/calendar/libecal/e-cal.c 2004-09-27 06:02:24.362926000 -0400 +@@ -126,16 +126,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_CALENDAR_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c.orig 2004-09-27 06:04:14.912978000 -0400 ++++ evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c 2004-09-27 06:04:43.372917000 -0400 +@@ -732,7 +732,7 @@ + g_return_if_fail (E_IS_CAL_BACKEND (backend)); + + g_assert (CLASS (backend)->get_object_list != NULL); +- return (* CLASS (backend)->get_object_list) (backend, cal, sexp); ++ (* CLASS (backend)->get_object_list) (backend, cal, sexp); + } + + /** +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c.orig 2004-09-27 06:06:28.492978000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c 2004-09-27 06:08:50.382913000 -0400 +@@ -30,6 +30,7 @@ + + /* Private part of the CalBackendFileEvents structure */ + struct _ECalBackendFileEventsPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c.orig 2004-09-27 06:09:35.912969000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c 2004-09-27 06:10:30.842913000 -0400 +@@ -26,6 +26,7 @@ + + /* Private part of the ECalBackendFileTodos structure */ + struct _ECalBackendFileTodosPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c.orig 2004-09-27 06:13:25.892943000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 2004-09-27 06:16:19.392917000 -0400 +@@ -599,7 +599,7 @@ + alarm = e_cal_component_alarm_new (); + e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY); + trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START; +- trigger.u.rel_duration = (struct icaldurationtype) icaldurationtype_from_int (alarm_duration); ++ trigger.u.rel_duration = icaldurationtype_from_int (alarm_duration); + e_cal_component_alarm_set_trigger (alarm, trigger); + e_cal_component_add_alarm (comp, alarm); + } +--- evolution-data-server-1.2.1/camel/camel-store.c.orig 2005-03-26 10:49:03.576595000 -0500 ++++ evolution-data-server-1.2.1/camel/camel-store.c 2005-03-26 10:51:01.386522000 -0500 +@@ -1257,7 +1257,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->subscribe) +- return iface->subscribe(store, folder_name, ex); ++ { ++ iface->subscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented subscribe method on a store"); + } +@@ -1267,7 +1270,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->unsubscribe) +- return iface->unsubscribe(store, folder_name, ex); ++ { ++ iface->unsubscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented unsubscribe method on a store"); + } +--- evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c.orig 2005-03-26 10:58:48.536596000 -0500 ++++ evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c 2005-03-26 10:59:39.186518000 -0500 +@@ -27,7 +27,7 @@ + EWeatherSourceClass *class; + g_return_if_fail (source != NULL); + class = (EWeatherSourceClass*) G_OBJECT_GET_CLASS (source); +- return class->parse (source, done, data); ++ class->parse (source, done, data); + } + + static void Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-e-summary-rdf.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- my-evolution/e-summary-rdf.c.orig 2004-03-07 18:20:05.055034000 +0100 ++++ my-evolution/e-summary-rdf.c 2004-03-07 18:20:26.230345000 +0100 +@@ -194,7 +194,7 @@ + charset = NULL; + } else { + /* bad/missing encoding, fallback to latin1 (locale?) */ +- charset = r->cache->encoding ? r->cache->encoding : "iso-8859-1"; ++ charset = r->cache->encoding ? (char*)r->cache->encoding : "iso-8859-1"; + } + + /* FIXME: Need arrows */ Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-mail-callbacks.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- mail/mail-callbacks.h.orig 2004-03-07 18:27:27.905455000 +0100 ++++ mail/mail-callbacks.h 2004-03-07 18:28:55.986146000 +0100 +@@ -129,7 +129,7 @@ + void composer_send_cb (EMsgComposer *composer, gpointer data); + void composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer data); + +-void forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean inline); ++void forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean); + + /* CamelStore callbacks */ + void folder_created (CamelStore *store, const char *prefix, CamelFolderInfo *fi); Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-nongcc-fixes.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,52 @@ +--- smime/lib/e-cert-db.c.orig 2004-09-27 10:58:59.686195000 -0400 ++++ smime/lib/e-cert-db.c 2004-09-27 10:59:15.146208000 -0400 +@@ -102,6 +102,7 @@ + static guint e_cert_db_signals[LAST_SIGNAL]; + + struct _ECertDBPrivate { ++ unsigned char very_secret; + }; + + #define PARENT_TYPE G_TYPE_OBJECT +--- calendar/gui/e-cal-model-calendar.c.orig 2004-09-27 11:09:01.060427000 -0400 ++++ calendar/gui/e-cal-model-calendar.c 2004-09-27 11:09:14.030440000 -0400 +@@ -28,6 +28,7 @@ + #include "misc.h" + + struct _ECalModelCalendarPrivate { ++ unsigned char very_secret; + }; + + static void ecmc_class_init (ECalModelCalendarClass *klass); +--- calendar/gui/e-cal-model-tasks.c.orig 2004-09-27 11:10:06.350500000 -0400 ++++ calendar/gui/e-cal-model-tasks.c 2004-09-27 11:10:20.470442000 -0400 +@@ -31,6 +31,7 @@ + #include "misc.h" + + struct _ECalModelTasksPrivate { ++ unsigned char very_secret; + }; + + static void ecmt_class_init (ECalModelTasksClass *klass); +--- composer/e-msg-composer-select-file.h.orig 2005-03-26 19:49:35.143777000 -0500 ++++ composer/e-msg-composer-select-file.h 2005-03-26 19:50:07.083699000 -0500 +@@ -28,7 +28,7 @@ + struct _EMsgComposer; + + typedef void (*EMsgComposerSelectFileFunc)(struct _EMsgComposer *composer, const char *filename); +-typedef void (*EMsgComposerSelectAttachFunc)(struct _EMsgComposer *composer, GSList *names, int inline); ++typedef void (*EMsgComposerSelectAttachFunc)(struct _EMsgComposer *composer, GSList *names, int iinline); + + void e_msg_composer_select_file(struct _EMsgComposer *composer, GtkWidget **w, EMsgComposerSelectFileFunc func, const char *title, int save); + void e_msg_composer_select_file_attachments(struct _EMsgComposer *composer, GtkWidget **, EMsgComposerSelectAttachFunc func); +--- plugins/calendar-weather/calendar-weather.c.orig 2005-03-26 20:01:03.561198000 -0500 ++++ plugins/calendar-weather/calendar-weather.c 2005-03-26 20:01:37.321123000 -0500 +@@ -107,7 +107,7 @@ + g_object_unref (weather); + + e_source_list_sync (source_list, NULL); +- return 0; ++ return; + } + + static void Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-plugin-list.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,27 @@ +--- plugins/subject-thread/org-gnome-subject-thread.eplug.in.orig 2005-04-13 12:44:34.065699000 -0400 ++++ plugins/subject-thread/org-gnome-subject-thread.eplug.in 2005-04-13 12:44:39.635639000 -0400 +@@ -11,4 +11,4 @@ + + + +- +\ No newline at end of file ++ +--- plugins/save-calendar/org-gnome-save-calendar.eplug.in.orig 2005-04-13 12:42:26.555716000 -0400 ++++ plugins/save-calendar/org-gnome-save-calendar.eplug.in 2005-04-13 12:42:38.335820000 -0400 +@@ -15,4 +15,4 @@ + + + +- +\ No newline at end of file ++ +--- plugins/select-one-source/org-gnome-select-one-source.eplug.in.orig 2005-04-13 12:43:42.515715000 -0400 ++++ plugins/select-one-source/org-gnome-select-one-source.eplug.in 2005-04-13 12:43:50.255638000 -0400 +@@ -15,4 +15,4 @@ + + + +- +\ No newline at end of file ++ Added: csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/sources/evolution-psfix.patch 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,11 @@ +--- mail/em-junk-filter.c.orig 2004-10-09 19:31:04.369997000 -0400 ++++ mail/em-junk-filter.c 2004-10-09 19:31:52.620013000 -0400 +@@ -295,7 +295,7 @@ + i = 0; + argv [i++] = "/bin/sh"; + argv [i++] = "-c"; +- argv [i++] = "ps ax|grep -v grep|grep -E 'spamd.*(\\-L|\\-\\-local)'|grep -E -v '\\ \\-p\\ |\\ \\-\\-port\\ '"; ++ argv [i++] = "/usr/bin/ps -ef|/usr/xpg4/bin/grep -v grep|/usr/xpg4/bin/grep -E 'spamd.*(\\-L|\\-\\-local)'|/usr/xpg4/bin/grep -E -v '\\ \\-p\\ |\\ \\-\\-port\\ '"; + argv[i] = NULL; + + if (pipe_to_sa (NULL, NULL, argv) != 0) { Added: csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/specs/Makefile 2009-04-27 12:39:15 UTC (rev 4495) @@ -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/evolution/trunk/legacy/specs/evolution =================================================================== --- csw/mgar/pkg/evolution/trunk/legacy/specs/evolution (rev 0) +++ csw/mgar/pkg/evolution/trunk/legacy/specs/evolution 2009-04-27 12:39:15 UTC (rev 4495) @@ -0,0 +1,77 @@ +# vim: ft=perl +# $Id: evolution,v 1.38 2005/04/13 16:48:28 simigern Exp $ + +$progname = 'evolution'; +$version = '2.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnome.org/projects/evolution/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = ( ['evolution-nongcc-fixes.patch', "${progname}-${version}", '-p0'], + ['evolution-psfix.patch', "${progname}-${version}", '-p0'], + ['evolution-plugin-list.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME mail client and PIM", + dependencies => ['CSWcommon','CSWgnomespell','CSWgnomeicontheme'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$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 -I${buildroot}/opt/csw/include" +export CPPFLAGS="-I/opt/csw/include -I${buildroot}/opt/csw/include" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/evolution/nss/lib -L/opt/csw/lib/evolution/nss/lib' +export LDFLAGS="\$LD_OPTIONS" +cd ${builddir} +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig:${buildroot}/opt/csw/lib/pkgconfig +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +sed -e 's| audio-inline | |g' configure | sed -e 's| new-mail-notify||g' >configure.new +mv configure.new configure +chmod 755 configure +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-krb5=/opt/csw --enable-nss=yes --with-openldap=/opt/csw --enable-ipv6=yes --without-broken-spool --enable-nntp=yes --with-nspr-includes=/opt/csw/lib/evolution/nss/include --with-nspr-libs=/opt/csw/lib/evolution/nss/lib --with-nss-includes=/opt/csw/lib/evolution/nss/lib/include --with-nss-libs=/opt/csw/lib/evolution/nss/lib --enable-pilot-conduits=yes + +touch help/C/evolution-2.0.xml +touch help/C/evolution-2.0-C.omf +touch help/C/evolution-2.0-C.omf.out + +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + + + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +rm ${buildroot}/opt/csw/bin/evolution-2.2 +ln -s ../libexec/evolution-2.2 ${buildroot}/opt/csw/bin/evolution-2.2 +ln -s ../libexec/evolution-2.2 ${buildroot}/opt/csw/bin/evolution-nognome +ln -s evolution-2.2 ${buildroot}/opt/csw/bin/evolution + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/evolution/*/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:39:30 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:39:30 +0000 Subject: [csw-devel] SF.net SVN: gar:[4496] csw/mgar/pkg Message-ID: Revision: 4496 http://gar.svn.sourceforge.net/gar/?rev=4496&view=rev Author: dmichelsen Date: 2009-04-27 12:39:30 +0000 (Mon, 27 Apr 2009) Log Message: ----------- evolution-ds: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/evolution-ds/ csw/mgar/pkg/evolution-ds/trunk/ csw/mgar/pkg/evolution-ds/trunk/legacy/ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/human.pl csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/evolution-ds/trunk/legacy/sources/ csw/mgar/pkg/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch csw/mgar/pkg/evolution-ds/trunk/legacy/specs/ csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile csw/mgar/pkg/evolution-ds/trunk/legacy/specs/evolution-ds Added: csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:39:30 UTC (rev 4496) @@ -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/evolution-ds/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/human.pl 2009-04-27 12:39:30 UTC (rev 4496) @@ -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 () { + 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 + +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 + +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/evolution-ds/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:39:30 UTC (rev 4496) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/sources/evolution-ds-nongcc-fixes.patch 2009-04-27 12:39:30 UTC (rev 4496) @@ -0,0 +1,121 @@ +--- evolution-data-server-1.0.0/addressbook/libebook/e-book.c.orig 2004-09-27 05:56:55.328187000 -0400 ++++ evolution-data-server-1.0.0/addressbook/libebook/e-book.c 2004-09-27 05:57:35.848160000 -0400 +@@ -32,16 +32,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_BOOK_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libecal/e-cal.c.orig 2004-09-27 06:02:06.222945000 -0400 ++++ evolution-data-server-1.0.0/calendar/libecal/e-cal.c 2004-09-27 06:02:24.362926000 -0400 +@@ -126,16 +126,14 @@ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + g_set_error (error, E_CALENDAR_ERROR, (error_code), \ +- "file %s: line %d (%s): assertion `%s' failed", \ ++ "file %s: line %d: assertion `%s' failed", \ + __FILE__, \ + __LINE__, \ +- __PRETTY_FUNCTION__, \ + #expr); \ + return FALSE; \ + }; }G_STMT_END +--- evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c.orig 2004-09-27 06:04:14.912978000 -0400 ++++ evolution-data-server-1.0.0/calendar/libedata-cal/e-cal-backend.c 2004-09-27 06:04:43.372917000 -0400 +@@ -732,7 +732,7 @@ + g_return_if_fail (E_IS_CAL_BACKEND (backend)); + + g_assert (CLASS (backend)->get_object_list != NULL); +- return (* CLASS (backend)->get_object_list) (backend, cal, sexp); ++ (* CLASS (backend)->get_object_list) (backend, cal, sexp); + } + + /** +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c.orig 2004-09-27 06:06:28.492978000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-events.c 2004-09-27 06:08:50.382913000 -0400 +@@ -30,6 +30,7 @@ + + /* Private part of the CalBackendFileEvents structure */ + struct _ECalBackendFileEventsPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c.orig 2004-09-27 06:09:35.912969000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/file/e-cal-backend-file-todos.c 2004-09-27 06:10:30.842913000 -0400 +@@ -26,6 +26,7 @@ + + /* Private part of the ECalBackendFileTodos structure */ + struct _ECalBackendFileTodosPrivate { ++ unsigned char very_secret; + }; + + +--- evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c.orig 2004-09-27 06:13:25.892943000 -0400 ++++ evolution-data-server-1.0.0/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 2004-09-27 06:16:19.392917000 -0400 +@@ -599,7 +599,7 @@ + alarm = e_cal_component_alarm_new (); + e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY); + trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START; +- trigger.u.rel_duration = (struct icaldurationtype) icaldurationtype_from_int (alarm_duration); ++ trigger.u.rel_duration = icaldurationtype_from_int (alarm_duration); + e_cal_component_alarm_set_trigger (alarm, trigger); + e_cal_component_add_alarm (comp, alarm); + } +--- evolution-data-server-1.2.1/camel/camel-store.c.orig 2005-03-26 10:49:03.576595000 -0500 ++++ evolution-data-server-1.2.1/camel/camel-store.c 2005-03-26 10:51:01.386522000 -0500 +@@ -1257,7 +1257,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->subscribe) +- return iface->subscribe(store, folder_name, ex); ++ { ++ iface->subscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented subscribe method on a store"); + } +@@ -1267,7 +1270,10 @@ + CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type()); + + if (iface && iface->unsubscribe) +- return iface->unsubscribe(store, folder_name, ex); ++ { ++ iface->unsubscribe(store, folder_name, ex); ++ return; ++ } + + g_warning("Trying to invoke unimplemented unsubscribe method on a store"); + } +--- evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c.orig 2005-03-26 10:58:48.536596000 -0500 ++++ evolution-data-server-1.2.1/calendar/backends/weather/e-weather-source.c 2005-03-26 10:59:39.186518000 -0500 +@@ -27,7 +27,7 @@ + EWeatherSourceClass *class; + g_return_if_fail (source != NULL); + class = (EWeatherSourceClass*) G_OBJECT_GET_CLASS (source); +- return class->parse (source, done, data); ++ class->parse (source, done, data); + } + + static void Added: csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/specs/Makefile 2009-04-27 12:39:30 UTC (rev 4496) @@ -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/evolution-ds/trunk/legacy/specs/evolution-ds =================================================================== --- csw/mgar/pkg/evolution-ds/trunk/legacy/specs/evolution-ds (rev 0) +++ csw/mgar/pkg/evolution-ds/trunk/legacy/specs/evolution-ds 2009-04-27 12:39:30 UTC (rev 4496) @@ -0,0 +1,78 @@ +# vim: ft=perl +# $Id: evolution-ds,v 1.12 2005/04/13 15:12:50 simigern Exp $ + +$progname = 'evolution-data-server'; +$version = '1.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/gnome/sources/evolution-data-server/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","nss-3.9.2.tar.gz"); + + at patches = (['evolution-ds-nongcc-fixes.patch', "${progname}-${version}", '-p1'], + ['nss-makefile.patch','nss-3.9.2','-p1']); + + at packages = ({ + pkgname => "evolution-ds", + filename => "evolution_ds", + name => "evolution_ds - evolution database backend server", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$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 -I${buildroot}/opt/csw/include" +export CPPFLAGS="-I/opt/csw/include -I${buildroot}/opt/csw/include" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/evolution/nss/lib -L/opt/csw/lib/evolution/nss/lib' +export LDFLAGS="\$LD_OPTIONS" +export LD_RUN_PATH="/opt/csw/lib/evolution/nss/lib" + +export BUILD_OPT=1 +cd ${builddir}/nss-3.9.2/mozilla/security/nss +gmake nss_build_all +export NSS_OBJ_DIR="`ls -d ${builddir}/nss-3.9.2/mozilla/dist/*OPT.OBJ`" +mkdir -p ${buildroot}/opt/csw/lib/evolution/nss/lib +mkdir -p ${buildroot}/opt/csw/lib/evolution/nss/include +cd \$NSS_OBJ_DIR/lib +cp *.so ${buildroot}/opt/csw/lib/evolution/nss/lib/ +cd \$NSS_OBJ_DIR/include +cp -r * ${buildroot}/opt/csw/lib/evolution/nss/include/ +cd ${builddir}/nss-3.9.2/mozilla/dist/public/nss +cp -r * ${buildroot}/opt/csw/lib/evolution/nss/include/ +unset LD_RUN_PATH + +cd ${builddir} +#Now evo-ds +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +cd ${builddir} +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-krb5=/opt/csw --enable-nss=yes --with-openldap=/opt/csw --enable-ipv6=yes --without-broken-spool --enable-nntp=yes --with-nspr-includes=${buildroot}/opt/csw/lib/evolution/nss/include --with-nspr-libs=${buildroot}/opt/csw/lib/evolution/nss/lib --with-nss-includes=${builddir}/opt/csw/lib/evolution/nss/include --with-nss-libs=${buildroot}/opt/csw/lib/evolution/nss/lib +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:39:45 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:39:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4497] csw/mgar/pkg Message-ID: Revision: 4497 http://gar.svn.sourceforge.net/gar/?rev=4497&view=rev Author: dmichelsen Date: 2009-04-27 12:39:45 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fedora-ds: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/fedora-ds/ csw/mgar/pkg/fedora-ds/trunk/ csw/mgar/pkg/fedora-ds/trunk/legacy/ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/human.pl csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/fedora-ds/trunk/legacy/sources/ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/Makefile csw/mgar/pkg/fedora-ds/trunk/legacy/specs/fedora-ds Added: csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:39:45 UTC (rev 4497) @@ -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/fedora-ds/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/human.pl 2009-04-27 12:39:45 UTC (rev 4497) @@ -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 () { + 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 + +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 + +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/fedora-ds/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:39:45 UTC (rev 4497) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/fedora-ds/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/Makefile 2009-04-27 12:39:45 UTC (rev 4497) @@ -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/fedora-ds/trunk/legacy/specs/fedora-ds =================================================================== --- csw/mgar/pkg/fedora-ds/trunk/legacy/specs/fedora-ds (rev 0) +++ csw/mgar/pkg/fedora-ds/trunk/legacy/specs/fedora-ds 2009-04-27 12:39:45 UTC (rev 4497) @@ -0,0 +1,244 @@ +# vim: ft=perl +# $Id: fedora-ds,v 1.11 2005/06/16 22:39:39 simigern Exp $ + +$progname = 'fedora-ds'; +$version = '7.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://directory.fedora.redhat.com/ packaged for CSW by Michael Gernoth'; + + at sources = ("fedora-ds/${progname}-${version}.tar.gz", "fedora-ds/mozilla-fds.tar.bz2", "fedora-ds/cyrus-sasl-2.1.20.tar.gz", "fedora-ds/icu-2.4.tgz", "fedora-ds/net-snmp-5.2.1.tar.gz", "fedora-ds/db-4.2.52.NC.tar.gz", "fedora-ds/fedora-ds-doc-${version}.tar.bz2" ); + + at patches = (['fedora-ds/patch.4.2.52.1', "db-4.2.52.NC", '-p0'], + ['fedora-ds/patch.4.2.52.2', "db-4.2.52.NC", '-p0'], + ['fedora-ds/patch.4.2.52.3', "db-4.2.52.NC", '-p0'], + ['fedora-ds/patch.4.2.52.4', "db-4.2.52.NC", '-p0'], + ['nss-makefile.patch','mozilla-fds','-p2'], + ['fedora-ds/fedora-ds-nongcc.patch', '', '-p0']); + + at packages = ({ + pkgname => "fedora-ds", + filename => "fedora_ds", + name => "fedora_ds - Fedora/Netscape LDAP Directory Server", + dependencies => ['CSWcommon','CSWperl'], + filelist => [qw(opt etc)], + postinstall => "fedora-ds/fedora-ds.postinstall" + }); + +$copyright = "${progname}-${version}/LICENSE"; + +$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' +set -e + +#First mozilla... +cd ${builddir}/mozilla-fds +cd security/nss +gmake BUILD_OPT=1 nss_build_all + +cd ${builddir}/mozilla-fds +cd security/svrcore +gmake BUILD_OPT=1 + +OLDCPPFLAGS="\$CPPFLAGS" +export CPPFLAGS="-I../../../ldap/include \$CPPFLAGS" +export LDFLAGS='-liconv' +cd ${builddir}/mozilla-fds +cd directory/c-sdk +/opt/csw/bin/gsed -i -e 's|-Qoption cg ||' configure +./configure --with-nss --enable-optimize +gmake BUILDCLU=1 HAVE_SVRCORE=1 BUILD_OPT=1 +export CPPFLAGS="\$OLDCPPFLAGS" +unset LDFLAGS + +#Cyrus sasl +cd ${builddir}/cyrus-sasl-2.1.20 +CC=cc CFLAGS="-xO2" ./configure --enable-gssapi --enable-static --without-des --without-openssl +gmake + +#icu +cd ${builddir}/icu +export ICU_BUILD_PATH=`pwd` +cd source +./runConfigureICU SOLARISCC --enable-rpath --disable-ustdio --prefix=\$ICU_BUILD_PATH/built --disable-64bit-libs +gmake all install + +#netsnmp +cd ${builddir}/net-snmp-5.2.1 +export NET_SNMP_BUILD_PATH=`pwd` +/opt/csw/bin/gyes ''|CC=cc CFLAGS="-xO2" ./configure --with-default-snmp-version=3 --with-sys-contact="" --with-sys-location="" --with-logfile="" --with-persistent-directory=/var/net-snmp --prefix="\$NET_SNMP_BUILD_PATH/built" --disable-applications --disable-manuals --disable-scripts --disable-mibs +gmake +gmake install + +#bdb +cd ${builddir}/db-4.2.52.NC +mkdir built +cd built +CC=cc ../dist/configure --enable-dynamic --disable-debug +gmake LIBDB_ARGS="libdb.a" all +rm db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify +gmake LDFLAGS="-static \$LDFLAGS" libdb.a all + +#and finally... +cd ${builddir} +ln -s mozilla-fds mozilla +cd ${builddir}/${progname}-${version} +gmake USE_PERL_FROM_PATH=1 BUILD_DEBUG=optimize + +cd ${builddir}/${progname}-${version}/built/release/slapd/SOLARIS* +mkdir -p ${buildroot}/opt/csw/fedora-ds +cp -r * ${buildroot}/opt/csw/fedora-ds/ + +mkdir -p ${buildroot}/etc/{init.d,rc{0,1,2,3,S}.d} +cp ${RealBin}/../sources/fedora-ds/fedora-ds.init ${buildroot}/etc/init.d/cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc3.d/S89cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc0.d/K03cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc1.d/K03cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rc2.d/K03cswfedora-ds +ln -s ../init.d/cswfedora-ds ${buildroot}/etc/rcS.d/K03cswfedora-ds + +mkdir -p ${buildroot}/opt/csw/fedora-ds/etc +cat >${buildroot}/opt/csw/fedora-ds/etc/startup.CSW <<__EOF__ +#run/stop fedora-ds with the init-script +START_FDS="yes" + +#automatically start all existing instances? +SCAN_INSTANCES="yes" + +#when SCAN_INSTANCES is no, which instances should be +#started? +INSTANCES="host" +__EOF__ + +cat >${buildroot}/opt/csw/fedora-ds/etc/fedora-ds-csw-install-sample.inf <<__EOF__ +[General] +FullMachineName = host.domain.tld +SuiteSpotUserID = nobody +ServerRoot = /opt/csw/fedora-ds +[slapd] +ServerPort = 389 +ServerIdentifier = host +Suffix = dc=host,dc=domain,dc=tld +RootDN = cn=Directory Manager +RootDNPwd = secret +__EOF__ + +cat >${buildroot}/opt/csw/fedora-ds/bin/ds_newinst.pl <<__EOF__ +#!/bin/sh + +exec /opt/csw/bin/perl /opt/csw/fedora-ds/bin/slapd/admin/bin/ds_newinst.pl "$@" +__EOF__ +chmod 755 ${buildroot}/opt/csw/fedora-ds/bin/ds_newinst.pl + +cat >${buildroot}/opt/csw/fedora-ds/README.CSW <<__EOF__ +Quick-Start +----------- + +To create a new LDAP-server instance do the following: +1. Create an install.inf file for your new server + (See /opt/csw/fedora-ds/etc/fedora-ds-csw-install-sample.inf for an example) +2. Run /opt/csw/fedora-ds/bin/ds_newinst.pl /path/to/install.inf + This creates the instance in /opt/csw/fedora-ds/slapd-[hostname] and starts + the server. +3. Run /opt/csw/fedora-ds/shared/bin/ldapsearch -s base -b "" "objectclass=*" + to see if your new server is working +4. Edit /opt/csw/fedora-ds/etc/startup to set the desired behaviour on system + startup and manually running /etc/init.d/cswfedora-ds. + + +Description of install.inf +-------------------------- +1. General Section + ++-------------------------+-----------+----------------------------------+------------------------------+ +| Name | Required? | Description | Example | ++-------------------------+-----------+----------------------------------+------------------------------+ +| SuiteSpotUserID | required | the Unix user that the Directory | ldap or nobody | +| | | Server will run as | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| FullMachineName | required | the fully qualified host and | oak.devel.example.com | +| | | domain name | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ServerRoot | required | the base directory where the | /opt/csw/fedora-ds | +| | | runtime files are installed | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ConfigDirectoryAdminID | optional | user ID for console login | admin | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ConfigDirectoryAdminPwd | optional | password for | password | +| | | ConfigDirectoryAdminID | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ConfigDirectoryLdapURL | optional | LDAP URL for the Configuration | | +| | | Directory. | ldap://host.domain.tld:port/ | +| | | the suffix is required and will | o=NetscapeRoot | +| | | usually be o=NetscapeRoot | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| AdminDomain | optional | the administrative domain this | devel.example.com | +| | | instance will belong to | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| UserDirectoryLdapURL | optional | the user/group directory used by | ldap://host.domain.tld:port/ | +| | | the Console | dc=devel,dc=example,dc=com | ++-------------------------+-----------+----------------------------------+------------------------------+ + + +2. slapd Section + ++-------------------------+-----------+----------------------------------+------------------------------+ +| Name | Required? | Description | Example | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ServerPort | required | the port number the server will | 389 | +| | | listen to | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| ServerIdentifier | required | the base name of the directory | oak | +| | | that contains the instance | | +| | | of this server - will have | | +| | | "slapd-" added to it | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| Suffix | required | the primary suffix for this | dc=devel,dc=example,dc=com | +| | | server (more can be added later) | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| RootDN | required | the DN for the Directory | cn=Directory Manager | +| | | Administrator | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| RootDNPwd | required | the password for the RootDN | itsasecret | ++-------------------------+-----------+----------------------------------+------------------------------+ +| InstallLdifFile | optional | use this LDIF file to initialize | /full/path/to/Example.ldif | +| | | the database the suffix must be | | +| | | specified in the Suffix directive| | ++-------------------------+-----------+----------------------------------+------------------------------+ +| SlapdConfigForMC | optional | if true (1), configure this new | 1 | +| | | DS instance as a Configuration | | +| | | Directory Server | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| UseExistingMC | optional | if true (1), register this DS | 1 | +| | | with the Configuration DS | | ++-------------------------+-----------+----------------------------------+------------------------------+ +| UseExistingUG | optional | if true (1), do not configure | 1 | +| | | this DS as a user/group | | +| | | directory but use the one speci- | | +| | | fied by UserDirectoryLdapURL | | ++-------------------------+-----------+----------------------------------+------------------------------+ + + +More Documentation +------------------ + +See /opt/csw/share/doc/fedora-ds/ +__EOF__ + +#Documentation +mkdir -p ${buildroot}/opt/csw/share/doc/fedora-ds/ +cp ${builddir}/fedora-ds-doc-${version}/* ${buildroot}/opt/csw/share/doc/fedora-ds/ + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4498] csw/mgar/pkg Message-ID: Revision: 4498 http://gar.svn.sourceforge.net/gar/?rev=4498&view=rev Author: dmichelsen Date: 2009-04-27 12:40:00 +0000 (Mon, 27 Apr 2009) Log Message: ----------- ficy: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/ficy/ csw/mgar/pkg/ficy/trunk/ csw/mgar/pkg/ficy/trunk/legacy/ csw/mgar/pkg/ficy/trunk/legacy/scripts/ csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/ficy/trunk/legacy/scripts/human.pl csw/mgar/pkg/ficy/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/ficy/trunk/legacy/sources/ csw/mgar/pkg/ficy/trunk/legacy/specs/ csw/mgar/pkg/ficy/trunk/legacy/specs/Makefile csw/mgar/pkg/ficy/trunk/legacy/specs/ficy Added: csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:00 UTC (rev 4498) @@ -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/ficy/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/scripts/human.pl 2009-04-27 12:40:00 UTC (rev 4498) @@ -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 () { + 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 + +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 + +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/ficy/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:00 UTC (rev 4498) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/ficy/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/specs/Makefile 2009-04-27 12:40:00 UTC (rev 4498) @@ -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/ficy/trunk/legacy/specs/ficy =================================================================== --- csw/mgar/pkg/ficy/trunk/legacy/specs/ficy (rev 0) +++ csw/mgar/pkg/ficy/trunk/legacy/specs/ficy 2009-04-27 12:40:00 UTC (rev 4498) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: ficy,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'fIcy'; +$version = '1.0.4'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ficy.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-1_0_4.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "ficy", + filename => "ficy", + name => "ficy - an icecast/shoutcast stream grabber", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-1_0_4/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 LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -lnsl -lsocket -lresolv' +cd ${progname}-1_0_4 +gmake || exit 1 +mkdir -p ${buildroot}/opt/csw/bin +cp fIcy ${buildroot}/opt/csw/bin/ +mkdir -p ${buildroot}/opt/csw/share/doc/ficy +cp AUTHORS NEWS README TODO ${buildroot}/opt/csw/share/doc/ficy/ +./ohg ${buildroot}/opt/csw/share/doc/ficy/README.html +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:36 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:36 +0000 Subject: [csw-devel] SF.net SVN: gar:[4500] csw/mgar/pkg Message-ID: Revision: 4500 http://gar.svn.sourceforge.net/gar/?rev=4500&view=rev Author: dmichelsen Date: 2009-04-27 12:40:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fotaq: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/fotaq/ csw/mgar/pkg/fotaq/trunk/ csw/mgar/pkg/fotaq/trunk/legacy/ csw/mgar/pkg/fotaq/trunk/legacy/scripts/ csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/fotaq/trunk/legacy/scripts/human.pl csw/mgar/pkg/fotaq/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/fotaq/trunk/legacy/sources/ csw/mgar/pkg/fotaq/trunk/legacy/specs/ csw/mgar/pkg/fotaq/trunk/legacy/specs/Makefile csw/mgar/pkg/fotaq/trunk/legacy/specs/fotaq Added: csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:36 UTC (rev 4500) @@ -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/fotaq/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/scripts/human.pl 2009-04-27 12:40:36 UTC (rev 4500) @@ -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 () { + 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 + +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 + +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/fotaq/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:36 UTC (rev 4500) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/fotaq/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/specs/Makefile 2009-04-27 12:40:36 UTC (rev 4500) @@ -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/fotaq/trunk/legacy/specs/fotaq =================================================================== --- csw/mgar/pkg/fotaq/trunk/legacy/specs/fotaq (rev 0) +++ csw/mgar/pkg/fotaq/trunk/legacy/specs/fotaq 2009-04-27 12:40:36 UTC (rev 4500) @@ -0,0 +1,92 @@ +# vim: ft=perl +# $Id: fotaq,v 1.2 2005/01/09 14:42:06 simigern Exp $ + +$progname = 'fotaq'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.scummvm.org/ packaged for CSW by Michael Gernoth'; + + at sources = (); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Flight of the Amazon Queen, a fantasy adventure game", + dependencies => ['CSWcommon','CSWscummvm'], + filelist => [qw(opt)] + }); + +$arch="all"; +$osversion="5.8"; + +$copyright = "FOTAQ_Talkie/COPYING"; + +$build = <<"EOF"; +unzip ${RealBin}/../sources/FOTAQ_Talkie.zip +cd FOTAQ_Talkie +cat >COPYING <<__EOF__ +Preamble: + Basically, give this game away, share it with your friends. Don't remove this +Readme, or pretend that you wrote it. You can include it in a software +collection, like a Linux distribution or coverdisk (which may be sold), but +using it in things like commercial adventure game collections without asking is +just playing dirty. You can modify the gamedata for such purposes as compressing +audio. This preamble is not legally binding, but is to clarify the intent of +the following licence. + +Licence: + 1) You may distribute this game for free on any medium, provided this Readme +and all associated copyright notices and disclaimers are left intact. + + 2) You may charge a reasonable copying fee for this archive, and may +distribute it in aggregate as part of a larger and possibly commercial software +distribution (such as a Linux distribution or magazine coverdisk). You must +provide proper attribution and ensure that this Readme and all associated +copyright notices and disclaimers are left intact. + + 3) You may not charge a fee for the game itself. This includes reselling the +game as an individual item. + + 4) You may modify the game as you wish. You may also distribute modified +versions under the terms set forth in this licence, but with the additional +requirement that the work is marked with a prominent notice which states that +it is a modified version. + + 5) All game content is (C) John Passfield and Steven Stamatiadis. + The ScummVM engine is (C) The ScummVM Team (www.scummvm.org). + + 6) THE GAME DATA IN THIS ARCHIVE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING AND NOT LIMITED TO ANY IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +__EOF__ +mkdir -p ${buildroot}/opt/csw/share/fotaq ${buildroot}/opt/csw/share/doc/fotaq ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/share/applications +cp queen.1c ${buildroot}/opt/csw/share/fotaq/ +cp readme.txt ${buildroot}/opt/csw/share/doc/fotaq/ +chmod 644 ${buildroot}/opt/csw/share/fotaq/* ${buildroot}/opt/csw/share/doc/fotaq/* + +cat >${buildroot}/opt/csw/bin/fotaq <<__EOF__ +#!/bin/sh + +exec /opt/csw/bin/scummvm -p /opt/csw/share/fotaq "\\\$@" queen +__EOF__ +chmod 755 ${buildroot}/opt/csw/bin/fotaq + +cat >${buildroot}/opt/csw/share/applications/fotaq.desktop <<__EOF__ +[Desktop Entry] +Encoding=UTF-8 +Name=Flight of the Amazon Queen +Comment=A fantasy adventure game +Exec=fotaq +Icon=scummvm.xpm +Terminal=false +Type=Application +Categories=Application;Game;AdventureGame; +StartupNotify=false +__EOF__ + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4501] csw/mgar/pkg Message-ID: Revision: 4501 http://gar.svn.sourceforge.net/gar/?rev=4501&view=rev Author: dmichelsen Date: 2009-04-27 12:40:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gail: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gail/ csw/mgar/pkg/gail/trunk/ csw/mgar/pkg/gail/trunk/legacy/ csw/mgar/pkg/gail/trunk/legacy/scripts/ csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gail/trunk/legacy/scripts/human.pl csw/mgar/pkg/gail/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gail/trunk/legacy/sources/ csw/mgar/pkg/gail/trunk/legacy/specs/ csw/mgar/pkg/gail/trunk/legacy/specs/Makefile csw/mgar/pkg/gail/trunk/legacy/specs/gail Added: csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:51 UTC (rev 4501) @@ -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/gail/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/scripts/human.pl 2009-04-27 12:40:51 UTC (rev 4501) @@ -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 () { + 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 + +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 + +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/gail/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:51 UTC (rev 4501) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gail/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/specs/Makefile 2009-04-27 12:40:51 UTC (rev 4501) @@ -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/gail/trunk/legacy/specs/gail =================================================================== --- csw/mgar/pkg/gail/trunk/legacy/specs/gail (rev 0) +++ csw/mgar/pkg/gail/trunk/legacy/specs/gail 2009-04-27 12:40:51 UTC (rev 4501) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: gail,v 1.7 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gail'; +$version = '1.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gail/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Accessibility support for GTK+ and libgnomecanvas", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +touch docs/reference/libgail-util/html/index.sgml +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gtk-2.0/modules/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4502] csw/mgar/pkg Message-ID: Revision: 4502 http://gar.svn.sourceforge.net/gar/?rev=4502&view=rev Author: dmichelsen Date: 2009-04-27 12:41:07 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gal: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gal/ csw/mgar/pkg/gal/trunk/ csw/mgar/pkg/gal/trunk/legacy/ csw/mgar/pkg/gal/trunk/legacy/scripts/ csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gal/trunk/legacy/scripts/human.pl csw/mgar/pkg/gal/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gal/trunk/legacy/sources/ csw/mgar/pkg/gal/trunk/legacy/specs/ csw/mgar/pkg/gal/trunk/legacy/specs/Makefile csw/mgar/pkg/gal/trunk/legacy/specs/gal Added: csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:07 UTC (rev 4502) @@ -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/gal/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/scripts/human.pl 2009-04-27 12:41:07 UTC (rev 4502) @@ -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 () { + 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 + +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 + +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/gal/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:07 UTC (rev 4502) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gal/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/specs/Makefile 2009-04-27 12:41:07 UTC (rev 4502) @@ -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/gal/trunk/legacy/specs/gal =================================================================== --- csw/mgar/pkg/gal/trunk/legacy/specs/gal (rev 0) +++ csw/mgar/pkg/gal/trunk/legacy/specs/gal 2009-04-27 12:41:07 UTC (rev 4502) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: gal,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gal'; +$version = '1.99.11'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gal/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME Application Libs", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:40:20 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:40:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4499] csw/mgar/pkg Message-ID: Revision: 4499 http://gar.svn.sourceforge.net/gar/?rev=4499&view=rev Author: dmichelsen Date: 2009-04-27 12:40:20 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fortune: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/fortune/ csw/mgar/pkg/fortune/trunk/ csw/mgar/pkg/fortune/trunk/legacy/ csw/mgar/pkg/fortune/trunk/legacy/scripts/ csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/fortune/trunk/legacy/scripts/human.pl csw/mgar/pkg/fortune/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/fortune/trunk/legacy/sources/ csw/mgar/pkg/fortune/trunk/legacy/sources/fortune-datfiles.patch csw/mgar/pkg/fortune/trunk/legacy/specs/ csw/mgar/pkg/fortune/trunk/legacy/specs/Makefile csw/mgar/pkg/fortune/trunk/legacy/specs/fortune Added: csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:40:20 UTC (rev 4499) @@ -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/fortune/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/scripts/human.pl 2009-04-27 12:40:20 UTC (rev 4499) @@ -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 () { + 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 + +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 + +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/fortune/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:40:20 UTC (rev 4499) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/fortune/trunk/legacy/sources/fortune-datfiles.patch =================================================================== --- csw/mgar/pkg/fortune/trunk/legacy/sources/fortune-datfiles.patch (rev 0) +++ csw/mgar/pkg/fortune/trunk/legacy/sources/fortune-datfiles.patch 2009-04-27 12:40:20 UTC (rev 4499) @@ -0,0 +1,23594 @@ +diff -Nru datfiles.orig/Makefile datfiles/Makefile +--- datfiles.orig/Makefile 1997-08-28 18:38:25.000000000 +0200 ++++ datfiles/Makefile 2004-08-07 23:32:30.000000000 +0200 +@@ -3,7 +3,8 @@ + food fortunes goedel humorists kids law linuxcookie literature \ + love magic medicine men-women miscellaneous news people pets \ + platitudes politics riddles science songs-poems sports \ +- startrek translate-me wisdom work zippy ++ startrek translate-me wisdom work linux perl knghtbrd \ ++ paradoxum zippy debian + + STRFILE=../util/strfile + +diff -Nru datfiles.orig/art datfiles/art +--- datfiles.orig/art 1995-10-21 04:31:41.000000000 +0100 ++++ datfiles/art 2004-08-07 23:32:32.000000000 +0200 +@@ -6,16 +6,16 @@ + The Bionic Dog gets a hormonal short-circuit and violates the + Mann Act with an interstate Greyhound bus. + % +-A "critic" is a man who creates nothing and thereby feels qualified to judge +-the work of creative men. There is logic in this; he is unbiased -- he hates +-all creative people equally. ++A "critic" is a man who creates nothing and thereby feels qualified to ++judge the work of creative men. There is logic in this; he is unbiased ++-- he hates all creative people equally. + % + A celebrity is a person who is known for his well-knownness. + % +- A circus foreman was making the rounds inspecting the big top when +-a scrawny little man entered the tent and walked up to him. "Are you the +-foreman around here?" he asked timidly. "I'd like to join your circus; I +-have what I think is a pretty good act." ++ A circus foreman was making the rounds inspecting the big top ++when a scrawny little man entered the tent and walked up to him. "Are ++you the foreman around here?" he asked timidly. "I'd like to join your ++circus; I have what I think is a pretty good act." + The foreman nodded assent, whereupon the little man hurried over to + the main pole and rapidly climbed up to the very tip-top of the big top. + Drawing a deep breath, he hurled himself off into the air and began flapping +@@ -73,7 +73,7 @@ + A poet who reads his verse in public may have other nasty habits. + % + A rose is a rose is a rose. Just ask Jean Marsh, known to millions of +-PBS viewers in the '70s as Rose, the maid on the BBC export "Upstairs, ++PBS viewers in the '70s as Rose, the maid on the LWT export "Upstairs, + Downstairs." Though Marsh has since gone on to other projects, ... it's + with Rose she's forever identified. So much so that she even likes to + joke about having one named after her, a distinction not without its +@@ -463,7 +463,7 @@ + -- John Mason Brown, drama critic + % + He was a fiddler, and consequently a rogue. +- -- Jonathon Swift ++ -- Jonathan Swift + % + "Hello," he lied. + -- Don Carpenter, quoting a Hollywood agent +@@ -1078,8 +1078,8 @@ + themselves that they have a better idea. + -- John Ciardi + % +-Mos Eisley Spaceport; you'll not find a more wretched collection of +-villainy and disreputable types... ++Mos Eisley Spaceport; you will never find a more wretched hive of scum ++and villainy... + -- Obi-wan Kenobi, "Star Wars" + % + Mr. Rockford, this is the Thomas Crown School of Dance and Contemporary +@@ -2194,9 +2194,6 @@ + % + Writing free verse is like playing tennis with the net down. + % +-X-rated movies are all alike ... the only thing they leave to the +-imagination is the plot. +-% + Yeah, that's me, Tracer Bullet. I've got eight slugs in me. One's lead, + the rest bourbon. The drink packs a wallop, and I pack a revolver. I'm + a private eye. +@@ -2240,3 +2237,8 @@ + Zero Mostel: That's it baby! When you got it, flaunt it! Flaunt it! + -- Mel Brooks, "The Producers" + % ++Naked children have never played in _o_u_r fountains, and I.M. Pei will ++never be happy on Route 66. ++ -- "Learning from Las Vegas", Robert Venturi, Denise Scott ++ Brown, and Steven Izenour ++% +diff -Nru datfiles.orig/computers datfiles/computers +--- datfiles.orig/computers 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/computers 2004-08-07 23:32:31.000000000 +0200 +@@ -75,7 +75,7 @@ + % + A computer salesman visits a company president for the purpose of selling + the president one of the latest talking computers. +-Salesman: "This machine knows everything. I can ask it any quesstion ++Salesman: "This machine knows everything. I can ask it any question + and it'll give the correct answer. Computer, what is the + speed of light?" + Computer: 186,282 miles per second. +@@ -574,7 +574,7 @@ + This is believed to speed up execution by as much as a factor of 1.01 or + 3.50 depending on whether you believe our friendly marketing representatives. + This code was written by a new programmer here (we snatched him away from +-Itty Bitti Machines where we was writting COUGHBOL code) so to give him ++Itty Bitti Machines where he was writing COUGHBOL code) so to give him + confidence we trusted his vows of "it works pretty well" and installed it. + % + === ALL USERS PLEASE NOTE ======================== +@@ -986,9 +986,9 @@ + % + Calm down, it's *____only* ones and zeroes. + % +-Can't open /usr/fortunes. Lid stuck on cookie jar. ++Can't open /usr/share/games/fortunes/fortunes. Lid stuck on cookie jar. + % +-Can't open /usr/games/lib/fortunes.dat. ++Can't open /usr/share/games/fortunes/fortunes.dat. + % + CChheecckk yyoouurr dduupplleexx sswwiittcchh.. + % +@@ -1442,8 +1442,6 @@ + % + /earth: file system full. + % +-egrep -n '^[a-z].*\(' $ | sort -t':' +2.0 +-% + Einstein argued that there must be simplified explanations of nature, because + God is not capricious or arbitrary. No such faith comforts the software + engineer. +@@ -2066,7 +2064,7 @@ + % + If the designers of X-window built cars, there would be no fewer than five + steering wheels hidden about the cockpit, none of which followed the same +-prinicples -- but you'd be able to shift gears with your car stereo. Useful ++principles -- but you'd be able to shift gears with your car stereo. Useful + feature, that. + -- From the programming notebooks of a heretic, 1990. + % +@@ -2236,12 +2234,12 @@ + At this Minsky shut his eyes, and Sussman asked his teacher "Why do + you close your eyes?" + "So that the room will be empty." +- At that momment, Sussman was enlightened. ++ At that moment, Sussman was enlightened. + % + In the east there is a shark which is larger than all other fish. It + changes into a bird whose winds are like clouds filling the sky. When this + bird moves across the land, it brings a message from Corporate Headquarters. +-This message it drops into the midst of the program mers, like a seagull ++This message it drops into the midst of the programmers, like a seagull + making its mark upon the beach. Then the bird mounts on the wind and, with + the blue sky at its back, returns home. + The novice programmer stares in wonder at the bird, for he understands +@@ -2327,7 +2325,7 @@ + The control program manager had 150 men. He asserted that they + could prepare the specifications, with the architecture team coordinating; + it would be well-done and practical, and he could do it on schedule. +-Futhermore, if the architecture team did it, his 150 men would sit twiddling ++Furthermore, if the architecture team did it, his 150 men would sit twiddling + their thumbs for ten months. + To this the architecture manager responded that if I gave the control + program team the responsibility, the result would not in fact be on time, +@@ -2812,7 +2810,9 @@ + Nobody's gonna believe that computers are intelligent until they start + coming in late and lying about it. + % +-nohup rm -fr /& ++My little brother got this fortune: ++ nohup rm -fr /& ++So he did... + % + Norbert Weiner was the subject of many dotty professor stories. Weiner was, in + fact, very absent minded. The following story is told about him: when they +@@ -4277,7 +4277,7 @@ + % + THEGODDESSOFTHENETHASTWISTINGFINGERSANDHERVOICEISLIKEAJAVELININTHENIGHTDUDE + % +-... there are about 5,000 people who are part of that commitee. These guys ++... there are about 5,000 people who are part of that committee. These guys + have a hard time sorting out what day to meet, and whether to eat croissants + or doughnuts for breakfast -- let alone how to define how all these complex + layers that are going to be agreed upon. +@@ -4749,7 +4749,7 @@ + % + UNIX was half a billion (500000000) seconds old on + Tue Nov 5 00:53:20 1985 GMT (measuring since the time(2) epoch). +- -- Andy Tannenbaum ++ -- Andy Tanenbaum + % + UNIX was not designed to stop you from doing stupid things, because that + would also stop you from doing clever things. +@@ -4761,7 +4761,7 @@ + % + Usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ... inputdir + % +-USENET would be a better laboratory is there were more labor and less oratory. ++USENET would be a better laboratory if there were more labor and less oratory. + -- Elizabeth Haley + % + User hostile. +@@ -5026,7 +5026,7 @@ + Whenever a system becomes completely defined, some damn fool discovers + something which either abolishes the system or expands it beyond recognition. + % +-Where a calculator on the ENIAC is equpped with 18,000 vaccuum tubes and ++Where a calculator on the ENIAC is equpped with 18,000 vacuum tubes and + weighs 30 tons, computers in the future may have only 1,000 vaccuum tubes + and perhaps weigh 1 1/2 tons. + -- Popular Mechanics, March 1949 +@@ -5266,7 +5266,7 @@ + % + Yes, we will be going to OSI, Mars, and Pluto, but not necessarily in + that order. +- -- Jeffrey Honig ++ -- George Michaelson + % + You are an insult to my intelligence! I demand that you log off immediately. + % +@@ -5287,7 +5287,7 @@ + gold nugget, a crocodile is removing large chunks of flesh from you, a + rhinoceros is goring you with his horn, a sabre-tooth cat is busy + trying to disembowel you, you are being trampled by a large mammoth, a +-vampire is sucking you dry, a Tyranosaurus Rex is sinking his six inch ++vampire is sucking you dry, a Tyrannosaurus Rex is sinking his six inch + long fangs into various parts of your anatomy, a large bear is + dismembering your body, a gargoyle is bouncing up and down on your + head, a burly troll is tearing you limb from limb, several dire wolves +@@ -5415,3 +5415,29 @@ + % + Your program is sick! Shoot it and put it out of its memory. + % ++I mean, if 10 years from now, when you are doing something quick and dirty, ++you suddenly visualize that I am looking over your shoulders and say to ++yourself, "Dijkstra would not have liked this", well that would be enough ++immortality for me. ++% ++As seen on slashdot about what you can do with your cable modems: ++(http://slashdot.org/comments.pl?sid=32387&cid=3495418): ++ ++ Summary: It's not about how you handle your equipment, it's where ++ you have permission to stick it. ++ ++The post is by "redgekko" ++% ++"The biggest problem facing software engineering is the one it will ++ never solve - politics." ++ -- Gavin Baker, ca 1996, An unusually cynical moment inspired by working on a large ++ project beseiged by politics ++% ++"Don't fear the pen. When in doubt, draw a pretty picture." ++ --Baker's Third Law of Design. ++% ++Breakpoint 1, main (argc=1, argv=0xbffffc40) at main.c:29 ++29 printf ("Welcome to GNU Hell!\n"); ++ -- "GNU Libtool documentation" ++% ++ +diff -Nru datfiles.orig/cookie datfiles/cookie +--- datfiles.orig/cookie 1998-10-27 04:33:59.000000000 +0100 ++++ datfiles/cookie 2004-08-07 23:32:31.000000000 +0200 +@@ -697,7 +697,7 @@ + -- Karl Lehenbauer + % + Life. Don't talk to me about life. +-- Marvin the Paranoid Anroid ++- Marvin the Paranoid Android + % + On a clear disk you can seek forever. + % +@@ -1347,7 +1347,7 @@ + % + On our campus the UNIX system has proved to be not only an effective software + tool, but an agent of technical and social change within the University. +-- John Lions (U. of Toronto (?)) ++- John Lions (University of New South Wales) + % + Those who do not understand Unix are condemned to reinvent it, poorly. + - Henry Spencer, University of Toronto Unix hack +@@ -2035,7 +2035,7 @@ + a metaphor for the fact that few of us fully exploit our talents, who could + deny it? As a refuge for occultists seeking a neural basis of the miraculous, + it leaves much to be desired. +--- Barry L. Beyerstein, "The Brain and Conciousness: Implications for ++-- Barry L. Beyerstein, "The Brain and Consciousness: Implications for + Psi Phenomena", The Skeptical Enquirer, Vol. XII, No. 2, pg. 171 + % + Thufir's a Harkonnen now. +@@ -3402,7 +3402,7 @@ + % + An Animal that knows who it is, one that has a sense of his own identity, is + a discontented creature, doomed to create new problems for himself for the +-duration of his stay on this planet. Since neither the mouse nor the chip ++duration of his stay on this planet. Since neither the mouse nor the chimp + knows what is, he is spared all the vexing problems that follow this + discovery. But as soon as the human animal who asked himself this question + emerged, he plunged himself and his descendants into an eternity of doubt +@@ -4063,8 +4063,6 @@ + at billions of operations per second (gigaflops). + -- Aviation Week & Space Technology, May 9, 1988, "Washington Roundup", pg 13 + % +-Shit Happens. +-% + backups: always in season, never out of style. + % + "There was a vague, unpleasant manginess about his appearence; he somehow +@@ -4454,7 +4452,7 @@ + or dogma. It is simply an approach to the problem of telling what is + counterfeit and what is genuine. And a recognition of how costly it may + be to fail to do so. To be a skeptic is to cultivate "street smarts" in +-the battle for control of one's own mind, one's own money, one'w own ++the battle for control of one's own mind, one's own money, one's own + allegiances. To be a skeptic, in short, is to refuse to be a victim. + -- Robert S. DeBear, "An Agenda for Reason, Realism, and Responsibility," + New York Skeptic (newsletter of the New York Area Skeptics, Inc.), Spring 1988 +@@ -4807,10 +4805,6 @@ + woman want?'" + -- Sigmund Freud + % +-"A fractal is by definition a set for which the Hausdorff Besicovitch +-dimension strictly exceeds the topological dimension." +--- Mandelbrot, _The Fractal Geometry of Nature_ +-% + "I have recently been examining all the known superstitions of the world, + and do not find in our particular superstition (Christianity) one redeeming + feature. They are all alike founded on fables and mythology." +@@ -4991,7 +4985,7 @@ + This is like becoming an archbishop so you can meet girls." + -- Matt Cartmill + % +-Heisengberg might have been here. ++Heisenberg might have been here. + % + "Any excuse will serve a tyrant." + -- Aesop +@@ -5230,7 +5224,7 @@ + -- D. J. McCarthy (dmccart at cadape.UUCP) + % + "They that can give up essential liberty to obtain a little temporary +-saftey deserve neither liberty not saftey." ++safety deserve neither liberty nor safety." + -- Benjamin Franklin, 1759 + % + "I am, therefore I am." +@@ -5325,15 +5319,6 @@ + "Life sucks, but death doesn't put out at all...." + -- Thomas J. Kopp + % +-"There is no Father Christmas. It's just a marketing ploy +-to make low income parents' lives a misery." +-"... I want you to picture the trusting face of a child, +-streaked with tears because of what you just said." +-"I want you to picture the face of its mother, because one +-week's dole won't pay for one Master of the Universe +-Battlecruiser!" +-- Filthy Rich and Catflap, 1986. +-% + n = ((n >> 1) & 0x55555555) | ((n << 1) & 0xaaaaaaaa); + n = ((n >> 2) & 0x33333333) | ((n << 2) & 0xcccccccc); + n = ((n >> 4) & 0x0f0f0f0f) | ((n << 4) & 0xf0f0f0f0); +@@ -5383,7 +5368,7 @@ + "Life, loathe it or ignore it, you can't like it." + -- Marvin the paranoid android + % +-Contemptuous lights flashed flashed across the computer's console. ++Contemptuous lights flashed across the computer's console. + -- Hitchhiker's Guide to the Galaxy + % + "There must be some mistake," he said, "are you not a greater computer than +@@ -5695,3 +5680,12 @@ + % + "You can have my Unix system when you pry it from my cold, dead fingers." + -- Cal Keegan ++% ++We'll be more than happy to do so once Jim shows the slightest sign ++of interest in fixing his proposal to deal with the technical ++arguments that have *already* been made. Most engineers have ++learned there is little to be gained in fine-tuning the valve timing ++on a gasoline-powered internal combustion engine when the pistons ++and crankshaft are missing... ++ -- Valdis.Kletnieks at vt.edu on NANOG ++% +diff -Nru datfiles.orig/debian datfiles/debian +--- datfiles.orig/debian 1970-01-01 01:00:00.000000000 +0100 ++++ datfiles/debian 2004-08-07 23:32:30.000000000 +0200 +@@ -0,0 +1,81 @@ ++I think it's a little fantastic to try to form a picture in people's ++minds of the Debian archive administration team huddled over their ++terminals, their faces lit only by a CRT with a little root shell ++prompt and the command ++"/project/org/ftp.debian.org/cabal/s3kr1t/nuke-non-free.pl" all keyed ++in and ready to go, their fingers poised over the enter key, a sweat of ++lustful anticipated beading on their upper lips." ++ -- Branden Robinson in ++ <20031104211846.GK13131 at deadbeast.net> discussing ++ his draft Social Contract amendment ++% ++If you are going to run a rinky-dink distro made by a couple of ++volunteers, why not run a rinky-dink distro made by a lot of volunteers? ++ -- Jaldhar H. Vyas on debian-devel ++% ++Packages should build-depend on what they should build-depend. ++ -- Santiago Vila on debian-devel ++% ++There are 3 types of guys -- the ones who hate nerds (all nerds, that ++is; girls aren't let off the hook); the ones who are scared off by girls ++who are slightly more intelligent than average; and the guys who are ++also somewhat more intelligent than average, but are so shy that they ++can't put 2 words together when they're within 20 feet of a girl. ++ -- Vikki Roemer on debian-curiosa ++% ++Debian is the Jedi operating system: "Always two there are, a master and ++an apprentice". ++ -- Simon Richter on debian-devel ++% ++This is Unix we're talking about, remember. It's not supposed to be ++nice for the applications programmer. ++ -- Matthew Danish on debian-devel ++% ++... but hey, this is Linux, isn't it meant to do infinite loops in 5 ++seconds? ++ -- Jonathan Oxer in the apt-cacher ChangeLog ++% ++I'm personally quite happy with one stable release every two years, and ++am of the opinion that trying to release more will mean we'll have to ++rename the distro from "stable" to "wobbly". ++ -- Scott James Remnant on debian-devel ++% ++< Keybuk> Perl 6 scares me ++< doogie> you can name your operators anything. the name here is the ++ string '~|_|~' ++* Lo-lan-2 runs away screaming ++< Keybuk> it looks like a diagram of a canal lock :) ++< jaybonci> japanese smiley operators? ++< nickr> ^_^ ++ -- in #debian-devel ++% ++< sam> /.ing an issue is like asking an infinite number of monkeys for ++ advice ++ -- in #debian-devel ++% ++< DanielS> still, throne of blood sounds like a movie about overfiend ++ and virgins or some crap ++ -- in #debian-devel ++% ++< jaybonci> actually d-i stands for "divine intervention" ;) ++ -- in #debian-devel ++% ++< doogie> asuffield: how do you think dpkg was originally written? :| ++< asuffield> by letting iwj get dangerously near a computer ++ -- in #debian-devel ++% ++< asuffield> a workstation is anything you can stick on somebodies desk ++ and con them into using ++ -- in #debian-devel ++% ++ joshk at influx:/etc/logrotate.d> sh -n * ++ apache: line 14: syntax error near unexpected token `}' ++ apache: line 14: `}' ++ the plot thickens ++ those aren't shell scripts ++ this wasn't chicken. ++ -- in #debian-devel ++% ++% ++* joeyh installs debian using only his big toe, for a change of pace ++ -- in #debian-boot +diff -Nru datfiles.orig/definitions datfiles/definitions +--- datfiles.orig/definitions 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/definitions 2004-08-07 23:32:31.000000000 +0200 +@@ -2762,7 +2762,7 @@ + manual, n.: + A unit of documentation. There are always three or more on a given + item. One is on the shelf; someone has the others. The information +- you need in in the others. ++ you need is in the others. + -- Ray Simard + % + Mark's Dental-Chair Discovery: +@@ -3565,7 +3565,7 @@ + "I haven't come far enough, and don't call me baby." + % + QOTD: +- "I may not be able to walk, but I drive from the sitting posistion." ++ "I may not be able to walk, but I drive from the sitting position." + % + QOTD: + "I never met a man I couldn't drink handsome." +@@ -5028,3 +5028,580 @@ + Zymurgy's Law of Volunteer Labor: + People are always available for work in the past tense. + % ++Obscurism: ++ The practice of peppering daily life with obscure ++references as a subliminal means of showcasing both one's education ++and one's wish to disassociate from the world of mass culture. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++McJob: ++ A low-pay, low-prestige, low-benefit, no-future job in the ++service sector. Frequently considered a satisfying career choice by ++those who have never held one. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poverty Jet Set: ++ A group of people given to chronic traveling at the expense of ++long-term job stability or a permanent residence. Tend to have doomed ++and extremely expensive phone-call relationships with people named ++Serge or Ilyana. Tend to discuss frequent-flyer programs at parties. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Historic Underdosing: ++ To live in a period of time when nothing seems to happen. ++Major symptoms include addiction to newspapers, magazines, and TV news ++broadcasts. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Historic Overdosing: ++ To live in a period of time when too much seems to happen. ++Major symptoms include addiction to newspapers, magazines, and TV news ++broadcasts. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Historical Slumming: ++ The act of visiting locations such as diners, smokestack ++industrial sites, rural villages -- locations where time appears to ++have been frozen many years back -- so as to experience relief when ++one returns back to "the present." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Brazilification: ++ The widening gulf between the rich and the poor and the ++accompanying disappearance of the middle classes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Vaccinated Time Travel: ++ To fantasize about traveling backward in time, but only ++with proper vaccinations. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Decade Blending: ++ In clothing: the indiscriminate combination of two or more ++items from various decades to create a personal mood: Sheila = ++Mary Quant earrings (1960s) + cork wedgie platform shows (1970s) + ++black leather jacket (1950s and 1980s). ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Veal-Fattening Pen: ++ Small, cramped office workstations built of ++fabric-covered disassemblable wall partitions and inhabited by junior ++staff members. Named after the small preslaughter cubicles used by ++the cattle industry. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Emotional Ketchup Burst: ++ The bottling up of opinions and emotions inside oneself so ++that they explosively burst forth all at once, shocking and confusing ++employers and friends -- most of whom thought things were fine. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bleeding Ponytail: ++ An elderly, sold-out baby boomer who pines for hippie or ++presellout days. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Boomer Envy: ++ Envy of material wealth and long-range material security ++accrued by older members of the baby boom generation by virtue of ++fortunate births. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Clique Maintenance: ++ The need of one generation to see the generation following it ++as deficient so as to bolster its own collective ego: "Kids today do ++nothing. They're so apathetic. We used to go out and protest. All ++they do is shop and complain." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Consensus Terrorism: ++ The process that decides in-office attitudes and behavior. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Sick Building Migration: ++ The tendency of younger workers to leave or avoid jobs in ++unhealthy office environments or workplaces affected by the Sick ++Building Syndrome. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Recurving: ++ Leaving one job to take another that pays less but places one ++back on the learning curve. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Ozmosis: ++ The inability of one's job to live up to one's self-image. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Power Mist: ++ The tendency of hierarchies in office environments to be diffuse ++and preclude crisp articulation. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Overboarding: ++ Overcompensating for fears about the future by plunging ++headlong into a job or life-style seemingly unrelated to one's ++previous life interests: i.e., Amway sales, aerobics, the Republican ++party, a career in law, cults, McJobs.... ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Earth Tones: ++ A youthful subgroup interested in vegetarianism, tie-dyed ++outfits, mild recreational drugs, and good stereo equipment. Earnest, ++frequently lacking in humor. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Ethnomagnetism: ++ The tendency of young people to live in emotionally ++demonstrative, more unrestrained ethnic neighborhoods: "You wouldn't ++understand it there, mother -- they *hug* where I live now." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Mid-Twenties Breakdown: ++ A period of mental collapse occurring in one's twenties, ++often caused by an inability to function outside of school or ++structured environments coupled with a realization of one's essential ++aloneness in the world. Often marks induction into the ritual of ++pharmaceutical usage. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Successophobia: ++ The fear that if one is successful, then one's personal needs ++will be forgotten and one will no longer have one's childish needs ++catered to. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Safety Net-ism: ++ The belief that there will always be a financial and emotional ++safety net to buffer life's hurts. Usually parents. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Divorce Assumption: ++ A form of Safety Net-ism, the belief that if a marriage ++doesn't work out, then there is no problem because partners can simply ++seek a divorce. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Anti-Sabbatical: ++ A job taken with the sole intention of staying only for a ++limited period of time (often one year). The intention is usually to ++raise enough funds to partake in another, more meaningful activity ++such as watercolor sketching in Crete, or designing computer knit ++sweaters in Hong Kong. Employers are rarely informed of intentions. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Legislated Nostalgia: ++ To force a body of people to have memories they do not ++actually possess: "How can I be a part of the 1960s generation when I ++don't even remember any of it?" ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Now Denial: ++ To tell oneself that the only time worth living in is the past and ++that the only time that may ever be interesting again is the future. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bambification: ++ The mental conversion of flesh and blood living creatures into ++cartoon characters possessing bourgeois Judeo-Christian attitudes and ++morals. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Diseases for Kisses (Hyperkarma): ++ A deeply rooted belief that punishment will somehow always be ++far greater than the crime: ozone holes for littering. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Spectacularism: ++ A fascination with extreme situations. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Lessness: ++ A philosophy whereby one reconciles oneself with diminishing ++expectations of material wealth: "I've given up wanting to make a ++killing or be a bigshot. I just want to find happiness and maybe open ++up a little roadside cafe in Idaho." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Status Substitution: ++ Using an object with intellectual or fashionable cachet to ++substitute for an object that is merely pricey: "Brian, you left your ++copy of Camus in your brother's BMW." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Survivulousness: ++ The tendency to visualize oneself enjoying being the last ++person on Earth. "I'd take a helicopter up and throw microwave ovens ++down on the Taco Bell." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Platonic Shadow: ++ A nonsexual friendship with a member of the opposite sex. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Mental Ground Zero: ++ The location where one visualizes oneself during the dropping ++of the atomic bomb; frequently, a shopping mall. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Cult of Aloneness: ++ The need for autonomy at all costs, usually at the expense of ++long-term relationships. Often brought about by overly high ++expectations of others. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Celebrity Schadenfreude: ++ Lurid thrills derived from talking about celebrity deaths. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++The Emperor's New Mall: ++ The popular notion that shopping malls exist on the insides only ++and have no exterior. The suspension of visual disbelief engendered ++by this notion allows shoppers to pretend that the large, cement ++blocks thrust into their environment do not, in fact, exist. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poorochrondria: ++ Hypochrondria derived from not having medical insurance. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Personal Tabu: ++ A small rule for living, bordering on a superstition, that ++allows one to cope with everyday life in the absence of cultural or ++religious dictums. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Architectural Indigestion: ++ The almost obsessive need to live in a "cool" ++architectural environment. Frequently related objects of fetish ++include framed black-and-white art photography (Diane Arbus a ++favorite); simplistic pine furniture; matte black high-tech items such ++as TVs, stereos, and telephones; low-wattage ambient lighting; a lamp, ++chair, or table that alludes to the 1950s; cut flowers with complex ++names. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Japanese Minimalism: ++ The most frequently offered interior design aesthetic used by ++rootless career-hopping young people. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bread and Circuits: ++ The electronic era tendency to view party politics as corny -- ++no longer relevant of meaningful or useful to modern societal issues, ++and in many cases dangerous. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Voter's Block: ++ The attempt, however futile, to register dissent with the ++current political system by simply not voting. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Armanism: ++ After Giorgio Armani; an obsession with mimicking the seamless ++and (more importantly) *controlled* ethos of Italian couture. Like ++Japanese Minimalism, Armanism reflects a profound inner need for ++control. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poor Buoyancy: ++ The realization that one was a better person when one had less ++money. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Musical Hairsplitting: ++ The act of classifying music and musicians into pathologically ++picayune categories: "The Vienna Franks are a good example of urban ++white acid fold revivalism crossed with ska." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++101-ism: ++ The tendency to pick apart, often in minute detail, all ++aspects of life using half-understood pop psychology as a tool. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Yuppie Wannabes: ++ An X generation subgroup that believes the myth of a yuppie ++life-style being both satisfying and viable. Tend to be highly in ++debt, involved in some form of substance abuse, and show a willingness ++to talk about Armageddon after three drinks. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Ultra Short Term Nostalgia: ++ Homesickness for the extremely recent past: "God, things seemed ++so much better in the world last week." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Rebellion Postponement: ++ The tendency in one's youth to avoid traditionally youthful ++activities and artistic experiences in order to obtain serious career ++experience. Sometimes results in the mourning for lost youth at about ++age thirty, followed by silly haircuts and expensive joke-inducing ++wardrobes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Conspicuous Minimalism: ++ A life-style tactic similar to Status Substitution. The ++nonownership of material goods flaunted as a token of moral and ++intellectual superiority. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Caf'e Minimalism: ++ To espouse a philosophy of minimalism without actually putting ++into practice any of its tenets. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++O'Propriation: ++ The inclusion of advertising, packaging, and entertainment ++jargon from earlier eras in everyday speech for ironic and/or comic ++effect: "Kathleen's Favorite Dead Celebrity party was tons o'fun" or ++"Dave really thinks of himself as a zany, nutty, wacky, and madcap ++guy, doesn't he?" ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Air Family: ++ Describes the false sense of community experienced among coworkers ++in an office environment. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Squirming: ++ Discomfort inflicted on young people by old people who see no ++irony in their gestures. "Karen died a thousand deaths as her father ++made a big show of tasting a recently manufactured bottle of wine ++before allowing it to be poured as the family sat in Steak Hut. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Recreational Slumming: ++ The practice of participating in recreational activities ++of a class one perceives as lower than one's own: "Karen! Donald! ++Let's go bowling tonight! And don't worry about shoes ... apparently ++you can rent them." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Conversational Slumming: ++ The self-conscious enjoyment of a given conversation ++precisely for its lack of intellectual rigor. A major spin-off ++activity of Recreational Slumming. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Occupational Slumming: ++ Taking a job well beneath one's skill or education level ++as a means of retreat from adult responsibilities and/or avoiding ++failure in one's true occupation. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Anti-Victim Device: ++ A small fashion accessory worn on an otherwise ++conservative outfit which announces to the world that one still has a ++spark of individuality burning inside: 1940s retro ties and earrings ++(on men), feminist buttons, noserings (women), and the now almost ++completely extinct teeny weeny "rattail" haircut (both sexes). ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Nutritional Slumming: ++ Food whose enjoyment stems not from flavor but from a ++complex mixture of class connotations, nostalgia signals, and ++packaging semiotics: Katie and I bought this tub of Multi-Whip instead ++of real whip cream because we thought petroleum distillate whip ++topping seemed like the sort of food that air force wives stationed in ++Pensacola back in the early sixties would feed their husbands to ++celebrate a career promotion. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Tele-Parabilizing: ++ Morals used in everyday life that derive from TV sitcom plots: ++"That's just like the episode where Jan loses her glasses!" ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++QFD: ++ Quelle fucking drag. "Jamie got stuck at Rome airport for ++thirty-six hours and it was, like, totally QFD." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++QFM: ++ Quelle fashion mistake. "It was really QFM. I mean painter ++pants? That's 1979 beyond belief." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Me-ism: ++ A search by an individual, in the absence of training in ++traditional religious tenets, to formulate a personally tailored ++religion by himself. Most frequently a mishmash of reincarnation, ++personal dialogue with a nebulously defined god figure, naturalism, ++and karmic eye-for-eye attitudes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Paper Rabies: ++ Hypersensitivity to littering. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Bradyism: ++ A multisibling sensibility derived from having grown up in ++large families. A rarity in those born after approximately 1965, ++symptoms of Bradyism include a facility for mind games, emotional ++withdrawal in situations of overcrowding, and a deeply felt need for a ++well-defined personal space. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Black Holes: ++ An X generation subgroup best known for their possession of ++almost entirely black wardrobes. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Black Dens: ++ Where Black Holes live; often unheated warehouses with Day-Glo ++spray painting, mutilated mannequins, Elvis references, dozens of ++overflowing ashtrays, mirror sculptures, and Velvet Underground music ++playing in background. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Strangelove Reproduction: ++ Having children to make up for the fact that one no longer ++believes in the future. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Squires: ++ The most common X generation subgroup and the only subgroup ++given to breeding. Squires exist almost exclusively in couples and ++are recognizable by their frantic attempts to create a semblance of ++Eisenhower-era plenitude in their daily lives in the face of ++exorbitant housing prices and two-job life-styles. Squires tend to be ++continually exhausted from their voraciously acquisitive pursuit of ++furniture and knickknacks. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Poverty Lurks: ++ Financial paranoia instilled in offspring by depression-era ++parents. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Pull-the-Plug, Slice the Pie: ++ A fantasy in which an offspring mentally tallies up the ++net worth of his parents. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Underdogging: ++ The tendency to almost invariably side with the underdog in a ++given situation. The consumer expression of this trait is the ++purchasing of less successful, "sad," or failing products: "I know ++these Vienna franks are heart failure on a stick, but they were so sad ++looking up against all the other yuppie food items that I just had to ++buy them." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++2 + 2 = 5-ism: ++ Caving in to a target marketing strategy aimed at oneself after ++holding out for a long period of time. "Oh, all right, I'll buy your ++stupid cola. Now leave me alone." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Option Paralysis: ++ The tendency, when given unlimited choices, to make none. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Personality Tithe: ++ A price paid for becoming a couple; previously amusing ++human beings become boring: "Thanks for inviting us, but Noreen and I ++are going to look at flatware catalogs tonight. Afterward we're going ++to watch the shopping channel." ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Jack-and-Jill Party: ++ A Squire tradition; baby showers to which both men and ++women friends are invited as opposed to only women. Doubled ++purchasing power of bisexual attendance brings gift values up to ++Eisenhower-era standards. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++ Culture" ++% ++Down-Nesting: ++ The tendency of parents to move to smaller, guest-room-free ++houses after the children have moved away so as to avoid children aged ++20 to 30 who have boomeranged home. ++ -- Douglas Coupland, "Generation X: Tales for an Accelerated ++% ++greenrd's law ++ Evey post disparaging someone else's spelling or grammar, or lauding ++ one's own spelling or grammar, will inevitably contain a spelling or ++ grammatical error. ++ -- greenrd in http://www.kuro5hin.org/comments/2002/4/16/61744/5230?pid=5#6 ++% +diff -Nru datfiles.orig/education datfiles/education +--- datfiles.orig/education 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/education 2004-08-07 23:32:31.000000000 +0200 +@@ -853,7 +853,7 @@ + in with them, and the seniors take none away, so knowledge accumulates. + % + University politics are vicious precisely because the stakes are so small. +- -- Henry Kissinger ++ -- C. P. Snow + % + Walt: Dad, what's gradual school? + Garp: Gradual school? +diff -Nru datfiles.orig/ethnic datfiles/ethnic +--- datfiles.orig/ethnic 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/ethnic 2004-08-07 23:32:31.000000000 +0200 +@@ -510,9 +510,6 @@ + Providence, New Jersey, is one of the few cities where Velveeta cheese + appears on the gourmet shelf. + % +-Roumanian-Yiddish cooking has killed more Jews than Hitler. +- -- Zero Mostel +-% + San Francisco isn't what it used to be, and it never was. + -- Herb Caen + % +diff -Nru datfiles.orig/food datfiles/food +--- datfiles.orig/food 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/food 2004-08-07 23:32:31.000000000 +0200 +@@ -778,7 +778,7 @@ + Mushrooms are what grows on vegetables when food's done with them. + -- Meat Eater's Credo, according to Jim Williams + % +-Vegeterians beware! You are what you eat. ++Vegetarians beware! You are what you eat. + % + Waiter: "Tea or coffee, gentlemen?" + 1st customer: "I'll have tea." +diff -Nru datfiles.orig/fortunes datfiles/fortunes +--- datfiles.orig/fortunes 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/fortunes 2004-08-07 23:32:31.000000000 +0200 +@@ -319,8 +319,6 @@ + Next Friday will not be your lucky day. As a matter of fact, you don't + have a lucky day this year. + % +-Obviously the only rational solution to your problem is suicide. +-% + Of course you have a purpose -- to find a purpose. + % + People are beginning to notice you. Try dressing before you leave the house. +@@ -341,7 +339,7 @@ + % + Snow Day -- stay home. + % +-So this it it. We're going to die. ++So this is it. We're going to die. + % + So you're back... about time... + % +@@ -655,8 +653,6 @@ + % + You will be called upon to help a friend in trouble. + % +-You will be dead within a year. +-% + You will be divorced within a year. + % + You will be given a post of trust and responsibility. +diff -Nru datfiles.orig/humorists datfiles/humorists +--- datfiles.orig/humorists 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/humorists 2004-08-07 23:32:31.000000000 +0200 +@@ -1014,3 +1014,19 @@ + When your IQ rises to 28, sell. + -- Professor Irwin Corey to a heckler + % ++FORTUNE'S RANDOM QUOTES FROM MATCH GAME 75, NO. 1: ++ ++ Gene Rayburn: We'd like to close with a thought for the day, friends --- ++ something ... ++ ++ Someone: (interrupting) Uh-oh ++ ++ Gene Rayburn: ...pithy, full of wisdom --- and we call on the Poet ++ Laureate, Lipsy Russell ++ ++Lipsy Russell: The young people are very different today, and there is ++ one sure way to know: Kids to use to ask where they came ++ from, now they'll tell you where you can go. ++ ++ All: (laughter) ++% +diff -Nru datfiles.orig/kids datfiles/kids +--- datfiles.orig/kids 1995-10-21 04:31:42.000000000 +0100 ++++ datfiles/kids 2004-08-07 23:32:31.000000000 +0200 +@@ -111,7 +111,7 @@ + Wipe that smile off your face. + I don't believe you. + How many times have I told you to be careful? +- Just beacuse. ++ Just because. + % + Are you a parent? Do you sometimes find yourself unsure as to what to + say in those awkward situations? Worry no more... +diff -Nru datfiles.orig/knghtbrd datfiles/knghtbrd +--- datfiles.orig/knghtbrd 1970-01-01 01:00:00.000000000 +0100 ++++ datfiles/knghtbrd 2004-08-07 23:32:30.000000000 +0200 +@@ -0,0 +1,2402 @@ ++* SynrG notes that the number of configuration questions to answer in ++ sendmail is NON-TRIVIAL ++% ++* james would be more impressed if netgod's magic powers could stop the ++ splits in the first place... ++* netgod notes debian developers are notoriously hard to impress ++% ++ need help: my first packet to my provider gets lost :-( ++ sel: dont send the first one, start with #2 ++% ++ abuse me. I'm so lame I sent a bug report to ++ debian-devel-changes ++% ++I never thought that I'd see the day where Netscape is free software and ++X11 is proprietary. We live in interesting times. ++ -- Matt Kimball ++% ++ Lemme make sure I'm not wasting time here... bcwhite will remove ++ pkgs that havent been fixed that have outstanding bugs of severity ++ "important". True or false? ++ jim: "important" or higher. True. ++ Then we're about to lose ftp.debian.org and dpkg :) ++* netgod will miss dpkg -- it was occasionally useful ++ We still have rpm.... ++% ++ Being overloaded is the sign of a true Debian maintainer. ++% ++ partycle: I seriously do need a vacation from this package. ++ I actually had a DREAM about introducing a stupid new bug ++ into xbase-preinst last night. That's a Bad Sign. ++% ++Writing non-free software is not an ethically legitimate activity, so if ++people who do this run into trouble, that's good! All businesses based ++on non-free software ought to fail, and the sooner the better. ++ -- Richard Stallman ++% ++Microsoft DNS service terminates abnormally when it recieves a response ++to a DNS query that was never made. Fix Information: Run your DNS ++service on a different platform. ++ -- BugTraq ++% ++* dpkg hands stu a huge glass of vbeer ++* Joey takes the beer from stu, you're too young ;) ++* Cylord takes the beer from Joey, you're too drunk. ++* Cylord gives the beer to muggles. ++% ++We the people of the Debian GNU/Linux distribution, in order to form a ++more perfect operating system, establish quality, insure marketplace ++diversity, provide for the common needs of computer users, promote ++security and privacy, overthrow monopolistic forces in the computer ++software industry, and secure the blessings of liberty to ourselves and ++our posterity, do ordain and establish this Constitution for the Debian ++GNU/Linux System. ++% ++"This is the element_data structure for elements whose *element_type = ++FORM_TYPE_SELECT_ONE, FORM_TYPE_SELECT_MULT. */ /* * nesting deeper ++and deeper, harder and harder, go, go, oh, OH, OHHHHH!! * Sorry, got ++carried away there. */ struct lo_FormElementOptionData_struct." ++ -- Mozilla source code ++% ++While the year 2000 (y2k) problem is not an issue for us, all Linux ++implementations will impacted by the year 2038 (y2.038k) issue. The ++Debian Project is committed to working with the industry on this issue ++and we will have our full plans and strategy posted by the first quarter ++of 2020. ++% ++... Where was Stac Electronics when Microsoft invented Doublespace? Where ++were Xerox and Apple when Microsoft invented the GUI? Where was Apple's ++QuickTime when Microsoft invented Video for Windows? Where was Spyglass ++Inc.'s Mosaic when Microsoft invented Internet Explorer? Where was Sun ++when Microsoft invented Java? ++% ++I'm sorry if the following sounds combative and excessively personal, ++but that's my general style. -- Ian Jackson ++% ++"my biggest problem with RH (and especially RH contrib packages) is that ++they DON'T have anything like our policy. That's one of the main reasons ++why their packages are so crappy and broken. Debian has the teamwork ++side of building a distribution down to a fine art." ++% ++"slackware users don't matter. in my experience, slackware users are ++either clueless newbies who will have trouble even with tar, or they are ++rabid do-it-yourselfers who wouldn't install someone else's pre-compiled ++binary even if they were paid to do it." ++% ++ "Lord grant me the serenity to accept the things I cannot ++ change, the courage to change the things I can, and the wisdom ++ to hide the bodies of the people I had to kill because they ++ pissed me off." ++% ++* dark has changed the topic on channel #debian to: Later tonight: After ++ months of careful refrigeration, Debian 2.0 is finally cool enough to ++ release. ++% ++I sat laughing snidely into my notebook until they showed me a PC running ++Linux. And oh! It was as though the heavens opened and God handed down a ++client-side OS so beautiful, so graceful, and so elegant that a million ++Microsoft developers couldn't have invented it even if they had a hundred ++years and a thousand crates of Jolt cola. ++ -- LAN Times ++% ++I sat laughing snidely into my notebook until they showed me a PC running ++Linux.... And did this PC choke? Did it stutter? Did it, even once, ++say that this program has performed an illegal operation and must be shut ++down? No. And this is just on the client. ++ -- LAN Times ++% ++"I think that most debian developers are rather "strong willed" people ++with a great degree of understanding and a high level of passion for what ++they perceive as important in development of the debian system." ++ --Bill Leach ++% ++"Actually, the only distribution of Linux I've ever used that passed the ++rootshell test out of the box (hit rootshell at the time the dist is ++released and see if you can break the OS with scripts from there) is ++Debian." ++ -- seen on the Linux security-audit mailing list ++% ++* Culus fears perl - the language with optional errors ++% ++ you should be afraid to use KDE because RMS might come to your ++ house and cleave your monitor with an axe or something :) ++% ++"and i actually like debian 2.0 that much i completely revamped the ++default config of the linux systems our company sells and reinstalled any ++of the linux systems in the office and here at home.." ++% ++ how bout a policy policing policy with a policy for changing the ++ police policing policy ++% ++ "Let's form the Linux Standard Linux Standardization Association ++ Board. The purpose of this board will be to standardize Linux ++ Standardization Organizations." ++% ++ Don't come crying to me about your "30 minute compiles"!! I ++ have to build X uphill both ways! In the snow! With bare ++ feet! And we didn't have compilers! We had to translate the ++ C code to mnemonics OURSELVES! ++ And I was 18 before we even had assemblers! ++% ++NEW YORK (CNN) -- Internet users who spend even a few hours a week online ++at home experience higher levels of depression and loneliness than if ++they had used the computer network less frequently, The New York Times ++reported Sunday. The result ... surprised both researchers and ++sponsors, which included Intel Corp., Hewlett Packard, AT&T Research and ++Apple Computer. ++% ++"What is striking, however, is the general layout and integration of the ++system. Debian is a truly elegant Linux distribution; great care has ++been taken in the preparation of packages and their placement within the ++system. The sheer number of packages available is also impressive...." ++% ++Debian Linux is a solid, comprehensive product, and a genuine pleasure to ++use. It is also great to become involved with the Debian collective, ++whose friendliness and spirit recalls the early days of the Internet and ++its sense of openness and global cooperation. ++% ++ can I write a unix-like kernel in perl? ++% ++ netgod: I also have a "Evil Inside" T-shirt (w/ Intel logo).. on ++ the back it states: "When the rapture comes, will you have root?" ++% ++ "NT 5.0. All the bugs and ten times the code size!" ++% ++ there is 150 meg in the /tmp dir! DEAR LORD ++% ++ netgod: what do you have in your kernel??? The compiled source for ++ driving a space shuttle??? ++ time to make a zip drive your floppy drive then. if the kernel ++ doesn fit on that, the kernel is an AI ++% ++Now I can finally explain to everyone why I do this. I just got $7 worth ++of free stuff for working on Debian ! ++% ++ netgod: My calculator has more registers than the x86, and ++ -thats- sad ++% ++* boren tosses matlab across the room and hopes it breaks into a number ++ aproaching infinite peices ++% ++"...It was a lot faster than I thought it was going to be, much faster ++than NT. If further speed increases are done to the server for the final ++release, Oracle is going to be able to wipe their ass with SQL SERVER and ++hand it back to M$ while the Oracle admins ... migrate their databases ++over to Linux!" ++% ++World Domination, of course. And scantily clad females. Who cares if ++its twenty below? -- Linus Torvalds ++% ++ Win 98 Psychic edition: We'll tell you where you're going tomorrow ++% ++ it's amazing how "not-broken" debian is compared to slack and rh ++% ++ "Hey, I'm from this project called Debian... have you heard of it? ++ Your name seems to be on a bunch of our stuff." ++% ++"In the event of a percieved failing of the project leadership #debian is ++empowered to take drastic and descisive action to correct the failing, ++including by not limited to expelling officials, apointing new officials ++and generally abusing power" ++ -- proposed amendment to Debian Constitution ++% ++ Fuck, I can't compile the damn thing and I wrote it ! ++% ++ we're calling 2.2 _POTATO_?? ++% ++ does Johnie Ingram hang out here on IRC? ++% ++* Twilight1 will have to hang his Mozilla beanie dinosaur in effigy if ++ Netscape sells-out to Alot Of Losers.. ++% ++ if macOS is for the computer illiterate, then windoze is for the ++ computer masochists ++% ++ Culus: Building a five-meter-high replica of the Empire State ++ Building with paperclips is impressive. Doing it blindfolded is ++ eleet. ++% ++I can just see it now: nomination-terrorism ;-) ++ -- Manoj ++ ++haha! i nominate manoj. ++ -- seeS ++% ++ Somehow I have more respect for 14 year old Debian developers than ++ 14 year old Certified Microsoft Serfs. ++% ++ Ben: Do you solumly swear to read you debian email once a day and ++ do not permit people to think you are MIA? ++ Culus: i do so swear ++% ++"I wonder if this is the first constitution in the history of mankind ++where you have to calculate a square root to determine if a motion ++passes. :-)" ++ -- Seen on Slashdot ++% ++This is the solution to Debian's problem .. and since the only real way ++to create more relatives of developers is to have children, we need more ++sex! It's a long term investment ... it's the work itself that is ++satisfying! ++ -- Craig Brozefsky ++% ++ dunham: You know how real numbers are constructed from rational ++ numbers by equivalence classes of convergent sequences? ++ marcus: yes. ++% ++ "Hello?" "Hi baybee" "Are you Johnie Ingram?" "For you I'll be ++ anyone" "Ermm.. Do you sell slink CD's?" "I love slinkies" ++% ++ xhost +localhost should only be done by people who would ++ paint their hostname and root password on an interstate ++ overpass. ++% ++ AIX - the Unix from the universe where Spock has a beard. ++% ++ Studies prove that research causes cancer in 43% of laboratory ++ rats ++ knghtbrd- yeah, but 78% of those statistics are off by 52%... ++% ++ apt: !bugs ++ !bugs are stupid ++ apt: are stupid? what's that? ++ dpkg: i don't know ++ apt: Beauty is in the eye of the beer holder... ++ i already had it that way, dpkg. ++% ++ i'm trying to convince some netcom admins i know to convert ++ to Debian from RH, netgod, but they are DAMN stubborn ++ why RH users so damned hard headed? ++ it's the hat ++% ++ Debian - All the power, without the silly hat. ++% ++How many months are we going to be behind them [Redhat] with a glibc ++release?" ++ -- Jim Pick, 8 months before Debian 2.0 is finally released ++% ++The purpose of having mailing lists rather than having newsgroups is to ++place a barrier to entry which protects the lists and their users from ++invasion by the general uneducated hordes. ++ -- Ian Jackson ++% ++Most of us feel that marketing types are like a dangerous weapon - keep ++'em unloaded and locked up in a cupboard, and only bring them out when ++you need them to do a job. ++ -- Craig Sanders ++% ++ cerb: we subscribed you to debian-fight as the moderator ++ cerb: list rules are, 1) no nice emails, 2) no apologies ++% ++ our local telco has admitted that someone "backed into a ++ button on a switch" and took the entire ATM network down ++ hopefully now routers are designed better, so the "network ++ off" swtich is on the back ++% ++ Thunder-: when you get { MessagesLikeThisFromYourHardDrive } ++ Thunder-: it either means { TheDriverIsScrewy } ++ or ++ { YourDriveIsFlakingOut BackUpYourDataBeforeIt'sTooLate ++ PrayToGod } ++% ++ it has been said that redhat is the thing Marc Ewing wears on ++ his head. ++% ++ by the power of greyskull ++ someone tell me the ban to place ++ mrcurious: *.debian.org, *.novare.net ++ *.debian.org. that's awesome. ++ -- Seen on LinuxNet #linux ++% ++"What does this tell me? That if Microsoft were the last software ++company left in the world, 13% of the US population would be scouring ++garage sales & Goodwill for old TRS-80s, CPM machines & Apple ]['s before ++they would buy Microsoft. That's not exactly a ringing endorsement." ++ -- Seen on Slashdot ++% ++"Bruce McKinney, author of of Hardcore Visual Basic, has announced that ++he's fed up with VB and won't be writing a 3rd edition of his book. The ++best quote is at the end: 'I don't need a language designed by a focus ++group'." ++% ++ Would it be acceptable to debian policy if we inserted a crontab ++ by default into potato that emailed bill.gates at microsoft.com ++ every morning with an email that read, "Don't worry, linux is a ++ fad..." ++% ++* Overfiend ponders doing an NMU of asclock, in which he simply changes ++ the extended description to "If you bend over and put your head between ++ your legs, you can read the time off your assclock." ++ Overfiend: go to bed. ++% ++ It is important to note that the primary reason the Roman Empire ++ fail is that they had no concept of zero... thus they could not ++ test the success or failure of their C programs. ++% ++Since when has the purpose of debian been to appease the interests of the ++mass of unskilled consumers? -- Steve Shorter ++% ++ netgod: er, are these 2.2.0 packages 2.0.0pre9 or do you have a ++ direct line with the gods? ++ joeyh: i have the direct line ++% ++<_Anarchy_> Argh.. who's handing out the paper bags 8) ++% ++ anyone around? ++ no, we're all irregular polygons ++% ++ OH MY GOD NOT A RANDOM QUOTE GENERATOR ++ surely you didnt think that was static? how lame would that be? :-) ++% ++Mere nonexistence is a feeble excuse for declaring a thing unseeable. You ++*can* see dragons. You just have to look in the right direction. ++ -- John Hasler ++% ++ gcc is the best compressor ever ported to linux. it can turn ++ 12MB of kernel source (and that's .debbed) into a 500k kernel ++% ++ I *like* the chicken ++% ++ ++ [ ] DOGBERT ++ [ 2 ] RICHARD STALLMAN ++ [ 3 ] BUFFY SUMMERS ++ [ 1 ] MANOJ SRIVASTAVA ++ [ 4 ] NONE of the above ++ ++ -- Debian Project Leader 1999 ballot ++% ++ anyone know if there is a version of dpkg for redhat? ++% ++acme-cannon (3.1415) unstable; urgency=low ++ ++ * Added safety to prevent operator dismemberment, closes: bug #98765, ++ bug #98713, #98714. ++ * Added manpage. closes: #98725. ++ ++ -- Wile E. Coyote Sun, 31 Jan 1999 07:49:57 -0600 ++% ++!netgod:*! time flies when youre using linux ++!doogie:*! yeah, infinite loops in 5 seconds. ++!Teknix:*! has anyone re-tested that with 2.2.x ? ++!netgod:*! yeah, 4 seconds now ++% ++* dark greets liw with a small yellow frog. ++* liw kisses the frog and watches it transform to a beautiful nerd ++ girl, takes her out to ice cream, and lives happily forever after ++ with her ++ liw: Umm it's too late to have the frog back? ++% ++* Culus thinks we should go to trade shows and see how many people we ++ can kill by throwing debian cds at them ++% ++ "Yes, your honour, I have RSA encryption code tattood on my ++ penis. Shall I show the jury?" ++% ++ you people are all insane. ++ knight: sure, that's why we work on Debian. ++ Knghtbrd: get in touch with your inner nutcase. ++% ++ Saens demonstrates no less than 3 tcp/ip bugs in 2.2.3 ++% ++ alexsh: Be /VERY/ cairful, you could, if your unlucky, fry your ++ motherboards.. ++ Mercury - sounds like fun ++% ++ dark: caldera? ++ rcw - that's not a distribution, it's a curse ++ Knghtbrd: it's a cursed distribution ++% ++Software is like sex, it's better when it's free. -- Linus Torvalds ++% ++ Knghtbrd: We have lots of whatevers. ++ dark - In Debian? Hell yeah we do! ++% ++I did it just to piss you off. :-P ++ -- Branden Robinson in a message to debian-devel ++% ++The software required Win95 or better, so I installed Linux. ++% ++10) there is no 10, but it sounded like a nice number :) ++ -- Wichert Akkerman ++% ++Eric Raymond: I want to live in a world where software doesn't suck. ++Richard Stallman: Any software that isn't free sucks. ++Linus Torvalds: I'm interested in free beer. ++Richard Stallman: That's okay, as long as I don't have to drink it. I ++ don't like beer. ++ -- LinuxWorld Expo panel, 4 March 1999 ++% ++I'm not a level-headed person... -- Bruce Perens ++% ++Personally, I don't often talk about social good because when I hear other ++people talk about social good, that's when I reach for my revolver. ++ -- Eric Raymond ++% ++If we want something nice to get born in nine months, then sex has to ++happen. We want to have the kind of sex that is acceptable and fun for both ++people, not the kind where someone is getting screwed. Let's get some cross ++fertilization, but not someone getting screwed. ++ -- Larry Wall ++% ++We all know Linux is great... it does infinite loops in 5 seconds. ++ -- Linus Torvalds ++% ++YES! YES! YES! Oh, YES! (ooops, I sound like Meg Ryan ;-) ++ -- Ian Nandhra ++% ++ If I start writing essays about Free Software for slashdot, ++ please shoot me. ++% ++ hmm, lunch does sound like a good idea ++ would taste like a good idea too ++% ++p.s. - i'm about *this* close to running around in the server room with a ++pair of bolt cutters, and a large wooden mallet, laughing like a maniac and ++cutting everything i can fit the bolt cutters around. and whacking that ++which i cannot. so if i seem semi-incoherent, or just really *really* nasty ++at times, please forgive me. stress is not a pretty thing. };P ++ -- Phillip R. Jaenke ++% ++Every company complaining about Microsoft's business practices is simply a ++rose bush. They look lovely and smell nice. Once a lucky company dethrones ++Microsoft they will shed their petals to expose the thorns underneath. A ++thorn by any other name would hurt as much. ++% ++Something must be Done ++This is Something ++Therefore, This must be Done ++ -- The Thatcherite Syllogism ++% ++ xtifr - beware of james when he's off his medication => ++% ++Indifference will certainly be the downfall of mankind, but who cares? ++% ++Never underestimate the power of human stupidity. ++ -- Robert A. Heinlein ++% ++ red dye causes cancer, haven't you heard? (; ++ fucking everything causes cancer, haven't you heard? ++ => ++ no, that causes aids ++% ++Gold, n.: ++ A soft malleable metal relatively scarce in distribution. It is mined ++ deep in the earth by poor men who then give it to rich men who immediately ++ bury it back in the earth in great prisons, although gold hasn't done ++ anything to them. ++ -- Mike Harding, "The Armchair Anarchist's Almanac" ++% ++* lilo hereby declares OPN a virtual pain in the ass :) ++% ++"They are both businesses - if you have given them enough money, I'm ++sure they'll do whatever the hell you ask:->" ++ -- David Welton ++% ++"You have the right not to be an asshole. If you give up that right ++everything you say and do in here will be held against you. If you cannot ++afford to stop being an asshole then someone will be appointed to kick ++yours outta here." ++ -- Your rights as an irc addict ++% ++* Simunye is so happy she has her mothers gene's ++ you better give them back before she misses them! ++% ++ conning the most intellegent people on the planet is not easy ++% ++California, n.: ++ From Latin "calor", meaning "heat" (as in English "calorie" or ++Spanish "caliente"); and "fornia'" for "sexual intercourse" or ++"fornication." Hence: Tierra de California, "the land of hot sex." ++ -- Ed Moran ++% ++* Caytln slaps Lisa ++ catfight :P ++ Watch it girl, I like that. ++ :) ++ figures :D ++% ++ rit/ara: There's something really demented about UNIX ++ underwear... ++% ++The X Window System: ++ The standard UNIX graphical environment. With Linux, this is usually ++ XFree86 (http://www.xfree86.org). You may call it X, XFree, the X ++ Window System, XF86, or a host of other things. Call it 'XWindows' and ++ someone will smack you and you will have deserved it. ++% ++ "The currency collectors are offline." "I'm rerouting though ++ the secondary couplings. If we re-align the phase manifold we ++ should be able to use the plasma inductor matrix to manually ++ launch a new cheesy spinoff series." ++* ShadwDrgn sighs ++ you leave my manifolds alone ++ ! ++% ++* Turken thinks little kids are absolutely adorable... especialyy when ++ they're someone elses. ++% ++* Overfiend sighs ++ Netscape sucks. ++ It is a house of cards resting on a bed of quicksand. ++ during an earthquake ++ in a tornado ++% ++ media ethics is an oxymoron, much like Jumbo Shrimp and ++ Microsoft Works. ++ not to mention NT Security ++% ++ Oxymorons? I saw one yesterday - the pamphlet on "Taco Bell ++ Nutritional Information" ++% ++* Knghtbrd unleashes a pair of double barreled snurf guns and covers ++ jesus with snurf darts ++ meany :P ++% ++ doogie: you sound highly unstable :-) ++ jgoerzen - he is. ++* doogie bops Knghtbrd ++ see? Resorting to violence =D ++% ++I have also been a huge Unix fan ever since I realized that SCO was not ++Unix. -- Dennis Baker ++% ++ Ctrl+Option+Command + P + R ++ dracus - YE GODS! That's worse than EMACS! ++ hehehehe ++ don't ask what that does :P ++% ++ you are not a nutcase ++ You obviously don't know me well enough yet. => ++% ++* aj thinks Kb^Zzz ought to pick different things to dream about than ++ general resolutions and policy changes. ++ aj - tell me about it, this is a Bad Sign ++% ++ hmm, is there a --now-dammit option for exim? ++% ++ Kira: JOIN THE DARK SIDE, YOUNG ONE. ++ darth, I *am* the dark side. ++% ++ Feanor: u have no idea of the depth of the stupidty of american law ++% ++Anyone who stands out in the middle of a road looks like roadkill to me. ++ -- Linus Torvalds ++% ++ "PLEASE RESPECT INTELLECTUAL RIGHTS!" ++ "Please demonstrate intellect." ;) ++% ++ Feanor - license issues are important. If we don't watch our ++ arses now, someone's gonna come up and bite us later... ++% ++"Now we'll have to kill you." ++ -- Linus Torvalds ++% ++* knghtbrd can already envision: "Subject: [INTENT TO PREPARE TO PROPOSE ++ FILING OF BUG REPORT] Typos in the policy document" ++% ++ heh thats a lost cause, like the correct pronounciation of ++ "jewelry" ++ give it up :-) ++ and the correct spelling of "colour" :) ++ heh ++ and aluminium ++ or nuclear weapons ++ are you threating me yankee ? ++ just cause we don't have the bomb... ++ back off ya yellow belly ++% ++ !seen god ++ LauraDax, I don't remember seeing "god" ++% ++ Europe Passes Pro-spam Law ++ I though only Americans were that fucking stupid => ++ apparently americans are quite naive :) ++% ++ is a surgical war where you go give the foreign troops nose jobs? ++% ++ Athena Desktop Environment! In your hearts, you *know* it's the ++ right choice! :) ++* Knghtbrd THWAPS xtifr ++% ++ shaleh - unclean is just WEIRD. ++ heh, unclean is cool ++ Espy - and weird. ++ yes, weird too ++% ++ direct brain implants :) ++ xtifr - yah, then using computers would actually require some ++ of these idiots to think! ++ ;> ++% ++ Overfiend - BTW, after we've discovered X takes all of 1.4 GIGS ++ to build, are you willing admit that X is bloatware? => ++ KB: there is a 16 1/2 minute gap in my answer ++ knghtbrd: evidence exists that X is only the *2nd* worst windowing ++ system ;) ++% ++ damn, the autonomous mouse movement starts usually after I use a ++ mouse button ++ don't use a mouse button then :) ++ yeah, right :) ++% ++ you know, Linux needs a platform game starring Tux @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4503] csw/mgar/pkg Message-ID: Revision: 4503 http://gar.svn.sourceforge.net/gar/?rev=4503&view=rev Author: dmichelsen Date: 2009-04-27 12:41:23 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gal2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gal2/ csw/mgar/pkg/gal2/trunk/ csw/mgar/pkg/gal2/trunk/legacy/ csw/mgar/pkg/gal2/trunk/legacy/scripts/ csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gal2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gal2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gal2/trunk/legacy/sources/ csw/mgar/pkg/gal2/trunk/legacy/specs/ csw/mgar/pkg/gal2/trunk/legacy/specs/Makefile csw/mgar/pkg/gal2/trunk/legacy/specs/gal2 Added: csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:23 UTC (rev 4503) @@ -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/gal2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/scripts/human.pl 2009-04-27 12:41:23 UTC (rev 4503) @@ -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 () { + 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 + +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 + +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/gal2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:23 UTC (rev 4503) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gal2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/specs/Makefile 2009-04-27 12:41:23 UTC (rev 4503) @@ -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/gal2/trunk/legacy/specs/gal2 =================================================================== --- csw/mgar/pkg/gal2/trunk/legacy/specs/gal2 (rev 0) +++ csw/mgar/pkg/gal2/trunk/legacy/specs/gal2 2009-04-27 12:41:23 UTC (rev 4503) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: gal2,v 1.11 2005/04/13 15:17:11 simigern Exp $ + +$progname = 'gal'; +$version = '2.4.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gal/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + +$progname = $progname."2"; + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME Application Libs", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "gal-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd gal-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4504] csw/mgar/pkg Message-ID: Revision: 4504 http://gar.svn.sourceforge.net/gar/?rev=4504&view=rev Author: dmichelsen Date: 2009-04-27 12:41:40 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gconf2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gconf2/ csw/mgar/pkg/gconf2/trunk/ csw/mgar/pkg/gconf2/trunk/legacy/ csw/mgar/pkg/gconf2/trunk/legacy/scripts/ csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gconf2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gconf2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gconf2/trunk/legacy/sources/ csw/mgar/pkg/gconf2/trunk/legacy/specs/ csw/mgar/pkg/gconf2/trunk/legacy/specs/Makefile csw/mgar/pkg/gconf2/trunk/legacy/specs/gconf2 Added: csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:40 UTC (rev 4504) @@ -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/gconf2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/scripts/human.pl 2009-04-27 12:41:40 UTC (rev 4504) @@ -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 () { + 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 + +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 + +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/gconf2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:40 UTC (rev 4504) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gconf2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/specs/Makefile 2009-04-27 12:41:40 UTC (rev 4504) @@ -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/gconf2/trunk/legacy/specs/gconf2 =================================================================== --- csw/mgar/pkg/gconf2/trunk/legacy/specs/gconf2 (rev 0) +++ csw/mgar/pkg/gconf2/trunk/legacy/specs/gconf2 2009-04-27 12:41:40 UTC (rev 4504) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: gconf2,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'GConf'; +$version = '2.9.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/GConf packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gconf2", + filename => "gconf2", + name => "gconf2 - GNOME configuration database system", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +#rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +sed 's/\\.gconf/\\.gconf-csw/g' ${buildroot}/opt/csw/etc/gconf/2/path >${buildroot}/opt/csw/etc/gconf/2/path.tmpcsw && mv ${buildroot}/opt/csw/etc/gconf/2/path.tmpcsw ${buildroot}/opt/csw/etc/gconf/2/path + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,GConf/2/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:41:54 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:41:54 +0000 Subject: [csw-devel] SF.net SVN: gar:[4505] csw/mgar/pkg/glib2/trunk Message-ID: Revision: 4505 http://gar.svn.sourceforge.net/gar/?rev=4505&view=rev Author: dmichelsen Date: 2009-04-27 12:41:54 +0000 (Mon, 27 Apr 2009) Log Message: ----------- glib2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/glib2/trunk/legacy/ csw/mgar/pkg/glib2/trunk/legacy/scripts/ csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/glib2/trunk/legacy/scripts/human.pl csw/mgar/pkg/glib2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/glib2/trunk/legacy/sources/ csw/mgar/pkg/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch csw/mgar/pkg/glib2/trunk/legacy/specs/ csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile csw/mgar/pkg/glib2/trunk/legacy/specs/glib2 Added: csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:41:54 UTC (rev 4505) @@ -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/glib2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/scripts/human.pl 2009-04-27 12:41:54 UTC (rev 4505) @@ -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 () { + 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 + +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 + +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/glib2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:41:54 UTC (rev 4505) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/sources/glib-xdg-data-dirs.patch 2009-04-27 12:41:54 UTC (rev 4505) @@ -0,0 +1,11 @@ +--- glib/gutils.c~ 2005-08-31 16:59:34.000000000 -0400 ++++ glib/gutils.c 2005-11-10 05:54:08.040020000 -0500 +@@ -2351,7 +2351,7 @@ + gchar *data_dirs = (gchar *) g_getenv ("XDG_DATA_DIRS"); + + if (!data_dirs || !data_dirs[0]) +- data_dirs = "/usr/local/share/:/usr/share/"; ++ data_dirs = "/opt/csw/share/:/usr/local/share/:/usr/share/"; + + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif Added: csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/specs/Makefile 2009-04-27 12:41:54 UTC (rev 4505) @@ -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/glib2/trunk/legacy/specs/glib2 =================================================================== --- csw/mgar/pkg/glib2/trunk/legacy/specs/glib2 (rev 0) +++ csw/mgar/pkg/glib2/trunk/legacy/specs/glib2 2009-04-27 12:41:54 UTC (rev 4505) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: glib2,v 1.9 2005/12/15 15:13:49 simigern Exp $ + +$progname = 'glib'; +$version = '2.8.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gtk.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['glib-xdg-data-dirs.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "glib2", + filename => "glib2", + name => "glib2 - Low-level core library that forms the basis of GTK+", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => "gtk2.postinstall" + }); + +$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 -DANSICPP" +export CPPFLAGS='-I/opt/csw/include -DANSICPP' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-libiconv=gnu +gmake || exit 1 +gmake DESTDIR=${buildroot} install +/opt/csw/bin/gsed -i -e 's|/opt/csw/bin/perl|/usr/bin/perl|' ${buildroot}/opt/csw/bin/glib-mkenums +/opt/csw/bin/gsed -i -e 's|^\\(Cflags.*\\)-mt|\\1-D_REENTRANT|' -e 's|^\\(Libs.*\\)-mt|\\1-lthread|' ${buildroot}/opt/csw/lib/pkgconfig/gthread-2.0.pc +rm -f ${buildroot}/opt/csw/lib/charset.alias +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:42:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:42:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4506] csw/mgar/pkg Message-ID: Revision: 4506 http://gar.svn.sourceforge.net/gar/?rev=4506&view=rev Author: dmichelsen Date: 2009-04-27 12:42:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome/ csw/mgar/pkg/gnome/trunk/ csw/mgar/pkg/gnome/trunk/legacy/ csw/mgar/pkg/gnome/trunk/legacy/scripts/ csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome/trunk/legacy/sources/ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch csw/mgar/pkg/gnome/trunk/legacy/specs/ csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome/trunk/legacy/specs/gnome Added: csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:42:15 UTC (rev 4506) @@ -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/gnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/scripts/human.pl 2009-04-27 12:42:15 UTC (rev 4506) @@ -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 () { + 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 + +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 + +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/gnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:42:15 UTC (rev 4506) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-linuxproc.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,13 @@ +--- multiload/linux-proc.c.orig 2004-04-10 15:06:07.657644000 -0400 ++++ multiload/linux-proc.c 2004-04-10 15:07:34.027579000 -0400 +@@ -93,8 +93,8 @@ + GetPage (int Maximum, int data [3], LoadGraph *g) + { + static int max = 100; /* guess at maximum page rate (= in + out) */ +- static u_int64_t lastin = 0; +- static u_int64_t lastout = 0; ++ static uint64_t lastin = 0; ++ static uint64_t lastout = 0; + int in, out, idle; + + glibtop_swap swap; Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-applets-mixer.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,23 @@ +--- mixer/mixer.c.orig 2004-04-19 16:10:03.693350000 -0400 ++++ mixer/mixer.c 2004-04-19 16:10:59.093290000 -0400 +@@ -53,19 +53,7 @@ + #include + #include + +-#ifdef HAVE_LINUX_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_MACHINE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_AUDIOIO_H ++#ifdef HAVE_SYS_AUDIOIO_H + #include + #define SUN_API + #elif HAVE_SYS_AUDIO_IO_H Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games-sol.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,54 @@ +--- aisleriot/sol.c.old 2004-08-06 18:46:19.004762000 -0400 ++++ aisleriot/sol.c 2004-08-06 18:46:36.464698000 -0400 +@@ -85,6 +85,51 @@ + #define DEFAULT_VARIATION "klondike.scm" + #define GNOME_SESSION_BUG + ++/* 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)); ++} ++ ++ ++ + gchar* game_file_to_name (const gchar* file) + { + char* p, *buf = g_path_get_basename(file); Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-games.preinstall 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,16 @@ +#!/bin/sh +#$Id: gnome-games.preinstall,v 1.1 2004/12/09 10:29:54 simigern Exp $ + +umask 0022 +test -d "${BASEDIR}/opt/csw/var/games" || mkdir -p "${BASEDIR}/opt/csw/var/games" + +for statefile in glines.scores gnibbles.1.0.scores gnibbles.1.1.scores gnibbles.2.0.scores gnibbles.2.1.scores gnibbles.3.0.scores gnibbles.3.1.scores gnibbles.4.0.scores gnibbles.4.1.scores gnobots2.classic_robots-safe.scores gnobots2.classic_robots-super-safe.scores gnobots2.classic_robots.scores gnobots2.nightmare-safe.scores gnobots2.nightmare-super-safe.scores gnobots2.nightmare.scores gnobots2.robots2-safe.scores gnobots2.robots2-super-safe.scores gnobots2.robots2.scores gnobots2.robots2_easy-safe.scores gnobots2.robots2_easy-super-safe.scores gnobots2.robots2_easy.scores gnobots2.robots_with_safe_teleport-safe.scores gnobots2.robots_with_safe_teleport-super-safe.scores gnobots2.robots_with_safe_teleport.scores gnome-stones.scores gnometris.scores gnomine.Custom.scores gnomine.Large.scores gnomine.Medium.scores gnomine.Small.scores gnotravex.2x2.scores gnotravex.3x3.scores gnotravex.4x4.scores gnotravex.5x5.scores gnotravex.6x6.scores gnotski.1.scores gnotski.11.scores gnotski.12.scores gnotski.13.scores gnotski.14.scores gnotski.15.scores gnotski.16.scores gnotski.17.scores gnotski.2.scores gnotski.21.scores gnotski.22.scores gnotski.23.scores gnotski.24.scores gnotski.25.scores gnotski.26.scores gnotski.3.scores gnotski.4.scores gnotski.5.scores gnotski.6.scores gnotski.7.scores gtali.scores mahjongg.bridges.scores mahjongg.cloud.scores mahjongg.confounding.scores mahjongg.difficult.scores mahjongg.dragon.scores mahjongg.easy.scores mahjongg.pyramid.scores mahjongg.tictactoe.scores mahjongg.ziggurat.scores same-gnome.scores; do + if [ ! -f "${BASEDIR}/opt/csw/var/games/${statefile}" ]; then + echo "Creating ${statefile}" + touch "${BASEDIR}/opt/csw/var/games/${statefile}" + chgrp nogroup "${BASEDIR}/opt/csw/var/games/${statefile}" + chmod 664 "${BASEDIR}/opt/csw/var/games/${statefile}" + fi +done + +/bin/true Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,121 @@ +--- ./email/email_conduit.c.orig 2004-12-06 06:52:50.051501000 -0500 ++++ ./email/email_conduit.c 2004-12-06 06:53:02.631439000 -0500 +@@ -25,11 +25,11 @@ + + /*#define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "email: " format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit( guint32 pilotId ) ; +--- ./expense/expense_conduit.c.orig 2004-12-06 06:53:36.991501000 -0500 ++++ ./expense/expense_conduit.c 2004-12-06 06:53:47.191438000 -0500 +@@ -45,11 +45,11 @@ + + /* #define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "expense: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + static void +--- ./mal-conduit/mal/common/AGNet.h.orig 2004-12-06 06:56:06.711501000 -0500 ++++ ./mal-conduit/mal/common/AGNet.h 2004-12-06 06:57:18.031437000 -0500 +@@ -57,7 +57,7 @@ + # include + # include + # include +-# ifdef __sun__ ++# ifdef sun + # include + # include + # else +--- ./mal-conduit/mal/common/AGCollection.c.orig 2004-12-06 06:58:11.351501000 -0500 ++++ ./mal-conduit/mal/common/AGCollection.c 2004-12-06 06:58:46.101436000 -0500 +@@ -21,6 +21,9 @@ + + #include + #include ++#include ++ ++#define AGFreeFunc free + + ExportFunc void AGCollectionCallbacksInit(AGCollectionCallbacks *callbacks, + AGElementType elemType) +--- ./mal-conduit/mal/common/AGBufferedNet.c.orig 2004-12-06 06:59:49.981436000 -0500 ++++ ./mal-conduit/mal/common/AGBufferedNet.c 2004-12-06 07:00:05.956438000 -0500 +@@ -24,12 +24,8 @@ + #include + + +-#ifdef __unix__ +- +- #include ++#include + +-#endif // __unix__ +- + /*************************************************************************************/ + #ifdef __palmos__ + +--- ./mal-conduit/src/mal-conduit.h.orig 2004-12-06 07:00:45.335782000 -0500 ++++ ./mal-conduit/src/mal-conduit.h 2004-12-06 07:00:53.315711000 -0500 +@@ -1,11 +1,11 @@ + /* $Id: mal-conduit.h,v 1.3 2001/08/02 08:47:44 eskil Exp $ */ + + #ifdef MC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "mal-conduit: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + +--- ./memo_file/memo_file_conduit.c.orig 2004-12-06 07:01:16.025782000 -0500 ++++ ./memo_file/memo_file_conduit.c 2004-12-06 07:03:22.345721000 -0500 +@@ -46,11 +46,11 @@ + #define MC_DEBUG + + #ifdef MC_DEBUG +-#define LOG(args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- args) ++ __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit (guint32 pilotId); +--- ./time/time-conduit.c.orig 2004-12-06 07:03:47.005782000 -0500 ++++ ./time/time-conduit.c 2004-12-06 07:05:44.635708000 -0500 +@@ -36,11 +36,11 @@ + #define TC_DEBUG 1 + + #ifdef TC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- "time_file: " format, ##args) ++ "time_file: " __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_load_gpilot_conduit (GPilotPilot *pilot); Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,33 @@ +--- ./email/Makefile.in.orig 2004-12-06 07:14:04.395795000 -0500 ++++ ./email/Makefile.in 2004-12-06 07:14:15.395708000 -0500 +@@ -397,7 +397,7 @@ + && mv sendmail.conduit.tmp sendmail.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./memo_file/Makefile.in.orig 2004-12-06 07:14:58.105705000 -0500 ++++ ./memo_file/Makefile.in 2004-12-06 07:15:07.845718000 -0500 +@@ -394,7 +394,7 @@ + && mv memofile.conduit.tmp memofile.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./time/Makefile.in.orig 2004-12-06 07:15:51.175705000 -0500 ++++ ./time/Makefile.in 2004-12-06 07:15:59.685718000 -0500 +@@ -387,7 +387,7 @@ + && mv time.conduit.tmp time.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-terminal-selection.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,52 @@ +--- terminal-screen.c.ORG Fri Sep 19 17:12:52 2003 ++++ terminal-screen.c Fri Sep 19 19:36:40 2003 +@@ -1459,10 +1459,7 @@ terminal_screen_button_press_event (GtkW + terminal_widget_get_cell_size (term, &char_width, &char_height); + + g_free (screen->priv->matched_string); +- screen->priv->matched_string = +- terminal_widget_check_match (term, +- event->x / char_width, +- event->y / char_height); ++ + dingus_button = ((event->button == 1) || (event->button == 2)); + + if (dingus_button && +@@ -1484,20 +1481,31 @@ terminal_screen_button_press_event (GtkW + } + + if (dingus_button && +- (event->state & GDK_CONTROL_MASK) && +- (screen->priv->matched_string != NULL)) ++ (event->state & GDK_CONTROL_MASK)) + { + gtk_widget_grab_focus (widget); + +- open_url (screen, screen->priv->matched_string); +- g_free (screen->priv->matched_string); +- screen->priv->matched_string = NULL; +- return TRUE; /* don't do anything else such as select with the click */ ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); ++ ++ if (screen->priv->matched_string != NULL) ++ { ++ open_url (screen, screen->priv->matched_string); ++ g_free (screen->priv->matched_string); ++ screen->priv->matched_string = NULL; ++ return TRUE; /* don't do anything else such as select with the click */ ++ } + } + + if ((event->button == 3) && + !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK))) + { ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); + terminal_screen_do_popup (screen, event); + return TRUE; + } Added: csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/sources/gnome-vfs-cswpath.patch 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,33 @@ +--- libgnomevfs/eggdirfuncs.c.orig 2004-12-07 05:20:30.149044000 -0500 ++++ libgnomevfs/eggdirfuncs.c 2004-12-07 05:21:01.238980000 -0500 +@@ -106,7 +106,7 @@ + data_dirs = (gchar *) g_getenv ("XDG_DATA_DIRS"); + + if (!data_dirs || !data_dirs[0]) +- data_dirs = "/usr/local/share/:/usr/share/"; ++ data_dirs = "/opt/csw/share:/usr/local/share/:/usr/share/"; + + data_dir_vector = g_strsplit (data_dirs, ":", 0); + +--- libgnomevfs/gnome-vfs-mime-info.c.orig 2004-12-07 05:20:35.798970000 -0500 ++++ libgnomevfs/gnome-vfs-mime-info.c 2004-12-07 05:21:23.718971000 -0500 +@@ -149,7 +149,7 @@ + + xdg_data_dirs = g_getenv ("XDG_DATA_DIRS"); + if (!xdg_data_dirs) { +- xdg_data_dirs = "/usr/local/share/:/usr/share/"; ++ xdg_data_dirs = "/opt/csw/share:/usr/local/share/:/usr/share/"; + } + + split_data_dirs = g_strsplit (xdg_data_dirs, ":", 0); +--- libgnomevfs/xdgmime.c.orig 2004-12-07 05:20:41.159002000 -0500 ++++ libgnomevfs/xdgmime.c 2004-12-07 05:21:43.358971000 -0500 +@@ -189,7 +189,7 @@ + + xdg_data_dirs = getenv ("XDG_DATA_DIRS"); + if (xdg_data_dirs == NULL) +- xdg_data_dirs = "/usr/local/share/:/usr/share/"; ++ xdg_data_dirs = "/opt/csw/share:/usr/local/share/:/usr/share/"; + + ptr = xdg_data_dirs; + Added: csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/specs/Makefile 2009-04-27 12:42:15 UTC (rev 4506) @@ -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/gnome/trunk/legacy/specs/gnome =================================================================== --- csw/mgar/pkg/gnome/trunk/legacy/specs/gnome (rev 0) +++ csw/mgar/pkg/gnome/trunk/legacy/specs/gnome 2009-04-27 12:42:15 UTC (rev 4506) @@ -0,0 +1,309 @@ +# vim: ft=perl +# $Id: gnome,v 1.30 2006-09-28 18:21:45 simigern Exp $ + +$progname = 'gnome'; +$version = '2.14.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnome.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-dtlogin-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ( { + pkgname => "gnomedtlogin", + filename => "gnome_dtlogin", + name => "gnome_dtlogin - GNOME 2 dtlogin integration", + filelist => [qw('etc/dt/appconfig' + 'etc/dt/config/Xinitrc.CSWgnome' + 'etc/dt/config/Xsession.CSWgnome' + 'etc/dt/config/Xsession2.CSWgnome' + 'etc/dt/config/C/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ar_EG.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/de_AT.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_GB.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_IE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/en_US.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/es.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/he_IL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/it.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.PCK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ja_JP.eucJP/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ko.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pl_PL.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/pt_BR.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/ru_RU.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.ISO8859-15/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sv.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.ISO8859-11/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.TIS620/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/th_TH.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.GBK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_HK.BIG5HK/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.BIG5/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/zh_TW.UTF-8/Xresources.d/Xresources.CSWgnome' + 'etc/dt/config/sk_SK.ISO8859-2/Xresources.d/Xresources.CSWgnome')] + + }, + { + pkgname => "gnomemin", + filename => "gnome_minimal", + name => "gnome_minimal - The GNOME 2 Desktop, minimal packages", + dependencies => ['CSWcommon', + 'CSWgnomedtlogin', + 'CSWgnomedesktop', + 'CSWgnomepanel', + 'CSWgnomesession', + 'CSWcontrolcenter', + 'CSWgnomethemes', + 'CSWnautilus', + 'CSWmetacity', + 'CSWgedit', + 'CSWscrollkeeper', + 'CSWgnometerminal', + 'CSWgnomeapplets', + 'CSWgnomeutils', + 'CSWsharedmimeinfo', + 'CSWgtkengines', + 'CSWatspi', + 'CSWgnomemedia', + 'CSWyelp', + 'CSWfam'], + filelist => [qw('opt')], + postinstall => 'gconf-schema-update.postinstall' + }, + { + pkgname => $progname, + filename => $progname, + name => "$progname - The GNOME 2 Desktop", + dependencies => ['CSWcommon', + 'CSWgnomemin', + 'CSWggv', + 'CSWgnomegames', + 'CSWeog', + 'CSWxsave', + 'CSWgpdf', + 'CSWgnome2userdocs', + 'CSWnautiluscdburner', + 'CSWgok', + 'CSWgnomespeech', + 'CSWgnomesysmon', + 'CSWgnopernicus', + 'CSWnautilusview', + 'CSWgimp', + 'CSWgcalctool', + 'CSWgucharmap', + 'CSWgnomemag', + 'CSWgconfeditor', +# 'CSWtotem', + 'CSWrhythmbox', + 'CSWxmms', + 'CSWgnomepilot', + 'CSWepiphany', + 'CSWbugbuddy'], + filelist => [qw('none')], + postinstall => 'gconf-schema-update.postinstall' + }); + +push @csw_ignore, 'etc/dt'; +push @csw_ignore, 'etc/dt/appconfig'; +push @csw_ignore, 'etc/dt/appconfig/icons'; +push @csw_ignore, 'etc/dt/appconfig/icons/C'; +push @csw_ignore, 'etc/dt/config'; + +push @csw_dirs, 'etc/dt/config/C'; +push @csw_dirs, 'etc/dt/config/ar'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/de'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/de.UTF-8'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8'; +push @csw_dirs, 'etc/dt/config/es'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/es.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/he'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/it'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/it.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP'; +push @csw_dirs, 'etc/dt/config/ko'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8'; +push @csw_dirs, 'etc/dt/config/pt_BR'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8'; +push @csw_dirs, 'etc/dt/config/sv'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8'; +push @csw_dirs, 'etc/dt/config/th_TH'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh'; +push @csw_dirs, 'etc/dt/config/zh.GBK'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK'; +push @csw_dirs, 'etc/dt/config/zh_TW'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8'; +push @csw_dirs, 'etc/dt/config/sk_SK.ISO8859-2'; + +push @csw_dirs, 'etc/dt/config/C/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ar_EG.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/cs_CZ.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/de_AT.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_GB.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_IE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/en_US.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/es.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/fr_BE.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he/Xresources.d'; +push @csw_dirs, 'etc/dt/config/he_IL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/hu_HU.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/it.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.PCK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ja_JP.eucJP/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ko.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.ISO8859-2/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pl_PL.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.ISO8859-1/Xresources.d'; +push @csw_dirs, 'etc/dt/config/pt_BR.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.ISO8859-5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/ru_RU.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.ISO8859-15/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sv.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.ISO8859-11/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.TIS620/Xresources.d'; +push @csw_dirs, 'etc/dt/config/th_TH.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.GBK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_HK.BIG5HK/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.BIG5/Xresources.d'; +push @csw_dirs, 'etc/dt/config/zh_TW.UTF-8/Xresources.d'; +push @csw_dirs, 'etc/dt/config/sk_SK.ISO8859-2/Xresources.d'; + +#'CSWgnomemedia', + +$copyright = "${progname}-dtlogin-${version}/COPYING"; + +$arch="all"; + +$build = <<"EOF"; +cd ${progname}-dtlogin-${version} +mkdir -p ${buildroot} +gcp -vax * ${buildroot}/ +cat >COPYING <<__EOF__ +See dependancies for license-informations +__EOF__ +mkdir -p ${buildroot}/opt/csw/etc/gconf/schemas +cat >${buildroot}/opt/csw/etc/gconf/schemas/csw.entries <<__EOF__ + + + + /apps/metacity/general/theme + + Crux + + + + /desktop/gnome/interface/gtk_theme + + Crux + + + + /desktop/gnome/interface/icon_theme + + Crux + + + + /schemas/desktop/gnome/file-views/icon_theme + + + gnome + string + + + + crux_teal + + + File Icon Theme + Theme used for displaying file icons + + + + + + +__EOF__ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:42:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:42:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4507] csw/mgar/pkg Message-ID: Revision: 4507 http://gar.svn.sourceforge.net/gar/?rev=4507&view=rev Author: dmichelsen Date: 2009-04-27 12:42:32 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-applets: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-applets/ csw/mgar/pkg/gnome-applets/trunk/ csw/mgar/pkg/gnome-applets/trunk/legacy/ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-applets/trunk/legacy/sources/ csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch csw/mgar/pkg/gnome-applets/trunk/legacy/specs/ csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-applets/trunk/legacy/specs/gnome-applets Added: csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:42:32 UTC (rev 4507) @@ -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/gnome-applets/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/human.pl 2009-04-27 12:42:32 UTC (rev 4507) @@ -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 () { + 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 + +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 + +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/gnome-applets/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:42:32 UTC (rev 4507) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-linuxproc.patch 2009-04-27 12:42:32 UTC (rev 4507) @@ -0,0 +1,13 @@ +--- multiload/linux-proc.c.orig 2004-04-10 15:06:07.657644000 -0400 ++++ multiload/linux-proc.c 2004-04-10 15:07:34.027579000 -0400 +@@ -93,8 +93,8 @@ + GetPage (int Maximum, int data [3], LoadGraph *g) + { + static int max = 100; /* guess at maximum page rate (= in + out) */ +- static u_int64_t lastin = 0; +- static u_int64_t lastout = 0; ++ static uint64_t lastin = 0; ++ static uint64_t lastout = 0; + int in, out, idle; + + glibtop_swap swap; Added: csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/sources/gnome-applets-mixer.patch 2009-04-27 12:42:32 UTC (rev 4507) @@ -0,0 +1,23 @@ +--- mixer/mixer.c.orig 2004-04-19 16:10:03.693350000 -0400 ++++ mixer/mixer.c 2004-04-19 16:10:59.093290000 -0400 +@@ -53,19 +53,7 @@ + #include + #include + +-#ifdef HAVE_LINUX_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_MACHINE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SOUNDCARD_H +-#include +-#define OSS_API +-#elif HAVE_SYS_AUDIOIO_H ++#ifdef HAVE_SYS_AUDIOIO_H + #include + #define SUN_API + #elif HAVE_SYS_AUDIO_IO_H Added: csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/specs/Makefile 2009-04-27 12:42:32 UTC (rev 4507) @@ -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/gnome-applets/trunk/legacy/specs/gnome-applets =================================================================== --- csw/mgar/pkg/gnome-applets/trunk/legacy/specs/gnome-applets (rev 0) +++ csw/mgar/pkg/gnome-applets/trunk/legacy/specs/gnome-applets 2009-04-27 12:42:32 UTC (rev 4507) @@ -0,0 +1,71 @@ +# vim: ft=perl +# $Id: gnome-applets,v 1.10 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-applets'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-applets/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gnome-applets-linuxproc.patch', "${progname}-${version}", '-p0'], + ['gnome-applets-mixer.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomeapplets", + filename => "gnome_applets", + name => "gnome_applets - Various applets for GNOME 2 panel", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +#export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib/gstreamer-0.8 -L/opt/csw/lib/gstreamer-0.8 -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' + +mkdir ${builddir}/mypath +ln -s /opt/csw/bin/gsed ${builddir}/mypath/sed + +cd ${progname}-${version} +export PATH="${builddir}/mypath:${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +#Defuck up +sed -e 's|-Wall\$||' multiload/Makefile.in >multiload/Makefile.innew +mv multiload/Makefile.innew multiload/Makefile.in + +mv configure configure.preCSW +gsed -e 's|sys/soundcard\.h|sys/soundcard.hdonotest|g' configure.preCSW >configure +chmod 755 configure +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --disable-gstreamer || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#sed -e 's|<<|<' ${buildroot}/opt/csw/share/gweather/Locations.xml >${buildroot}/opt/csw/share/gweather/Locations.xml.cswtmp +#mv ${buildroot}/opt/csw/share/gweather/Locations.xml.cswtmp ${buildroot}/opt/csw/share/gweather/Locations.xml + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:42:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:42:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4508] csw/mgar/pkg Message-ID: Revision: 4508 http://gar.svn.sourceforge.net/gar/?rev=4508&view=rev Author: dmichelsen Date: 2009-04-27 12:42:49 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-games: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-games/ csw/mgar/pkg/gnome-games/trunk/ csw/mgar/pkg/gnome-games/trunk/legacy/ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-games/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-games/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-games/trunk/legacy/sources/ csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games-sol.patch csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall csw/mgar/pkg/gnome-games/trunk/legacy/specs/ csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-games/trunk/legacy/specs/gnome-games Added: csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:42:49 UTC (rev 4508) @@ -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/gnome-games/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/human.pl 2009-04-27 12:42:49 UTC (rev 4508) @@ -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 () { + 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 + +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 + +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/gnome-games/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:42:49 UTC (rev 4508) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-games/trunk/legacy/sources/gnome-games-sol.patch =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games-sol.patch (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games-sol.patch 2009-04-27 12:42:49 UTC (rev 4508) @@ -0,0 +1,54 @@ +--- aisleriot/sol.c.old 2004-08-06 18:46:19.004762000 -0400 ++++ aisleriot/sol.c 2004-08-06 18:46:36.464698000 -0400 +@@ -85,6 +85,51 @@ + #define DEFAULT_VARIATION "klondike.scm" + #define GNOME_SESSION_BUG + ++/* 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)); ++} ++ ++ ++ + gchar* game_file_to_name (const gchar* file) + { + char* p, *buf = g_path_get_basename(file); Added: csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/sources/gnome-games.preinstall 2009-04-27 12:42:49 UTC (rev 4508) @@ -0,0 +1,16 @@ +#!/bin/sh +#$Id: gnome-games.preinstall,v 1.1 2004/12/09 10:29:54 simigern Exp $ + +umask 0022 +test -d "${BASEDIR}/opt/csw/var/games" || mkdir -p "${BASEDIR}/opt/csw/var/games" + +for statefile in glines.scores gnibbles.1.0.scores gnibbles.1.1.scores gnibbles.2.0.scores gnibbles.2.1.scores gnibbles.3.0.scores gnibbles.3.1.scores gnibbles.4.0.scores gnibbles.4.1.scores gnobots2.classic_robots-safe.scores gnobots2.classic_robots-super-safe.scores gnobots2.classic_robots.scores gnobots2.nightmare-safe.scores gnobots2.nightmare-super-safe.scores gnobots2.nightmare.scores gnobots2.robots2-safe.scores gnobots2.robots2-super-safe.scores gnobots2.robots2.scores gnobots2.robots2_easy-safe.scores gnobots2.robots2_easy-super-safe.scores gnobots2.robots2_easy.scores gnobots2.robots_with_safe_teleport-safe.scores gnobots2.robots_with_safe_teleport-super-safe.scores gnobots2.robots_with_safe_teleport.scores gnome-stones.scores gnometris.scores gnomine.Custom.scores gnomine.Large.scores gnomine.Medium.scores gnomine.Small.scores gnotravex.2x2.scores gnotravex.3x3.scores gnotravex.4x4.scores gnotravex.5x5.scores gnotravex.6x6.scores gnotski.1.scores gnotski.11.scores gnotski.12.scores gnotski.13.scores gnotski.14.scores gnotski.15.scores gnotski.16.scores gnotski.17.scores gnotski.2.scores gnotski.21.scores gnotski.22.scores gnotski.23.scores gnotski.24.scores gnotski.25.scores gnotski.26.scores gnotski.3.scores gnotski.4.scores gnotski.5.scores gnotski.6.scores gnotski.7.scores gtali.scores mahjongg.bridges.scores mahjongg.cloud.scores mahjongg.confounding.scores mahjongg.difficult.scores mahjongg.dragon.scores mahjongg.easy.scores mahjongg.pyramid.scores mahjongg.tictactoe.scores mahjongg.ziggurat.scores same-gnome.scores; do + if [ ! -f "${BASEDIR}/opt/csw/var/games/${statefile}" ]; then + echo "Creating ${statefile}" + touch "${BASEDIR}/opt/csw/var/games/${statefile}" + chgrp nogroup "${BASEDIR}/opt/csw/var/games/${statefile}" + chmod 664 "${BASEDIR}/opt/csw/var/games/${statefile}" + fi +done + +/bin/true Added: csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/specs/Makefile 2009-04-27 12:42:49 UTC (rev 4508) @@ -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/gnome-games/trunk/legacy/specs/gnome-games =================================================================== --- csw/mgar/pkg/gnome-games/trunk/legacy/specs/gnome-games (rev 0) +++ csw/mgar/pkg/gnome-games/trunk/legacy/specs/gnome-games 2009-04-27 12:42:49 UTC (rev 4508) @@ -0,0 +1,82 @@ +# vim: ft=perl +# $Id: gnome-games,v 1.11 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-games'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-games/ packaged for CSW by Michael Gernoth'; + +#$suffix='.01'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['gnome-games-sol.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomegames", + filename => "gnome_games", + name => "gnome_games - Games for GNOME 2", + dependencies => ['CSWcommon','CSWguile'], + filelist => [qw(opt)], + preinstall => 'gnome-games.preinstall', + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$attributes{'/opt/csw/bin/glines'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnibbles'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnobots2'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnome-stones'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnometris'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnomine'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnotravex'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gnotski'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/gtali'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/mahjongg'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/bin/same-gnome'} = ({user => 'root', group => 'nogroup', perm => '2755'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/ucblib -R/usr/ucblib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/ucblib -R/usr/ucblib' +cd ${progname}-${version} +export PATH="${builddir}/mypath:${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +mkdir -p ${builddir}/mypath +ln -s /opt/csw/bin/ggrep ${builddir}/mypath/grep +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-scores-group=nogroup || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 + +mkdir -p ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +rm ${buildroot}/opt/csw/var/games/* + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gnome-stones/objects/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:04 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:04 +0000 Subject: [csw-devel] SF.net SVN: gar:[4509] csw/mgar/pkg Message-ID: Revision: 4509 http://gar.svn.sourceforge.net/gar/?rev=4509&view=rev Author: dmichelsen Date: 2009-04-27 12:43:03 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-icon-theme: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-icon-theme/ csw/mgar/pkg/gnome-icon-theme/trunk/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-icon-theme/trunk/legacy/sources/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme Added: csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:03 UTC (rev 4509) @@ -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/gnome-icon-theme/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/human.pl 2009-04-27 12:43:03 UTC (rev 4509) @@ -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 () { + 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 + +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 + +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/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:03 UTC (rev 4509) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-icon-theme/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/Makefile 2009-04-27 12:43:03 UTC (rev 4509) @@ -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/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme =================================================================== --- csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme (rev 0) +++ csw/mgar/pkg/gnome-icon-theme/trunk/legacy/specs/gnome-icon-theme 2009-04-27 12:43:03 UTC (rev 4509) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: gnome-icon-theme,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-icon-theme'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomeicontheme", + filename => "gnome_icon_theme", + name => "gnome_icon_theme - GNOME icon theme", + dependencies => ['CSWcommon','CSWhicoloricontheme'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$arch="all"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4510] csw/mgar/pkg Message-ID: Revision: 4510 http://gar.svn.sourceforge.net/gar/?rev=4510&view=rev Author: dmichelsen Date: 2009-04-27 12:43:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-keyring: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-keyring/ csw/mgar/pkg/gnome-keyring/trunk/ csw/mgar/pkg/gnome-keyring/trunk/legacy/ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-keyring/trunk/legacy/sources/ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/gnome-keyring Added: csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:19 UTC (rev 4510) @@ -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/gnome-keyring/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/human.pl 2009-04-27 12:43:19 UTC (rev 4510) @@ -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 () { + 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 + +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 + +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/gnome-keyring/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:19 UTC (rev 4510) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-keyring/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/Makefile 2009-04-27 12:43:19 UTC (rev 4510) @@ -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/gnome-keyring/trunk/legacy/specs/gnome-keyring =================================================================== --- csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/gnome-keyring (rev 0) +++ csw/mgar/pkg/gnome-keyring/trunk/legacy/specs/gnome-keyring 2009-04-27 12:43:19 UTC (rev 4510) @@ -0,0 +1,42 @@ +# vim: ft=perl + +$progname = 'gnomekeyring'; +$version = '0.4.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-keyring/ packaged for CSW by Michael Gernoth'; + + at sources = ("gnome-keyring-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - keep password and other secrets for users", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); +#, exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + +$copyright = "gnome-keyring-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd gnome-keyring-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4511] csw/mgar/pkg Message-ID: Revision: 4511 http://gar.svn.sourceforge.net/gar/?rev=4511&view=rev Author: dmichelsen Date: 2009-04-27 12:43:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-panel: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-panel/ csw/mgar/pkg/gnome-panel/trunk/ csw/mgar/pkg/gnome-panel/trunk/legacy/ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-panel/trunk/legacy/sources/ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-panel/trunk/legacy/specs/gnome-panel Added: csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:35 UTC (rev 4511) @@ -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/gnome-panel/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/human.pl 2009-04-27 12:43:35 UTC (rev 4511) @@ -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 () { + 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 + +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 + +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/gnome-panel/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:35 UTC (rev 4511) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-panel/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/Makefile 2009-04-27 12:43:35 UTC (rev 4511) @@ -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/gnome-panel/trunk/legacy/specs/gnome-panel =================================================================== --- csw/mgar/pkg/gnome-panel/trunk/legacy/specs/gnome-panel (rev 0) +++ csw/mgar/pkg/gnome-panel/trunk/legacy/specs/gnome-panel 2009-04-27 12:43:35 UTC (rev 4511) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: gnome-panel,v 1.8 2005/03/27 12:54:08 simigern Exp $ + +$progname = 'gnome-panel'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-panel/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomepanel", + filename => "gnome_panel", + name => "gnome_panel - Launch and/or dock GNOME 2 applications", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:43:52 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:43:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4512] csw/mgar/pkg Message-ID: Revision: 4512 http://gar.svn.sourceforge.net/gar/?rev=4512&view=rev Author: dmichelsen Date: 2009-04-27 12:43:52 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-pilot: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-pilot/ csw/mgar/pkg/gnome-pilot/trunk/ csw/mgar/pkg/gnome-pilot/trunk/legacy/ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/ csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/ csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/gnome-pilot Added: csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:43:52 UTC (rev 4512) @@ -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/gnome-pilot/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/human.pl 2009-04-27 12:43:52 UTC (rev 4512) @@ -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 () { + 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 + +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 + +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/gnome-pilot/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:43:52 UTC (rev 4512) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-nongcc-fixes.patch 2009-04-27 12:43:52 UTC (rev 4512) @@ -0,0 +1,121 @@ +--- ./email/email_conduit.c.orig 2004-12-06 06:52:50.051501000 -0500 ++++ ./email/email_conduit.c 2004-12-06 06:53:02.631439000 -0500 +@@ -25,11 +25,11 @@ + + /*#define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "email: " format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit( guint32 pilotId ) ; +--- ./expense/expense_conduit.c.orig 2004-12-06 06:53:36.991501000 -0500 ++++ ./expense/expense_conduit.c 2004-12-06 06:53:47.191438000 -0500 +@@ -45,11 +45,11 @@ + + /* #define EC_DEBUG */ + #ifdef EC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "expense: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + static void +--- ./mal-conduit/mal/common/AGNet.h.orig 2004-12-06 06:56:06.711501000 -0500 ++++ ./mal-conduit/mal/common/AGNet.h 2004-12-06 06:57:18.031437000 -0500 +@@ -57,7 +57,7 @@ + # include + # include + # include +-# ifdef __sun__ ++# ifdef sun + # include + # include + # else +--- ./mal-conduit/mal/common/AGCollection.c.orig 2004-12-06 06:58:11.351501000 -0500 ++++ ./mal-conduit/mal/common/AGCollection.c 2004-12-06 06:58:46.101436000 -0500 +@@ -21,6 +21,9 @@ + + #include + #include ++#include ++ ++#define AGFreeFunc free + + ExportFunc void AGCollectionCallbacksInit(AGCollectionCallbacks *callbacks, + AGElementType elemType) +--- ./mal-conduit/mal/common/AGBufferedNet.c.orig 2004-12-06 06:59:49.981436000 -0500 ++++ ./mal-conduit/mal/common/AGBufferedNet.c 2004-12-06 07:00:05.956438000 -0500 +@@ -24,12 +24,8 @@ + #include + + +-#ifdef __unix__ +- +- #include ++#include + +-#endif // __unix__ +- + /*************************************************************************************/ + #ifdef __palmos__ + +--- ./mal-conduit/src/mal-conduit.h.orig 2004-12-06 07:00:45.335782000 -0500 ++++ ./mal-conduit/src/mal-conduit.h 2004-12-06 07:00:53.315711000 -0500 +@@ -1,11 +1,11 @@ + /* $Id: mal-conduit.h,v 1.3 2001/08/02 08:47:44 eskil Exp $ */ + + #ifdef MC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(format,...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + "mal-conduit: "##format, ##args) + #else +-#define LOG(format,args...) ++#define LOG(format,...) + #endif + + +--- ./memo_file/memo_file_conduit.c.orig 2004-12-06 07:01:16.025782000 -0500 ++++ ./memo_file/memo_file_conduit.c 2004-12-06 07:03:22.345721000 -0500 +@@ -46,11 +46,11 @@ + #define MC_DEBUG + + #ifdef MC_DEBUG +-#define LOG(args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- args) ++ __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_get_gpilot_conduit (guint32 pilotId); +--- ./time/time-conduit.c.orig 2004-12-06 07:03:47.005782000 -0500 ++++ ./time/time-conduit.c 2004-12-06 07:05:44.635708000 -0500 +@@ -36,11 +36,11 @@ + #define TC_DEBUG 1 + + #ifdef TC_DEBUG +-#define LOG(format,args...) g_log (G_LOG_DOMAIN, \ ++#define LOG(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ +- "time_file: " format, ##args) ++ "time_file: " __VA_ARGS__) + #else +-#define LOG(args...) ++#define LOG(...) + #endif + + GnomePilotConduit *conduit_load_gpilot_conduit (GPilotPilot *pilot); Added: csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/sources/gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch 2009-04-27 12:43:52 UTC (rev 4512) @@ -0,0 +1,33 @@ +--- ./email/Makefile.in.orig 2004-12-06 07:14:04.395795000 -0500 ++++ ./email/Makefile.in 2004-12-06 07:14:15.395708000 -0500 +@@ -397,7 +397,7 @@ + && mv sendmail.conduit.tmp sendmail.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./memo_file/Makefile.in.orig 2004-12-06 07:14:58.105705000 -0500 ++++ ./memo_file/Makefile.in 2004-12-06 07:15:07.845718000 -0500 +@@ -394,7 +394,7 @@ + && mv memofile.conduit.tmp memofile.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- ./time/Makefile.in.orig 2004-12-06 07:15:51.175705000 -0500 ++++ ./time/Makefile.in 2004-12-06 07:15:59.685718000 -0500 +@@ -387,7 +387,7 @@ + && mv time.conduit.tmp time.conduit + + install-data-local: +- $(mkinstalldirs) $(Conduitdir) ++ $(mkinstalldirs) $(DESTDIR)$(Conduitdir) + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. Added: csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/Makefile 2009-04-27 12:43:52 UTC (rev 4512) @@ -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/gnome-pilot/trunk/legacy/specs/gnome-pilot =================================================================== --- csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/gnome-pilot (rev 0) +++ csw/mgar/pkg/gnome-pilot/trunk/legacy/specs/gnome-pilot 2009-04-27 12:43:52 UTC (rev 4512) @@ -0,0 +1,65 @@ +# vim: ft=perl +# $Id: gnome-pilot,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-pilot'; +$version = '2.0.12'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","gnome-pilot-conduits-${version}.tar.bz2"); + + at patches = (['gnome-pilot-conduits-nongcc-fixes.patch', "gnome-pilot-conduits-${version}", '-p0'], + ['gnome-pilot-conduits-we-need-no-stinkin-DESTDIR-fixes.patch',"gnome-pilot-conduits-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomepilot", + filename => "gnome_pilot", + name => "gnome_pilot - The GNOME PalmPilot integration suite", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +cd ${builddir}/gnome-pilot-conduits-${version} +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig:${buildroot}/opt/csw/lib/pkgconfig +export CFLAGS="\$CFLAGS -I${buildroot}/opt/csw/include" +export CPPFLAGS="\$CPPFLAGS -I${buildroot}/opt/csw/include" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gnome-pilot/conduits/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4513] csw/mgar/pkg Message-ID: Revision: 4513 http://gar.svn.sourceforge.net/gar/?rev=4513&view=rev Author: dmichelsen Date: 2009-04-27 12:44:07 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-session: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-session/ csw/mgar/pkg/gnome-session/trunk/ csw/mgar/pkg/gnome-session/trunk/legacy/ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-session/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-session/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-session/trunk/legacy/sources/ csw/mgar/pkg/gnome-session/trunk/legacy/specs/ csw/mgar/pkg/gnome-session/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-session/trunk/legacy/specs/gnome-session Added: csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:07 UTC (rev 4513) @@ -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/gnome-session/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/human.pl 2009-04-27 12:44:07 UTC (rev 4513) @@ -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 () { + 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 + +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 + +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/gnome-session/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:07 UTC (rev 4513) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-session/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/specs/Makefile 2009-04-27 12:44:07 UTC (rev 4513) @@ -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/gnome-session/trunk/legacy/specs/gnome-session =================================================================== --- csw/mgar/pkg/gnome-session/trunk/legacy/specs/gnome-session (rev 0) +++ csw/mgar/pkg/gnome-session/trunk/legacy/specs/gnome-session 2009-04-27 12:44:07 UTC (rev 4513) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: gnome-session,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-session'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-session/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomesession", + filename => "gnome_session", + name => "gnome_session - The GNOME 2 Session Manager", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} + +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4514] csw/mgar/pkg Message-ID: Revision: 4514 http://gar.svn.sourceforge.net/gar/?rev=4514&view=rev Author: dmichelsen Date: 2009-04-27 12:44:22 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-skeleton: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-skeleton/ csw/mgar/pkg/gnome-skeleton/trunk/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-skeleton/trunk/legacy/sources/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/gnome-skeleton Added: csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:22 UTC (rev 4514) @@ -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/gnome-skeleton/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/human.pl 2009-04-27 12:44:22 UTC (rev 4514) @@ -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 () { + 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 + +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 + +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/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:22 UTC (rev 4514) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-skeleton/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/Makefile 2009-04-27 12:44:22 UTC (rev 4514) @@ -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/gnome-skeleton/trunk/legacy/specs/gnome-skeleton =================================================================== --- csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/gnome-skeleton (rev 0) +++ csw/mgar/pkg/gnome-skeleton/trunk/legacy/specs/gnome-skeleton 2009-04-27 12:44:22 UTC (rev 4514) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: gnome-skeleton,v 1.6 2004/12/23 14:29:09 simigern Exp $ + +$progname = 'gnome'; +$version = '2.6.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - ", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4515] csw/mgar/pkg Message-ID: Revision: 4515 http://gar.svn.sourceforge.net/gar/?rev=4515&view=rev Author: dmichelsen Date: 2009-04-27 12:44:37 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-spell: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-spell/ csw/mgar/pkg/gnome-spell/trunk/ csw/mgar/pkg/gnome-spell/trunk/legacy/ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-spell/trunk/legacy/sources/ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-spell/trunk/legacy/specs/gnome-spell Added: csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:37 UTC (rev 4515) @@ -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/gnome-spell/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/human.pl 2009-04-27 12:44:37 UTC (rev 4515) @@ -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 () { + 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 + +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 + +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/gnome-spell/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:37 UTC (rev 4515) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-spell/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/Makefile 2009-04-27 12:44:37 UTC (rev 4515) @@ -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/gnome-spell/trunk/legacy/specs/gnome-spell =================================================================== --- csw/mgar/pkg/gnome-spell/trunk/legacy/specs/gnome-spell (rev 0) +++ csw/mgar/pkg/gnome-spell/trunk/legacy/specs/gnome-spell 2009-04-27 12:44:37 UTC (rev 4515) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: gnome-spell,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-spell'; +$version = '1.0.5'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-spell/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomespell", + filename => "gnome_spell", + name => "gnome_spell - GNOME/Bonobo component for spell checking", + dependencies => ['CSWcommon','CSWaspell'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -L${buildroot}/opt/csw/lib' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake clean || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:44:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:44:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4516] csw/mgar/pkg Message-ID: Revision: 4516 http://gar.svn.sourceforge.net/gar/?rev=4516&view=rev Author: dmichelsen Date: 2009-04-27 12:44:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-terminal: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-terminal/ csw/mgar/pkg/gnome-terminal/trunk/ csw/mgar/pkg/gnome-terminal/trunk/legacy/ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/ csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/ csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/gnome-terminal Added: csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:44:53 UTC (rev 4516) @@ -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/gnome-terminal/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/human.pl 2009-04-27 12:44:53 UTC (rev 4516) @@ -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 () { + 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 + +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 + +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/gnome-terminal/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:44:53 UTC (rev 4516) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/sources/gnome-terminal-selection.patch 2009-04-27 12:44:53 UTC (rev 4516) @@ -0,0 +1,52 @@ +--- terminal-screen.c.ORG Fri Sep 19 17:12:52 2003 ++++ terminal-screen.c Fri Sep 19 19:36:40 2003 +@@ -1459,10 +1459,7 @@ terminal_screen_button_press_event (GtkW + terminal_widget_get_cell_size (term, &char_width, &char_height); + + g_free (screen->priv->matched_string); +- screen->priv->matched_string = +- terminal_widget_check_match (term, +- event->x / char_width, +- event->y / char_height); ++ + dingus_button = ((event->button == 1) || (event->button == 2)); + + if (dingus_button && +@@ -1484,20 +1481,31 @@ terminal_screen_button_press_event (GtkW + } + + if (dingus_button && +- (event->state & GDK_CONTROL_MASK) && +- (screen->priv->matched_string != NULL)) ++ (event->state & GDK_CONTROL_MASK)) + { + gtk_widget_grab_focus (widget); + +- open_url (screen, screen->priv->matched_string); +- g_free (screen->priv->matched_string); +- screen->priv->matched_string = NULL; +- return TRUE; /* don't do anything else such as select with the click */ ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); ++ ++ if (screen->priv->matched_string != NULL) ++ { ++ open_url (screen, screen->priv->matched_string); ++ g_free (screen->priv->matched_string); ++ screen->priv->matched_string = NULL; ++ return TRUE; /* don't do anything else such as select with the click */ ++ } + } + + if ((event->button == 3) && + !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK))) + { ++ screen->priv->matched_string = ++ terminal_widget_check_match (term, ++ event->x / char_width, ++ event->y / char_height); + terminal_screen_do_popup (screen, event); + return TRUE; + } Added: csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/Makefile 2009-04-27 12:44:53 UTC (rev 4516) @@ -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/gnome-terminal/trunk/legacy/specs/gnome-terminal =================================================================== --- csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/gnome-terminal (rev 0) +++ csw/mgar/pkg/gnome-terminal/trunk/legacy/specs/gnome-terminal 2009-04-27 12:44:53 UTC (rev 4516) @@ -0,0 +1,48 @@ +# vim: ft=perl +# $Id: gnome-terminal,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-terminal'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-terminal/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['gnome-terminal-selection.patch', "${progname}-${version}/src", '-p0']); + + at packages = ({ + pkgname => "gnometerminal", + filename => "gnome_terminal", + name => "gnome_terminal - The GNOME 2 terminal emulator application", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4517] csw/mgar/pkg Message-ID: Revision: 4517 http://gar.svn.sourceforge.net/gar/?rev=4517&view=rev Author: dmichelsen Date: 2009-04-27 12:45:08 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-themes: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-themes/ csw/mgar/pkg/gnome-themes/trunk/ csw/mgar/pkg/gnome-themes/trunk/legacy/ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-themes/trunk/legacy/sources/ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-themes/trunk/legacy/specs/gnome-themes Added: csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:08 UTC (rev 4517) @@ -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/gnome-themes/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/human.pl 2009-04-27 12:45:08 UTC (rev 4517) @@ -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 () { + 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 + +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 + +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/gnome-themes/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:08 UTC (rev 4517) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-themes/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/Makefile 2009-04-27 12:45:08 UTC (rev 4517) @@ -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/gnome-themes/trunk/legacy/specs/gnome-themes =================================================================== --- csw/mgar/pkg/gnome-themes/trunk/legacy/specs/gnome-themes (rev 0) +++ csw/mgar/pkg/gnome-themes/trunk/legacy/specs/gnome-themes 2009-04-27 12:45:08 UTC (rev 4517) @@ -0,0 +1,58 @@ +# vim: ft=perl +# $Id: gnome-themes,v 1.7 2005/03/26 13:42:56 simigern Exp $ + +$progname = 'gnome-themes'; +$version = '2.10.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-themes/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomethemes", + filename => "gnome_themes", + name => "gnome_themes - official themes for the GNOME 2 desktop", + dependencies => ['CSWcommon','CSWgnomeicontheme'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/gtk-2.0/2.*/engines/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:28 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4518] csw/mgar/pkg Message-ID: Revision: 4518 http://gar.svn.sourceforge.net/gar/?rev=4518&view=rev Author: dmichelsen Date: 2009-04-27 12:45:28 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnome-utils: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnome-utils/ csw/mgar/pkg/gnome-utils/trunk/ csw/mgar/pkg/gnome-utils/trunk/legacy/ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnome-utils/trunk/legacy/sources/ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/Makefile csw/mgar/pkg/gnome-utils/trunk/legacy/specs/gnome-utils Added: csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:28 UTC (rev 4518) @@ -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/gnome-utils/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/human.pl 2009-04-27 12:45:28 UTC (rev 4518) @@ -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 () { + 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 + +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 + +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/gnome-utils/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:28 UTC (rev 4518) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnome-utils/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/Makefile 2009-04-27 12:45:28 UTC (rev 4518) @@ -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/gnome-utils/trunk/legacy/specs/gnome-utils =================================================================== --- csw/mgar/pkg/gnome-utils/trunk/legacy/specs/gnome-utils (rev 0) +++ csw/mgar/pkg/gnome-utils/trunk/legacy/specs/gnome-utils 2009-04-27 12:45:28 UTC (rev 4518) @@ -0,0 +1,48 @@ +# vim: ft=perl +# $Id: gnome-utils,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-utils'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-utils/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomeutils", + filename => "gnome_utils", + name => "gnome_utils - GNOME 2 desktop utilities", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:43 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4519] csw/mgar/pkg Message-ID: Revision: 4519 http://gar.svn.sourceforge.net/gar/?rev=4519&view=rev Author: dmichelsen Date: 2009-04-27 12:45:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnomedesktop: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnomedesktop/ csw/mgar/pkg/gnomedesktop/trunk/ csw/mgar/pkg/gnomedesktop/trunk/legacy/ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnomedesktop/trunk/legacy/sources/ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/Makefile csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/gnomedesktop Added: csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:42 UTC (rev 4519) @@ -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/gnomedesktop/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/human.pl 2009-04-27 12:45:42 UTC (rev 4519) @@ -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 () { + 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 + +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 + +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/gnomedesktop/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:42 UTC (rev 4519) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnomedesktop/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/Makefile 2009-04-27 12:45:42 UTC (rev 4519) @@ -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/gnomedesktop/trunk/legacy/specs/gnomedesktop =================================================================== --- csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/gnomedesktop (rev 0) +++ csw/mgar/pkg/gnomedesktop/trunk/legacy/specs/gnomedesktop 2009-04-27 12:45:42 UTC (rev 4519) @@ -0,0 +1,61 @@ +# vim: ft=perl +# $Id: gnomedesktop,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-desktop'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomedesktop", + filename => "gnomedesktop", + name => "gnomedesktop - Additional UI API for GNOME", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-gnome-distributor="Blastwave.org" || exit 1 + +#gnarf, configure creates empty intltool-{extract,merge,update}-files... fix this +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:45:58 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:45:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4520] csw/mgar/pkg Message-ID: Revision: 4520 http://gar.svn.sourceforge.net/gar/?rev=4520&view=rev Author: dmichelsen Date: 2009-04-27 12:45:57 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gnomevfs2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gnomevfs2/ csw/mgar/pkg/gnomevfs2/trunk/ csw/mgar/pkg/gnomevfs2/trunk/legacy/ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gnomevfs2/trunk/legacy/sources/ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/Makefile csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/gnomevfs2 Added: csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:45:57 UTC (rev 4520) @@ -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/gnomevfs2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/human.pl 2009-04-27 12:45:57 UTC (rev 4520) @@ -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 () { + 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 + +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 + +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/gnomevfs2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:45:57 UTC (rev 4520) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gnomevfs2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/Makefile 2009-04-27 12:45:57 UTC (rev 4520) @@ -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/gnomevfs2/trunk/legacy/specs/gnomevfs2 =================================================================== --- csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/gnomevfs2 (rev 0) +++ csw/mgar/pkg/gnomevfs2/trunk/legacy/specs/gnomevfs2 2009-04-27 12:45:57 UTC (rev 4520) @@ -0,0 +1,58 @@ +# vim: ft=perl +# $Id: gnomevfs2,v 1.7 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gnome-vfs'; +$version = '2.8.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gnome-vfs-cswpath.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gnomevfs2", + filename => "gnomevfs2", + name => "gnomevfs2 - GNOME Virtual File System", + dependencies => ['CSWcommon','CSWgnomemime2','CSWdtopfutils'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --enable-ipv6 --with-samba-includes=/opt/csw/include --with-samba-libs=/opt/csw/lib --with-openssl-includes=/opt/csw/include --with-openssl-libs=/opt/csw/lib || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +rmdir ${buildroot}/opt/csw/doc/ + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gnome-vfs-2.0/modules/*.la,bonobo/monikers/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:46:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:46:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4521] csw/mgar/pkg Message-ID: Revision: 4521 http://gar.svn.sourceforge.net/gar/?rev=4521&view=rev Author: dmichelsen Date: 2009-04-27 12:46:13 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gstreamer: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gstreamer/ csw/mgar/pkg/gstreamer/trunk/ csw/mgar/pkg/gstreamer/trunk/legacy/ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gstreamer/trunk/legacy/scripts/human.pl csw/mgar/pkg/gstreamer/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gstreamer/trunk/legacy/sources/ csw/mgar/pkg/gstreamer/trunk/legacy/specs/ csw/mgar/pkg/gstreamer/trunk/legacy/specs/Makefile csw/mgar/pkg/gstreamer/trunk/legacy/specs/gstreamer Added: csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:46:13 UTC (rev 4521) @@ -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/gstreamer/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/human.pl 2009-04-27 12:46:13 UTC (rev 4521) @@ -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 () { + 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 + +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 + +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/gstreamer/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:46:13 UTC (rev 4521) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gstreamer/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/specs/Makefile 2009-04-27 12:46:13 UTC (rev 4521) @@ -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/gstreamer/trunk/legacy/specs/gstreamer =================================================================== --- csw/mgar/pkg/gstreamer/trunk/legacy/specs/gstreamer (rev 0) +++ csw/mgar/pkg/gstreamer/trunk/legacy/specs/gstreamer 2009-04-27 12:46:13 UTC (rev 4521) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: gstreamer,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'gstreamer'; +$version = '0.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/~gstreamer/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - open source multimedia framework", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:46:29 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:46:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4522] csw/mgar/pkg Message-ID: Revision: 4522 http://gar.svn.sourceforge.net/gar/?rev=4522&view=rev Author: dmichelsen Date: 2009-04-27 12:46:29 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtk-engines: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtk-engines/ csw/mgar/pkg/gtk-engines/trunk/ csw/mgar/pkg/gtk-engines/trunk/legacy/ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtk-engines/trunk/legacy/sources/ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/Makefile csw/mgar/pkg/gtk-engines/trunk/legacy/specs/gtk-engines Added: csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:46:29 UTC (rev 4522) @@ -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/gtk-engines/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/human.pl 2009-04-27 12:46:29 UTC (rev 4522) @@ -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 () { + 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 + +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 + +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/gtk-engines/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:46:29 UTC (rev 4522) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtk-engines/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/Makefile 2009-04-27 12:46:29 UTC (rev 4522) @@ -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/gtk-engines/trunk/legacy/specs/gtk-engines =================================================================== --- csw/mgar/pkg/gtk-engines/trunk/legacy/specs/gtk-engines (rev 0) +++ csw/mgar/pkg/gtk-engines/trunk/legacy/specs/gtk-engines 2009-04-27 12:46:29 UTC (rev 4522) @@ -0,0 +1,49 @@ +# vim: ft=perl +# $Id: gtk-engines,v 1.5 2005/11/10 20:16:52 simigern Exp $ + +$progname = 'gtk-engines'; +$version = '2.6.5'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gtkengines", + filename => "gtk_engines", + name => "gtk_engines - A collection of basic theme engines for GTK+", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install +cd ${buildroot}/opt/csw/lib/gtk-2.0/ +mkdir engines +cd engines +ln -s ../2*/engines/* . || exit 1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:46:44 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:46:44 +0000 Subject: [csw-devel] SF.net SVN: gar:[4523] csw/mgar/pkg/gtk2/trunk Message-ID: Revision: 4523 http://gar.svn.sourceforge.net/gar/?rev=4523&view=rev Author: dmichelsen Date: 2009-04-27 12:46:44 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtk2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtk2/trunk/legacy/ csw/mgar/pkg/gtk2/trunk/legacy/scripts/ csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtk2/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtk2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtk2/trunk/legacy/sources/ csw/mgar/pkg/gtk2/trunk/legacy/sources/gtk2.postinstall csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch csw/mgar/pkg/gtk2/trunk/legacy/specs/ csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile csw/mgar/pkg/gtk2/trunk/legacy/specs/gtk2 Added: csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:46:44 UTC (rev 4523) @@ -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/gtk2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/scripts/human.pl 2009-04-27 12:46:44 UTC (rev 4523) @@ -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 () { + 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 + +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 + +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/gtk2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:46:44 UTC (rev 4523) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtk2/trunk/legacy/sources/gtk2.postinstall =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/sources/gtk2.postinstall (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/sources/gtk2.postinstall 2009-04-27 12:46:44 UTC (rev 4523) @@ -0,0 +1,12 @@ +#!/bin/sh + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +echo 'Updating gdk-pixbuf.loaders...' +test -x ${PKG_ROOT_DIR}/opt/csw/bin/gdk-pixbuf-query-loaders && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/gdk-pixbuf-query-loaders >/opt/csw/etc/gtk-2.0/gdk-pixbuf.loaders +echo 'Updating gtk.immodules...' +test -x ${PKG_ROOT_DIR}/opt/csw/bin/gtk-query-immodules-2.0 && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/gtk-query-immodules-2.0 >/opt/csw/etc/gtk-2.0/gtk.immodules + +/bin/true Added: csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/sources/xinerama.h.patch 2009-04-27 12:46:44 UTC (rev 4523) @@ -0,0 +1,46 @@ +--- /dev/null 2004-06-25 18:29:26.000000000 +0200 ++++ xinerama.h 2002-04-06 07:55:15.000000000 +0200 +@@ -0,0 +1,43 @@ ++/****************************************************************** ++ ++ Copyright 1990, 1991, by Sun Microsystems, Inc. ++ ++Permission to use, copy, modify, distribute, and sell this software ++and its documentation for any purpose is hereby granted without fee, ++provided that the above copyright notice appear in all copies and ++that both that copyright notice and this permission notice appear ++in supporting documentation, and that the name of Sun Microsystems, Inc. ++not be used in advertising or publicity pertaining to distribution ++of the software without specific, written prior permission. ++Sun Microsystems, Inc. makes no representations about the suitability of ++this software for any purpose. It is provided "as is" without ++express or implied warranty. ++ ++Sun Microsystems Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS ++SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, ++IN NO EVENT SHALL Sun Microsystems, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT ++OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS ++OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE ++OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ++OR PERFORMANCE OF THIS SOFTWARE. ++ ++ Author: John McKernan (jmck at Sun.COM) ++ Sun Microsystems, Inc. ++******************************************************************/ ++ ++/* Xinerama header file */ ++ ++#ifndef _XINERAMA_H_ ++#define _XINERAMA_H_ ++ ++#define MAXFRAMEBUFFERS 16 ++#define XINERAMA_PLACE_TOP 1 ++#define XINERAMA_PLACE_BOTTOM 2 ++#define XINERAMA_PLACE_RIGHT 4 ++#define XINERAMA_PLACE_LEFT 8 ++ ++Bool XineramaGetState(Display*, int); ++Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*); ++Status XineramaGetCenterHint(Display*, int, int*, int*); ++ ++#endif /* _XINERAMA_H_ */ Added: csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/specs/Makefile 2009-04-27 12:46:44 UTC (rev 4523) @@ -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/gtk2/trunk/legacy/specs/gtk2 =================================================================== --- csw/mgar/pkg/gtk2/trunk/legacy/specs/gtk2 (rev 0) +++ csw/mgar/pkg/gtk2/trunk/legacy/specs/gtk2 2009-04-27 12:46:44 UTC (rev 4523) @@ -0,0 +1,50 @@ +# vim: ft=perl +# $Id: gtk2,v 1.9 2005/11/10 20:17:39 simigern Exp $ + +$progname = 'gtk+'; +$version = '2.8.4'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gtk.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['xinerama.h.patch', "${progname}-${version}", '-p0'], + ['gtk-xdg-data-dirs.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "gtk2", + filename => "gtk2", + name => "gtk2 - GTK+, The GIMP Toolkit", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => "gtk2.postinstall" + }); + +$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 -DANSICPP -I${builddir}/${progname}-${version}" +export CPPFLAGS='-I/opt/csw/include -DANSICPP -I${builddir}/${progname}-${version}' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version} +mkdir -p X11/extensions +mv xinerama.h X11/extensions/ +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-xinput=yes +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/etc/gtk-2.0 +mkdir -p ${buildroot}/opt/csw/include/X11/extensions +cp X11/extensions/xinerama.h ${buildroot}/opt/csw/include/X11/extensions +chmod 644 ${buildroot}/opt/csw/include/X11/extensions/xinerama.h +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4525] csw/mgar/pkg Message-ID: Revision: 4525 http://gar.svn.sourceforge.net/gar/?rev=4525&view=rev Author: dmichelsen Date: 2009-04-27 12:47:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtkhtml31: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtkhtml31/ csw/mgar/pkg/gtkhtml31/trunk/ csw/mgar/pkg/gtkhtml31/trunk/legacy/ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/ csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/ csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/gtkhtml31 Added: csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:19 UTC (rev 4525) @@ -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/gtkhtml31/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/human.pl 2009-04-27 12:47:19 UTC (rev 4525) @@ -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 () { + 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 + +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 + +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/gtkhtml31/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:19 UTC (rev 4525) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/sources/gtkhtml32-htmlpainter.patch 2009-04-27 12:47:19 UTC (rev 4525) @@ -0,0 +1,11 @@ +--- src/htmlpainter.c.orig 2004-09-27 06:44:48.732978000 -0400 ++++ src/htmlpainter.c 2004-09-27 06:45:14.132915000 -0400 +@@ -663,7 +663,7 @@ + void + html_painter_set_widget (HTMLPainter *painter, GtkWidget *widget) + { +- return (* HP_CLASS (painter)->set_widget) (painter, widget); ++ (* HP_CLASS (painter)->set_widget) (painter, widget); + } + + HTMLTextPangoInfo * Added: csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/Makefile 2009-04-27 12:47:19 UTC (rev 4525) @@ -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/gtkhtml31/trunk/legacy/specs/gtkhtml31 =================================================================== --- csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/gtkhtml31 (rev 0) +++ csw/mgar/pkg/gtkhtml31/trunk/legacy/specs/gtkhtml31 2009-04-27 12:47:19 UTC (rev 4525) @@ -0,0 +1,59 @@ +# vim: ft=perl +# $Id: gtkhtml31,v 1.11 2005/04/13 15:17:12 simigern Exp $ + +$progname = 'gtkhtml'; +$version = '3.6.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/gtkhtml/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gtkhtml32-htmlpainter.patch', "${progname}-${version}", '-p0']); + +$progname=$progname."31"; + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An HTML rendering/editing library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "gtkhtml-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 CPP='/usr/lib/cpp' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +cd gtkhtml-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" + +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +#export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gtkhtml/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4526] csw/mgar/pkg Message-ID: Revision: 4526 http://gar.svn.sourceforge.net/gar/?rev=4526&view=rev Author: dmichelsen Date: 2009-04-27 12:47:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- hdf5: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/hdf5/ csw/mgar/pkg/hdf5/trunk/ csw/mgar/pkg/hdf5/trunk/legacy/ csw/mgar/pkg/hdf5/trunk/legacy/scripts/ csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/hdf5/trunk/legacy/scripts/human.pl csw/mgar/pkg/hdf5/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/hdf5/trunk/legacy/sources/ csw/mgar/pkg/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch csw/mgar/pkg/hdf5/trunk/legacy/specs/ csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile csw/mgar/pkg/hdf5/trunk/legacy/specs/hdf5 Added: csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:35 UTC (rev 4526) @@ -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/hdf5/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/scripts/human.pl 2009-04-27 12:47:35 UTC (rev 4526) @@ -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 () { + 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 + +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 + +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/hdf5/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:35 UTC (rev 4526) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/sources/hdf5-sun-i386.patch 2009-04-27 12:47:35 UTC (rev 4526) @@ -0,0 +1,11 @@ +--- hdf5-1.6.6/fortran/src/H5f90i.h.orig Sat Dec 29 22:35:57 2007 ++++ hdf5-1.6.6/fortran/src/H5f90i.h Sat Dec 29 22:36:29 2007 +@@ -147,7 +147,7 @@ + #define _fcdtocp(desc) (desc) + #endif /* Cray X1 */ + +-#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) & !defined(__i386) ++#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) + + typedef char *_fcd; + typedef long long haddr_t_f; Added: csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/specs/Makefile 2009-04-27 12:47:35 UTC (rev 4526) @@ -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/hdf5/trunk/legacy/specs/hdf5 =================================================================== --- csw/mgar/pkg/hdf5/trunk/legacy/specs/hdf5 (rev 0) +++ csw/mgar/pkg/hdf5/trunk/legacy/specs/hdf5 2009-04-27 12:47:35 UTC (rev 4526) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: hdf5,v 1.1 2007-12-30 00:05:29 simigern Exp $ + +$progname = 'hdf5'; +$version = '1.6.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://hdf.ncsa.uiuc.edu/products/hdf5/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['hdf5-sun-i386.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - HDF5 (Hierarchical Data Format 5) Software Library and Utilities", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --docdir=/opt/csw/share/doc +gmake || exit 1 +gmake DESTDIR=${buildroot} prefix=${buildroot}/opt/csw/ install +mkdir ${buildroot}/opt/csw/share +mv ${buildroot}/opt/csw/doc ${buildroot}/opt/csw/share/doc +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4524] csw/mgar/pkg Message-ID: Revision: 4524 http://gar.svn.sourceforge.net/gar/?rev=4524&view=rev Author: dmichelsen Date: 2009-04-27 12:47:02 +0000 (Mon, 27 Apr 2009) Log Message: ----------- gtkhtml: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/gtkhtml/ csw/mgar/pkg/gtkhtml/trunk/ csw/mgar/pkg/gtkhtml/trunk/legacy/ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/human.pl csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/gtkhtml/trunk/legacy/sources/ csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-void.patch csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml32-htmlpainter.patch csw/mgar/pkg/gtkhtml/trunk/legacy/sources/orbit-idl-2.fix.patch csw/mgar/pkg/gtkhtml/trunk/legacy/specs/ csw/mgar/pkg/gtkhtml/trunk/legacy/specs/Makefile csw/mgar/pkg/gtkhtml/trunk/legacy/specs/gtkhtml Added: csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:02 UTC (rev 4524) @@ -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/gtkhtml/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/human.pl 2009-04-27 12:47:02 UTC (rev 4524) @@ -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 () { + 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 + +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 + +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/gtkhtml/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:02 UTC (rev 4524) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch =================================================================== --- csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch (rev 0) +++ csw/mgar/pkg/gtkhtml/trunk/legacy/sources/gtkhtml-editor.patch 2009-04-27 12:47:02 UTC (rev 4524) @@ -0,0 +1,2334 @@ +diff -urN components/html-editor.old/Editor-common.c components/html-editor/Editor-common.c +--- components/html-editor.old/Editor-common.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor-common.c 2004-03-06 23:22:34.899004000 +0100 +@@ -0,0 +1,307 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#define ORBIT_IDL_C_COMMON ++#define Editor_COMMON ++#include "Editor.h" ++static const CORBA_unsigned_long ORBit_zero_int = 0; ++#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0 == 'E') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_1 == 'd') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_2 == 'i') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_3 == 't') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_4 == 'o') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_5 == 'r') \ ++) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_Listener) ++#define TC_DEF_TC_GNOME_GtkHTML_Editor_Listener 1 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Listener_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_objref, ++ 0, ++ 0, ++ 4, ++ 0, ++ 0 ++ , ++ NULL, ++ CORBA_OBJECT_NIL, ++ "Listener", ++ "IDL:GNOME/GtkHTML/Editor/Listener:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0 == 'E') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_1 == 'd') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_2 == 'i') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_3 == 't') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_4 == 'o') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_5 == 'r') \ ++) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_Engine) ++#define TC_DEF_TC_GNOME_GtkHTML_Editor_Engine 1 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Engine_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_objref, ++ 0, ++ 0, ++ 4, ++ 0, ++ 0 ++ , ++ NULL, ++ CORBA_OBJECT_NIL, ++ "Engine", ++ "IDL:GNOME/GtkHTML/Editor/Engine:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0 == 'E') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_1 == 'd') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_2 == 'i') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_3 == 't') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_4 == 'o') \ ++&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_5 == 'r') \ ++) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_URLRequestEvent) ++#define TC_DEF_TC_GNOME_GtkHTML_Editor_URLRequestEvent 1 ++static const char *anon_subnames_array6[] = {"url", "stream"}; ++static const CORBA_TypeCode anon_subtypes_array7[] = {(CORBA_TypeCode) & TC_CORBA_string_struct, (CORBA_TypeCode) & TC_Bonobo_Stream_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_struct, ++ 0, ++ 0, ++ 4, ++ 0, ++ 2 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array7, ++ CORBA_OBJECT_NIL, ++ "URLRequestEvent", ++ "IDL:GNOME/GtkHTML/Editor/URLRequestEvent:1.0", ++ (char **) anon_subnames_array6, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#ifndef ORBIT_IDL_C_IMODULE_Editor ++CORBA_unsigned_long GNOME_GtkHTML_Editor_Listener__classid = 0; ++#endif ++#ifndef ORBIT_IDL_C_IMODULE_Editor ++CORBA_unsigned_long GNOME_GtkHTML_Editor_Engine__classid = 0; ++#endif ++/* Interface type data */ ++static ORBit_IArg GNOME_GtkHTML_Editor_Listener_event__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "name"}, ++ {TC_CORBA_any, ORBit_I_ARG_IN, "arg"} ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IMethod GNOME_GtkHTML_Editor_Listener__imethods[] = { ++ { ++ {2, 2, GNOME_GtkHTML_Editor_Listener_event__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_any, "event", 5, ++ 0 ++ } ++}; ++static CORBA_string GNOME_GtkHTML_Editor_Listener__base_itypes[] = { ++ "IDL:Bonobo/Unknown:1.0", ++ "IDL:omg.org/CORBA/Object:1.0" ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IInterface GNOME_GtkHTML_Editor_Listener__iinterface = { ++ TC_GNOME_GtkHTML_Editor_Listener, {1, 1, GNOME_GtkHTML_Editor_Listener__imethods, FALSE}, ++ {2, 2, GNOME_GtkHTML_Editor_Listener__base_itypes, FALSE} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine__set_listener__arginfo[] = { ++ {TC_GNOME_GtkHTML_Editor_Listener, ORBit_I_ARG_IN, "value"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_runCommand__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "command"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_getParagraphData__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_setParagraphData__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "value"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_setObjectDataByType__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "type_name"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "data"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_searchByData__arginfo[] = { ++ {TC_CORBA_long, ORBit_I_ARG_IN | ORBit_I_COMMON_FIXED_SIZE, "level"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "klass"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "key"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "value"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_insertHTML__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "html"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_undoBegin__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "undo_name"}, ++ {TC_CORBA_string, ORBit_I_ARG_IN, "redo_name"} ++}; ++static ORBit_IArg GNOME_GtkHTML_Editor_Engine_ignoreWord__arginfo[] = { ++ {TC_CORBA_string, ORBit_I_ARG_IN, "word"} ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IMethod GNOME_GtkHTML_Editor_Engine__imethods[] = { ++ { ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_GNOME_GtkHTML_Editor_Listener, "_get_listener", 13, ++ 0 ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine__set_listener__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "_set_listener", 13, ++ 0 ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_runCommand__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "runCommand", 10, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_getParagraphData__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_string, "getParagraphData", 16, ++ 0 ++ } ++ ,{ ++ {2, 2, GNOME_GtkHTML_Editor_Engine_setParagraphData__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "setParagraphData", 16, ++ 0 ++ } ++ ,{ ++ {3, 3, GNOME_GtkHTML_Editor_Engine_setObjectDataByType__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "setObjectDataByType", 19, ++ 0 ++ } ++ ,{ ++ {4, 4, GNOME_GtkHTML_Editor_Engine_searchByData__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "searchByData", 12, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "isParagraphEmpty", 16, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "isPreviousParagraphEmpty", 24, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_insertHTML__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "insertHTML", 10, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "freeze", 6, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "thaw", 4, ++ 0 ++ } ++ ,{ ++ {2, 2, GNOME_GtkHTML_Editor_Engine_undoBegin__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "undoBegin", 9, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "undoEnd", 7, ++ 0 ++ } ++ ,{ ++ {1, 1, GNOME_GtkHTML_Editor_Engine_ignoreWord__arginfo, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "ignoreWord", 10, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_void, "dropUndo", 8, ++ 0 ++ } ++ ,{ ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ {0, 0, NULL, FALSE}, ++ TC_CORBA_boolean, "hasUndo", 7, ++ 0 | ORBit_I_COMMON_FIXED_SIZE ++ } ++}; ++static CORBA_string GNOME_GtkHTML_Editor_Engine__base_itypes[] = { ++ "IDL:Bonobo/Unknown:1.0", ++ "IDL:omg.org/CORBA/Object:1.0" ++}; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++static ++#endif ++ORBit_IInterface GNOME_GtkHTML_Editor_Engine__iinterface = { ++ TC_GNOME_GtkHTML_Editor_Engine, {17, 17, GNOME_GtkHTML_Editor_Engine__imethods, FALSE}, ++ {2, 2, GNOME_GtkHTML_Editor_Engine__base_itypes, FALSE} ++}; +diff -urN components/html-editor.old/Editor-skels.c components/html-editor/Editor-skels.c +--- components/html-editor.old/Editor-skels.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor-skels.c 2004-03-06 23:22:34.869434000 +0100 +@@ -0,0 +1,426 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#include "Editor.h" ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event(POA_GNOME_GtkHTML_Editor_Listener * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_any * (*_impl_event) (PortableServer_Servant _servant, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev)) ++{ ++ *(CORBA_any * *) _o_retval = _impl_event(_o_servant, *(const CORBA_char * *) _o_args[0], (const CORBA_any *) _o_args[1], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ GNOME_GtkHTML_Editor_Listener(*_impl__get_listener) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(GNOME_GtkHTML_Editor_Listener *) _o_retval = _impl__get_listener(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl__set_listener) (PortableServer_Servant _servant, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev)) ++{ ++ _impl__set_listener(_o_servant, *(const GNOME_GtkHTML_Editor_Listener *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_runCommand) (PortableServer_Servant _servant, const CORBA_char * command, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_runCommand(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_string(*_impl_getParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, CORBA_Environment * ev)) ++{ ++ *(CORBA_string *) _o_retval = _impl_getParagraphData(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_setParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)) ++{ ++ _impl_setParagraphData(_o_servant, *(const CORBA_char * *) _o_args[0], *(const CORBA_char * *) _o_args[1], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_setObjectDataByType) (PortableServer_Servant _servant, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev)) ++{ ++ _impl_setObjectDataByType(_o_servant, *(const CORBA_char * *) _o_args[0], *(const CORBA_char * *) _o_args[1], *(const CORBA_char * *) _o_args[2], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_searchByData) (PortableServer_Servant _servant, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_searchByData(_o_servant, *(const CORBA_long *) _o_args[0], *(const CORBA_char * *) _o_args[1], *(const CORBA_char * *) _o_args[2], *(const CORBA_char * *) _o_args[3], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_isParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_isParagraphEmpty(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_isPreviousParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_isPreviousParagraphEmpty(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_insertHTML) (PortableServer_Servant _servant, const CORBA_char * html, CORBA_Environment * ev)) ++{ ++ _impl_insertHTML(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_freeze) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_freeze(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++void (*_impl_thaw) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_thaw(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_undoBegin) (PortableServer_Servant _servant, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev)) ++{ ++ _impl_undoBegin(_o_servant, *(const CORBA_char * *) _o_args[0], *(const CORBA_char * *) _o_args[1], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_undoEnd) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_undoEnd(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_ignoreWord) (PortableServer_Servant _servant, const CORBA_char * word, CORBA_Environment * ev)) ++{ ++ _impl_ignoreWord(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ void (*_impl_dropUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ _impl_dropUndo(_o_servant, _o_ev); ++} ++void ++_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo(POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval, gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev, ++ CORBA_boolean(*_impl_hasUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)) ++{ ++ *(CORBA_boolean *) _o_retval = _impl_hasUndo(_o_servant, _o_ev); ++} ++static ORBitSmallSkeleton ++get_skel_small_GNOME_GtkHTML_Editor_Listener(POA_GNOME_GtkHTML_Editor_Listener * servant, ++ const char *opname, gpointer * m_data, gpointer * impl) ++{ ++ switch (opname[0]) { ++ case 'e': ++ if (strcmp((opname + 1), "vent")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Listener_epv->event; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Listener__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event; ++ break; ++ case 'q': ++ if (strcmp((opname + 1), "ueryInterface")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->queryInterface; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[2]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_queryInterface; ++ break; ++ case 'r': ++ if (strcmp((opname + 1), "ef")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->ref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_ref; ++ break; ++ case 'u': ++ if (strcmp((opname + 1), "nref")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->unref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[1]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_unref; ++ break; ++ default: ++ break; ++ } ++ return NULL; ++} ++void ++POA_GNOME_GtkHTML_Editor_Listener__init(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ static PortableServer_ClassInfo class_info = {NULL, (ORBit_small_impl_finder) & get_skel_small_GNOME_GtkHTML_Editor_Listener, "IDL:GNOME/GtkHTML/Editor/Listener:1.0", &GNOME_GtkHTML_Editor_Listener__classid, NULL, &GNOME_GtkHTML_Editor_Listener__iinterface}; ++ POA_GNOME_GtkHTML_Editor_Listener__vepv *fakevepv = NULL; ++ if (((PortableServer_ServantBase *) servant)->vepv[0]->finalize == 0) { ++ ((PortableServer_ServantBase *) servant)->vepv[0]->finalize = POA_GNOME_GtkHTML_Editor_Listener__fini; ++ } ++ PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env); ++ POA_Bonobo_Unknown__init(servant, env); ++ ORBit_classinfo_register(&class_info); ++ ORBIT_SERVANT_SET_CLASSINFO(servant, &class_info); ++ if (!class_info.vepvmap) { ++ class_info.vepvmap = g_new0(ORBit_VepvIdx, GNOME_GtkHTML_Editor_Listener__classid + 1); ++ class_info.vepvmap[Bonobo_Unknown__classid] = (((char *) &(fakevepv->Bonobo_Unknown_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ class_info.vepvmap[GNOME_GtkHTML_Editor_Listener__classid] = (((char *) &(fakevepv->GNOME_GtkHTML_Editor_Listener_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ } ++} ++void ++POA_GNOME_GtkHTML_Editor_Listener__fini(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ POA_Bonobo_Unknown__fini(servant, env); ++ PortableServer_ServantBase__fini(servant, env); ++} ++static ORBitSmallSkeleton ++get_skel_small_GNOME_GtkHTML_Editor_Engine(POA_GNOME_GtkHTML_Editor_Engine * servant, ++ const char *opname, gpointer * m_data, gpointer * impl) ++{ ++ switch (opname[0]) { ++ case '_': ++ switch (opname[1]) { ++ case 'g': ++ if (strcmp((opname + 2), "et_listener")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->_get_listener; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener; ++ break; ++ case 's': ++ if (strcmp((opname + 2), "et_listener")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->_set_listener; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[1]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener; ++ break; ++ default: ++ break; ++ } ++ break; ++ case 'd': ++ if (strcmp((opname + 1), "ropUndo")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->dropUndo; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[15]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo; ++ break; ++ case 'f': ++ if (strcmp((opname + 1), "reeze")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->freeze; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[10]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze; ++ break; ++ case 'g': ++ if (strcmp((opname + 1), "etParagraphData")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->getParagraphData; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[3]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData; ++ break; ++ case 'h': ++ if (strcmp((opname + 1), "asUndo")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->hasUndo; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[16]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo; ++ break; ++ case 'i': ++ switch (opname[1]) { ++ case 'g': ++ if (strcmp((opname + 2), "noreWord")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->ignoreWord; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[14]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord; ++ break; ++ case 'n': ++ if (strcmp((opname + 2), "sertHTML")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->insertHTML; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[9]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML; ++ break; ++ case 's': ++ switch (opname[2]) { ++ case 'P': ++ switch (opname[3]) { ++ case 'a': ++ if (strcmp((opname + 4), "ragraphEmpty")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->isParagraphEmpty; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[7]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty; ++ break; ++ case 'r': ++ if (strcmp((opname + 4), "eviousParagraphEmpty")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->isPreviousParagraphEmpty; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[8]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ case 'q': ++ if (strcmp((opname + 1), "ueryInterface")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->queryInterface; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[2]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_queryInterface; ++ break; ++ case 'r': ++ switch (opname[1]) { ++ case 'e': ++ if (strcmp((opname + 2), "f")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->ref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[0]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_ref; ++ break; ++ case 'u': ++ if (strcmp((opname + 2), "nCommand")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->runCommand; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[2]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand; ++ break; ++ default: ++ break; ++ } ++ break; ++ case 's': ++ switch (opname[1]) { ++ case 'e': ++ switch (opname[2]) { ++ case 'a': ++ if (strcmp((opname + 3), "rchByData")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->searchByData; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[6]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData; ++ break; ++ case 't': ++ switch (opname[3]) { ++ case 'O': ++ if (strcmp((opname + 4), "bjectDataByType")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->setObjectDataByType; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[5]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType; ++ break; ++ case 'P': ++ if (strcmp((opname + 4), "aragraphData")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->setParagraphData; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[4]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ case 't': ++ if (strcmp((opname + 1), "haw")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->thaw; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[11]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw; ++ break; ++ case 'u': ++ switch (opname[1]) { ++ case 'n': ++ switch (opname[2]) { ++ case 'd': ++ switch (opname[3]) { ++ case 'o': ++ switch (opname[4]) { ++ case 'B': ++ if (strcmp((opname + 5), "egin")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->undoBegin; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[12]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin; ++ break; ++ case 'E': ++ if (strcmp((opname + 5), "nd")) ++ break; ++ *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->undoEnd; ++ *m_data = (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods._buffer[13]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ case 'r': ++ if (strcmp((opname + 3), "ef")) ++ break; ++ *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->unref; ++ *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[1]; ++ return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_unref; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ return NULL; ++} ++void ++POA_GNOME_GtkHTML_Editor_Engine__init(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ static PortableServer_ClassInfo class_info = {NULL, (ORBit_small_impl_finder) & get_skel_small_GNOME_GtkHTML_Editor_Engine, "IDL:GNOME/GtkHTML/Editor/Engine:1.0", &GNOME_GtkHTML_Editor_Engine__classid, NULL, &GNOME_GtkHTML_Editor_Engine__iinterface}; ++ POA_GNOME_GtkHTML_Editor_Engine__vepv *fakevepv = NULL; ++ if (((PortableServer_ServantBase *) servant)->vepv[0]->finalize == 0) { ++ ((PortableServer_ServantBase *) servant)->vepv[0]->finalize = POA_GNOME_GtkHTML_Editor_Engine__fini; ++ } ++ PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env); ++ POA_Bonobo_Unknown__init(servant, env); ++ ORBit_classinfo_register(&class_info); ++ ORBIT_SERVANT_SET_CLASSINFO(servant, &class_info); ++ if (!class_info.vepvmap) { ++ class_info.vepvmap = g_new0(ORBit_VepvIdx, GNOME_GtkHTML_Editor_Engine__classid + 1); ++ class_info.vepvmap[Bonobo_Unknown__classid] = (((char *) &(fakevepv->Bonobo_Unknown_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ class_info.vepvmap[GNOME_GtkHTML_Editor_Engine__classid] = (((char *) &(fakevepv->GNOME_GtkHTML_Editor_Engine_epv)) - ((char *) (fakevepv))) / sizeof(GFunc); ++ } ++} ++void ++POA_GNOME_GtkHTML_Editor_Engine__fini(PortableServer_Servant servant, ++ CORBA_Environment * env) ++{ ++ POA_Bonobo_Unknown__fini(servant, env); ++ PortableServer_ServantBase__fini(servant, env); ++} +diff -urN components/html-editor.old/Editor-stubs.c components/html-editor/Editor-stubs.c +--- components/html-editor.old/Editor-stubs.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor-stubs.c 2004-03-06 23:22:34.821504000 +0100 +@@ -0,0 +1,294 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#include "Editor.h" ++CORBA_any * ++GNOME_GtkHTML_Editor_Listener_event(GNOME_GtkHTML_Editor_Listener _obj, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev) ++{ ++ CORBA_any *_ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Listener__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Listener__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Listener__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Listener__classid))->event) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->event(ORBIT_STUB_GetServant(_obj), name, arg, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & name, (gpointer) arg}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Listener__iinterface.methods, 0, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++GNOME_GtkHTML_Editor_Listener ++GNOME_GtkHTML_Editor_Engine__get_listener(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ GNOME_GtkHTML_Editor_Listener _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->_get_listener) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->_get_listener(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 0, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++void ++GNOME_GtkHTML_Editor_Engine__set_listener(GNOME_GtkHTML_Editor_Engine _obj, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->_set_listener) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->_set_listener(ORBIT_STUB_GetServant(_obj), value, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & value}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 1, NULL, _args, NULL, ev); ++ } ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_runCommand(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * command, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->runCommand) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->runCommand(ORBIT_STUB_GetServant(_obj), command, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & command}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 2, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++CORBA_string ++GNOME_GtkHTML_Editor_Engine_getParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, CORBA_Environment * ev) ++{ ++ CORBA_string _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->getParagraphData) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->getParagraphData(ORBIT_STUB_GetServant(_obj), key, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & key}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 3, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++void ++GNOME_GtkHTML_Editor_Engine_setParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->setParagraphData) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->setParagraphData(ORBIT_STUB_GetServant(_obj), key, value, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & key, (gpointer) & value}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 4, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_setObjectDataByType(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->setObjectDataByType) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->setObjectDataByType(ORBIT_STUB_GetServant(_obj), type_name, key, data, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & type_name, (gpointer) & key, (gpointer) & data}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 5, NULL, _args, NULL, ev); ++ } ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_searchByData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->searchByData) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->searchByData(ORBIT_STUB_GetServant(_obj), level, klass, key, value, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & level, (gpointer) & klass, (gpointer) & key, (gpointer) & value}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 6, &_ORBIT_retval, _args, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->isParagraphEmpty) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->isParagraphEmpty(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 7, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->isPreviousParagraphEmpty) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->isPreviousParagraphEmpty(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 8, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} ++void ++GNOME_GtkHTML_Editor_Engine_insertHTML(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * html, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->insertHTML) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->insertHTML(ORBIT_STUB_GetServant(_obj), html, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & html}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 9, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_freeze(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->freeze) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->freeze(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 10, NULL, NULL, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_thaw(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->thaw) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->thaw(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 11, NULL, NULL, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_undoBegin(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->undoBegin) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->undoBegin(ORBIT_STUB_GetServant(_obj), undo_name, redo_name, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & undo_name, (gpointer) & redo_name}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 12, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_undoEnd(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->undoEnd) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->undoEnd(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 13, NULL, NULL, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_ignoreWord(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * word, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->ignoreWord) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->ignoreWord(ORBIT_STUB_GetServant(_obj), word, ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ gpointer _args[] = { ++ (gpointer) & word}; ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 14, NULL, _args, NULL, ev); ++ } ++} ++void ++GNOME_GtkHTML_Editor_Engine_dropUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->dropUndo) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_epv->dropUndo(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 15, NULL, NULL, NULL, ev); ++ } ++} ++CORBA_boolean ++GNOME_GtkHTML_Editor_Engine_hasUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev) ++{ ++ CORBA_boolean _ORBIT_retval; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv; ++ if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS && ++ ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) && ++ (_ORBIT_epv = (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj, GNOME_GtkHTML_Editor_Engine__classid))->hasUndo) { ++ ORBIT_STUB_PreCall(_obj); ++ _ORBIT_retval = _ORBIT_epv->hasUndo(ORBIT_STUB_GetServant(_obj), ev); ++ ORBIT_STUB_PostCall(_obj); ++ } else { /* remote marshal */ ++ ORBit_small_invoke_stub_n(_obj, &GNOME_GtkHTML_Editor_Engine__iinterface.methods, 16, &_ORBIT_retval, NULL, NULL, ev); ++ } ++ return _ORBIT_retval; ++} +diff -urN components/html-editor.old/Editor.h components/html-editor/Editor.h +--- components/html-editor.old/Editor.h 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Editor.h 2004-03-06 23:22:34.941372000 +0100 +@@ -0,0 +1,223 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#ifndef Editor_H ++#define Editor_H 1 ++#include ++#define ORBIT_IDL_SERIAL 19 ++#include ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ /** typedefs **/ ++#include ++#if !defined(ORBIT_DECL_GNOME_GtkHTML_Editor_Listener) && !defined(_GNOME_GtkHTML_Editor_Listener_defined) ++#define ORBIT_DECL_GNOME_GtkHTML_Editor_Listener 1 ++#define _GNOME_GtkHTML_Editor_Listener_defined 1 ++#define GNOME_GtkHTML_Editor_Listener__freekids CORBA_Object__freekids ++ typedef CORBA_Object GNOME_GtkHTML_Editor_Listener; ++ extern CORBA_unsigned_long GNOME_GtkHTML_Editor_Listener__classid; ++#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0) ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0 'E' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_1 'd' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_2 'i' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_3 't' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_4 'o' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_5 'r' ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Listener_struct; ++#define TC_GNOME_GtkHTML_Editor_Listener ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_Listener_struct) ++#endif ++#endif ++#if !defined(ORBIT_DECL_GNOME_GtkHTML_Editor_Engine) && !defined(_GNOME_GtkHTML_Editor_Engine_defined) ++#define ORBIT_DECL_GNOME_GtkHTML_Editor_Engine 1 ++#define _GNOME_GtkHTML_Editor_Engine_defined 1 ++#define GNOME_GtkHTML_Editor_Engine__freekids CORBA_Object__freekids ++ typedef CORBA_Object GNOME_GtkHTML_Editor_Engine; ++ extern CORBA_unsigned_long GNOME_GtkHTML_Editor_Engine__classid; ++#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0) ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0 'E' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_1 'd' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_2 'i' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_3 't' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_4 'o' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_5 'r' ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Engine_struct; ++#define TC_GNOME_GtkHTML_Editor_Engine ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_Engine_struct) ++#endif ++#endif ++#if !defined(_GNOME_GtkHTML_Editor_URLRequestEvent_defined) ++#define _GNOME_GtkHTML_Editor_URLRequestEvent_defined 1 ++ typedef struct GNOME_GtkHTML_Editor_URLRequestEvent_type GNOME_GtkHTML_Editor_URLRequestEvent; ++ struct GNOME_GtkHTML_Editor_URLRequestEvent_type { ++ CORBA_string url; ++ Bonobo_Stream stream; ++ }; ++#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0) ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0 'E' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_1 'd' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_2 'i' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_3 't' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_4 'o' ++#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_5 'r' ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct; ++#define TC_GNOME_GtkHTML_Editor_URLRequestEvent ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct) ++#endif ++#define GNOME_GtkHTML_Editor_URLRequestEvent__alloc() ((GNOME_GtkHTML_Editor_URLRequestEvent *)ORBit_small_alloc (TC_GNOME_GtkHTML_Editor_URLRequestEvent)) ++#define GNOME_GtkHTML_Editor_URLRequestEvent__freekids(m,d) ORBit_small_freekids (TC_GNOME_GtkHTML_Editor_URLRequestEvent,(m),(d)) ++#endif ++ /** POA structures **/ ++#ifndef _defined_POA_GNOME_GtkHTML_Editor_Listener ++#define _defined_POA_GNOME_GtkHTML_Editor_Listener 1 ++ typedef struct { ++ void *_private; ++ CORBA_any *(*event) (PortableServer_Servant _servant, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev); ++ } POA_GNOME_GtkHTML_Editor_Listener__epv; ++ typedef struct { ++ PortableServer_ServantBase__epv *_base_epv; ++ POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv; ++ POA_GNOME_GtkHTML_Editor_Listener__epv *GNOME_GtkHTML_Editor_Listener_epv; ++ } POA_GNOME_GtkHTML_Editor_Listener__vepv; ++ typedef struct { ++ void *_private; ++ POA_GNOME_GtkHTML_Editor_Listener__vepv *vepv; ++ } POA_GNOME_GtkHTML_Editor_Listener; ++ extern void POA_GNOME_GtkHTML_Editor_Listener__init(PortableServer_Servant servant, CORBA_Environment * ev); ++ extern void POA_GNOME_GtkHTML_Editor_Listener__fini(PortableServer_Servant servant, CORBA_Environment * ev); ++#endif /* _defined_POA_GNOME_GtkHTML_Editor_Listener */ ++#ifndef _defined_POA_GNOME_GtkHTML_Editor_Engine ++#define _defined_POA_GNOME_GtkHTML_Editor_Engine 1 ++ typedef struct { ++ void *_private; ++ GNOME_GtkHTML_Editor_Listener(*_get_listener) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*_set_listener) (PortableServer_Servant _servant, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev); ++ CORBA_boolean(*runCommand) (PortableServer_Servant _servant, const CORBA_char * command, CORBA_Environment * ev); ++ CORBA_string(*getParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, CORBA_Environment * ev); ++ void (*setParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ void (*setObjectDataByType) (PortableServer_Servant _servant, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev); ++ CORBA_boolean(*searchByData) (PortableServer_Servant _servant, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ CORBA_boolean(*isParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ CORBA_boolean(*isPreviousParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*insertHTML) (PortableServer_Servant _servant, const CORBA_char * html, CORBA_Environment * ev); ++ void (*freeze) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*thaw) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*undoBegin) (PortableServer_Servant _servant, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev); ++ void (*undoEnd) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ void (*ignoreWord) (PortableServer_Servant _servant, const CORBA_char * word, CORBA_Environment * ev); ++ void (*dropUndo) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ CORBA_boolean(*hasUndo) (PortableServer_Servant _servant, CORBA_Environment * ev); ++ } POA_GNOME_GtkHTML_Editor_Engine__epv; ++ typedef struct { ++ PortableServer_ServantBase__epv *_base_epv; ++ POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv; ++ POA_GNOME_GtkHTML_Editor_Engine__epv *GNOME_GtkHTML_Editor_Engine_epv; ++ } POA_GNOME_GtkHTML_Editor_Engine__vepv; ++ typedef struct { ++ void *_private; ++ POA_GNOME_GtkHTML_Editor_Engine__vepv *vepv; ++ } POA_GNOME_GtkHTML_Editor_Engine; ++ extern void POA_GNOME_GtkHTML_Editor_Engine__init(PortableServer_Servant servant, CORBA_Environment * ev); ++ extern void POA_GNOME_GtkHTML_Editor_Engine__fini(PortableServer_Servant servant, CORBA_Environment * ev); ++#endif /* _defined_POA_GNOME_GtkHTML_Editor_Engine */ ++ /** skel prototypes **/ ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event(POA_GNOME_GtkHTML_Editor_Listener * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_any * (*_impl_event) (PortableServer_Servant _servant, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, GNOME_GtkHTML_Editor_Listener(*_impl__get_listener) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl__set_listener) (PortableServer_Servant _servant, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_runCommand) (PortableServer_Servant _servant, const CORBA_char * command, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_string(*_impl_getParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_setParagraphData) (PortableServer_Servant _servant, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_setObjectDataByType) (PortableServer_Servant _servant, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_searchByData) (PortableServer_Servant _servant, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_isParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_isPreviousParagraphEmpty) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_insertHTML) (PortableServer_Servant _servant, const CORBA_char * html, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_freeze) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_thaw) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_undoBegin) (PortableServer_Servant _servant, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_undoEnd) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_ignoreWord) (PortableServer_Servant _servant, const CORBA_char * word, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, void (*_impl_dropUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ void _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo(POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant, gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx, CORBA_Environment * ev, CORBA_boolean(*_impl_hasUndo) (PortableServer_Servant _servant, CORBA_Environment * ev)); ++ /** stub prototypes **/ ++#define GNOME_GtkHTML_Editor_Listener_ref Bonobo_Unknown_ref ++#define GNOME_GtkHTML_Editor_Listener_unref Bonobo_Unknown_unref ++#define GNOME_GtkHTML_Editor_Listener_queryInterface Bonobo_Unknown_queryInterface ++ CORBA_any *GNOME_GtkHTML_Editor_Listener_event(GNOME_GtkHTML_Editor_Listener _obj, const CORBA_char * name, const CORBA_any * arg, CORBA_Environment * ev); ++#define GNOME_GtkHTML_Editor_Engine_ref Bonobo_Unknown_ref ++#define GNOME_GtkHTML_Editor_Engine_unref Bonobo_Unknown_unref ++#define GNOME_GtkHTML_Editor_Engine_queryInterface Bonobo_Unknown_queryInterface ++ GNOME_GtkHTML_Editor_Listener GNOME_GtkHTML_Editor_Engine__get_listener(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine__set_listener(GNOME_GtkHTML_Editor_Engine _obj, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_runCommand(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * command, CORBA_Environment * ev); ++ CORBA_string GNOME_GtkHTML_Editor_Engine_getParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_setParagraphData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_setObjectDataByType(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * data, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_searchByData(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_long level, const CORBA_char * klass, const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_insertHTML(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * html, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_freeze(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_thaw(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_undoBegin(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * undo_name, const CORBA_char * redo_name, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_undoEnd(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_ignoreWord(GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * word, CORBA_Environment * ev); ++ void GNOME_GtkHTML_Editor_Engine_dropUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ CORBA_boolean GNOME_GtkHTML_Editor_Engine_hasUndo(GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev); ++ /** more internals **/ ++#if !defined(MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_0) ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_0 'E' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_1 'd' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_2 'i' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_3 't' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_4 'o' ++#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_5 'r' ++#endif ++#include ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IInterface GNOME_GtkHTML_Editor_Listener__iinterface; ++#define GNOME_GtkHTML_Editor_Listener_IMETHODS_LEN 1 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IMethod GNOME_GtkHTML_Editor_Listener__imethods[GNOME_GtkHTML_Editor_Listener_IMETHODS_LEN]; ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IInterface GNOME_GtkHTML_Editor_Engine__iinterface; ++#define GNOME_GtkHTML_Editor_Engine_IMETHODS_LEN 17 ++#ifdef ORBIT_IDL_C_IMODULE_Editor ++ static ++#else ++ extern ++#endif ++ ORBit_IMethod GNOME_GtkHTML_Editor_Engine__imethods[GNOME_GtkHTML_Editor_Engine_IMETHODS_LEN]; ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++#ifndef EXCLUDE_ORBIT_H ++#include ++#endif /* EXCLUDE_ORBIT_H */ ++#endif ++#undef ORBIT_IDL_SERIAL +diff -urN components/html-editor.old/Spell-common.c components/html-editor/Spell-common.c +--- components/html-editor.old/Spell-common.c 1970-01-01 01:00:00.000000000 +0100 ++++ components/html-editor/Spell-common.c 2004-03-06 23:23:57.080627000 +0100 +@@ -0,0 +1,399 @@ ++/* ++ * This file was generated by orbit-idl-2 - DO NOT EDIT! ++ */ ++#include ++#define ORBIT2_STUBS_API ++#define ORBIT_IDL_C_COMMON ++#define Spell_COMMON ++#include "Spell.h" ++static const CORBA_unsigned_long ORBit_zero_int = 0; ++#if ( (TC_IMPL_TC_CORBA_sequence_CORBA_string_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_CORBA_string) ++#define TC_DEF_TC_CORBA_sequence_CORBA_string 1 ++static const CORBA_TypeCode anon_subtypes_array1[] = {(CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_CORBA_string_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array1, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_CORBA_sequence_CORBA_string_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_CORBA_string_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_CORBA_string) ++#define TC_DEF_TC_CORBA_sequence_CORBA_string 1 ++static const CORBA_TypeCode anon_subtypes_array8[] = {(CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_CORBA_string_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array8, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_StringSeq_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_StringSeq_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_StringSeq) ++#define TC_DEF_TC_GNOME_Spell_StringSeq 1 ++static const CORBA_TypeCode anon_subtypes_array11[] = {(CORBA_TypeCode) & TC_CORBA_sequence_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_StringSeq_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_alias, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array11, ++ CORBA_OBJECT_NIL, ++ "StringSeq", ++ "IDL:GNOME/Spell/StringSeq:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_Language_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_Language_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_Language) ++#define TC_DEF_TC_GNOME_Spell_Language 1 ++static const char *anon_subnames_array13[] = {"name", "abbreviation"}; ++static const CORBA_TypeCode anon_subtypes_array14[] = {(CORBA_TypeCode) & TC_CORBA_string_struct, (CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_Language_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_struct, ++ 0, ++ 0, ++ 4, ++ 0, ++ 2 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array14, ++ CORBA_OBJECT_NIL, ++ "Language", ++ "IDL:GNOME/Spell/Language:1.0", ++ (char **) anon_subnames_array13, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language) ++#define TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language 1 ++static const CORBA_TypeCode anon_subtypes_array17[] = {(CORBA_TypeCode) & TC_GNOME_Spell_Language_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_GNOME_Spell_Language_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array17, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_0 == 'S') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_1 == 'p') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_2 == 'e') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_3 == 'l') \ ++&& (TC_IMPL_TC_CORBA_sequence_GNOME_Spell_Language_4 == 'l') \ ++) && !defined(TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language) ++#define TC_DEF_TC_CORBA_sequence_GNOME_Spell_Language 1 ++static const CORBA_TypeCode anon_subtypes_array24[] = {(CORBA_TypeCode) & TC_GNOME_Spell_Language_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_CORBA_sequence_GNOME_Spell_Language_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_sequence, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array24, ++ CORBA_OBJECT_NIL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_LanguageSeq_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_LanguageSeq_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_LanguageSeq) ++#define TC_DEF_TC_GNOME_Spell_LanguageSeq 1 ++static const CORBA_TypeCode anon_subtypes_array27[] = {(CORBA_TypeCode) & TC_CORBA_sequence_GNOME_Spell_Language_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_LanguageSeq_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_alias, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , ++ (CORBA_TypeCode *) anon_subtypes_array27, ++ CORBA_OBJECT_NIL, ++ "LanguageSeq", ++ "IDL:GNOME/Spell/LanguageSeq:1.0", ++ NULL, ++ NULL, ++ -1, ++ 0, ++ 0, 0 ++}; ++#endif ++#if ( (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_0 == 'S') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_1 == 'p') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_2 == 'e') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_3 == 'l') \ ++&& (TC_IMPL_TC_GNOME_Spell_Dictionary_Error_4 == 'l') \ ++) && !defined(TC_DEF_TC_GNOME_Spell_Dictionary_Error) ++#define TC_DEF_TC_GNOME_Spell_Dictionary_Error 1 ++static const char *anon_subnames_array29[] = {"error"}; ++static const CORBA_TypeCode anon_subtypes_array30[] = {(CORBA_TypeCode) & TC_CORBA_string_struct}; ++#ifdef ORBIT_IDL_C_IMODULE_Spell ++static ++#endif ++const struct CORBA_TypeCode_struct TC_GNOME_Spell_Dictionary_Error_struct = { ++ {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC}, ++ CORBA_tk_except, ++ 0, ++ 0, ++ 4, ++ 0, ++ 1 ++ , @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:47:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:47:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4527] csw/mgar/pkg/hicolor-icon-theme/trunk Message-ID: Revision: 4527 http://gar.svn.sourceforge.net/gar/?rev=4527&view=rev Author: dmichelsen Date: 2009-04-27 12:47:49 +0000 (Mon, 27 Apr 2009) Log Message: ----------- hicolor-icon-theme: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/human.pl csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/sources/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/Makefile csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme Added: csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:47:49 UTC (rev 4527) @@ -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/hicolor-icon-theme/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/human.pl 2009-04-27 12:47:49 UTC (rev 4527) @@ -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 () { + 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 + +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 + +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/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:47:49 UTC (rev 4527) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/hicolor-icon-theme/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/Makefile 2009-04-27 12:47:49 UTC (rev 4527) @@ -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/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme =================================================================== --- csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme (rev 0) +++ csw/mgar/pkg/hicolor-icon-theme/trunk/legacy/specs/hicolor-icon-theme 2009-04-27 12:47:49 UTC (rev 4527) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: hicolor-icon-theme,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'hicolor-icon-theme'; +$version = '0.5'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/icon-theme/releases/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "hicoloricontheme", + filename => "hicolor_icon_theme", + name => "hicolor_icon_theme - freedesktop.org base icon theme", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$arch="all"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4528] csw/mgar/pkg/intltool/trunk Message-ID: Revision: 4528 http://gar.svn.sourceforge.net/gar/?rev=4528&view=rev Author: dmichelsen Date: 2009-04-27 12:48:03 +0000 (Mon, 27 Apr 2009) Log Message: ----------- intltool: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/intltool/trunk/legacy/ csw/mgar/pkg/intltool/trunk/legacy/scripts/ csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/intltool/trunk/legacy/scripts/human.pl csw/mgar/pkg/intltool/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/intltool/trunk/legacy/sources/ csw/mgar/pkg/intltool/trunk/legacy/specs/ csw/mgar/pkg/intltool/trunk/legacy/specs/Makefile csw/mgar/pkg/intltool/trunk/legacy/specs/intltool Added: csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:03 UTC (rev 4528) @@ -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/intltool/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/scripts/human.pl 2009-04-27 12:48:03 UTC (rev 4528) @@ -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 () { + 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 + +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 + +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/intltool/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:03 UTC (rev 4528) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/intltool/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/specs/Makefile 2009-04-27 12:48:03 UTC (rev 4528) @@ -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/intltool/trunk/legacy/specs/intltool =================================================================== --- csw/mgar/pkg/intltool/trunk/legacy/specs/intltool (rev 0) +++ csw/mgar/pkg/intltool/trunk/legacy/specs/intltool 2009-04-27 12:48:03 UTC (rev 4528) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: intltool,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'intltool'; +$version = '0.30'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/gnome/sources/intltool/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A collection of tools for internationalization", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:20 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4529] csw/mgar/pkg Message-ID: Revision: 4529 http://gar.svn.sourceforge.net/gar/?rev=4529&view=rev Author: dmichelsen Date: 2009-04-27 12:48:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- iperf: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/iperf/ csw/mgar/pkg/iperf/trunk/ csw/mgar/pkg/iperf/trunk/legacy/ csw/mgar/pkg/iperf/trunk/legacy/scripts/ csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/iperf/trunk/legacy/scripts/human.pl csw/mgar/pkg/iperf/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/iperf/trunk/legacy/sources/ csw/mgar/pkg/iperf/trunk/legacy/sources/iperf.patch csw/mgar/pkg/iperf/trunk/legacy/specs/ csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile csw/mgar/pkg/iperf/trunk/legacy/specs/iperf Added: csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:19 UTC (rev 4529) @@ -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/iperf/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/scripts/human.pl 2009-04-27 12:48:19 UTC (rev 4529) @@ -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 () { + 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 + +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 + +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/iperf/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:19 UTC (rev 4529) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/iperf/trunk/legacy/sources/iperf.patch =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/sources/iperf.patch (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/sources/iperf.patch 2009-04-27 12:48:19 UTC (rev 4529) @@ -0,0 +1,11 @@ +--- iperf-2.0.2/compat/Thread.c.orig 2007-01-03 22:57:59.258235849 +0100 ++++ iperf-2.0.2/compat/Thread.c 2007-01-03 22:58:13.065711544 +0100 +@@ -202,7 +202,7 @@ + #if defined( HAVE_POSIX_THREAD ) + // Cray J90 doesn't have pthread_cancel; Iperf works okay without + #ifdef HAVE_PTHREAD_CANCEL +- pthread_cancel( oldTID ); ++ pthread_cancel( thread->mTID ); + #endif + #else // Win32 + // this is a somewhat dangerous function; it's not Added: csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/specs/Makefile 2009-04-27 12:48:19 UTC (rev 4529) @@ -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/iperf/trunk/legacy/specs/iperf =================================================================== --- csw/mgar/pkg/iperf/trunk/legacy/specs/iperf (rev 0) +++ csw/mgar/pkg/iperf/trunk/legacy/specs/iperf 2009-04-27 12:48:19 UTC (rev 4529) @@ -0,0 +1,101 @@ +# vim: ft=perl +# $Id: iperf,v 1.1 2007-01-03 22:06:43 simigern Exp $ + +$progname = 'iperf'; +$version = '2.0.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://dast.nlanr.net/Projects/Iperf/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['iperf.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The TCP/UDP Bandwidth Measurement Tool", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share/doc/iperf +cp doc/*.html doc/*.gif ${buildroot}/opt/csw/share/doc/iperf/ +cat >COPYING <<__EOF__ + Distributed Applications Support Team + + Iperf Copyright + + ---------------------------------------------------------------------- + + Copyright (c) 1999,2000,2001,2002,2003,2004,2005 The Board of Trustees of the + University of Illinois + All Rights Reserved. + + Iperf performance test + Mark Gates + Ajay Tirumala + Jim Ferguson + Jon Dugan + Feng Qin + Kevin Gibbs + John Estabrook + National Laboratory for Applied Network Research + National Center for Supercomputing Applications + University of Illinois at Urbana-Champaign + http://www.ncsa.uiuc.edu + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software (Iperf) and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit + persons to whom the Software is furnished to do so, subject to the + following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the University of Illinois, NCSA, nor the names + of its contributors may be used to endorse or promote products derived + from this Software without specific prior written permission. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE CONTIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ---------------------------------------------------------------------- + + dast\@nlanr.net Last modified: Jan 5, 2004 + NLANR || applications support || engineering support || measurement and + operations +__EOF__ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4530] csw/mgar/pkg Message-ID: Revision: 4530 http://gar.svn.sourceforge.net/gar/?rev=4530&view=rev Author: dmichelsen Date: 2009-04-27 12:48:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libbonobo2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libbonobo2/ csw/mgar/pkg/libbonobo2/trunk/ csw/mgar/pkg/libbonobo2/trunk/legacy/ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/human.pl csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libbonobo2/trunk/legacy/sources/ csw/mgar/pkg/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch csw/mgar/pkg/libbonobo2/trunk/legacy/specs/ csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile csw/mgar/pkg/libbonobo2/trunk/legacy/specs/libbonobo2 Added: csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:35 UTC (rev 4530) @@ -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/libbonobo2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/human.pl 2009-04-27 12:48:35 UTC (rev 4530) @@ -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 () { + 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 + +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 + +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/libbonobo2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:35 UTC (rev 4530) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/sources/libbonobo2-nongcc-fixes.patch 2009-04-27 12:48:35 UTC (rev 4530) @@ -0,0 +1,11 @@ +--- bonobo/bonobo-app-client.c.orig 2004-12-05 17:12:36.268428000 -0500 ++++ bonobo/bonobo-app-client.c 2004-12-05 17:13:39.028375000 -0500 +@@ -266,7 +266,7 @@ + } + + +-static __inline__ GType ++static GType + _typecode_to_gtype (CORBA_TypeCode tc) + { + static GHashTable *hash = NULL; Added: csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/specs/Makefile 2009-04-27 12:48:35 UTC (rev 4530) @@ -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/libbonobo2/trunk/legacy/specs/libbonobo2 =================================================================== --- csw/mgar/pkg/libbonobo2/trunk/legacy/specs/libbonobo2 (rev 0) +++ csw/mgar/pkg/libbonobo2/trunk/legacy/specs/libbonobo2 2009-04-27 12:48:35 UTC (rev 4530) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libbonobo2,v 1.6 2005/11/15 21:31:14 simigern Exp $ + +$progname = 'libbonobo'; +$version = '2.10.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['libbonobo2-nongcc-fixes.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "bonobo2", + filename => "libbonobo2", + name => "libbonobo2 - GNOME component and compound document system", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-xO2 -xspace -xarch=386' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,orbit-2.0/*.la,bonobo/monikers/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:48:50 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:48:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4531] csw/mgar/pkg Message-ID: Revision: 4531 http://gar.svn.sourceforge.net/gar/?rev=4531&view=rev Author: dmichelsen Date: 2009-04-27 12:48:50 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libbonoboui: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libbonoboui/ csw/mgar/pkg/libbonoboui/trunk/ csw/mgar/pkg/libbonoboui/trunk/legacy/ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/human.pl csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libbonoboui/trunk/legacy/sources/ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/Makefile csw/mgar/pkg/libbonoboui/trunk/legacy/specs/libbonoboui Added: csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:48:50 UTC (rev 4531) @@ -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/libbonoboui/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/human.pl 2009-04-27 12:48:50 UTC (rev 4531) @@ -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 () { + 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 + +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 + +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/libbonoboui/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:48:50 UTC (rev 4531) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libbonoboui/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/Makefile 2009-04-27 12:48:50 UTC (rev 4531) @@ -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/libbonoboui/trunk/legacy/specs/libbonoboui =================================================================== --- csw/mgar/pkg/libbonoboui/trunk/legacy/specs/libbonoboui (rev 0) +++ csw/mgar/pkg/libbonoboui/trunk/legacy/specs/libbonoboui 2009-04-27 12:48:50 UTC (rev 4531) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libbonoboui,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libbonoboui'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libbonoboui/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - UI code for the GNOME 2 Object Activation Framework", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +touch doc/api/html/index.sgml +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,libglade/2.0/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:06 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4532] csw/mgar/pkg Message-ID: Revision: 4532 http://gar.svn.sourceforge.net/gar/?rev=4532&view=rev Author: dmichelsen Date: 2009-04-27 12:49:06 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libcroco: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libcroco/ csw/mgar/pkg/libcroco/trunk/ csw/mgar/pkg/libcroco/trunk/legacy/ csw/mgar/pkg/libcroco/trunk/legacy/scripts/ csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libcroco/trunk/legacy/scripts/human.pl csw/mgar/pkg/libcroco/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libcroco/trunk/legacy/sources/ csw/mgar/pkg/libcroco/trunk/legacy/sources/libcroco.cr-num.patch csw/mgar/pkg/libcroco/trunk/legacy/specs/ csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile csw/mgar/pkg/libcroco/trunk/legacy/specs/libcroco Added: csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:06 UTC (rev 4532) @@ -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/libcroco/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/scripts/human.pl 2009-04-27 12:49:06 UTC (rev 4532) @@ -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 () { + 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 + +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 + +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/libcroco/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:06 UTC (rev 4532) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libcroco/trunk/legacy/sources/libcroco.cr-num.patch =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/sources/libcroco.cr-num.patch (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/sources/libcroco.cr-num.patch 2009-04-27 12:49:06 UTC (rev 4532) @@ -0,0 +1,19 @@ +--- src/cr-num.c.orig 2004-03-30 04:27:22.687100000 -0500 ++++ src/cr-num.c 2004-03-30 04:29:38.087105000 -0500 +@@ -268,7 +268,15 @@ + g_return_val_if_fail (a_this, FALSE); + + switch (a_this->type) { +- case NUM_LENGTH_EM...NUM_LENGTH_PC: ++ ++ case NUM_LENGTH_EM: ++ case NUM_LENGTH_EX: ++ case NUM_LENGTH_PX: ++ case NUM_LENGTH_IN: ++ case NUM_LENGTH_CM: ++ case NUM_LENGTH_MM: ++ case NUM_LENGTH_PT: ++ case NUM_LENGTH_PC: + result = TRUE; + break; + default: Added: csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/specs/Makefile 2009-04-27 12:49:06 UTC (rev 4532) @@ -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/libcroco/trunk/legacy/specs/libcroco =================================================================== --- csw/mgar/pkg/libcroco/trunk/legacy/specs/libcroco (rev 0) +++ csw/mgar/pkg/libcroco/trunk/legacy/specs/libcroco 2009-04-27 12:49:06 UTC (rev 4532) @@ -0,0 +1,53 @@ +# vim: ft=perl +# $Id: libcroco,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libcroco'; +$version = '0.6.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libcroco/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['libcroco.cr-num.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A CSS parsing and manipulation toolkit", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:22 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:22 +0000 Subject: [csw-devel] SF.net SVN: gar:[4533] csw/mgar/pkg Message-ID: Revision: 4533 http://gar.svn.sourceforge.net/gar/?rev=4533&view=rev Author: dmichelsen Date: 2009-04-27 12:49:21 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgail_gnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgail_gnome/ csw/mgar/pkg/libgail_gnome/trunk/ csw/mgar/pkg/libgail_gnome/trunk/legacy/ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgail_gnome/trunk/legacy/sources/ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/Makefile csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/libgail_gnome Added: csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:21 UTC (rev 4533) @@ -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/libgail_gnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/human.pl 2009-04-27 12:49:21 UTC (rev 4533) @@ -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 () { + 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 + +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 + +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/libgail_gnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:21 UTC (rev 4533) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgail_gnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/Makefile 2009-04-27 12:49:21 UTC (rev 4533) @@ -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/libgail_gnome/trunk/legacy/specs/libgail_gnome =================================================================== --- csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/libgail_gnome (rev 0) +++ csw/mgar/pkg/libgail_gnome/trunk/legacy/specs/libgail_gnome 2009-04-27 12:49:21 UTC (rev 4533) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libgail_gnome,v 1.2 2005/01/23 14:48:43 simigern Exp $ + +$progname = 'libgail-gnome'; +$version = '1.1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgail-gnome/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "libgailgnome", + filename => "libgail_gnome", + name => "libgail_gnome - GNOME Accessibility Implementation Module", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/gtk-2.0/modules/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4534] csw/mgar/pkg Message-ID: Revision: 4534 http://gar.svn.sourceforge.net/gar/?rev=4534&view=rev Author: dmichelsen Date: 2009-04-27 12:49:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnome: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnome/ csw/mgar/pkg/libgnome/trunk/ csw/mgar/pkg/libgnome/trunk/legacy/ csw/mgar/pkg/libgnome/trunk/legacy/scripts/ csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnome/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnome/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnome/trunk/legacy/sources/ csw/mgar/pkg/libgnome/trunk/legacy/specs/ csw/mgar/pkg/libgnome/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnome/trunk/legacy/specs/libgnome Added: csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:36 UTC (rev 4534) @@ -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/libgnome/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/scripts/human.pl 2009-04-27 12:49:36 UTC (rev 4534) @@ -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 () { + 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 + +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 + +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/libgnome/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:36 UTC (rev 4534) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnome/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/specs/Makefile 2009-04-27 12:49:36 UTC (rev 4534) @@ -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/libgnome/trunk/legacy/specs/libgnome =================================================================== --- csw/mgar/pkg/libgnome/trunk/legacy/specs/libgnome (rev 0) +++ csw/mgar/pkg/libgnome/trunk/legacy/specs/libgnome 2009-04-27 12:49:36 UTC (rev 4534) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: libgnome,v 1.10 2005/11/12 19:29:08 simigern Exp $ + +$progname = 'libgnome'; +$version = '2.12.0.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnome/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The main GNOME 2 library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:49:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:49:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4535] csw/mgar/pkg Message-ID: Revision: 4535 http://gar.svn.sourceforge.net/gar/?rev=4535&view=rev Author: dmichelsen Date: 2009-04-27 12:49:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomecanvas: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomecanvas/ csw/mgar/pkg/libgnomecanvas/trunk/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomecanvas/trunk/legacy/sources/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/libgnomecanvas Added: csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:49:51 UTC (rev 4535) @@ -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/libgnomecanvas/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/human.pl 2009-04-27 12:49:51 UTC (rev 4535) @@ -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 () { + 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 + +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 + +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/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:49:51 UTC (rev 4535) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomecanvas/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/Makefile 2009-04-27 12:49:51 UTC (rev 4535) @@ -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/libgnomecanvas/trunk/legacy/specs/libgnomecanvas =================================================================== --- csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/libgnomecanvas (rev 0) +++ csw/mgar/pkg/libgnomecanvas/trunk/legacy/specs/libgnomecanvas 2009-04-27 12:49:51 UTC (rev 4535) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: libgnomecanvas,v 1.11 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomecanvas'; +$version = '2.8.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomecanvas/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Gnome2 Canvas Lib", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs'] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +touch docs/reference/html/index.sgml +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share +#mv ${buildroot}/opt/csw/lib/locale ${buildroot}/opt/csw/share/locale + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:07 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4536] csw/mgar/pkg Message-ID: Revision: 4536 http://gar.svn.sourceforge.net/gar/?rev=4536&view=rev Author: dmichelsen Date: 2009-04-27 12:50:07 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomecups: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomecups/ csw/mgar/pkg/libgnomecups/trunk/ csw/mgar/pkg/libgnomecups/trunk/legacy/ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomecups/trunk/legacy/sources/ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomecups/trunk/legacy/specs/libgnomecups Added: csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:07 UTC (rev 4536) @@ -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/libgnomecups/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/human.pl 2009-04-27 12:50:07 UTC (rev 4536) @@ -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 () { + 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 + +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 + +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/libgnomecups/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:07 UTC (rev 4536) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomecups/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/Makefile 2009-04-27 12:50:07 UTC (rev 4536) @@ -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/libgnomecups/trunk/legacy/specs/libgnomecups =================================================================== --- csw/mgar/pkg/libgnomecups/trunk/legacy/specs/libgnomecups (rev 0) +++ csw/mgar/pkg/libgnomecups/trunk/legacy/specs/libgnomecups 2009-04-27 12:50:07 UTC (rev 4536) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: libgnomecups,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomecups'; +$version = '0.1.13'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomecups/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNOME library for CUPS interaction", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4537] csw/mgar/pkg Message-ID: Revision: 4537 http://gar.svn.sourceforge.net/gar/?rev=4537&view=rev Author: dmichelsen Date: 2009-04-27 12:50:22 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomeprint: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomeprint/ csw/mgar/pkg/libgnomeprint/trunk/ csw/mgar/pkg/libgnomeprint/trunk/legacy/ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomeprint/trunk/legacy/sources/ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/libgnomeprint Added: csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:22 UTC (rev 4537) @@ -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/libgnomeprint/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/human.pl 2009-04-27 12:50:22 UTC (rev 4537) @@ -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 () { + 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 + +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 + +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/libgnomeprint/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:22 UTC (rev 4537) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomeprint/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/Makefile 2009-04-27 12:50:22 UTC (rev 4537) @@ -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/libgnomeprint/trunk/legacy/specs/libgnomeprint =================================================================== --- csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/libgnomeprint (rev 0) +++ csw/mgar/pkg/libgnomeprint/trunk/legacy/specs/libgnomeprint 2009-04-27 12:50:22 UTC (rev 4537) @@ -0,0 +1,61 @@ +# vim: ft=perl +# $Id: libgnomeprint,v 1.10 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomeprint'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomeprint/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The GNOME 2 print library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info + +#tmp remove fuckup +rm intltool-{extract,merge,update} +ln -s /opt/csw/bin/intltool-{extract,merge,update} . + +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share +#mv ${buildroot}/opt/csw/lib/locale ${buildroot}/opt/csw/share/locale + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,libgnomeprint/2.*/modules/*.la,libgnomeprint/2.*/modules/transports/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4538] csw/mgar/pkg Message-ID: Revision: 4538 http://gar.svn.sourceforge.net/gar/?rev=4538&view=rev Author: dmichelsen Date: 2009-04-27 12:50:38 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomeprintui: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomeprintui/ csw/mgar/pkg/libgnomeprintui/trunk/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomeprintui/trunk/legacy/sources/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/libgnomeprintui Added: csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:38 UTC (rev 4538) @@ -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/libgnomeprintui/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/human.pl 2009-04-27 12:50:38 UTC (rev 4538) @@ -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 () { + 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 + +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 + +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/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:38 UTC (rev 4538) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomeprintui/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/Makefile 2009-04-27 12:50:38 UTC (rev 4538) @@ -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/libgnomeprintui/trunk/legacy/specs/libgnomeprintui =================================================================== --- csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/libgnomeprintui (rev 0) +++ csw/mgar/pkg/libgnomeprintui/trunk/legacy/specs/libgnomeprintui 2009-04-27 12:50:38 UTC (rev 4538) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: libgnomeprintui,v 1.9 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgnomeprintui'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomeprintui/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The GNOME 2 print UI library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install +mkdir -p ${buildroot}/opt/csw/share +#mv ${buildroot}/opt/csw/lib/locale ${buildroot}/opt/csw/share/locale + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:50:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:50:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4539] csw/mgar/pkg Message-ID: Revision: 4539 http://gar.svn.sourceforge.net/gar/?rev=4539&view=rev Author: dmichelsen Date: 2009-04-27 12:50:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgnomeui: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgnomeui/ csw/mgar/pkg/libgnomeui/trunk/ csw/mgar/pkg/libgnomeui/trunk/legacy/ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgnomeui/trunk/legacy/sources/ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/Makefile csw/mgar/pkg/libgnomeui/trunk/legacy/specs/libgnomeui Added: csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:50:53 UTC (rev 4539) @@ -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/libgnomeui/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/human.pl 2009-04-27 12:50:53 UTC (rev 4539) @@ -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 () { + 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 + +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 + +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/libgnomeui/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:50:53 UTC (rev 4539) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgnomeui/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/Makefile 2009-04-27 12:50:53 UTC (rev 4539) @@ -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/libgnomeui/trunk/legacy/specs/libgnomeui =================================================================== --- csw/mgar/pkg/libgnomeui/trunk/legacy/specs/libgnomeui (rev 0) +++ csw/mgar/pkg/libgnomeui/trunk/legacy/specs/libgnomeui 2009-04-27 12:50:53 UTC (rev 4539) @@ -0,0 +1,61 @@ +# vim: ft=perl +# $Id: libgnomeui,v 1.16 2005/11/19 11:42:55 simigern Exp $ + +$progname = 'libgnomeui'; +$version = '2.12.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgnomeui/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The main GNOME 2 UI library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +touch doc/reference/html/index.sgml +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,lib/libglade/2.0/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +#We don't want static libs says Phil +rm -f ${buildroot}/opt/csw/lib/libgnomeui-2.a +rm -f ${buildroot}/opt/csw/lib/gtk-2.0/2.4.0/filesystems/libgnome-vfs.a +rm -f ${buildroot}/opt/csw/lib/libglade/2.0/libgnome.a + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:12 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4540] csw/mgar/pkg Message-ID: Revision: 4540 http://gar.svn.sourceforge.net/gar/?rev=4540&view=rev Author: dmichelsen Date: 2009-04-27 12:51:12 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libgtop: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libgtop/ csw/mgar/pkg/libgtop/trunk/ csw/mgar/pkg/libgtop/trunk/legacy/ csw/mgar/pkg/libgtop/trunk/legacy/scripts/ csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libgtop/trunk/legacy/scripts/human.pl csw/mgar/pkg/libgtop/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libgtop/trunk/legacy/sources/ csw/mgar/pkg/libgtop/trunk/legacy/specs/ csw/mgar/pkg/libgtop/trunk/legacy/specs/Makefile csw/mgar/pkg/libgtop/trunk/legacy/specs/libgtop Added: csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:12 UTC (rev 4540) @@ -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/libgtop/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/scripts/human.pl 2009-04-27 12:51:12 UTC (rev 4540) @@ -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 () { + 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 + +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 + +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/libgtop/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:12 UTC (rev 4540) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libgtop/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/specs/Makefile 2009-04-27 12:51:12 UTC (rev 4540) @@ -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/libgtop/trunk/legacy/specs/libgtop =================================================================== --- csw/mgar/pkg/libgtop/trunk/legacy/specs/libgtop (rev 0) +++ csw/mgar/pkg/libgtop/trunk/legacy/specs/libgtop 2009-04-27 12:51:12 UTC (rev 4540) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: libgtop,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libgtop'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libgtop/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - library that fetches system related information", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$attributes{'/opt/csw/bin/libgtop_server2'} = ({user => 'root', group => 'sys', perm => '2755'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install +rm ${buildroot}/opt/csw/share/info/dir + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4541] csw/mgar/pkg Message-ID: Revision: 4541 http://gar.svn.sourceforge.net/gar/?rev=4541&view=rev Author: dmichelsen Date: 2009-04-27 12:51:26 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libidl: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libidl/ csw/mgar/pkg/libidl/trunk/ csw/mgar/pkg/libidl/trunk/legacy/ csw/mgar/pkg/libidl/trunk/legacy/scripts/ csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libidl/trunk/legacy/scripts/human.pl csw/mgar/pkg/libidl/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libidl/trunk/legacy/sources/ csw/mgar/pkg/libidl/trunk/legacy/specs/ csw/mgar/pkg/libidl/trunk/legacy/specs/Makefile csw/mgar/pkg/libidl/trunk/legacy/specs/libidl Added: csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:26 UTC (rev 4541) @@ -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/libidl/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/scripts/human.pl 2009-04-27 12:51:26 UTC (rev 4541) @@ -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 () { + 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 + +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 + +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/libidl/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:26 UTC (rev 4541) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libidl/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/specs/Makefile 2009-04-27 12:51:26 UTC (rev 4541) @@ -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/libidl/trunk/legacy/specs/libidl =================================================================== --- csw/mgar/pkg/libidl/trunk/legacy/specs/libidl (rev 0) +++ csw/mgar/pkg/libidl/trunk/legacy/specs/libidl 2009-04-27 12:51:26 UTC (rev 4541) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: libidl,v 1.4 2005/11/15 21:31:14 simigern Exp $ + +$progname = 'libidl'; +$version = '0.8.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libIDL/ packaged for CSW by Michael Gernoth'; + + at sources = ("libIDL-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Library for handling CORBA IDL", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "libIDL-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export CPP=/usr/lib/cpp +cd libIDL-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults +rm -rf ${buildroot}/opt/csw/share/info/dir + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4542] csw/mgar/pkg Message-ID: Revision: 4542 http://gar.svn.sourceforge.net/gar/?rev=4542&view=rev Author: dmichelsen Date: 2009-04-27 12:51:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libmad: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libmad/ csw/mgar/pkg/libmad/trunk/ csw/mgar/pkg/libmad/trunk/legacy/ csw/mgar/pkg/libmad/trunk/legacy/scripts/ csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libmad/trunk/legacy/scripts/human.pl csw/mgar/pkg/libmad/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libmad/trunk/legacy/sources/ csw/mgar/pkg/libmad/trunk/legacy/sources/libmad-pkgconfig.patch csw/mgar/pkg/libmad/trunk/legacy/specs/ csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile csw/mgar/pkg/libmad/trunk/legacy/specs/libmad Added: csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:42 UTC (rev 4542) @@ -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/libmad/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/scripts/human.pl 2009-04-27 12:51:42 UTC (rev 4542) @@ -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 () { + 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 + +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 + +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/libmad/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:42 UTC (rev 4542) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libmad/trunk/legacy/sources/libmad-pkgconfig.patch =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/sources/libmad-pkgconfig.patch (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/sources/libmad-pkgconfig.patch 2009-04-27 12:51:42 UTC (rev 4542) @@ -0,0 +1,14 @@ +--- /dev/null 2004-02-20 13:03:35.000000000 +0100 ++++ mad.pc 2003-10-22 04:44:10.000000000 +0200 +@@ -0,0 +1,11 @@ ++prefix=/opt/csw ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: mad ++Description: MPEG Audio Decoder ++Requires: ++Version: 0.15.1b ++Libs: -L${libdir} -lmad -lm ++Cflags: -I${includedir} Added: csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/specs/Makefile 2009-04-27 12:51:42 UTC (rev 4542) @@ -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/libmad/trunk/legacy/specs/libmad =================================================================== --- csw/mgar/pkg/libmad/trunk/legacy/specs/libmad (rev 0) +++ csw/mgar/pkg/libmad/trunk/legacy/specs/libmad 2009-04-27 12:51:42 UTC (rev 4542) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: libmad,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libmad'; +$version = '0.15.1'; +my $addver = 'b'; +$suffix = "_rev=${addver}"; + +$buildroot = "${builddir}/${progname}-${version}${addver}-buildroot"; + +$category = 'system'; +$vendor = 'http://www.underbit.com/products/mad/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}${addver}.tar.gz"); + + at patches = (['libmad-pkgconfig.patch', "${progname}-${version}${addver}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - MPEG Audio Decoder", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}${addver}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-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}${addver} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +mkdir -p ${buildroot}/opt/csw/lib/pkgconfig +cp mad.pc ${buildroot}/opt/csw/lib/pkgconfig/ +chmod 644 ${buildroot}/opt/csw/lib/pkgconfig/mad.pc +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:51:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:51:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4543] csw/mgar/pkg Message-ID: Revision: 4543 http://gar.svn.sourceforge.net/gar/?rev=4543&view=rev Author: dmichelsen Date: 2009-04-27 12:51:58 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libpango: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libpango/ csw/mgar/pkg/libpango/trunk/ csw/mgar/pkg/libpango/trunk/legacy/ csw/mgar/pkg/libpango/trunk/legacy/scripts/ csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libpango/trunk/legacy/scripts/human.pl csw/mgar/pkg/libpango/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libpango/trunk/legacy/sources/ csw/mgar/pkg/libpango/trunk/legacy/sources/libpango.postinstall csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch csw/mgar/pkg/libpango/trunk/legacy/specs/ csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile csw/mgar/pkg/libpango/trunk/legacy/specs/libpango Added: csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:51:58 UTC (rev 4543) @@ -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/libpango/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/scripts/human.pl 2009-04-27 12:51:58 UTC (rev 4543) @@ -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 () { + 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 + +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 + +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/libpango/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:51:58 UTC (rev 4543) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libpango/trunk/legacy/sources/libpango.postinstall =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/sources/libpango.postinstall (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/sources/libpango.postinstall 2009-04-27 12:51:58 UTC (rev 4543) @@ -0,0 +1,10 @@ +#!/bin/sh + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +echo 'Updating pango.modules...' +test -x ${PKG_ROOT_DIR}/opt/csw/bin/pango-querymodules && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/pango-querymodules >/opt/csw/etc/pango/pango.modules + +/bin/true Added: csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/sources/pango.glib.patch 2009-04-27 12:51:58 UTC (rev 4543) @@ -0,0 +1,11 @@ +--- pango/opentype/Makefile.in.orig 2004-09-13 17:40:17.000000000 -0400 ++++ pango/opentype/Makefile.in 2004-12-07 04:39:20.167073000 -0500 +@@ -278,7 +278,7 @@ + + ottest_LDADD = \ + libpango-ot.la \ +- $(FREETYPE_LIBS) ++ $(FREETYPE_LIBS) -lglib + + + EXTRA_DIST = \ Added: csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/specs/Makefile 2009-04-27 12:51:58 UTC (rev 4543) @@ -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/libpango/trunk/legacy/specs/libpango =================================================================== --- csw/mgar/pkg/libpango/trunk/legacy/specs/libpango (rev 0) +++ csw/mgar/pkg/libpango/trunk/legacy/specs/libpango 2009-04-27 12:51:58 UTC (rev 4543) @@ -0,0 +1,59 @@ +# vim: ft=perl +# $Id: libpango,v 1.10 2005/12/15 15:13:49 simigern Exp $ + +$progname = 'pango'; +$version = '1.10.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/pango packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['pango.glib.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "pango", + filename => "libpango", + name => "libpango - Library for laying out and rendering text", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'], + postinstall => "libpango.postinstall" + }); + +#$suffix='.01'; + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsunmath' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +/opt/csw/bin/gsed -i -e 's|have_cairo=true|have_cairo=false|g' configure +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,pango/1.*/modules/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:52:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:52:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4544] csw/mgar/pkg/librsvg/trunk Message-ID: Revision: 4544 http://gar.svn.sourceforge.net/gar/?rev=4544&view=rev Author: dmichelsen Date: 2009-04-27 12:52:13 +0000 (Mon, 27 Apr 2009) Log Message: ----------- librsvg: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/librsvg/trunk/legacy/ csw/mgar/pkg/librsvg/trunk/legacy/scripts/ csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/librsvg/trunk/legacy/scripts/human.pl csw/mgar/pkg/librsvg/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/librsvg/trunk/legacy/sources/ csw/mgar/pkg/librsvg/trunk/legacy/sources/librsvg.postinstall csw/mgar/pkg/librsvg/trunk/legacy/specs/ csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile csw/mgar/pkg/librsvg/trunk/legacy/specs/librsvg Added: csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:52:13 UTC (rev 4544) @@ -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/librsvg/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/scripts/human.pl 2009-04-27 12:52:13 UTC (rev 4544) @@ -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 () { + 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 + +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 + +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/librsvg/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:52:13 UTC (rev 4544) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/librsvg/trunk/legacy/sources/librsvg.postinstall =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/sources/librsvg.postinstall (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/sources/librsvg.postinstall 2009-04-27 12:52:13 UTC (rev 4544) @@ -0,0 +1,11 @@ +#!/bin/sh + +echo 'Updating gdk-pixbuf.loaders...' + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +test -x ${PKG_ROOT_DIR}/opt/csw/bin/gdk-pixbuf-query-loaders && chroot "${PKG_ROOT_DIR}" /opt/csw/bin/gdk-pixbuf-query-loaders >/opt/csw/etc/gtk-2.0/gdk-pixbuf.loaders + +/bin/true Added: csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/specs/Makefile 2009-04-27 12:52:13 UTC (rev 4544) @@ -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/librsvg/trunk/legacy/specs/librsvg =================================================================== --- csw/mgar/pkg/librsvg/trunk/legacy/specs/librsvg (rev 0) +++ csw/mgar/pkg/librsvg/trunk/legacy/specs/librsvg 2009-04-27 12:52:13 UTC (rev 4544) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: librsvg,v 1.8 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'librsvg'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://librsvg.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Scalable Vector Graphics library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'librsvg.postinstall', + postremove => 'librsvg.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo "all:" >moz-plugin/Makefile +gmake || exit 1 +echo "install:" >moz-plugin/Makefile +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/{*.la,gtk-2.0/*/*/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:52:29 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:52:29 +0000 Subject: [csw-devel] SF.net SVN: gar:[4545] csw/mgar/pkg Message-ID: Revision: 4545 http://gar.svn.sourceforge.net/gar/?rev=4545&view=rev Author: dmichelsen Date: 2009-04-27 12:52:28 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libsoup: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libsoup/ csw/mgar/pkg/libsoup/trunk/ csw/mgar/pkg/libsoup/trunk/legacy/ csw/mgar/pkg/libsoup/trunk/legacy/scripts/ csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libsoup/trunk/legacy/scripts/human.pl csw/mgar/pkg/libsoup/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libsoup/trunk/legacy/sources/ csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup-gnutls.patch csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch csw/mgar/pkg/libsoup/trunk/legacy/specs/ csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile csw/mgar/pkg/libsoup/trunk/legacy/specs/libsoup Added: csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:52:28 UTC (rev 4545) @@ -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/libsoup/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/scripts/human.pl 2009-04-27 12:52:28 UTC (rev 4545) @@ -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 () { + 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 + +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 + +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/libsoup/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:52:28 UTC (rev 4545) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libsoup/trunk/legacy/sources/libsoup-gnutls.patch =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup-gnutls.patch (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup-gnutls.patch 2009-04-27 12:52:28 UTC (rev 4545) @@ -0,0 +1,11 @@ +--- libsoup/soup-gnutls.c.orig 2004-05-21 14:46:37.397102000 -0400 ++++ libsoup/soup-gnutls.c 2004-05-21 14:46:56.477037000 -0400 +@@ -77,7 +77,7 @@ + + if (status & GNUTLS_CERT_INVALID || + status & GNUTLS_CERT_NOT_TRUSTED || +- status & GNUTLS_CERT_CORRUPTED || ++ /* status & GNUTLS_CERT_CORRUPTED || */ + status & GNUTLS_CERT_REVOKED) + { + g_warning ("The certificate is not trusted."); Added: csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/sources/libsoup2-dns.patch 2009-04-27 12:52:28 UTC (rev 4545) @@ -0,0 +1,52 @@ +--- libsoup/soup-dns.c.orig Sun Oct 17 14:46:06 2004 ++++ libsoup/soup-dns.c Sun Oct 17 14:57:30 2004 +@@ -199,7 +199,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -208,12 +209,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL ) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) +@@ -286,7 +287,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -297,12 +299,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) Added: csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/specs/Makefile 2009-04-27 12:52:28 UTC (rev 4545) @@ -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/libsoup/trunk/legacy/specs/libsoup =================================================================== --- csw/mgar/pkg/libsoup/trunk/legacy/specs/libsoup (rev 0) +++ csw/mgar/pkg/libsoup/trunk/legacy/specs/libsoup 2009-04-27 12:52:28 UTC (rev 4545) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: libsoup,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libsoup'; +$version = '1.99.26'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libsoup/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['libsoup-gnutls.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - HTTP library implementation", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:52:45 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:52:45 +0000 Subject: [csw-devel] SF.net SVN: gar:[4546] csw/mgar/pkg Message-ID: Revision: 4546 http://gar.svn.sourceforge.net/gar/?rev=4546&view=rev Author: dmichelsen Date: 2009-04-27 12:52:44 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libsoup2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libsoup2/ csw/mgar/pkg/libsoup2/trunk/ csw/mgar/pkg/libsoup2/trunk/legacy/ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libsoup2/trunk/legacy/scripts/human.pl csw/mgar/pkg/libsoup2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libsoup2/trunk/legacy/sources/ csw/mgar/pkg/libsoup2/trunk/legacy/sources/libsoup2-dns.patch csw/mgar/pkg/libsoup2/trunk/legacy/specs/ csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile csw/mgar/pkg/libsoup2/trunk/legacy/specs/libsoup2 Added: csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:52:44 UTC (rev 4546) @@ -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/libsoup2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/human.pl 2009-04-27 12:52:44 UTC (rev 4546) @@ -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 () { + 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 + +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 + +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/libsoup2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:52:44 UTC (rev 4546) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libsoup2/trunk/legacy/sources/libsoup2-dns.patch =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/sources/libsoup2-dns.patch (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/sources/libsoup2-dns.patch 2009-04-27 12:52:44 UTC (rev 4546) @@ -0,0 +1,52 @@ +--- libsoup/soup-dns.c.orig Sun Oct 17 14:46:06 2004 ++++ libsoup/soup-dns.c Sun Oct 17 14:57:30 2004 +@@ -199,7 +199,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -208,12 +209,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL ) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) +@@ -286,7 +287,8 @@ + #elif defined(HAVE_GETHOSTBYNAME_R_SOLARIS) + { + size_t len; +- int herr, res; ++ int herr; ++ struct hostent *res; + + len = 1024; + buf = g_new (char, len); +@@ -297,12 +299,12 @@ + &result_buf, + buf, + len, +- &herr)) == ERANGE) { ++ &herr)) == NULL && herr == ERANGE) { + len *= 2; + buf = g_renew (char, buf, len); + } + +- if (res) ++ if (res == NULL) + result = NULL; + } + #elif defined(HAVE_GETHOSTBYNAME_R_HPUX) Added: csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/specs/Makefile 2009-04-27 12:52:44 UTC (rev 4546) @@ -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/libsoup2/trunk/legacy/specs/libsoup2 =================================================================== --- csw/mgar/pkg/libsoup2/trunk/legacy/specs/libsoup2 (rev 0) +++ csw/mgar/pkg/libsoup2/trunk/legacy/specs/libsoup2 2009-04-27 12:52:44 UTC (rev 4546) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: libsoup2,v 1.8 2005/03/26 13:21:54 simigern Exp $ + +$progname = 'libsoup2'; +$version = '2.2.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libsoup/ packaged for CSW by Michael Gernoth'; + + at patches = (['libsoup2-dns.patch', "libsoup-${version}", '-p0']); + + at sources = ("libsoup-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - HTTP library implementation", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "libsoup-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd libsoup-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:01 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:01 +0000 Subject: [csw-devel] SF.net SVN: gar:[4547] csw/mgar/pkg Message-ID: Revision: 4547 http://gar.svn.sourceforge.net/gar/?rev=4547&view=rev Author: dmichelsen Date: 2009-04-27 12:53:00 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libwnck: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libwnck/ csw/mgar/pkg/libwnck/trunk/ csw/mgar/pkg/libwnck/trunk/legacy/ csw/mgar/pkg/libwnck/trunk/legacy/scripts/ csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libwnck/trunk/legacy/scripts/human.pl csw/mgar/pkg/libwnck/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libwnck/trunk/legacy/sources/ csw/mgar/pkg/libwnck/trunk/legacy/specs/ csw/mgar/pkg/libwnck/trunk/legacy/specs/Makefile csw/mgar/pkg/libwnck/trunk/legacy/specs/libwnck Added: csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:00 UTC (rev 4547) @@ -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/libwnck/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/scripts/human.pl 2009-04-27 12:53:00 UTC (rev 4547) @@ -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 () { + 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 + +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 + +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/libwnck/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:00 UTC (rev 4547) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libwnck/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/specs/Makefile 2009-04-27 12:53:00 UTC (rev 4547) @@ -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/libwnck/trunk/legacy/specs/libwnck =================================================================== --- csw/mgar/pkg/libwnck/trunk/legacy/specs/libwnck (rev 0) +++ csw/mgar/pkg/libwnck/trunk/legacy/specs/libwnck 2009-04-27 12:53:00 UTC (rev 4547) @@ -0,0 +1,53 @@ +# vim: ft=perl +# $Id: libwnck,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libwnck'; +$version = '2.8.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/libwnck/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Window Navigator Construction Kit", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:16 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4548] csw/mgar/pkg Message-ID: Revision: 4548 http://gar.svn.sourceforge.net/gar/?rev=4548&view=rev Author: dmichelsen Date: 2009-04-27 12:53:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libxft2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libxft2/ csw/mgar/pkg/libxft2/trunk/ csw/mgar/pkg/libxft2/trunk/legacy/ csw/mgar/pkg/libxft2/trunk/legacy/scripts/ csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libxft2/trunk/legacy/scripts/human.pl csw/mgar/pkg/libxft2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libxft2/trunk/legacy/sources/ csw/mgar/pkg/libxft2/trunk/legacy/specs/ csw/mgar/pkg/libxft2/trunk/legacy/specs/Makefile csw/mgar/pkg/libxft2/trunk/legacy/specs/libxft2 Added: csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:15 UTC (rev 4548) @@ -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/libxft2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/scripts/human.pl 2009-04-27 12:53:15 UTC (rev 4548) @@ -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 () { + 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 + +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 + +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/libxft2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:15 UTC (rev 4548) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libxft2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/specs/Makefile 2009-04-27 12:53:15 UTC (rev 4548) @@ -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/libxft2/trunk/legacy/specs/libxft2 =================================================================== --- csw/mgar/pkg/libxft2/trunk/legacy/specs/libxft2 (rev 0) +++ csw/mgar/pkg/libxft2/trunk/legacy/specs/libxft2 2009-04-27 12:53:15 UTC (rev 4548) @@ -0,0 +1,53 @@ +# vim: ft=perl +# $Id: libxft2,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'libXft'; +$version = '2.1.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://pdx.freedesktop.org/~xlibs/release/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "libxft2", + filename => "libxft2", + name => "libxft2 - FreeType-based font drawing library for X", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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/freetype2 -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include/freetype2 -I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*michael[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4549] csw/mgar/pkg Message-ID: Revision: 4549 http://gar.svn.sourceforge.net/gar/?rev=4549&view=rev Author: dmichelsen Date: 2009-04-27 12:53:32 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libxklavier: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libxklavier/ csw/mgar/pkg/libxklavier/trunk/ csw/mgar/pkg/libxklavier/trunk/legacy/ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libxklavier/trunk/legacy/scripts/human.pl csw/mgar/pkg/libxklavier/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libxklavier/trunk/legacy/sources/ csw/mgar/pkg/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch csw/mgar/pkg/libxklavier/trunk/legacy/specs/ csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile csw/mgar/pkg/libxklavier/trunk/legacy/specs/libxklavier Added: csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:32 UTC (rev 4549) @@ -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/libxklavier/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/human.pl 2009-04-27 12:53:32 UTC (rev 4549) @@ -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 () { + 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 + +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 + +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/libxklavier/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:32 UTC (rev 4549) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/sources/libxklavier-xklavier_config_xkb.patch 2009-04-27 12:53:32 UTC (rev 4549) @@ -0,0 +1,11 @@ +--- libxklavier/xklavier_config_xkb.c.old 2004-06-12 08:07:43.210000000 -0400 ++++ libxklavier/xklavier_config_xkb.c 2004-06-12 08:07:53.659999000 -0400 +@@ -32,6 +32,8 @@ + static XkbComponentNamesRec componentNames; + #endif + ++#define XKB_RF_NAMES_PROP_ATOM 4 ++ + static char *locale; + + static char* _XklGetRulesSet( void ) Added: csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/specs/Makefile 2009-04-27 12:53:32 UTC (rev 4549) @@ -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/libxklavier/trunk/legacy/specs/libxklavier =================================================================== --- csw/mgar/pkg/libxklavier/trunk/legacy/specs/libxklavier (rev 0) +++ csw/mgar/pkg/libxklavier/trunk/legacy/specs/libxklavier 2009-04-27 12:53:32 UTC (rev 4549) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: libxklavier,v 1.4 2005/03/27 10:12:07 simigern Exp $ + +$progname = 'libxklavier'; +$version = '1.04'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/LibXklavier packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['libxklavier-xklavier_config_xkb.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An XKB foundation library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/openwin/lib -R/usr/openwin/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -L/usr/openwin/lib -R/usr/openwin/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:53:48 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:53:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4550] csw/mgar/pkg Message-ID: Revision: 4550 http://gar.svn.sourceforge.net/gar/?rev=4550&view=rev Author: dmichelsen Date: 2009-04-27 12:53:47 +0000 (Mon, 27 Apr 2009) Log Message: ----------- libxrender: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/libxrender/ csw/mgar/pkg/libxrender/trunk/ csw/mgar/pkg/libxrender/trunk/legacy/ csw/mgar/pkg/libxrender/trunk/legacy/scripts/ csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/libxrender/trunk/legacy/scripts/human.pl csw/mgar/pkg/libxrender/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/libxrender/trunk/legacy/sources/ csw/mgar/pkg/libxrender/trunk/legacy/specs/ csw/mgar/pkg/libxrender/trunk/legacy/specs/Makefile csw/mgar/pkg/libxrender/trunk/legacy/specs/libxrender Added: csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:53:47 UTC (rev 4550) @@ -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/libxrender/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/scripts/human.pl 2009-04-27 12:53:47 UTC (rev 4550) @@ -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 () { + 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 + +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 + +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/libxrender/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:53:47 UTC (rev 4550) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/libxrender/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/specs/Makefile 2009-04-27 12:53:47 UTC (rev 4550) @@ -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/libxrender/trunk/legacy/specs/libxrender =================================================================== --- csw/mgar/pkg/libxrender/trunk/legacy/specs/libxrender (rev 0) +++ csw/mgar/pkg/libxrender/trunk/legacy/specs/libxrender 2009-04-27 12:53:47 UTC (rev 4550) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: libxrender,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'xrender'; +$version = '0.8.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/fontconfig/releases/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "libxrender", + filename => "libxrender", + name => "libxrender - fontconfig.org Xrender library", + dependencies => ['CSWcommon','CSWrenderdev'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4551] csw/mgar/pkg Message-ID: Revision: 4551 http://gar.svn.sourceforge.net/gar/?rev=4551&view=rev Author: dmichelsen Date: 2009-04-27 12:54:02 +0000 (Mon, 27 Apr 2009) Log Message: ----------- metacity: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/metacity/ csw/mgar/pkg/metacity/trunk/ csw/mgar/pkg/metacity/trunk/legacy/ csw/mgar/pkg/metacity/trunk/legacy/scripts/ csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/metacity/trunk/legacy/scripts/human.pl csw/mgar/pkg/metacity/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/metacity/trunk/legacy/sources/ csw/mgar/pkg/metacity/trunk/legacy/sources/xinerama.h.patch csw/mgar/pkg/metacity/trunk/legacy/specs/ csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile csw/mgar/pkg/metacity/trunk/legacy/specs/metacity Added: csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:02 UTC (rev 4551) @@ -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/metacity/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/scripts/human.pl 2009-04-27 12:54:02 UTC (rev 4551) @@ -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 () { + 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 + +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 + +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/metacity/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:02 UTC (rev 4551) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/metacity/trunk/legacy/sources/xinerama.h.patch =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/sources/xinerama.h.patch (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/sources/xinerama.h.patch 2009-04-27 12:54:02 UTC (rev 4551) @@ -0,0 +1,46 @@ +--- /dev/null 2004-06-25 18:29:26.000000000 +0200 ++++ xinerama.h 2002-04-06 07:55:15.000000000 +0200 +@@ -0,0 +1,43 @@ ++/****************************************************************** ++ ++ Copyright 1990, 1991, by Sun Microsystems, Inc. ++ ++Permission to use, copy, modify, distribute, and sell this software ++and its documentation for any purpose is hereby granted without fee, ++provided that the above copyright notice appear in all copies and ++that both that copyright notice and this permission notice appear ++in supporting documentation, and that the name of Sun Microsystems, Inc. ++not be used in advertising or publicity pertaining to distribution ++of the software without specific, written prior permission. ++Sun Microsystems, Inc. makes no representations about the suitability of ++this software for any purpose. It is provided "as is" without ++express or implied warranty. ++ ++Sun Microsystems Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS ++SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, ++IN NO EVENT SHALL Sun Microsystems, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT ++OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS ++OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE ++OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ++OR PERFORMANCE OF THIS SOFTWARE. ++ ++ Author: John McKernan (jmck at Sun.COM) ++ Sun Microsystems, Inc. ++******************************************************************/ ++ ++/* Xinerama header file */ ++ ++#ifndef _XINERAMA_H_ ++#define _XINERAMA_H_ ++ ++#define MAXFRAMEBUFFERS 16 ++#define XINERAMA_PLACE_TOP 1 ++#define XINERAMA_PLACE_BOTTOM 2 ++#define XINERAMA_PLACE_RIGHT 4 ++#define XINERAMA_PLACE_LEFT 8 ++ ++Bool XineramaGetState(Display*, int); ++Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*); ++Status XineramaGetCenterHint(Display*, int, int*, int*); ++ ++#endif /* _XINERAMA_H_ */ Added: csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/specs/Makefile 2009-04-27 12:54:02 UTC (rev 4551) @@ -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/metacity/trunk/legacy/specs/metacity =================================================================== --- csw/mgar/pkg/metacity/trunk/legacy/specs/metacity (rev 0) +++ csw/mgar/pkg/metacity/trunk/legacy/specs/metacity 2009-04-27 12:54:02 UTC (rev 4551) @@ -0,0 +1,58 @@ +# vim: ft=perl +# $Id: metacity,v 1.12 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'metacity'; +$version = '2.8.8'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/metacity/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['xinerama.h.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A light-weight window manager for GNOME", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -I${builddir}/${progname}-${version}" +export CPPFLAGS='-I/opt/csw/include -I${builddir}/${progname}-${version}' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +mkdir -p X11/extensions +mv xinerama.h X11/extensions/ +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:19 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4552] csw/mgar/pkg Message-ID: Revision: 4552 http://gar.svn.sourceforge.net/gar/?rev=4552&view=rev Author: dmichelsen Date: 2009-04-27 12:54:19 +0000 (Mon, 27 Apr 2009) Log Message: ----------- mgetty: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/mgetty/ csw/mgar/pkg/mgetty/trunk/ csw/mgar/pkg/mgetty/trunk/legacy/ csw/mgar/pkg/mgetty/trunk/legacy/scripts/ csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/mgetty/trunk/legacy/scripts/human.pl csw/mgar/pkg/mgetty/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/mgetty/trunk/legacy/sources/ csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty-policy.h.patch csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall csw/mgar/pkg/mgetty/trunk/legacy/specs/ csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile csw/mgar/pkg/mgetty/trunk/legacy/specs/mgetty Added: csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:19 UTC (rev 4552) @@ -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/mgetty/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/scripts/human.pl 2009-04-27 12:54:19 UTC (rev 4552) @@ -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 () { + 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 + +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 + +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/mgetty/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:19 UTC (rev 4552) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/mgetty/trunk/legacy/sources/mgetty-policy.h.patch =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty-policy.h.patch (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty-policy.h.patch 2009-04-27 12:54:19 UTC (rev 4552) @@ -0,0 +1,603 @@ +--- /dev/null 2004-04-14 21:21:29.000000000 +0200 ++++ policy.h 2004-04-14 21:24:02.851346000 +0200 +@@ -0,0 +1,600 @@ ++#ident "$Id: policy.h,v 4.19 2002/12/05 11:52:42 gert Exp $ Copyright (c) Gert Doering" ++ ++/* this is the file where all configuration defaults for mgetty / sendfax ++ * are specified. ++ * ++ * defaults are used if no values are given in the config file(s). ++ * config file values can be overridden by command line options. ++ * ++ * see mgetty.texi/mgetty.info for a description of the configuration files. ++ */ ++ ++/* main mgetty configuration file ++ */ ++#define MGETTY_CONFIG "mgetty.config" ++ ++/* sendfax configuration file ++ * ++ * if path doesn't start with "/", it's relative to CONFDIR (Makefile) ++ * if not defined, no configuration file is read (saves a few kbytes) ++ */ ++#define SENDFAX_CONFIG "sendfax.config" ++ ++ ++/* login dispatcher config file (for mgetty) ++ * ++ * In this file, you can configure which "login" program (default /bin/login) ++ * to call for what user name. ++ * ++ * You could use it to call "uucico" for all users starting with "U*" ++ * (works only with Taylor UUCP 1.04 with my patch), or to call a fido ++ * mailer for fido calls (only if -DFIDO defined)... ++ * See the samples in the example login.config file (built from login.cfg.in). ++ * ++ * WARNING: make sure that this file isn't world-accessable (SECURITY!) ++ * ++ * If you want to call /bin/login in any case, do not define this ++ * ++ * If this doesn't start with "/", it's relative to CONFDIR. ++ */ ++#define LOGIN_CFG_FILE "login.config" ++ ++/* default login program ++ * ++ * If LOGIN_CFG_FILE is not defined, or does not exist, or doesn't ++ * have a default entry, this program is called for user logins. ++ * Normally, this is "/bin/login", just a few systems put "login" ++ * elsewhere (e.g. Free/NetBSD in "/usr/bin/login"). ++ */ ++#define DEFAULT_LOGIN_PROGRAM "/bin/login" ++ ++ ++/* callback config file ++ * ++ * this file controls the operation of the optional "callback" program. ++ * how callback works, is explained in detail in mgetty.texi. You need ++ * to set LOGIN_CFG_FILE (see above) to use callback from mgetty. ++ * ++ * If this path does not start with "/", it's relative to CONFDIR. ++ */ ++#define CALLBACK_CONFIG "callback.config" ++ ++ ++/* if this file exists, it can be used to control what callers ++ * are allowed in. If undefined, the functionality is omitted. ++ * It will work only if your modem supports it. Check the modem manual. ++ * For Rockwell-Based modems, add #CID=1 to MODEM_INIT_STRING, for ++ * ZyXELs use S40.2=1. ++ * If the path doesn't start with "/", it's relative to CONFDIR. ++ */ ++#define CNDFILE "dialin.config" ++ ++ ++/* If you want to use /etc/gettydefs to set tty flags, define this ++ * I recommend against it, I suspect some bugs lingering in that code ++ * (and one doesn't really need it in a normal setup anyway). ++ */ ++/* #define USE_GETTYDEFS */ ++ ++/* Name of the "gettydefs" file (used only if USE_GETTYDEFS is set) ++ */ ++#define GETTYDEFS "/etc/gettydefs" ++ ++/* If no gettydefs "tag" is specified on the command line, use ++ * this setting (from GETTYDEFS) as default (only if compiled with ++ * USE_GETTYDEFS set) ++ */ ++#define GETTYDEFS_DEFAULT_TAG "n" ++ ++ ++/* access modes */ ++ ++/* user id of the "uucp" user. The tty device will be owned by this user, ++ * so parallel dial-out of uucico will be possible ++ */ ++#define DEVICE_OWNER "uucp" ++/* group id that the device is chown()ed to. If not defined, the ++ * primary group of "DEVICE_OWNER" is used. ++ */ ++#define DEVICE_GROUP "uucp" ++ ++/* access mode for the line while getty has it - it should be accessible ++ * by uucp / uucp, but not by others (imagine someone dialing into your ++ * system and using another modem to dial to another country...) ++ */ ++#define FILE_MODE 0660 ++ ++/* security: optionally, mgetty can system() this, to kill any dangling ++ * processes on the current tty. A %s is replaced with the tty device. ++ * ++ * Under most circumstances, this is not needed. You might want ++ * to use it if you offer dial-in services with shell accounts to people ++ * that you don't trust (they might try to abuse your modems, and this ++ * will stop a number of attacks). ++ */ ++/* #define EXEC_FUSER "exec fuser -k -f %s >/dev/null 2>&1" */ ++ ++ ++/* logging */ ++ ++/* system console - if a severe error happens at startup, mgetty writes ++ * a message to this file and aborts ++ * On SCO, this may be /dev/syscon! ++ */ ++#define CONSOLE "/dev/console" ++ ++/* Name of the mgetty log file ++ * e.g. "/usr/spool/log/mgetty.log.%s" or "/tmp/log_mg.%s" ++ * a "%s" will be replaced by the device name, e.g. "tty2a" ++ * ++ * if the directory does not exist, the log file goes to CONSOLE (!) ++ */ ++#define LOG_PATH "/opt/csw/var/log/mgetty.%s" ++ ++/* Default log error level threshold. Possible error levels are ++ * L_FATAL, L_ERROR, L_AUDIT, L_WARN, L_MESG, L_NOISE, L_JUNK (see mgetty.h) ++ */ ++#define LOG_LEVEL L_MESG ++ ++/* Whether "\n"s in the modem response should start a new line ++ * in the logfile ++ */ ++/* #define LOG_CR_NEWLINE */ ++ ++/* System administrator - if a severe error happens (lprintf called ++ * with log_level L_FATAL) and writing to CONSOLE is not possible, ++ * the logfile will be mailed to him ++ */ ++#define ADMIN "root" ++ ++/* Syslog ++ * ++ * If you want logging messages of type L_AUDIT, L_ERROR and L_FATAL ++ * to go to the "syslog", define this. ++ * mgetty will use the facility "LOG_AUTH", and the priorities ++ * LOG_NOTICE, LOG_ERR and LOG_ALERT, respectively. ++ */ ++/* #define SYSLOG */ ++ ++/* Syslog facility ++ * ++ * This is the facility mgetty uses for logging. Ususally, this will be ++ * LOG_AUTH, but on some systems, this may not exist, try LOG_DAEMON ++ * instead (or look into the syslog manpage for available options) ++ */ ++#define SYSLOG_FC LOG_AUTH ++ ++/* login stuff */ ++ ++/* System name - printed at login prompt ++ * If you do not define this, the uname() call will be used ++ */ ++/* #define SYSTEM "greenie" */ ++ ++/* Login prompt ++ * The "@", "\\D" and "\\T" escapes will be replaced by SYSTEM, the ++ * current date and time, respectively. ++ * override with "-p " switch ++ */ ++#define LOGIN_PROMPT "@!login: " ++ ++/* On SVR4, maybe on other systems too, you can cause the 'login' program ++ * to prompt with the same string as mgetty did, instead of the standard ++ * "login:" prompt. The string will be passed to the 'login' program ++ * in the environment variable TTYPROMPT. ++ * This is done by putting "login" into a special (brain-dead) "ttymon"- ++ * compatibility mode. In that mode, mgetty doesn't ask for a login name ++ * at all, so mgetty won't work if you enable that feature and your ++ * login program doesn't support it. (You can see if it doesn't work ++ * if the user gets a double login prompt or none at all). ++ * ++ * This feature automatically disables FIDO and AutoPPP support! ++ * ++ * To use this feature, define ENV_TTYPROMPT. ++ */ ++/* #define ENV_TTYPROMPT */ ++ ++/* Some very old terminals can only generate UPPERCASE letters. ++ * Traditional getty variants detect this, and then set the ++ * corresponding termio(s) flags to convert upper/lower case letters ++ * "on the fly". Mgetty can do it, but since this is hardly ++ * needed nowadays, the default is off. ++ */ ++/* #define DO_LCUC_MAP */ ++ ++/* Maximum time before login name has to be entered (in seconds) ++ * (after that time a warning will be issued, after that, the call is ++ * dropped). To disable that feature, do not define it. ++ */ ++#define MAX_LOGIN_TIME 240 ++ ++/* nologin file ++ * ++ * If that file exists, a ringing phone won't be answered (see manual). ++ * "%s" will be replaced by the device name. ++ */ ++#define NOLOGIN_FILE "/etc/nologin.%s" ++ ++ ++/* misc */ ++ ++ ++/* Path for the lock files. A %s will be replaced with the device name, ++ * e.g. tty2a -> /usr/spool/uucp/LCK..tty2a ++ * Make sure that this is the same file that your uucico uses for ++ * locking! ++ */ ++ ++/* for a few systems, you can just take those defaults and be happy */ ++#if defined (SVR4) || defined(sunos4) ++# define LOCK_PATH "/var/spool/locks" ++# define LOCK "/var/spool/locks/LCK..%s" ++#else ++# ifdef sgi ++# define LOCK "/usr/spool/locks/LCK..%s" ++# endif ++# ifdef _AIX ++# define LOCK "/etc/locks/LCK..%s" ++# endif ++# ifdef NeXT ++# define LOCK "/usr/spool/uucp/LCK/LCK..%s" ++# endif ++# ifdef linux ++# define LOCK "/var/lock/LCK..%s" ++# endif ++# if defined(__FreeBSD__) || defined(__NetBSD__) ++# define LOCK "/var/spool/lock/LCK..%s" ++# endif ++#endif ++ ++/* if your system isn't listed above, change that line here */ ++#ifndef LOCK ++#define LOCK "/usr/spool/uucp/LCK..%s" ++#endif ++ ++/* Set this to "1" if your system uses binary lock files (i.e., the pid ++ * as four byte integer in host byte order written to the lock file) ++ * If it is "0", HDB locking will be used - the PID will be written as ++ * 10 byte ascii, with a trailing newline ++ * (Just check "LOCK" while uucico or pcomm or ... are running to find ++ * out what lock files are used on your system) ++ * On NeXT systems, you must set this to "1". ++ */ ++#define LOCKS_BINARY 0 ++ ++/* Lower case locks - change the last character of the device name ++ * to lowercase for locking purposes. ++ * ++ * If you're using a SCO Unix system with those "tty1a/tty1A" device ++ * pairs, you'll have to define this. ++ */ ++/* #define LOCKS_LOWERCASE */ ++ ++/* Change _all_ characters to lowercase (currently no system uses this) */ ++/* #define LOCKS_ALL_LOWERCASE */ ++ ++ ++/* the default speed used by mgetty - override it with "-s " ++ * ++ * WARNING: this is a bit tricky, since some modems insist on going to ++ * 19200 bps when in fax mode. So, if fax receiving with a port speed of ++ * something else doesn't work, try experimenting with FAX_RECV_SWITCHBD, ++ * and if that doesn't help, try DEFAULT_PORTSPEED 19200 ++ * ++ * WARNING2: Speeds higher than 38400 aren't supported on all platforms, ++ * and sometimes you have to use "50" to get 57600 or so! ++ */ ++#define DEFAULT_PORTSPEED 38400 ++ ++/* the modem initialization string ++ * ++ * the default string should set up most hayes compatible modems into a ++ * fairly sane state (echo on, verbose reports on, quiet off, reset on ++ * DTR toggle on), but it doesn't set any flow control options (because ++ * that's done differently on each modem, look into your manual for commands ++ * like &H3, &K4, \Q6 or similar things) or protocols. ++ * ++ * You can change the initialization sequence with the "init-chat" keyword ++ * in "mgetty.config". ++ * ++ * If you need delays, specify them as "\\d", if you want to send a ++ * backslash ('\'), give it as "\\\\". ++ * ++ * Very IMPORTANT: make sure that the modem assigns the DCD line properly, ++ * usually this is done with the AT&C1 command! ++ * ++ * The modem must answer with "OK" (!!!) - otherwise, use "init-chat". ++ */ ++#define MODEM_INIT_STRING "ATS0=0Q0&D3&C1" ++ ++/* command termination string ++ * ++ * for most modems, terminating the AT... command with "\r" is ++ * sufficient and "\r\n" also works without doing harm. ++ * Unfortunately, for the Courier HST, you've to use *only* \r, ++ * otherwise ATA won't work (immediate NO CARRIER), and for some ++ * (old) ZyXELs, you have to use \r\n (no OK otherwise). ++ * So, try one, and if it doesn't work, try the other. ++ */ ++#define MODEM_CMD_SUFFIX "\r" ++ ++/* "keep alive" ++ * ++ * mgetty can periodically check whether the modem is still alive ++ * by issueing an "AT\r" command and checking for the "OK" ++ * Define here, in seconds, how often mgetty should check. For normal ++ * reliable modems, once an hour should be sufficient... ++ * If you use "-1", or don't define this at all, mgetty won't check. ++ */ ++#define MODEM_CHECK_TIME 3600 ++ ++ ++/* modem mode ++ * ++ * DEFAULT_MODEMTYPE specifies the default way mgetty+sendfax handle a ++ * faxmodem. You have four choices: ++ * "data" - data only, no faxing available (for sendfax, equal to "auto") ++ * "cls2" - use AT+FCLASS=2 ++ * "c2.0" - use AT+FCLASS=2.0 ++ * "auto" - try "2.0", then "2", then fall to "data". ++ * ++ * Normally, you can leave this to "auto", but if you have a modem that ++ * can do class 2.0 and class 2, and 2.0 doesn't work, then you could try ++ * setting it to "cls2". ++ * You can override this define with the "-C " switch. ++ */ ++#define DEFAULT_MODEMTYPE "auto" ++ ++ ++/* some modems are a little bit slow - after sending a response (OK) ++ * to the host, it will take some time before they can accept the next ++ * command - specify the amount needed in data mode here (in ++ * milliseconds). Normally, 50 ms should be sufficient. (On a slow ++ * machine it may even work without any delay at all) ++ * ++ * Be warned: if your machine isn't able to sleep for less than one ++ * second, this may cause problems. ++ */ ++#define DO_CHAT_SEND_DELAY 50 ++ /* and this is the delay before sending each command while in fax mode ++ */ ++#define FAX_COMMAND_DELAY 50 ++ ++/* incoming faxes will be chown()ed to this uid and gid. ++ * if FAX_IN_GROUP is undefined, the group of ...OWNER is used. ++ */ ++#define FAX_IN_OWNER "uucp" ++/* #define FAX_IN_GROUP "root" */ ++ ++/* incoming faxes will be chmod()ed to this mode ++ * (if you do not define this, the file mode will be controlled by ++ * mgetty's umask) ++ */ ++#define FAX_FILE_MODE 0660 ++ ++/* FLOW CONTROL ++ * ++ * There are basically two types of flow control: ++ * - hardware flow control: pull the RTS/CTS lines low to stop the other ++ * side from spilling out data too fast ++ * - sofware flow control: send an Xoff-Character to tell the other ++ * side to stop sending, send an Xon to restart ++ * obviously, use of Xon/Xoff has the disadvantage that you cannot send ++ * those characters in your data anymore, but additionally, hardware flow ++ * control is normally faster and more reliable ++ * ++ * mgetty can use multiple flow control variants: ++ * FLOW_NONE - no flow control at all (absolutely not recommended) ++ * FLOW_HARD - use RTS/CTS flow control (if available on your machine) ++ * FLOW_SOFT - use Xon/Xoff flow control, leave HW lines alone ++ * FLOW_BOTH - use both types simultaneously, if possible ++ * ++ * Note that few operating systems allow both types to be used together. ++ * ++ * mgetty won't (cannot!) notice if your settings don't work, but you'll ++ * see it yourself: you'll experience character losses, garbled faxes, ++ * low data throughput,..., if the flow control settings are wrong ++ * ++ * If in doubt what to use, try both and compare results. ++ * (if you use FAS or SAS with the recommended settings, FLOW_HARD is a ++ * "don't care" since the driver will use RTS/CTS anyway) ++ * ++ * If you use an atypical system, check whether tio_set_flow_control in ++ * tio.c does the right thing for your system. ++ */ ++ ++/* This is the flow control used for normal data (login) connections ++ * Set it to FLOW_HARD except in very special cases. ++ */ ++#define DATA_FLOW FLOW_HARD ++ ++/* This is the flow control used for incoming fax connections ++ * Wrong settings will result in missing lines or erroneous lines ++ * in most of the received faxes. ++ * Most faxmodems expect Xon/Xoff, few honour the RTS line. ++ */ ++#define FAXREC_FLOW FLOW_HARD | FLOW_SOFT ++ ++/* And this is for sending faxes ++ * ++ * Wrong settings here will typically result in that the first few ++ * centimeters of a transmitted fax look perfect, and then (the buffer ++ * has filled up), the rest is more or less illegible junk. ++ * For most faxes, this has to be FLOW_SOFT, though the Supra and ZyXEL ++ * modems will (sometimes) do hardware flow control, too. Try it. ++ * ++ * If you see a large number of [11] and [13] characters in the sendfax ++ * log file, your modem is propably doing software flow control - and ++ * you've definitely set FAXSEND_FLOW to FLOW_HARD... ++ * ++ * Some versions of SCO Unix have a "weird" serial driver that will only ++ * do half duplex hardware flow control. You will then run into the problem ++ * that fax sending will time out after the first page sent (no ACK received) ++ * and fail if FLOW_HARD is used. Use FLOW_SOFT instead. ++ */ ++#define FAXSEND_FLOW FLOW_HARD | FLOW_SOFT ++ ++/* if your faxmodem switches port bit rate just after sending the "+FCON" ++ * message to the host, define this to contain the baudrate used. (Not ++ * important if you have the portspeed set to this value anyway). ++ * ++ * Most Rockwell-based modems need FAX_RECV_SWITCHBD 19200. ++ * ZyXELs do *not* need this, except if explicitely told to do so. ++ * ++ * You can see if this is set wrong if mgetty gets the "+FCON" response, ++ * starts the fax receiver, and times out waiting for OK, receiving ++ * nothing or just junk. ++ */ ++/* #define FAX_RECV_SWITCHBD 19200 */ ++ ++/* some genius at US Robotics obviously decided that the above method ++ * of switching baud rates is broken, and came up with something new ++ * --- broken as well (why bother switching rates at all?) --- this ++ * and other USR Courier Fax follies will be handled by enabling the ++ * following define. ++ * ++ * This should NOT be needed for recent V.34 or ISDN modems anymore ++ * (anything built after 1999). In doubt, make sure your firmware is ++ * up to date before experimenting with this. ++ */ ++/* #define FAX_USRobotics */ ++ ++/* name of the logfile for outgoing faxes (e.g. /var/log/sendfax.log) ++ * ++ * watch out: if you run 'sendfax' as non-privileged user (user 'fax' etc.) ++ * you might need to create this file manually and chown it to 'fax' ++ */ ++#define FAX_LOG "/opt/csw/var/log/sendfax.log" ++ ++/* local station ID (your fax number) ++ * 20 character string, most faxmodem allow all ascii characters 32..127, ++ * but some do only allow digits and blank ++ * AT+FLID=? should tell you what's allowed and what not. ++ */ ++#define FAX_STATION_ID "49 115 xxxxxxxx" ++ ++/* ------ sendfax-specific stuff follows here -------- */ ++ ++/* the baudrate used for *sending* faxes. ZyXELs can handle 38400, ++ * SUPRAs (and many other rockwell-based faxmodems) can not. ++ * I recommend 38400, since 19200 may be to slow for 14400 bps faxmodems! ++ */ ++#define FAX_SEND_BAUD 38400 ++ ++/* switch baud rate after +FCLASS=2 ++ * ++ * some weird modems require that you initialize the modem with one ++ * baud rate (e.g. 2400 or 9600 for cheap 2400+fax modems, or `smart' ++ * modems that insist on staying locked to 38400 (ELSA!)), but switch ++ * to another baud rate, typically 19200, immediately after receiving ++ * the "AT+FCLASS=2" command. ++ * ++ * If the following is defined, sendfax will switch to the speed given ++ * here after sending AT+FCLASS=2. ++ * ++ * Only try fiddling with this if sendfax times out during modem ++ * initialization, receiving junk instead of "OK" or "ERROR" (logfile!) ++ */ ++/* #define FAX_SEND_SWITCHBD 19200 */ ++ ++/* this is the command to set the modem to use the desired flow control. ++ * For hardware handshake, this could be AT&H3 for the ZyXEL, &K3 for ++ * Rockwell-Based modems or AT\\Q3&S0 for Exar-Based Modems (i.e. some GVC's) ++ * If you don't want extra initalization, do not define it. ++ * Don't forget the "AT"! ++ */ ++/* #define FAX_MODEM_HANDSHAKE "AT&H3" */ ++ ++/* This is the modem command used for dialing. The phone number will ++ * get appended right after the string. Normally, "ATD" or "ATDP" should ++ * suffice, but in some situations (company telephone systems) you might ++ * need something like "ATx0DT0wP" (switch of dial-tone recognition, tone- ++ * dial a "0", wait for dial-tone, pulse dial the rest) ++ */ ++#define FAX_DIAL_PREFIX "ATD" ++ ++/* When sending a fax, if the other side says "page bad, retrain ++ * requested", sendfax will retry the page. Specifiy here the maximum ++ * number of retries (I recommend 3) before hanging up. ++ * ++ * If you set it to "0", sendfax will *never* retransmit a page (only ++ * do this if you know that your modem returns +FPTS:2 even if the ++ * page arrived properly, but be warned - you wont' be able to react ++ * properly to transmission errors!) ++ * ++ * See also the description of the "max-tries" and "max-tries-continue" ++ * settings in the sendfax config file. ++ */ ++#define FAX_SEND_MAX_TRIES 3 ++ ++/* the device(s) used for faxing ++ * multiple devices can be separated by ":", e.g. "tty1a:tty2a" ++ * (with or without leading /dev/) ++ * If you don't adapt this for your needs, sendfax won't run (you can ++ * set it from the sendfax.config file, though)! ++ */ ++#define FAX_MODEM_TTYS "term/b" ++ ++/* Xon or not? ++ * ++ * the first issues of the class 2 drafts required that the program waits ++ * for an Xon character before sending the page data. Later versions ++ * removed that. Sendfax can do both, default is to wait for it. ++ * ++ * If you get an error message "... waiting for XON" when trying to ++ * send a fax, try this one. Some ELSA modems are know to need it. ++ * ++ * ** THIS OPTION IS OBSOLETE ** ++ * ** use "modem-quirks 0x08" in sendfax.config instead ** ++ */ ++ ++ ++/* define mailer that accepts destination on command line and mail text ++ * on stdin. For mailers with user friendly interfaces, (such as mail, ++ * mailx, elm), include an appropriate subject line in the command ++ * definition. If using a mail agent (such as sendmail), that reads ++ * mail headers, define NEED_MAIL_HEADERS. ++ */ ++#ifdef SVR4 ++# define MAILER "/usr/bin/mailx -s 'Incoming facsimile message'" ++#else ++# ifdef _AIX ++# define MAILER "/usr/sbin/sendmail" ++# define NEED_MAIL_HEADERS ++# endif ++# ifdef M_UNIX /* SCO */ ++# define MAILER "/usr/lib/mail/execmail" ++# define NEED_MAIL_HEADERS ++# endif ++#endif ++ ++#ifndef MAILER ++# define MAILER "/usr/lib/sendmail" ++# define NEED_MAIL_HEADERS ++#endif ++ ++/* where to send notify mail about incoming faxes to ++ * (remember to create an mail alias if no such user exists!) ++ */ ++#define MAIL_TO "root" ++ ++/* after a fax has arrived, mgetty can call a program for further ++ * processing of this fax. ++ * ++ * (e.g.: printing of the fax, sending as MIME mail, displaying in an X ++ * window (the latter one could be tricky) ...) ++ * ++ * It will be called as: ++ * "" <#pgs> ... ++ * ++ * Define the name of this program here ++ * If you don't want this type of service, do not define it at all ++ * Absolute path name has to be used here! ++ */ ++#define FAX_NOTIFY_PROGRAM "/usr/local/lib/mgetty+sendfax/new_fax" ++ ++/* default minimum space required on spooling partition for receiving a FAX ++ * (in KILObytes) ++ */ ++#define MINFREESPACE 1024 ++ Added: csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/sources/mgetty.postinstall 2009-04-27 12:54:19 UTC (rev 4552) @@ -0,0 +1,9 @@ +#!/bin/sh +#$Id: mgetty.postinstall,v 1.1 2004/03/20 17:57:01 simigern Exp $ + +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/dialin.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/dialin.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/dialin.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxheader" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxheader.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxheader +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxrunq.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxrunq.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/faxrunq.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/login.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/login.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/login.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/mgetty.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/mgetty.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/mgetty.config +test -f "${BASEDIR}/opt/csw/etc/mgetty+sendfax/sendfax.config" || cp ${BASEDIR}/opt/csw/etc/mgetty+sendfax/sendfax.config.CSW ${BASEDIR}/opt/csw/etc/mgetty+sendfax/sendfax.config Added: csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/specs/Makefile 2009-04-27 12:54:19 UTC (rev 4552) @@ -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/mgetty/trunk/legacy/specs/mgetty =================================================================== --- csw/mgar/pkg/mgetty/trunk/legacy/specs/mgetty (rev 0) +++ csw/mgar/pkg/mgetty/trunk/legacy/specs/mgetty 2009-04-27 12:54:19 UTC (rev 4552) @@ -0,0 +1,70 @@ +# vim: ft=perl +# $Id: mgetty,v 1.6 2005/06/30 12:11:50 simigern Exp $ + +$progname = 'mgetty'; +$version = '1.1.31'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://alpha.greenie.net/mgetty/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}${version}-Jul24.tar.gz"); + + at patches = (['mgetty-policy.h.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An intelligent getty with fax and voice modem support", + dependencies => ['CSWcommon'], + postinstall => "mgetty.postinstall", + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/frontends/X11/viewfax-2.5/COPYING"; + +$attributes{'/opt/csw/var/spool/fax'} = ({user => 'uucp'}); +$attributes{'/opt/csw/var/spool/fax/outgoing'} = ({user => 'uucp'}); +$attributes{'/opt/csw/lib/mgetty+sendfax/faxq-helper'} = ({user => 'uucp'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +mkdir dummybins +export PATH="${builddir}/${progname}-${version}/dummybins:\${PATH}" +ln -s /bin/true dummybins/chown +gmake CFLAGS='-Dsolaris2' LIBS='-lsocket -lnsl' prefix=/opt/csw spool=/opt/csw/var/spool CC=cc FAX_OUT_USER=uucp MAN1DIR=/opt/csw/share/man/man1 MAN4DIR=/opt/csw/share/man/man4 MAN5DIR=/opt/csw/share/man/man5 MAN8DIR=/opt/csw/share/man/man8 INFODIR=/opt/csw/share/info +mkdir -p ${buildroot}/opt/csw/var/spool +mkdir -p ${buildroot}/opt/csw/share +gmake DESTDIR=${buildroot} prefix=${buildroot}/opt/csw spool=${buildroot}/opt/csw/var/spool INSTALL='/usr/ucb/install -c -o bin -g bin' FAX_OUT_USER=uucp MAN1DIR=${buildroot}/opt/csw/share/man/man1 MAN4DIR=${buildroot}/opt/csw/share/man/man4 MAN5DIR=${buildroot}/opt/csw/share/man/man5 MAN8DIR=${buildroot}/opt/csw/share/man/man8 INFODIR=${buildroot}/opt/csw/share/info install +rm ${buildroot}/opt/csw/bin/g3topbm +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/dialin.config ${buildroot}/opt/csw/etc/mgetty+sendfax/dialin.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/faxheader ${buildroot}/opt/csw/etc/mgetty+sendfax/faxheader.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/faxrunq.config ${buildroot}/opt/csw/etc/mgetty+sendfax/faxrunq.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/login.config ${buildroot}/opt/csw/etc/mgetty+sendfax/login.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/mgetty.config ${buildroot}/opt/csw/etc/mgetty+sendfax/mgetty.config.CSW +mv ${buildroot}/opt/csw/etc/mgetty+sendfax/sendfax.config ${buildroot}/opt/csw/etc/mgetty+sendfax/sendfax.config.CSW + +mv ${buildroot}/opt/csw/bin/faxq ${buildroot}/opt/csw/bin/faxq-mgetty +mv ${buildroot}/opt/csw/bin/faxrm ${buildroot}/opt/csw/bin/faxrm-mgetty +mv ${buildroot}/opt/csw/share/man/man1/faxq.1 ${buildroot}/opt/csw/share/man/man1/faxq-mgetty.1 +mv ${buildroot}/opt/csw/share/man/man1/faxrm.1 ${buildroot}/opt/csw/share/man/man1/faxrm-mgetty.1 + + +##vgetty stuff starts here... +#cd voice +#gmake CFLAGS='-Dsolaris2' LIBS='-lsocket -lnsl' prefix=/opt/csw spool=/opt/csw/var/spool CC=cc FAX_OUT_USER=uucp MAN1DIR=/opt/csw/share/man/man1 MAN4DIR=/opt/csw/share/man/man4 MAN5DIR=/opt/csw/share/man/man5 MAN8DIR=/opt/csw/share/man/man8 INFODIR=/opt/csw/share/info +#gmake DESTDIR=${buildroot} CFLAGS='-Dsolaris2' LIBS='-lsocket -lnsl' prefix=${buildroot}/opt/csw spool=${buildroot}/opt/csw/var/spool INSTALL='/usr/ucb/install -c -o bin -g bin' FAX_OUT_USER=uucp MAN1DIR=${buildroot}/opt/csw/share/man/man1 MAN4DIR=${buildroot}/opt/csw/share/man/man4 MAN5DIR=${buildroot}/opt/csw/share/man/man5 MAN8DIR=${buildroot}/opt/csw/share/man/man8 INFODIR=${buildroot}/opt/csw/share/info install + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4553] csw/mgar/pkg Message-ID: Revision: 4553 http://gar.svn.sourceforge.net/gar/?rev=4553&view=rev Author: dmichelsen Date: 2009-04-27 12:54:36 +0000 (Mon, 27 Apr 2009) Log Message: ----------- multisync: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/multisync/ csw/mgar/pkg/multisync/trunk/ csw/mgar/pkg/multisync/trunk/legacy/ csw/mgar/pkg/multisync/trunk/legacy/scripts/ csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/multisync/trunk/legacy/scripts/human.pl csw/mgar/pkg/multisync/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/multisync/trunk/legacy/sources/ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.evogui.patch csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch csw/mgar/pkg/multisync/trunk/legacy/specs/ csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile csw/mgar/pkg/multisync/trunk/legacy/specs/multisync Added: csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:36 UTC (rev 4553) @@ -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/multisync/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/scripts/human.pl 2009-04-27 12:54:36 UTC (rev 4553) @@ -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 () { + 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 + +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 + +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/multisync/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:36 UTC (rev 4553) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/multisync/trunk/legacy/sources/multisync.evogui.patch =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.evogui.patch (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.evogui.patch 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,53 @@ +--- plugins/evolution_sync/src/gui.c.orig 2004-03-24 19:20:55.749911000 +0100 ++++ plugins/evolution_sync/src/gui.c 2004-03-24 21:35:11.427197000 +0100 +@@ -35,6 +35,7 @@ + #include "gui.h" + #include "interface.h" + #include "support.h" ++#include + + GtkWidget* evowindow = NULL; + evolution_connection *evoconn = NULL; +@@ -43,12 +44,24 @@ + GList* read_filelist(GList *list, char *dirname, char *textname, + char *filename, int depth) { + DIR *dir; ++ struct stat statbuf; ++ char *tostat; ++ + if (depth < 0) + return(list); + if ((dir = opendir(dirname))) { + struct dirent *de; + while ((de = readdir(dir))) { +- if (de->d_type != DT_DIR) { ++ /* dirname/de->d_name\0 */ ++ tostat=malloc(strlen(dirname)+1+strlen(de->d_name)+1); ++ strcpy(tostat,dirname); ++ tostat[strlen(dirname)]='/'; ++ strcpy(&tostat[strlen(dirname)+1],de->d_name); ++ tostat[strlen(dirname)+1+strlen(de->d_name)+1]=0x00; ++ /* printf("CSW-solaris: stating %s\n",tostat); */ ++ stat(tostat,&statbuf); ++ ++ if (!S_ISDIR(statbuf.st_mode)) { + if (!strcmp(de->d_name, filename)) { + evo_sync_file *ef = g_malloc0(sizeof(evo_sync_file)); + ef->name = g_strdup(textname); +@@ -56,7 +69,7 @@ + list = g_list_append(list, ef); + } + } +- if (de->d_type != DT_REG) { ++ if (!S_ISREG(statbuf.st_mode)) { + char *newdir; + if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) { + newdir = g_strdup_printf("%s/%s", dirname, de->d_name); +@@ -64,6 +77,7 @@ + g_free(newdir); + } + } ++ free(tostat); + } + closedir(dir); + } Added: csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.opieqcop.patch 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,11 @@ +--- plugins/opie_sync/src/opie_qcop.c.orig 2004-03-24 19:56:46.781075000 +0100 ++++ plugins/opie_sync/src/opie_qcop.c 2004-03-24 22:07:07.397348000 +0100 +@@ -339,7 +339,7 @@ + if (start=strstr(strstr(pc,"/")+1,"/")) /* We need the second slash */ + { + /* caller responsible for free()ing temp */ +- temp = g_strndup(start,strstr(start," ")-start); /* from slash to blank is our path */ ++ temp = g_strndup(start,(char*)strstr(start," ")-start); /* from slash to blank is our path */ + } + + g_free(pc); Added: csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/sources/multisync.vtype.patch 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,11 @@ +--- src/sync_vtype.c.orig 2004-03-24 18:51:37.684638000 +0100 ++++ src/sync_vtype.c 2004-03-24 18:53:09.459728000 +0100 +@@ -993,7 +993,7 @@ + if (z == 'Z') { + struct tm *local; + local = localtime(&dt); +- dt += local->tm_gmtoff; ++ dt += (mktime(gmtime(&dt)) - mktime(localtime(&dt))) / 60; + } + } + return(dt); Added: csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/specs/Makefile 2009-04-27 12:54:36 UTC (rev 4553) @@ -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/multisync/trunk/legacy/specs/multisync =================================================================== --- csw/mgar/pkg/multisync/trunk/legacy/specs/multisync (rev 0) +++ csw/mgar/pkg/multisync/trunk/legacy/specs/multisync 2009-04-27 12:54:36 UTC (rev 4553) @@ -0,0 +1,112 @@ +# vim: ft=perl +# $Id: multisync,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'multisync'; +$version = '0.81'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://multisync.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['multisync.vtype.patch', "${progname}-${version}", '-p0'], + ['multisync.evogui.patch', "${progname}-${version}", '-p0'], + ['multisync.opieqcop.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A calendar synchronization program", + 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:/opt/csw/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 -D_POSIX_PTHREAD_SEMANTICS" +export CPPFLAGS='-I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + +cd ${progname}-${version} +for i in config.guess config.sub depcomp install-sh missing mkinstalldirs; do + rm "\${i}" + ln -s /opt/csw/share/automake*/"\${i}" "\${i}" +done +sed -e 's|-rdynamic||' 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 || exit 1 + +#Backup-Plugin +cd ${builddir}/${progname}-${version}/plugins/backup_plugin +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#Evolution-Plugin +cd ${builddir}/${progname}-${version}/plugins/evolution_sync +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#LDAP-Plugin +cd ${builddir}/${progname}-${version}/plugins/ldap_plugin +sed -e 's|-Werror||' 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 || exit 1 + +#OPIE-Plugin +cd ${builddir}/${progname}-${version}/plugins/opie_sync +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#PALM-Plugin +cd ${builddir}/${progname}-${version}/plugins/palm_sync +sed -e 's|-Werror||' 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 || exit 1 + +#SyncML-Plugin +cd ${builddir}/${progname}-${version}/plugins/syncml_plugin +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#GCC :-( +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' + +#IrMC-Plugin +cd ${builddir}/${progname}-${version}/plugins/irmc_sync +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo "#include " >src/stdint.h +echo "#define TCSBRKP TCSBRK" >>src/stdint.h +cp src/stdint.h stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:54:53 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:54:53 +0000 Subject: [csw-devel] SF.net SVN: gar:[4554] csw/mgar/pkg Message-ID: Revision: 4554 http://gar.svn.sourceforge.net/gar/?rev=4554&view=rev Author: dmichelsen Date: 2009-04-27 12:54:53 +0000 (Mon, 27 Apr 2009) Log Message: ----------- nautilus: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/nautilus/ csw/mgar/pkg/nautilus/trunk/ csw/mgar/pkg/nautilus/trunk/legacy/ csw/mgar/pkg/nautilus/trunk/legacy/scripts/ csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/nautilus/trunk/legacy/scripts/human.pl csw/mgar/pkg/nautilus/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/nautilus/trunk/legacy/sources/ csw/mgar/pkg/nautilus/trunk/legacy/sources/nautilus-exif.diff csw/mgar/pkg/nautilus/trunk/legacy/specs/ csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile csw/mgar/pkg/nautilus/trunk/legacy/specs/nautilus Added: csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:54:53 UTC (rev 4554) @@ -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/nautilus/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/scripts/human.pl 2009-04-27 12:54:53 UTC (rev 4554) @@ -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 () { + 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 + +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 + +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/nautilus/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:54:53 UTC (rev 4554) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/nautilus/trunk/legacy/sources/nautilus-exif.diff =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/sources/nautilus-exif.diff (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/sources/nautilus-exif.diff 2009-04-27 12:54:53 UTC (rev 4554) @@ -0,0 +1,18 @@ +--- components/image_properties/nautilus-image-properties-view.c.orig 2005-12-23 14:54:48.001747000 -0500 ++++ components/image_properties/nautilus-image-properties-view.c 2005-12-23 14:57:53.441687000 -0500 +@@ -124,13 +124,14 @@ + exif_content_callback (ExifContent *content, gpointer data) + { + struct ExifAttribute *attribute; ++ char val[4096]; + + attribute = (struct ExifAttribute *)data; + if (attribute->found) { + return; + } + +- attribute->value = g_strdup (exif_content_get_value (content, attribute->tag)); ++ attribute->value = g_strdup (exif_content_get_value (content, attribute->tag, val, 4096)); + if (attribute->value != NULL) { + attribute->found = TRUE; + } Added: csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/specs/Makefile 2009-04-27 12:54:53 UTC (rev 4554) @@ -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/nautilus/trunk/legacy/specs/nautilus =================================================================== --- csw/mgar/pkg/nautilus/trunk/legacy/specs/nautilus (rev 0) +++ csw/mgar/pkg/nautilus/trunk/legacy/specs/nautilus 2009-04-27 12:54:53 UTC (rev 4554) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: nautilus,v 1.11 2005/12/23 20:01:05 simigern Exp $ + +$progname = 'nautilus'; +$version = '2.8.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/nautilus/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['nautilus-exif.diff', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - file manager and graphical shell for GNOME 2", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +for i in ${buildroot}/opt/csw/lib/{*.la,bonobo/*.la}; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:11 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:11 +0000 Subject: [csw-devel] SF.net SVN: gar:[4555] csw/mgar/pkg Message-ID: Revision: 4555 http://gar.svn.sourceforge.net/gar/?rev=4555&view=rev Author: dmichelsen Date: 2009-04-27 12:55:11 +0000 (Mon, 27 Apr 2009) Log Message: ----------- nethack: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/nethack/ csw/mgar/pkg/nethack/trunk/ csw/mgar/pkg/nethack/trunk/legacy/ csw/mgar/pkg/nethack/trunk/legacy/scripts/ csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/nethack/trunk/legacy/scripts/human.pl csw/mgar/pkg/nethack/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/nethack/trunk/legacy/sources/ csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.patch csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall csw/mgar/pkg/nethack/trunk/legacy/specs/ csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile csw/mgar/pkg/nethack/trunk/legacy/specs/nethack Added: csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:11 UTC (rev 4555) @@ -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/nethack/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/scripts/human.pl 2009-04-27 12:55:11 UTC (rev 4555) @@ -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 () { + 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 + +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 + +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/nethack/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:11 UTC (rev 4555) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/nethack/trunk/legacy/sources/nethack.patch =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.patch (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.patch 2009-04-27 12:55:11 UTC (rev 4555) @@ -0,0 +1,216 @@ +diff -ru orignethack-343/include/config.h nethack-3.4.3/include/config.h +--- orignethack-343/include/config.h 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/include/config.h 2004-03-22 01:19:54.606853000 +0100 +@@ -43,7 +43,7 @@ + * Some combinations make no sense. See the installation document. + */ + #define TTY_GRAPHICS /* good old tty based graphics */ +-/* #define X11_GRAPHICS */ /* X11 interface */ ++#define X11_GRAPHICS /* X11 interface */ + /* #define QT_GRAPHICS */ /* Qt interface */ + /* #define GNOME_GRAPHICS */ /* Gnome interface */ + /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ +@@ -126,7 +126,7 @@ + * would allow: + * xpmtoppm x11tiles_big.xpm + */ +-/* # define USE_XPM */ /* Disable if you do not have the XPM library */ ++# define USE_XPM /* Disable if you do not have the XPM library */ + # ifdef USE_XPM + # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ + # endif +@@ -172,7 +172,7 @@ + #define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ + #define COMPRESS_EXTENSION ".Z" /* compress's extension */ + /* An example of one alternative you might want to use: */ +-/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ ++/* #define COMPRESS "/opt/csw/bin/gzip" */ /* FSF gzip compression */ + /* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ + #endif + +@@ -185,7 +185,7 @@ + * a tar-like file, thus making a neater installation. See *conf.h + * for detailed configuration. + */ +-/* #define DLB */ /* not supported on all platforms */ ++#define DLB /* not supported on all platforms */ + + /* + * Defining INSURANCE slows down level changes, but allows games that +@@ -204,7 +204,7 @@ + * otherwise it will be the current directory. + */ + # ifndef HACKDIR +-# define HACKDIR "/usr/games/lib/nethackdir" ++# define HACKDIR "/opt/csw/share/nethack" + # endif + + /* +@@ -214,7 +214,7 @@ + * since the user might create files in a directory of his choice. + * Of course SECURE is meaningful only if HACKDIR is defined. + */ +-/* #define SECURE */ /* do setuid(getuid()) after chdir() */ ++#define SECURE /* do setuid(getuid()) after chdir() */ + + /* + * If it is desirable to limit the number of people that can play Hack +@@ -338,7 +338,7 @@ + #endif + + #define EXP_ON_BOTL /* Show experience on bottom line */ +-/* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson at ucivax) */ ++#define SCORE_ON_BOTL /* added by Gary Erickson (erickson at ucivax) */ + + /* + * Section 5: EXPERIMENTAL STUFF +@@ -349,7 +349,7 @@ + */ + + /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ +-/*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */ ++#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ + + /* End of Section 5 */ + +diff -ru orignethack-343/include/unixconf.h nethack-3.4.3/include/unixconf.h +--- orignethack-343/include/unixconf.h 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/include/unixconf.h 2004-03-22 01:17:44.956458000 +0100 +@@ -96,7 +96,7 @@ + */ + + /* #define NO_FILE_LINKS */ /* if no hard links */ +-/* #define LOCKDIR "/usr/games/lib/nethackdir" */ /* where to put locks */ ++#define LOCKDIR "/opt/csw/share/nethack" /* where to put locks */ + + /* + * If you want the static parts of your playground on a read-only file +@@ -132,7 +132,7 @@ + * "extra output" method is used, but not all systems provide access to + * a fine-grained timer. + */ +-/* #define TIMED_DELAY */ /* usleep() */ ++#define TIMED_DELAY /* usleep() */ + #endif + + /* +diff -ru orignethack-343/sys/unix/Makefile.src nethack-3.4.3/sys/unix/Makefile.src +--- orignethack-343/sys/unix/Makefile.src 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/sys/unix/Makefile.src 2004-03-22 01:17:44.975790000 +0100 +@@ -146,13 +146,13 @@ + # directories. The ones given below is the usual spot for linux systems. + # The paths are for glibconfig.h and gnomesupport.h respectively. + # +-GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome ++GNOMEINC=-I/opt/csw/include -I../win/gnome + + # flags for debugging: + # CFLAGS = -g -I../include + +-CFLAGS = -O -I../include +-LFLAGS = ++CFLAGS = -O -I/opt/csw/include -I../include ++LFLAGS = -L/opt/csw/lib -R/opt/csw/lib + + # The Qt and Be window systems are written in C++, while the rest of + # NetHack is standard C. If using Qt, uncomment the LINK line here to get +@@ -214,8 +214,8 @@ + + # + # +-WINSRC = $(WINTTYSRC) +-WINOBJ = $(WINTTYOBJ) ++WINSRC = $(WINTTYSRC) $(WINX11SRC) ++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) + + # on some systems the termcap library is in -ltermcap or -lcurses + # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead +@@ -235,7 +235,7 @@ + # + # libraries for X11 + # If USE_XPM is defined in config.h, you will also need -lXpm here. +-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 ++WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -lXpm + # WINX11LIB = -lXaw -lXmu -lXt -lX11 + # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm + # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0 +@@ -255,7 +255,7 @@ + # libraries for BeOS + WINBELIB = -lbe + +-WINLIB = $(WINTTYLIB) ++WINLIB = $(WINTTYLIB) $(WINX11LIB) + + # any other strange libraries your system needs (for Sysunix only -- the more + # specialized targets should already be right) +diff -ru orignethack-343/sys/unix/Makefile.top nethack-3.4.3/sys/unix/Makefile.top +--- orignethack-343/sys/unix/Makefile.top 2003-12-08 00:39:13.000000000 +0100 ++++ nethack-3.4.3/sys/unix/Makefile.top 2004-03-22 01:17:44.978021000 +0100 +@@ -14,18 +14,18 @@ + # MAKE = make + + # make NetHack +-PREFIX = /usr ++PREFIX = /opt/csw + GAME = nethack + # GAME = nethack.prg +-GAMEUID = games +-GAMEGRP = bin ++GAMEUID = nobody ++GAMEGRP = nogroup + + # Permissions - some places use setgid instead of setuid, for instance + # See also the option "SECURE" in include/config.h +-GAMEPERM = 04755 +-FILEPERM = 0644 ++GAMEPERM = 02755 ++FILEPERM = 0664 + EXEPERM = 0755 +-DIRPERM = 0755 ++DIRPERM = 0775 + + # GAMEDIR also appears in config.h as "HACKDIR". + # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR +@@ -35,12 +35,12 @@ + # therefore there should not be anything in GAMEDIR that you want to keep + # (if there is, you'll have to do the installation by hand or modify the + # instructions) +-GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir ++GAMEDIR = $(PREFIX)/share/$(GAME) + VARDIR = $(GAMEDIR) +-SHELLDIR = $(PREFIX)/games ++SHELLDIR = $(PREFIX)/bin + + # per discussion in Install.X11 and Install.Qt +-VARDATND = ++VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm mapbg.xpm + # VARDATND = x11tiles NetHack.ad pet_mark.xbm + # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm + # for Atari/Gem +@@ -193,11 +193,11 @@ + # set up their permissions + -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ + $(CHGRP) $(GAMEGRP) $(GAME) recover ) +- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) +- chmod $(EXEPERM) $(GAMEDIR)/recover ++ -chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) ++ -chmod $(EXEPERM) $(GAMEDIR)/recover + -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) +- $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) +- chmod $(EXEPERM) $(SHELLDIR)/$(GAME) ++ -$(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) ++ -chmod $(EXEPERM) $(SHELLDIR)/$(GAME) + + dofiles-dlb: check-dlb + ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) ) +@@ -238,8 +238,8 @@ + -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save + -rmdir ./-p + -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save ++ -$(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save ++ -chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save + # set up the game files + ( $(MAKE) dofiles ) + # set up some additional files Added: csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/sources/nethack.postinstall 2009-04-27 12:55:11 UTC (rev 4555) @@ -0,0 +1,11 @@ +#!/bin/sh +#$Id: nethack.postinstall,v 1.3 2004/03/22 00:33:49 simigern Exp $ + +for statefile in logfile perm record; do + if [ ! -f "${BASEDIR}/opt/csw/share/nethack/${statefile}" ]; then + echo "Creating ${statefile}" + touch "${BASEDIR}/opt/csw/share/nethack/${statefile}" + chgrp nogroup "${BASEDIR}/opt/csw/share/nethack/${statefile}" + chmod 664 "${BASEDIR}/opt/csw/share/nethack/${statefile}" + fi +done Added: csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/specs/Makefile 2009-04-27 12:55:11 UTC (rev 4555) @@ -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/nethack/trunk/legacy/specs/nethack =================================================================== --- csw/mgar/pkg/nethack/trunk/legacy/specs/nethack (rev 0) +++ csw/mgar/pkg/nethack/trunk/legacy/specs/nethack 2009-04-27 12:55:11 UTC (rev 4555) @@ -0,0 +1,69 @@ +# vim: ft=perl +# $Id: nethack,v 1.6 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'nethack'; +$version = '3.4.3'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.nethack.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-343-src.tgz"); + + at patches = (['nethack.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A single player dungeon exploration game", + dependencies => ['CSWcommon'], + postinstall => "nethack.postinstall", + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/dat/license"; + +$attributes{'/opt/csw/share/nethack/nethack'} = ({user => 'root', group => 'nogroup', perm => '2755'}); +$attributes{'/opt/csw/share/nethack'} = ({user => 'root', group => 'nogroup', perm => '1775'}); +$attributes{'/opt/csw/share/nethack/save'} = ({user => 'root', group => 'nogroup', perm => '1775'}); + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version}/ + +(cd sys/unix/ && sh -x ./setup.sh) +#./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake PREFIX=${buildroot}/opt/csw install +cd doc +mkdir -p ${buildroot}/opt/csw/share/man/man6 +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 Guidebook.ps +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 Guidebook.dvi +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 distrib +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man/man6 manpages +mkdir -p ${buildroot}/opt/csw/share/doc/nethack +cp Guidebook ${buildroot}/opt/csw/share/doc/nethack/ +cp Guidebook.ps ${buildroot}/opt/csw/share/doc/nethack/ +cp Guidebook.dvi ${buildroot}/opt/csw/share/doc/nethack/ +cp *.txt ${buildroot}/opt/csw/share/doc/nethack/ +chmod g-w ${buildroot}/opt/csw/share/nethack/* +rm ${buildroot}/opt/csw/share/nethack/{logfile,perm,record} +sed -e 's|${buildroot}||' ${buildroot}/opt/csw/bin/nethack >${buildroot}/opt/csw/bin/nethack.new +mv ${buildroot}/opt/csw/bin/nethack.new ${buildroot}/opt/csw/bin/nethack +chmod 755 ${buildroot}/opt/csw/bin/nethack +#mkdir -p ${buildroot}/opt/csw/lib/X11/app-defaults +#mv ${buildroot}/opt/csw/share/nethack/NetHack.ad ${buildroot}/opt/csw/lib/X11/app-defaults/NetHack +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:27 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4556] csw/mgar/pkg Message-ID: Revision: 4556 http://gar.svn.sourceforge.net/gar/?rev=4556&view=rev Author: dmichelsen Date: 2009-04-27 12:55:26 +0000 (Mon, 27 Apr 2009) Log Message: ----------- npadmin: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/npadmin/ csw/mgar/pkg/npadmin/trunk/ csw/mgar/pkg/npadmin/trunk/legacy/ csw/mgar/pkg/npadmin/trunk/legacy/scripts/ csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/npadmin/trunk/legacy/scripts/human.pl csw/mgar/pkg/npadmin/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/npadmin/trunk/legacy/sources/ csw/mgar/pkg/npadmin/trunk/legacy/specs/ csw/mgar/pkg/npadmin/trunk/legacy/specs/Makefile csw/mgar/pkg/npadmin/trunk/legacy/specs/npadmin Added: csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:26 UTC (rev 4556) @@ -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/npadmin/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/scripts/human.pl 2009-04-27 12:55:26 UTC (rev 4556) @@ -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 () { + 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 + +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 + +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/npadmin/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:26 UTC (rev 4556) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/npadmin/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/specs/Makefile 2009-04-27 12:55:26 UTC (rev 4556) @@ -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/npadmin/trunk/legacy/specs/npadmin =================================================================== --- csw/mgar/pkg/npadmin/trunk/legacy/specs/npadmin (rev 0) +++ csw/mgar/pkg/npadmin/trunk/legacy/specs/npadmin 2009-04-27 12:55:26 UTC (rev 4556) @@ -0,0 +1,36 @@ +# vim: ft=perl +# $Id: npadmin,v 1.2 2004/11/27 11:52:42 simigern Exp $ + +$progname = 'npadmin'; +$version = '0.13'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://lpr.sourceforge.net packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Command line SNMP based network adminstration tool for printers", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -lgcc_s' +export LD_RUN_PATH='/opt/csw/lib' +cd ${progname}-${version} +./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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4557] csw/mgar/pkg Message-ID: Revision: 4557 http://gar.svn.sourceforge.net/gar/?rev=4557&view=rev Author: dmichelsen Date: 2009-04-27 12:55:42 +0000 (Mon, 27 Apr 2009) Log Message: ----------- octave: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/octave/ csw/mgar/pkg/octave/trunk/ csw/mgar/pkg/octave/trunk/legacy/ csw/mgar/pkg/octave/trunk/legacy/scripts/ csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/octave/trunk/legacy/scripts/human.pl csw/mgar/pkg/octave/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/octave/trunk/legacy/sources/ csw/mgar/pkg/octave/trunk/legacy/sources/octave-gcc-segvfix.patch csw/mgar/pkg/octave/trunk/legacy/specs/ csw/mgar/pkg/octave/trunk/legacy/specs/Makefile csw/mgar/pkg/octave/trunk/legacy/specs/octave Added: csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:42 UTC (rev 4557) @@ -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/octave/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/scripts/human.pl 2009-04-27 12:55:42 UTC (rev 4557) @@ -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 () { + 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 + +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 + +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/octave/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:42 UTC (rev 4557) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/octave/trunk/legacy/sources/octave-gcc-segvfix.patch =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/sources/octave-gcc-segvfix.patch (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/sources/octave-gcc-segvfix.patch 2009-04-27 12:55:42 UTC (rev 4557) @@ -0,0 +1,19 @@ +--- octave-3.0.0/src/oct-hist.cc.orig 2007-12-23 13:50:54.494837000 -0500 ++++ octave-3.0.0/src/oct-hist.cc 2007-12-23 13:51:35.309798000 -0500 +@@ -76,6 +76,16 @@ + // TRUE means input is coming from temporary history file. + bool input_from_tmp_history_file = false; + ++char file_ops::dir_sep_char = '/'; ++std::string file_ops::dir_sep_str ("/"); ++std::string file_ops::dir_sep_chars (file_ops::dir_sep_str); ++ ++bool ++file_ops::is_dir_sep (char c) ++{ ++ return dir_sep_chars.find (c) != NPOS; ++} ++ + static std::string + default_history_file (void) + { Added: csw/mgar/pkg/octave/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/specs/Makefile 2009-04-27 12:55:42 UTC (rev 4557) @@ -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/octave/trunk/legacy/specs/octave =================================================================== --- csw/mgar/pkg/octave/trunk/legacy/specs/octave (rev 0) +++ csw/mgar/pkg/octave/trunk/legacy/specs/octave 2009-04-27 12:55:42 UTC (rev 4557) @@ -0,0 +1,63 @@ +# vim: ft=perl +# $Id: octave,v 1.11 2007-12-30 00:06:41 simigern Exp $ + +$progname = 'octave'; +$version = '3.0.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.octave.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['octave-gcc-segvfix.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - The GNU Octave language for numerical computations", + dependencies => ['CSWcommon','CSWgnuplot','CSWgcc3g++rt','CSWgcc3g77rt'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +#This works, but links against sunmath and sunperf... +#export CC=cc +#export CXX=CC +#export F77=f77 +#export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' + +export PATH="/opt/csw/gcc3/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="-I/opt/csw/include" +export CPPFLAGS="-I/opt/csw/include" +export LD_OPTIONS="-R/opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib/octave-${version} -L/opt/csw/lib/octave-${version}" +export CC=gcc +export CXX=g++ +export F77=g77 + + +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-hdf5 +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +rm -f ${buildroot}/opt/csw/share/info/dir +find ${buildroot} -perm -u+x -type f -exec strip {} \\; + +for i in faq interpreter liboctave refcard; do + mkdir -p ${buildroot}/opt/csw/share/doc/octave/\$i + cp doc/\$i/*.pdf doc/\$i/*.html ${buildroot}/opt/csw/share/doc/octave/\$i/ || true + test -d doc/\$i/HTML && cp -r doc/\$i/HTML ${buildroot}/opt/csw/share/doc/octave/\$i/HTML +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:55:58 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:55:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4558] csw/mgar/pkg Message-ID: Revision: 4558 http://gar.svn.sourceforge.net/gar/?rev=4558&view=rev Author: dmichelsen Date: 2009-04-27 12:55:58 +0000 (Mon, 27 Apr 2009) Log Message: ----------- openobex: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/openobex/ csw/mgar/pkg/openobex/trunk/ csw/mgar/pkg/openobex/trunk/legacy/ csw/mgar/pkg/openobex/trunk/legacy/scripts/ csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/openobex/trunk/legacy/scripts/human.pl csw/mgar/pkg/openobex/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/openobex/trunk/legacy/sources/ csw/mgar/pkg/openobex/trunk/legacy/specs/ csw/mgar/pkg/openobex/trunk/legacy/specs/Makefile csw/mgar/pkg/openobex/trunk/legacy/specs/openobex Added: csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:55:58 UTC (rev 4558) @@ -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/openobex/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/scripts/human.pl 2009-04-27 12:55:58 UTC (rev 4558) @@ -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 () { + 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 + +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 + +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/openobex/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:55:58 UTC (rev 4558) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/openobex/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/specs/Makefile 2009-04-27 12:55:58 UTC (rev 4558) @@ -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/openobex/trunk/legacy/specs/openobex =================================================================== --- csw/mgar/pkg/openobex/trunk/legacy/specs/openobex (rev 0) +++ csw/mgar/pkg/openobex/trunk/legacy/specs/openobex 2009-04-27 12:55:58 UTC (rev 4558) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: openobex,v 1.3 2004/03/24 18:47:35 simigern Exp $ + +$progname = 'openobex'; +$version = '1.0.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://openobex.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - An Object Exchange (OBEX) protocol implementation", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=gcc +export CXX=g++ +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include' +export LD_OPTIONS='-R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -lsocket -lnsl' +cd ${progname}-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo "#include " >src/stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install +sed -e 's|#include ||' ${buildroot}/opt/csw/include/openobex/obex.h >${buildroot}/opt/csw/include/openobex/obex.hnew +mv ${buildroot}/opt/csw/include/openobex/obex.hnew ${buildroot}/opt/csw/include/openobex/obex.h +sed -e 's|#include ||' ${buildroot}/opt/csw/include/openobex/obex_const.h >${buildroot}/opt/csw/include/openobex/obex_const.hnew +mv ${buildroot}/opt/csw/include/openobex/obex_const.hnew ${buildroot}/opt/csw/include/openobex/obex_const.h +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:56:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:56:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4559] csw/mgar/pkg Message-ID: Revision: 4559 http://gar.svn.sourceforge.net/gar/?rev=4559&view=rev Author: dmichelsen Date: 2009-04-27 12:56:15 +0000 (Mon, 27 Apr 2009) Log Message: ----------- orbit2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/orbit2/ csw/mgar/pkg/orbit2/trunk/ csw/mgar/pkg/orbit2/trunk/legacy/ csw/mgar/pkg/orbit2/trunk/legacy/scripts/ csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/orbit2/trunk/legacy/scripts/human.pl csw/mgar/pkg/orbit2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/orbit2/trunk/legacy/sources/ csw/mgar/pkg/orbit2/trunk/legacy/specs/ csw/mgar/pkg/orbit2/trunk/legacy/specs/Makefile csw/mgar/pkg/orbit2/trunk/legacy/specs/orbit2 Added: csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:56:15 UTC (rev 4559) @@ -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/orbit2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/scripts/human.pl 2009-04-27 12:56:15 UTC (rev 4559) @@ -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 () { + 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 + +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 + +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/orbit2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:56:15 UTC (rev 4559) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/orbit2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/specs/Makefile 2009-04-27 12:56:15 UTC (rev 4559) @@ -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/orbit2/trunk/legacy/specs/orbit2 =================================================================== --- csw/mgar/pkg/orbit2/trunk/legacy/specs/orbit2 (rev 0) +++ csw/mgar/pkg/orbit2/trunk/legacy/specs/orbit2 2009-04-27 12:56:15 UTC (rev 4559) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: orbit2,v 1.2 2005/11/12 19:29:36 simigern Exp $ + +$progname = 'orbit2'; +$version = '2.12.4'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/gnome/sources/ORBit2 packaged for CSW by Michael Gernoth'; + + at sources = ("ORBit2-${version}.tar.bz2"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - ORBit 2.x CORBA tools and libraries", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:${builddir}/ORBit2-${version}/src/idl-compiler/:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export CPP='/opt/csw/gcc3/bin/cpp' +cd ORBit2-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:${builddir}/ORBit2-${version}/src/idl-compiler:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} GCONF_SCHEMA_CONFIG_SOURCE=xml::${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:56:32 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:56:32 +0000 Subject: [csw-devel] SF.net SVN: gar:[4560] csw/mgar/pkg Message-ID: Revision: 4560 http://gar.svn.sourceforge.net/gar/?rev=4560&view=rev Author: dmichelsen Date: 2009-04-27 12:56:31 +0000 (Mon, 27 Apr 2009) Log Message: ----------- patchutils: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/patchutils/ csw/mgar/pkg/patchutils/trunk/ csw/mgar/pkg/patchutils/trunk/legacy/ csw/mgar/pkg/patchutils/trunk/legacy/scripts/ csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/patchutils/trunk/legacy/scripts/human.pl csw/mgar/pkg/patchutils/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/patchutils/trunk/legacy/sources/ csw/mgar/pkg/patchutils/trunk/legacy/specs/ csw/mgar/pkg/patchutils/trunk/legacy/specs/Makefile csw/mgar/pkg/patchutils/trunk/legacy/specs/patchutils Added: csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:56:31 UTC (rev 4560) @@ -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/patchutils/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/scripts/human.pl 2009-04-27 12:56:31 UTC (rev 4560) @@ -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 () { + 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 + +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 + +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/patchutils/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:56:31 UTC (rev 4560) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/patchutils/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/specs/Makefile 2009-04-27 12:56:31 UTC (rev 4560) @@ -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/patchutils/trunk/legacy/specs/patchutils =================================================================== --- csw/mgar/pkg/patchutils/trunk/legacy/specs/patchutils (rev 0) +++ csw/mgar/pkg/patchutils/trunk/legacy/specs/patchutils 2009-04-27 12:56:31 UTC (rev 4560) @@ -0,0 +1,35 @@ +# vim: ft=perl +# $Id: patchutils,v 1.2 2004/06/27 22:30:36 simigern Exp $ + +$progname = 'patchutils'; +$version = '0.2.29'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://cyberelk.net/tim/patchutils/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Tools for manipulating patch files", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake +gmake DESTDIR=${buildroot} install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:56:47 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:56:47 +0000 Subject: [csw-devel] SF.net SVN: gar:[4561] csw/mgar/pkg/rdesktop/trunk Message-ID: Revision: 4561 http://gar.svn.sourceforge.net/gar/?rev=4561&view=rev Author: dmichelsen Date: 2009-04-27 12:56:47 +0000 (Mon, 27 Apr 2009) Log Message: ----------- rdesktop: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/rdesktop/trunk/legacy/ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/rdesktop/trunk/legacy/scripts/human.pl csw/mgar/pkg/rdesktop/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/rdesktop/trunk/legacy/sources/ csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff csw/mgar/pkg/rdesktop/trunk/legacy/specs/ csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile csw/mgar/pkg/rdesktop/trunk/legacy/specs/rdesktop Added: csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:56:47 UTC (rev 4561) @@ -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/rdesktop/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/human.pl 2009-04-27 12:56:47 UTC (rev 4561) @@ -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 () { + 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 + +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 + +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/rdesktop/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:56:47 UTC (rev 4561) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-f11-f2-key.diff 2009-04-27 12:56:47 UTC (rev 4561) @@ -0,0 +1,19 @@ +? aclocal.m4 +? link.hpux +? rdpsnd_libao.c.sic +Index: keymaps/common +=================================================================== +RCS file: /cvsroot/rdesktop/rdesktop/keymaps/common,v +retrieving revision 1.15 +diff -u -r1.15 common +--- keymaps/common 8 Dec 2003 12:01:25 -0000 1.15 ++++ keymaps/common 25 Mar 2005 11:12:47 -0000 +@@ -79,6 +79,8 @@ + F10 0x44 localstate + F11 0x57 localstate + F12 0x58 localstate ++SunF36 0x57 localstate ++SunF37 0x58 localstate + + # Printscreen, Scrollock and Pause + # Printscreen really requires four scancodes (0xe0, 0x2a, 0xe0, 0x37), Added: csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/sources/rdesktop-morekeys.diff 2009-04-27 12:56:47 UTC (rev 4561) @@ -0,0 +1,15 @@ +Index: xkeymap.c +=================================================================== +RCS file: /cvsroot/rdesktop/rdesktop/xkeymap.c,v +retrieving revision 1.67 +diff -u -r1.67 xkeymap.c +--- xkeymap.c 6 Mar 2005 21:11:17 -0000 1.67 ++++ xkeymap.c 25 Mar 2005 15:00:59 -0000 +@@ -326,6 +326,7 @@ + break; + + case XK_Pause: ++ case XK_F21: /* Pause on SUN Keyboard */ + /* According to MS Keyboard Scan Code + Specification, pressing Pause should result + in E1 1D 45 E1 9D C5. I'm not exactly sure Added: csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/specs/Makefile 2009-04-27 12:56:47 UTC (rev 4561) @@ -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/rdesktop/trunk/legacy/specs/rdesktop =================================================================== --- csw/mgar/pkg/rdesktop/trunk/legacy/specs/rdesktop (rev 0) +++ csw/mgar/pkg/rdesktop/trunk/legacy/specs/rdesktop 2009-04-27 12:56:47 UTC (rev 4561) @@ -0,0 +1,44 @@ +# vim: ft=perl +# $Id: rdesktop,v 1.6 2006/09/13 17:20:00 simigern Exp $ + +$progname = 'rdesktop'; +$version = '1.5.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.rdesktop.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['rdesktop-morekeys.diff',"${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - RDP client for Windows NT/2000/2003/XP Terminal Server", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-sound=sun --with-ipv6 --with-openssl=/opt/csw +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 +mkdir -p ${buildroot}/opt/csw/share/doc/rdesktop +cp doc/* ${buildroot}/opt/csw/share/doc/rdesktop/ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:02 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:02 +0000 Subject: [csw-devel] SF.net SVN: gar:[4562] csw/mgar/pkg Message-ID: Revision: 4562 http://gar.svn.sourceforge.net/gar/?rev=4562&view=rev Author: dmichelsen Date: 2009-04-27 12:57:01 +0000 (Mon, 27 Apr 2009) Log Message: ----------- render_dev: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/render_dev/ csw/mgar/pkg/render_dev/trunk/ csw/mgar/pkg/render_dev/trunk/legacy/ csw/mgar/pkg/render_dev/trunk/legacy/scripts/ csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/render_dev/trunk/legacy/scripts/human.pl csw/mgar/pkg/render_dev/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/render_dev/trunk/legacy/sources/ csw/mgar/pkg/render_dev/trunk/legacy/specs/ csw/mgar/pkg/render_dev/trunk/legacy/specs/Makefile csw/mgar/pkg/render_dev/trunk/legacy/specs/render_dev Added: csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:01 UTC (rev 4562) @@ -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/render_dev/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/scripts/human.pl 2009-04-27 12:57:01 UTC (rev 4562) @@ -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 () { + 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 + +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 + +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/render_dev/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:01 UTC (rev 4562) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/render_dev/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/specs/Makefile 2009-04-27 12:57:01 UTC (rev 4562) @@ -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/render_dev/trunk/legacy/specs/render_dev =================================================================== --- csw/mgar/pkg/render_dev/trunk/legacy/specs/render_dev (rev 0) +++ csw/mgar/pkg/render_dev/trunk/legacy/specs/render_dev 2009-04-27 12:57:01 UTC (rev 4562) @@ -0,0 +1,47 @@ +# vim: ft=perl +# $Id: render_dev,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'render'; +$version = '0.8'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/fontconfig/releases/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "renderdev", + filename => "render_dev", + name => "render_dev - fontconfig.org render development files", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$arch='all'; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:16 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:16 +0000 Subject: [csw-devel] SF.net SVN: gar:[4563] csw/mgar/pkg/scrollkeeper/trunk Message-ID: Revision: 4563 http://gar.svn.sourceforge.net/gar/?rev=4563&view=rev Author: dmichelsen Date: 2009-04-27 12:57:16 +0000 (Mon, 27 Apr 2009) Log Message: ----------- scrollkeeper: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/scrollkeeper/trunk/legacy/ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/human.pl csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/ csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/ csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/scrollkeeper Added: csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:16 UTC (rev 4563) @@ -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/scrollkeeper/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/human.pl 2009-04-27 12:57:16 UTC (rev 4563) @@ -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 () { + 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 + +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 + +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/scrollkeeper/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:16 UTC (rev 4563) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/sources/scrollkeeper.postinstall 2009-04-27 12:57:16 UTC (rev 4563) @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +PATH="/opt/csw/bin:${PATH}" +export PATH + +test -f "${PKG_ROOT_DIR}/opt/csw/etc/scrollkeeper.conf" || cp "${PKG_ROOT_DIR}/opt/csw/etc/scrollkeeper.conf.CSW" "${PKG_ROOT_DIR}/opt/csw/etc/scrollkeeper.conf" +chroot "${PKG_ROOT_DIR}" /opt/csw/bin/scrollkeeper-rebuilddb -q -p /opt/csw/var/lib/scrollkeeper + Added: csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/Makefile 2009-04-27 12:57:16 UTC (rev 4563) @@ -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/scrollkeeper/trunk/legacy/specs/scrollkeeper =================================================================== --- csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/scrollkeeper (rev 0) +++ csw/mgar/pkg/scrollkeeper/trunk/legacy/specs/scrollkeeper 2009-04-27 12:57:16 UTC (rev 4563) @@ -0,0 +1,57 @@ +# vim: ft=perl +# $Id: scrollkeeper,v 1.7 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'scrollkeeper'; +$version = '0.3.14'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://scrollkeeper.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - a cataloging system for documentation on open systems", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + #postinstall => "scrollkeeper.postinstall", + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$suffix='.02'; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -L${buildroot}/opt/csw/lib' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-omfdirs=/opt/csw/share/omf --with-xml-catalog=/opt/csw/etc/xml/catalog +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +sed -e 's|echo "`date|#echo "`date|' Makefile | sed -e 's|\$(DESTDIR)\$(bindir)/scrollkeeper-rebuilddb -q|#\$(DESTDIR)\$(bindir)/scrollkeeper-rebuilddb -q|' >Makefile.new +mv Makefile.new Makefile +gmake +gmake DESTDIR=${buildroot} install +mv ${buildroot}/opt/csw/etc/scrollkeeper.conf ${buildroot}/opt/csw/etc/scrollkeeper.conf.CSW + +sed -e 's|scrollkeeper-config|/opt/csw/bin/scrollkeeper-config|g' ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb | sed -e 's|scrollkeeper-update|/opt/csw/bin/scrollkeeper-update|g' >${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb.new +mv ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb.new ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb +chmod 755 ${buildroot}/opt/csw/bin/scrollkeeper-rebuilddb + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4564] csw/mgar/pkg Message-ID: Revision: 4564 http://gar.svn.sourceforge.net/gar/?rev=4564&view=rev Author: dmichelsen Date: 2009-04-27 12:57:31 +0000 (Mon, 27 Apr 2009) Log Message: ----------- scummvm: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/scummvm/ csw/mgar/pkg/scummvm/trunk/ csw/mgar/pkg/scummvm/trunk/legacy/ csw/mgar/pkg/scummvm/trunk/legacy/scripts/ csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/scummvm/trunk/legacy/scripts/human.pl csw/mgar/pkg/scummvm/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/scummvm/trunk/legacy/sources/ csw/mgar/pkg/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch csw/mgar/pkg/scummvm/trunk/legacy/specs/ csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile csw/mgar/pkg/scummvm/trunk/legacy/specs/scummvm Added: csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:31 UTC (rev 4564) @@ -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/scummvm/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/scripts/human.pl 2009-04-27 12:57:31 UTC (rev 4564) @@ -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 () { + 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 + +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 + +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/scummvm/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:31 UTC (rev 4564) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/sources/scummvm-solaris.fixes.patch 2009-04-27 12:57:31 UTC (rev 4564) @@ -0,0 +1,23 @@ +--- base/gameDetector.cpp.orig 2004-12-24 09:10:42.958207000 -0500 ++++ base/gameDetector.cpp 2004-12-24 09:13:03.298223000 -0500 +@@ -37,6 +37,7 @@ + #endif + + #ifdef UNIX ++#include + #include + #include + #ifdef MACOSX +--- backends/midi/mt32/mt32emu.h.orig 2004-12-24 09:29:26.658230000 -0500 ++++ backends/midi/mt32/mt32emu.h 2004-12-24 09:34:35.428219000 -0500 +@@ -56,6 +56,10 @@ + #define MT32EMU_USE_MMX 0 + #endif + ++#define powf pow ++#define logf log ++#define expf exp ++ + #include "freeverb.h" + + #include "structures.h" Added: csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/specs/Makefile 2009-04-27 12:57:31 UTC (rev 4564) @@ -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/scummvm/trunk/legacy/specs/scummvm =================================================================== --- csw/mgar/pkg/scummvm/trunk/legacy/specs/scummvm (rev 0) +++ csw/mgar/pkg/scummvm/trunk/legacy/specs/scummvm 2009-04-27 12:57:31 UTC (rev 4564) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: scummvm,v 1.7 2004/12/24 14:51:40 simigern Exp $ + +$progname = 'scummvm'; +$version = '0.7.0'; +#my $addver = "b"; +#$suffix = "_rev=${addver}"; +my $addver=""; + +$buildroot = "${builddir}/${progname}-${version}${addver}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.scummvm.org packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}${addver}.tar.bz2"); + + at patches = (['scummvm-solaris.fixes.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - virtual machine for several classic graphical point-and-click adventure games", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}${addver}/COPYING"; + +$build = <<"EOF"; +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin:${builddir}/${progname}-${version}${addver}" +export CFLAGS="-I/opt/csw/include" +export CPPFLAGS='-I/opt/csw/include' +export LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib' # -lgcc_s' +export LD_RUN_PATH='/opt/csw/lib' +cd ${progname}-${version}${addver} +ln -s /opt/csw/bin/ginstall install +./configure --with-vorbis-prefix=/opt/csw --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake || exit 1 +gmake PREFIX=${buildroot}/opt/csw MANDIR=${buildroot}/opt/csw/share/man BINDIR=${buildroot}/opt/csw/bin install +gmkdir -p ${buildroot}/opt/csw/share/applications +cp scummvm.desktop ${buildroot}/opt/csw/share/applications +#gmkdir -p ${buildroot}/opt/csw/bin ${buildroot}/opt/csw/share/doc/${progname} +#cp scummvm ${buildroot}/opt/csw/bin +#cp NEWS README ${buildroot}/opt/csw/share/doc/${progname} +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:57:48 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:57:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4565] csw/mgar/pkg Message-ID: Revision: 4565 http://gar.svn.sourceforge.net/gar/?rev=4565&view=rev Author: dmichelsen Date: 2009-04-27 12:57:47 +0000 (Mon, 27 Apr 2009) Log Message: ----------- shared-mime-info: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/shared-mime-info/ csw/mgar/pkg/shared-mime-info/trunk/ csw/mgar/pkg/shared-mime-info/trunk/legacy/ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/human.pl csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/ csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/ csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/shared-mime-info Added: csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:57:47 UTC (rev 4565) @@ -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/shared-mime-info/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/human.pl 2009-04-27 12:57:47 UTC (rev 4565) @@ -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 () { + 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 + +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 + +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/shared-mime-info/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:57:47 UTC (rev 4565) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/sources/shared-mime-info.postinst 2009-04-27 12:57:47 UTC (rev 4565) @@ -0,0 +1,10 @@ +#!/bin/sh +#$Id: shared-mime-info.postinst,v 1.1 2004/06/25 16:35:27 simigern Exp $ + +umask 0022 + +if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi + +XDG_DATA_DIRS=/opt/csw/share/:/usr/local/share/:/usr/share/ +export XDG_DATA_DIRS +chroot "${PKG_ROOT_DIR}" /opt/csw/bin/update-mime-database /opt/csw/share/mime Added: csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/Makefile 2009-04-27 12:57:47 UTC (rev 4565) @@ -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/shared-mime-info/trunk/legacy/specs/shared-mime-info =================================================================== --- csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/shared-mime-info (rev 0) +++ csw/mgar/pkg/shared-mime-info/trunk/legacy/specs/shared-mime-info 2009-04-27 12:57:47 UTC (rev 4565) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: shared-mime-info,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'shared-mime-info'; +$version = '0.15'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://freedesktop.org/Software/shared-mime-info packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['gpl-copying.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "sharedmimeinfo", + filename => "shared_mime_info", + name => "shared_mime_info - freedesktop.org common MIME database", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:03 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:03 +0000 Subject: [csw-devel] SF.net SVN: gar:[4566] csw/mgar/pkg Message-ID: Revision: 4566 http://gar.svn.sourceforge.net/gar/?rev=4566&view=rev Author: dmichelsen Date: 2009-04-27 12:58:02 +0000 (Mon, 27 Apr 2009) Log Message: ----------- skeleton: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/skeleton/ csw/mgar/pkg/skeleton/trunk/ csw/mgar/pkg/skeleton/trunk/legacy/ csw/mgar/pkg/skeleton/trunk/legacy/scripts/ csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/skeleton/trunk/legacy/scripts/human.pl csw/mgar/pkg/skeleton/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/skeleton/trunk/legacy/sources/ csw/mgar/pkg/skeleton/trunk/legacy/specs/ csw/mgar/pkg/skeleton/trunk/legacy/specs/Makefile csw/mgar/pkg/skeleton/trunk/legacy/specs/skeleton Added: csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:02 UTC (rev 4566) @@ -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/skeleton/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/scripts/human.pl 2009-04-27 12:58:02 UTC (rev 4566) @@ -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 () { + 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 + +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 + +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/skeleton/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:02 UTC (rev 4566) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/skeleton/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/specs/Makefile 2009-04-27 12:58:02 UTC (rev 4566) @@ -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/skeleton/trunk/legacy/specs/skeleton =================================================================== --- csw/mgar/pkg/skeleton/trunk/legacy/specs/skeleton (rev 0) +++ csw/mgar/pkg/skeleton/trunk/legacy/specs/skeleton 2009-04-27 12:58:02 UTC (rev 4566) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: skeleton,v 1.4 2004/12/23 14:29:09 simigern Exp $ + +$progname = 'program_name_here'; +$version = '1.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://URL packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Description", + 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} +./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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:18 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:18 +0000 Subject: [csw-devel] SF.net SVN: gar:[4567] csw/mgar/pkg Message-ID: Revision: 4567 http://gar.svn.sourceforge.net/gar/?rev=4567&view=rev Author: dmichelsen Date: 2009-04-27 12:58:18 +0000 (Mon, 27 Apr 2009) Log Message: ----------- sox: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/sox/ csw/mgar/pkg/sox/trunk/ csw/mgar/pkg/sox/trunk/legacy/ csw/mgar/pkg/sox/trunk/legacy/scripts/ csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/sox/trunk/legacy/scripts/human.pl csw/mgar/pkg/sox/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/sox/trunk/legacy/sources/ csw/mgar/pkg/sox/trunk/legacy/sources/sox.diff csw/mgar/pkg/sox/trunk/legacy/specs/ csw/mgar/pkg/sox/trunk/legacy/specs/Makefile csw/mgar/pkg/sox/trunk/legacy/specs/sox Added: csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:18 UTC (rev 4567) @@ -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/sox/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/scripts/human.pl 2009-04-27 12:58:18 UTC (rev 4567) @@ -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 () { + 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 + +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 + +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/sox/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:18 UTC (rev 4567) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/sox/trunk/legacy/sources/sox.diff =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/sources/sox.diff (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/sources/sox.diff 2009-04-27 12:58:18 UTC (rev 4567) @@ -0,0 +1,11 @@ +--- sox-13.0.0/src/st.h.orig 2007-03-04 11:15:32.159095000 -0500 ++++ sox-13.0.0/src/st.h 2007-03-04 11:15:40.478940000 -0500 +@@ -27,6 +27,8 @@ + /* Avoid warnings about unused parameters. */ + #ifdef __GNUC__ + #define UNUSED __attribute__ ((unused)) ++#else ++#define UNUSED + #endif + + /* C language enhancements: */ Added: csw/mgar/pkg/sox/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/specs/Makefile 2009-04-27 12:58:18 UTC (rev 4567) @@ -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/sox/trunk/legacy/specs/sox =================================================================== --- csw/mgar/pkg/sox/trunk/legacy/specs/sox (rev 0) +++ csw/mgar/pkg/sox/trunk/legacy/specs/sox 2009-04-27 12:58:18 UTC (rev 4567) @@ -0,0 +1,48 @@ +# vim: ft=perl +# $Id: sox,v 1.7 2007-03-04 16:25:37 simigern Exp $ + +$progname = 'sox'; +$version = '13.0.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://sox.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + + at patches = (['sox.diff', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Sound Processing Tool", + 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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake prefix=${buildroot}/opt/csw mandir=${buildroot}/opt/csw/share/man install +rm ${buildroot}/opt/csw/bin/rec +ln -s play ${buildroot}/opt/csw/bin/rec +rm ${buildroot}/opt/csw/share/man/man1/rec.1 +ln -s play.1 ${buildroot}/opt/csw/share/man/man1/rec.1 +rm ${buildroot}/opt/csw/share/man/man1/soxmix.1 +ln -s sox.1 ${buildroot}/opt/csw/share/man/man1/soxmix.1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:34 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:34 +0000 Subject: [csw-devel] SF.net SVN: gar:[4568] csw/mgar/pkg Message-ID: Revision: 4568 http://gar.svn.sourceforge.net/gar/?rev=4568&view=rev Author: dmichelsen Date: 2009-04-27 12:58:34 +0000 (Mon, 27 Apr 2009) Log Message: ----------- sqlite: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/sqlite/ csw/mgar/pkg/sqlite/trunk/ csw/mgar/pkg/sqlite/trunk/legacy/ csw/mgar/pkg/sqlite/trunk/legacy/scripts/ csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/sqlite/trunk/legacy/scripts/human.pl csw/mgar/pkg/sqlite/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/sqlite/trunk/legacy/sources/ csw/mgar/pkg/sqlite/trunk/legacy/sources/sqlite-COPYING.patch csw/mgar/pkg/sqlite/trunk/legacy/specs/ csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile csw/mgar/pkg/sqlite/trunk/legacy/specs/sqlite Added: csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:34 UTC (rev 4568) @@ -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/sqlite/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/scripts/human.pl 2009-04-27 12:58:34 UTC (rev 4568) @@ -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 () { + 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 + +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 + +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/sqlite/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:34 UTC (rev 4568) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/sqlite/trunk/legacy/sources/sqlite-COPYING.patch =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/sources/sqlite-COPYING.patch (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/sources/sqlite-COPYING.patch 2009-04-27 12:58:34 UTC (rev 4568) @@ -0,0 +1,40 @@ +--- /dev/null 2004-02-24 11:11:49.000000000 -0500 ++++ COPYING 2004-02-24 11:17:14.915481000 -0500 +@@ -0,0 +1,37 @@ ++SQLite Copyright ++ ++The original author of SQLite has dedicated the code to the public domain. ++Anyone is free to copy, modify, publish, use, compile, sell, or distribute the ++original SQLite code, either in source code form or as a compiled binary, for ++any purpose, commerical or non-commerical, and by any means. ++ ++Contributed Code ++ ++In order to keep SQLite complete free and unencumbered by copyright, other ++contributors to the SQLite code base are asked to likewise dedicate their ++contributions to the public domain. If you want to send a patch or enhancement ++for possible inclusion in the SQLite source tree, please accompany the patch ++with the following statement: ++ ++ The author or authors of this code dedicate any and all copyright interest ++ in this code to the public domain. We make this dedication for the benefit ++ of the public at large and to the detriment of our heirs and successors. ++ We intend this dedication to be an overt act of relinquishment in ++ perpetuity of all present and future rights this code under copyright law. ++ ++Regrettably, as of 2003 October 20, we will no longer be able to accept patches ++or changes to SQLite that are not accompanied by a statement such as the above. ++In addition, if you make changes or enhancements as an employee, then a simple ++statement such as the above is insufficient. You must also send by surface mail ++a copyright release signed by a company officer. A signed original of the ++copyright release should be mailed to: ++ ++ Hwaci ++ 6200 Maple Cove Lane ++ Charlotte, NC 28269 ++ USA ++ ++A template copyright release is available in PDF or HTML. You can use this ++release to make future changes. If you have contributed changes or enhancements ++to SQLite in the past, and have not already done so, you are invited to ++complete and sign a copy of the template and mail it to the address above. Added: csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/specs/Makefile 2009-04-27 12:58:34 UTC (rev 4568) @@ -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/sqlite/trunk/legacy/specs/sqlite =================================================================== --- csw/mgar/pkg/sqlite/trunk/legacy/specs/sqlite (rev 0) +++ csw/mgar/pkg/sqlite/trunk/legacy/specs/sqlite 2009-04-27 12:58:34 UTC (rev 4568) @@ -0,0 +1,73 @@ +# vim: ft=perl +# $Id: sqlite,v 1.8 2005/04/09 12:18:18 simigern Exp $ + +$progname = 'sqlite'; +$version = '2.8.16'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.sqlite.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("sqlite-${version}.tar.gz"); + at patches = (['sqlite-COPYING.patch', "sqlite-${version}", '-p0']); + at packages = ({ + pkgname => ${progname}, + filename => ${progname}, + name => "${progname} - An embeddable SQL engine in a C library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); +$copyright = "${progname}-${version}/COPYING"; + +if ("$arch" eq "sparc") { + @isaexecs = ('/opt/csw/bin/sqlite'); +} + +#$suffix='.01'; + +$build = <<"EOF"; +set -x +export CC=cc +export PATH="${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +export LD_RUN_PATH='/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-fast -xarch=386' + #export CFLAGS='' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include -I/opt/csw/include/readline" +export CPPFLAGS="-I/opt/csw/include -I/opt/csw/include/readline" +cd sqlite-${version} +mkdir bld +cd bld +../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --mandir=/opt/csw/share/man --enable-threadsafe +gmake +gmake prefix=${buildroot}/opt/csw install +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp ../sqlite.1 ${buildroot}/opt/csw/share/man/man1/ + +#We need 64-bit libreadline (really?) +if [ "${arch}" = "sparc" ]; then + mkdir -p ${buildroot}/opt/csw/bin/sparcv8 + mv ${buildroot}/opt/csw/bin/sqlite ${buildroot}/opt/csw/bin/sparcv8/ + gmake distclean + export CFLAGS='-fast -xtarget=ultra -xarch=v9 -I/opt/csw/include -I/opt/csw/include/readline' + export LD_OPTIONS='-R/opt/csw/lib/sparcv9 -L/opt/csw/lib/sparcv9' + export LD_RUN_PATH='/opt/csw/lib/sparcv9' + ../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --libdir=/opt/csw/lib/sparcv9 --bindir=/opt/csw/bin/sparcv9 --mandir=/opt/csw/share/man --enable-threadsafe + gmake + #This is ugly :-( + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/lib/sparcv9 + ./libtool /opt/csw/bin/ginstall -c libsqlite.la ${buildroot}/opt/csw/lib/sparcv9 + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/bin/sparcv9 + ./libtool /opt/csw/bin/ginstall -c sqlite ${buildroot}/opt/csw/bin/sparcv9 + ln -s sparcv8/sqlite ${buildroot}/opt/csw/bin/sqlite32 + ln -s sparcv9/sqlite ${buildroot}/opt/csw/bin/sqlite64 +else + ln -s sqlite ${buildroot}/opt/csw/bin/sqlite32 +fi + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:58:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:58:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4569] csw/mgar/pkg/sqlite3/trunk Message-ID: Revision: 4569 http://gar.svn.sourceforge.net/gar/?rev=4569&view=rev Author: dmichelsen Date: 2009-04-27 12:58:48 +0000 (Mon, 27 Apr 2009) Log Message: ----------- sqlite3: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/sqlite3/trunk/legacy/ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/sqlite3/trunk/legacy/scripts/human.pl csw/mgar/pkg/sqlite3/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/sqlite3/trunk/legacy/sources/ csw/mgar/pkg/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch csw/mgar/pkg/sqlite3/trunk/legacy/specs/ csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile csw/mgar/pkg/sqlite3/trunk/legacy/specs/sqlite3 Added: csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:58:48 UTC (rev 4569) @@ -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/sqlite3/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/human.pl 2009-04-27 12:58:48 UTC (rev 4569) @@ -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 () { + 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 + +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 + +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/sqlite3/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:58:48 UTC (rev 4569) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/sources/sqlite-COPYING.patch 2009-04-27 12:58:48 UTC (rev 4569) @@ -0,0 +1,40 @@ +--- /dev/null 2004-02-24 11:11:49.000000000 -0500 ++++ COPYING 2004-02-24 11:17:14.915481000 -0500 +@@ -0,0 +1,37 @@ ++SQLite Copyright ++ ++The original author of SQLite has dedicated the code to the public domain. ++Anyone is free to copy, modify, publish, use, compile, sell, or distribute the ++original SQLite code, either in source code form or as a compiled binary, for ++any purpose, commerical or non-commerical, and by any means. ++ ++Contributed Code ++ ++In order to keep SQLite complete free and unencumbered by copyright, other ++contributors to the SQLite code base are asked to likewise dedicate their ++contributions to the public domain. If you want to send a patch or enhancement ++for possible inclusion in the SQLite source tree, please accompany the patch ++with the following statement: ++ ++ The author or authors of this code dedicate any and all copyright interest ++ in this code to the public domain. We make this dedication for the benefit ++ of the public at large and to the detriment of our heirs and successors. ++ We intend this dedication to be an overt act of relinquishment in ++ perpetuity of all present and future rights this code under copyright law. ++ ++Regrettably, as of 2003 October 20, we will no longer be able to accept patches ++or changes to SQLite that are not accompanied by a statement such as the above. ++In addition, if you make changes or enhancements as an employee, then a simple ++statement such as the above is insufficient. You must also send by surface mail ++a copyright release signed by a company officer. A signed original of the ++copyright release should be mailed to: ++ ++ Hwaci ++ 6200 Maple Cove Lane ++ Charlotte, NC 28269 ++ USA ++ ++A template copyright release is available in PDF or HTML. You can use this ++release to make future changes. If you have contributed changes or enhancements ++to SQLite in the past, and have not already done so, you are invited to ++complete and sign a copy of the template and mail it to the address above. Added: csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/specs/Makefile 2009-04-27 12:58:48 UTC (rev 4569) @@ -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/sqlite3/trunk/legacy/specs/sqlite3 =================================================================== --- csw/mgar/pkg/sqlite3/trunk/legacy/specs/sqlite3 (rev 0) +++ csw/mgar/pkg/sqlite3/trunk/legacy/specs/sqlite3 2009-04-27 12:58:48 UTC (rev 4569) @@ -0,0 +1,75 @@ +# vim: ft=perl +# $Id: sqlite3,v 1.5 2005/07/10 18:33:04 simigern Exp $ + +$progname = 'sqlite3'; +$version = '3.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.sqlite.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("sqlite-${version}.tar.gz"); + at patches = (['sqlite-COPYING.patch', "sqlite-${version}", '-p0']); + at packages = ({ + pkgname => ${progname}, + filename => ${progname}, + name => "${progname} - An embeddable SQL engine in a C library", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); +$copyright = "sqlite-${version}/COPYING"; + +if ("$arch" eq "sparc") { + @isaexecs = ('/opt/csw/bin/sqlite3'); +} + +#$suffix='.01'; + +$build = <<"EOF"; +set -x +export CC=cc +export PATH="${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +export LD_RUN_PATH='/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-fast -xarch=386' + #export CFLAGS='' +fi +export CFLAGS="\$CFLAGS -I/opt/csw/include -I/opt/csw/include/readline" +export CPPFLAGS="-I/opt/csw/include -I/opt/csw/include/readline" +cd sqlite-${version} +mkdir bld +cd bld +ln -s /opt/csw/bin/gawk awk +export PATH="`pwd`:\${PATH}" +../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --mandir=/opt/csw/share/man --enable-threadsafe +gmake +gmake prefix=${buildroot}/opt/csw install +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp ../sqlite3.1 ${buildroot}/opt/csw/share/man/man1/ + +#We need 64-bit libreadline (really?) +if [ "${arch}" = "sparc" ]; then + mkdir -p ${buildroot}/opt/csw/bin/sparcv8 + mv ${buildroot}/opt/csw/bin/sqlite3 ${buildroot}/opt/csw/bin/sparcv8/ + gmake distclean + export CFLAGS='-fast -xtarget=ultra -xarch=v9 -I/opt/csw/include -I/opt/csw/include/readline' + export LD_OPTIONS='-R/opt/csw/lib/sparcv9 -L/opt/csw/lib/sparcv9' + export LD_RUN_PATH='/opt/csw/lib/sparcv9' + ../configure --prefix=/opt/csw --infodir=/opt/csw/share/info --libdir=/opt/csw/lib/sparcv9 --bindir=/opt/csw/bin/sparcv9 --mandir=/opt/csw/share/man --enable-threadsafe + gmake + #This is ugly :-( + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/lib/sparcv9 + ./libtool /opt/csw/bin/ginstall -c libsqlite3.la ${buildroot}/opt/csw/lib/sparcv9 + /opt/csw/bin/ginstall -c -d ${buildroot}/opt/csw/bin/sparcv9 + ./libtool /opt/csw/bin/ginstall -c sqlite3 ${buildroot}/opt/csw/bin/sparcv9 + ln -s sparcv8/sqlite3 ${buildroot}/opt/csw/bin/sqlite3-32 + ln -s sparcv9/sqlite3 ${buildroot}/opt/csw/bin/sqlite3-64 +else + ln -s sqlite3 ${buildroot}/opt/csw/bin/sqlite3-32 +fi + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:05 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:05 +0000 Subject: [csw-devel] SF.net SVN: gar:[4570] csw/mgar/pkg Message-ID: Revision: 4570 http://gar.svn.sourceforge.net/gar/?rev=4570&view=rev Author: dmichelsen Date: 2009-04-27 12:59:05 +0000 (Mon, 27 Apr 2009) Log Message: ----------- startup-notification: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/startup-notification/ csw/mgar/pkg/startup-notification/trunk/ csw/mgar/pkg/startup-notification/trunk/legacy/ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/startup-notification/trunk/legacy/scripts/human.pl csw/mgar/pkg/startup-notification/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/startup-notification/trunk/legacy/sources/ csw/mgar/pkg/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch csw/mgar/pkg/startup-notification/trunk/legacy/specs/ csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile csw/mgar/pkg/startup-notification/trunk/legacy/specs/startup-notification Added: csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:05 UTC (rev 4570) @@ -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/startup-notification/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/human.pl 2009-04-27 12:59:05 UTC (rev 4570) @@ -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 () { + 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 + +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 + +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/startup-notification/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:05 UTC (rev 4570) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/sources/startup-notification.sn-launcher.patch 2009-04-27 12:59:05 UTC (rev 4570) @@ -0,0 +1,22 @@ +--- libsn/sn-launcher.c.orig 2002-11-30 12:58:17.000000000 -0500 ++++ libsn/sn-launcher.c 2004-03-29 15:41:49.000000000 -0500 +@@ -175,8 +175,7 @@ + + if (context->startup_id != NULL) + { +- fprintf (stderr, "%s called twice for the same SnLaunchContext\n", +- __FUNCTION__); ++ fprintf (stderr, "sn_launcher_context_initiate called twice for the same SnLaunchContext\n"); + return; + } + +@@ -361,8 +360,7 @@ + + /* FIXME use something pluggable, not fprintf */ + #define WARN_ALREADY_INITIATED(context) do { if ((context)->startup_id != NULL) { \ +- fprintf (stderr, "%s called for an SnLauncherContext that has already been initiated\n", \ +- __FUNCTION__); \ ++ fprintf (stderr, "sn_launcher_context_setup_child_process called for an SnLauncherContext that has already been initiated\n"); \ + return; \ + } } while (0) + Added: csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/specs/Makefile 2009-04-27 12:59:05 UTC (rev 4570) @@ -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/startup-notification/trunk/legacy/specs/startup-notification =================================================================== --- csw/mgar/pkg/startup-notification/trunk/legacy/specs/startup-notification (rev 0) +++ csw/mgar/pkg/startup-notification/trunk/legacy/specs/startup-notification 2009-04-27 12:59:05 UTC (rev 4570) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: startup-notification,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'startup-notification'; +$version = '0.7'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://ftp.gnome.org/pub/GNOME/sources/startup-notification/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['startup-notification.sn-launcher.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "startupnotif", + filename => "startup_notif", + name => "startup_notif - Library for tracking application startup", + dependencies => ['CSWcommon'], + filelist => [qw(opt)], + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib' +cd ${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info || exit 1 +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. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:21 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:21 +0000 Subject: [csw-devel] SF.net SVN: gar:[4571] csw/mgar/pkg/subversion/trunk Message-ID: Revision: 4571 http://gar.svn.sourceforge.net/gar/?rev=4571&view=rev Author: dmichelsen Date: 2009-04-27 12:59:21 +0000 (Mon, 27 Apr 2009) Log Message: ----------- subversion: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/subversion/trunk/legacy/ csw/mgar/pkg/subversion/trunk/legacy/scripts/ csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/subversion/trunk/legacy/scripts/human.pl csw/mgar/pkg/subversion/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/subversion/trunk/legacy/sources/ csw/mgar/pkg/subversion/trunk/legacy/sources/subversion-utf.patch csw/mgar/pkg/subversion/trunk/legacy/specs/ csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile csw/mgar/pkg/subversion/trunk/legacy/specs/subversion Added: csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:21 UTC (rev 4571) @@ -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/subversion/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/scripts/human.pl 2009-04-27 12:59:21 UTC (rev 4571) @@ -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 () { + 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 + +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 + +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/subversion/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:21 UTC (rev 4571) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/subversion/trunk/legacy/sources/subversion-utf.patch =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/sources/subversion-utf.patch (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/sources/subversion-utf.patch 2009-04-27 12:59:21 UTC (rev 4571) @@ -0,0 +1,20 @@ +--- subversion/libsvn_subr/utf.c.orig 2004-03-26 21:34:00.815411000 +0100 ++++ subversion/libsvn_subr/utf.c 2004-03-26 21:45:05.375692000 +0100 +@@ -92,7 +92,7 @@ + static svn_error_t * + get_ntou_xlate_handle (apr_xlate_t **ret, apr_pool_t *pool) + { +- return get_xlate_handle(ret, "UTF-8", APR_LOCALE_CHARSET, ++ return get_xlate_handle(ret, "UTF-8", "ASCII", + SVN_UTF_NTOU_XLATE_HANDLE, pool); + } + +@@ -105,7 +105,7 @@ + static svn_error_t * + get_uton_xlate_handle (apr_xlate_t **ret, apr_pool_t *pool) + { +- return get_xlate_handle(ret, APR_LOCALE_CHARSET, "UTF-8", ++ return get_xlate_handle(ret, "ASCII", "UTF-8", + SVN_UTF_UTON_XLATE_HANDLE, pool); + } + Added: csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/specs/Makefile 2009-04-27 12:59:21 UTC (rev 4571) @@ -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/subversion/trunk/legacy/specs/subversion =================================================================== --- csw/mgar/pkg/subversion/trunk/legacy/specs/subversion (rev 0) +++ csw/mgar/pkg/subversion/trunk/legacy/specs/subversion 2009-04-27 12:59:21 UTC (rev 4571) @@ -0,0 +1,88 @@ +# vim: ft=perl +# $Id: subversion,v 1.24 2004/08/29 19:52:11 simigern Exp $ + +$progname = 'subversion'; +$version = '1.0.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://subversion.tigris.org/ packaged for CSW by Michael Gernoth'; + + at sources = ("subversion-${version}.tar.bz2"); +#@patches = (['rdesktop-sound-configure.patch', "rdesktop-${version}", '-p0'], +# ['rdesktop-1.3.1-backingstore.diff', "rdesktop-${version}", '-p1']); + + at patches = (['subversion-utf.patch',"subversion-${version}",'-p0']); + at packages = ({ + pkgname => 'svn', + filename => $progname, + name => "${progname} - Version Control rethought", + dependencies => ['CSWcommon','CSWswig'], + filelist => [qw( + opt/csw/bin + opt/csw/include + opt/csw/lib + opt/csw/share + )], + exclude_dependencies => ['SUNWbash'] + }, + { + pkgname => "ap2-svn", + filename => "ap2_${progname}", + name => "ap2_${progname} - Version Control rethought (Apache 2 Module)", + dependencies => ['CSWcommon','CSWapache2','CSWsvn'], + postinstall => "ap2_subversion.postinstall", + filelist => [qw( + opt/csw/apache2 + )] + #exclude_dependencies => ['CSWexpat'] + }, + ); +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +set -x +export CC=cc +export PATH="${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +export LDFLAGS='-R/opt/csw/bdb4/lib -L/opt/csw/bdb4/lib -R/opt/csw/lib/svn -L/opt/csw/lib/svn -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib/svn' +export LD_OPTIONS='-R/opt/csw/bdb4/lib -L/opt/csw/bdb4/lib -R/opt/csw/lib/svn -L/opt/csw/lib/svn -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib/svn' +export LD_RUN_PATH='/opt/csw/bdb4/lib:/opt/csw/lib/svn:/opt/csw/lib' +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8 -I${builddir}/svninc -I/opt/csw/bdb4/include -I/opt/csw/include' +else + export CFLAGS='-fast -xarch=386 -I${builddir}/svninc -I/opt/csw/bdb4/include -I/opt/csw/include' +fi +export CPPFLAGS="\${CFLAGS}" +export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig +mkdir svninc +cp /usr/include/iconv.h svninc/ +cd subversion-${version} +./configure --prefix=/opt/csw --infodir=/opt/csw/share/info --mandir=/opt/csw/share/man --with-zlib --with-berkeley-db=/opt/csw/bdb4 --libdir=/opt/csw/lib/svn --includedir=/opt/csw/include/svn --with-apxs=/opt/csw/apache2/sbin/apxs --with-ssl --with-zlib --enable-swig-bindings=all #--with-apr=/opt/csw/bin/apr-config --with-apr-util=/opt/csw +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#swig-python +#gmake swig-py || exit 1 +#gmake DESTDIR=${buildroot} install-swig-py || exit 1 + +#swig-perl +gmake swig-pl-lib || exit 1 +gmake DESTDIR=${buildroot} install-swig-pl-lib || exit 1 +cd subversion/bindings/swig/perl +env APR_CONFIG=/opt/csw/bin/apr-config perl Makefile.PL || exit 1 +gmake all || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +cd ${builddir}/${progname}-${version} + +mkdir -p ${buildroot}/opt/csw/share/doc/subversion +cp -r ${builddir}/subversion-${version}/doc/book/book/images ${buildroot}/opt/csw/share/doc/subversion +cp ${builddir}/subversion-${version}/doc/book/book/book.{html,pdf} ${buildroot}/opt/csw/share/doc/subversion +#mv ${buildroot}/opt/csw/build ${buildroot}/opt/csw/share/doc/subversion/ +#mv ${buildroot}/opt/csw/bin/apr-config ${buildroot}/opt/csw/share/doc/subversion/ +#mv ${buildroot}/opt/csw/bin/apu-config ${buildroot}/opt/csw/share/doc/subversion/ +rm -rf ${buildroot}/opt/csw/build ${buildroot}/opt/csw/bin/apr-config ${buildroot}/opt/csw/bin/apu-config +rm -f ${buildroot}/opt/csw/lib/perl/5*/perllocal.pod +rmdir ${buildroot}/opt/csw/lib/perl/5* +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4572] csw/mgar/pkg Message-ID: Revision: 4572 http://gar.svn.sourceforge.net/gar/?rev=4572&view=rev Author: dmichelsen Date: 2009-04-27 12:59:35 +0000 (Mon, 27 Apr 2009) Log Message: ----------- synce: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/synce/ csw/mgar/pkg/synce/trunk/ csw/mgar/pkg/synce/trunk/legacy/ csw/mgar/pkg/synce/trunk/legacy/scripts/ csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/synce/trunk/legacy/scripts/human.pl csw/mgar/pkg/synce/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/synce/trunk/legacy/sources/ csw/mgar/pkg/synce/trunk/legacy/specs/ csw/mgar/pkg/synce/trunk/legacy/specs/Makefile csw/mgar/pkg/synce/trunk/legacy/specs/synce Added: csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:35 UTC (rev 4572) @@ -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/synce/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/scripts/human.pl 2009-04-27 12:59:35 UTC (rev 4572) @@ -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 () { + 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 + +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 + +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/synce/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:35 UTC (rev 4572) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/synce/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/specs/Makefile 2009-04-27 12:59:35 UTC (rev 4572) @@ -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/synce/trunk/legacy/specs/synce =================================================================== --- csw/mgar/pkg/synce/trunk/legacy/specs/synce (rev 0) +++ csw/mgar/pkg/synce/trunk/legacy/specs/synce 2009-04-27 12:59:35 UTC (rev 4572) @@ -0,0 +1,120 @@ +# vim: ft=perl +# $Id: synce,v 1.7 2004/03/25 01:01:22 simigern Exp $ + +$progname = 'synce'; +$version = '0.8.9'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://synce.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("synce-dccm-${version}.tar.gz", + "synce-librapi2-${version}.tar.gz", + "synce-libsynce-${version}.tar.gz", + "synce-serial-${version}.tar.gz", + "libmimedir-0.3.tar.gz", + "unshield-0.2.tar.gz", + "synce-rra-${version}.tar.gz", + "synce-multisync_plugin-${version}.tar.gz", + "multisync-0.81.tar.bz2"); + +#@patches = (['synce-rra-0.8.9', "${progname}-rra-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Windows CE and Pocket PC connectivity for Unix", + dependencies => ['CSWcommon','CSWmultisync'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-dccm-${version}/LICENSE"; + +$build = <<"EOF"; +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' + +#libsynce +cd ${builddir}/synce-libsynce-${version} +sed -e 's|-Werror||' lib/Makefile.in >lib/Makefile.innew +mv lib/Makefile.innew lib/Makefile.in +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#librapi2 +cd ${builddir}/synce-librapi2-${version} +for i in src src/support tests tools; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#dccm +cd ${builddir}/synce-dccm-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +sed -e 's|LOG_PERROR|LOG_CONS|' src/dccm.c >src/dccm.cnew +mv src/dccm.cnew src/dccm.c +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#serial +cd ${builddir}/synce-serial-${version} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#libmimedir +cd ${builddir}/libmimedir-0.3 +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +gmake || exit 1 +gmake prefix=${buildroot}/opt/csw install || exit 1 + +export CFLAGS="\$CFLAGS -D__EXTENSIONS__" +#unshield +cd ${builddir}/unshield-0.2 +for i in src lib; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo '#define MIN(x,y) (((x) < (y)) ? (x) : (y))' >>lib/internal.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +#rra +cd ${builddir}/synce-rra-${version} +for i in src lib; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo '#include ' >stdint.h +echo '#define MIN(x,y) (((x) < (y)) ? (x) : (y))' >>stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +export CFLAGS="\$CFLAGS -I${buildroot}/opt/csw/include/rra" +export CPPFLAGS="\$CPPFLAGS -I${buildroot}/opt/csw/include/rra" + +#multisync_plugin +cd ${builddir}/synce-multisync_plugin-${version} +for i in src; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-multisync-source=${builddir}/multisync-0.81 --with-multisync-include=${builddir}/multisync-0.81/include +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 14:59:51 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 12:59:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4573] csw/mgar/pkg Message-ID: Revision: 4573 http://gar.svn.sourceforge.net/gar/?rev=4573&view=rev Author: dmichelsen Date: 2009-04-27 12:59:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- synce_multisync: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/synce_multisync/ csw/mgar/pkg/synce_multisync/trunk/ csw/mgar/pkg/synce_multisync/trunk/legacy/ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/human.pl csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/synce_multisync/trunk/legacy/sources/ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/Makefile csw/mgar/pkg/synce_multisync/trunk/legacy/specs/synce_multisync Added: csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:59:51 UTC (rev 4573) @@ -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/synce_multisync/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/human.pl 2009-04-27 12:59:51 UTC (rev 4573) @@ -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 () { + 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 + +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 + +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/synce_multisync/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:59:51 UTC (rev 4573) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/synce_multisync/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/Makefile 2009-04-27 12:59:51 UTC (rev 4573) @@ -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/synce_multisync/trunk/legacy/specs/synce_multisync =================================================================== --- csw/mgar/pkg/synce_multisync/trunk/legacy/specs/synce_multisync (rev 0) +++ csw/mgar/pkg/synce_multisync/trunk/legacy/specs/synce_multisync 2009-04-27 12:59:51 UTC (rev 4573) @@ -0,0 +1,62 @@ +# vim: ft=perl +# $Id: synce_multisync,v 1.2 2004/03/25 00:00:50 simigern Exp $ + +$progname = 'syncemultisync'; +$version = '0.8.9'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://synce.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("synce-rra-${version}.tar.gz", + "synce-multisync_plugin-${version}.tar.gz", + "multisync-0.81.tar.bz2"); + +#@patches = (['synce-rra-0.8.9', "${progname}-rra-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => "synce_multisync", + name => "synce_multisync - synce plugin for multisync", + dependencies => ['CSWcommon','CSWsynce','CSWmultisync'], + filelist => [qw(opt)] + }); + +$copyright = "synce-multisync_plugin-${version}/LICENSE"; + +$build = <<"EOF"; +export CC=gcc +export CXX=g++ +unset CFLAGS +export PATH="/opt/csw/gcc3/bin:${sunwspropath}:/opt/csw/bin:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +export CFLAGS="\$CFLAGS -I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include -D__EXTENSIONS__" +export CPPFLAGS='-I/opt/csw/gcc3/include -I/opt/csw/include -I${buildroot}/opt/csw/include' +export LD_OPTIONS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' +export LDFLAGS='-L${buildroot}/opt/csw/lib -R/opt/csw/gcc3/lib -L/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/lib -L${buildroot}/opt/csw/lib -lsocket -lnsl' + +#rra +cd ${builddir}/synce-rra-${version} +for i in src lib; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +echo '#include ' >stdint.h +echo '#define MIN(x,y) (((x) < (y)) ? (x) : (y))' >>stdint.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +export CFLAGS="\$CFLAGS -I${buildroot}/opt/csw/include/rra" +export CPPFLAGS="\$CPPFLAGS -I${buildroot}/opt/csw/include/rra" +#multisync_plugin +cd ${builddir}/synce-multisync_plugin-${version} +for i in src; do + sed -e 's|-Werror||' \${i}/Makefile.in >\${i}/Makefile.innew + mv \${i}/Makefile.innew \${i}/Makefile.in +done +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-multisync-source=${builddir}/multisync-0.81 --with-multisync-include=${builddir}/multisync-0.81/include +gmake || exit 1 +gmake DESTDIR=${buildroot} install || exit 1 + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:10 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4574] csw/mgar/pkg Message-ID: Revision: 4574 http://gar.svn.sourceforge.net/gar/?rev=4574&view=rev Author: dmichelsen Date: 2009-04-27 13:00:10 +0000 (Mon, 27 Apr 2009) Log Message: ----------- timidity: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/timidity/ csw/mgar/pkg/timidity/trunk/ csw/mgar/pkg/timidity/trunk/legacy/ csw/mgar/pkg/timidity/trunk/legacy/scripts/ csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/timidity/trunk/legacy/scripts/human.pl csw/mgar/pkg/timidity/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/timidity/trunk/legacy/sources/ csw/mgar/pkg/timidity/trunk/legacy/sources/timidity.sysdep.patch csw/mgar/pkg/timidity/trunk/legacy/specs/ csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile csw/mgar/pkg/timidity/trunk/legacy/specs/timidity Added: csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:10 UTC (rev 4574) @@ -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/timidity/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/scripts/human.pl 2009-04-27 13:00:10 UTC (rev 4574) @@ -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 () { + 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 + +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 + +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/timidity/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:10 UTC (rev 4574) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/timidity/trunk/legacy/sources/timidity.sysdep.patch =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/sources/timidity.sysdep.patch (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/sources/timidity.sysdep.patch 2009-04-27 13:00:10 UTC (rev 4574) @@ -0,0 +1,28 @@ +--- timidity/sysdep.h.orig 2004-10-08 12:53:38.427830000 -0400 ++++ timidity/sysdep.h 2004-10-08 12:54:47.397766000 -0400 +@@ -79,6 +79,7 @@ + #endif + + ++#if 0 + /* integer type definitions: ISO C now knows a better way */ + #if __STDC_VERSION__ == 199901L || __GNUC__ >= 3 + #include // int types are defined here +@@ -138,7 +139,17 @@ + #endif + #endif /* 64bit arch */ + #endif /* C99 */ ++#endif + ++typedef int8_t int8; ++typedef uint8_t uint8; ++typedef int16_t int16; ++typedef uint16_t uint16; ++typedef int32_t int32; ++typedef uint32_t uint32; ++typedef int64_t int64; ++typedef uint64_t uint64; ++#define TIMIDITY_HAVE_INT64 1 + + /* Instrument files are little-endian, MIDI files big-endian, so we + need to do some conversions. */ Added: csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/specs/Makefile 2009-04-27 13:00:10 UTC (rev 4574) @@ -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/timidity/trunk/legacy/specs/timidity =================================================================== --- csw/mgar/pkg/timidity/trunk/legacy/specs/timidity (rev 0) +++ csw/mgar/pkg/timidity/trunk/legacy/specs/timidity 2009-04-27 13:00:10 UTC (rev 4574) @@ -0,0 +1,54 @@ +# vim: ft=perl +# $Id: timidity,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'TiMidity++'; +$version = '2.13.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://timidity.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","timidity-patches_0.1-5.tar.gz"); + + at patches = (['timidity.sysdep.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => 'timidity', + filename => 'timidity', + name => "timidity - A MIDI to WAVE converter and player", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --enable-gtk --enable-slang --enable-motif --enable-vt100 --enable-xaw --enable-xskin --enable-server --enable-offix --enable-network --enable-spectrogram --enable-audio=sun,vorbis,esd #--enable-ncurses +gmake || exit 1 +gmake DESTDIR=${buildroot} install +echo >>COPYING +echo "===============================================================================" >>COPYING +echo "Copyright for sound-samples:" >>COPYING +cat ${builddir}/timidity-patches-0.1/debian/copyright >>COPYING +cd ${builddir}/timidity-patches-0.1 +mkdir -p ${buildroot}/opt/csw/share/timidity/patches +cp -p cfg/*.cfg ${buildroot}/opt/csw/share/timidity +cp -p pat/*.pat ${buildroot}/opt/csw/share/timidity/patches +chmod 644 ${buildroot}/opt/csw/share/timidity/patches/* +sed -e 's|/sedona/users/klee/instruments|/opt/csw/share/timidity/patches|' cfg/timidity.cfg >${buildroot}/opt/csw/share/timidity/timidity.cfg +chmod 644 ${buildroot}/opt/csw/share/timidity/*.cfg + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:27 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4575] csw/mgar/pkg Message-ID: Revision: 4575 http://gar.svn.sourceforge.net/gar/?rev=4575&view=rev Author: dmichelsen Date: 2009-04-27 13:00:27 +0000 (Mon, 27 Apr 2009) Log Message: ----------- tla: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/tla/ csw/mgar/pkg/tla/trunk/ csw/mgar/pkg/tla/trunk/legacy/ csw/mgar/pkg/tla/trunk/legacy/scripts/ csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/tla/trunk/legacy/scripts/human.pl csw/mgar/pkg/tla/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/tla/trunk/legacy/sources/ csw/mgar/pkg/tla/trunk/legacy/sources/tla-solaris.patch csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch csw/mgar/pkg/tla/trunk/legacy/specs/ csw/mgar/pkg/tla/trunk/legacy/specs/Makefile csw/mgar/pkg/tla/trunk/legacy/specs/tla Added: csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:27 UTC (rev 4575) @@ -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/tla/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/scripts/human.pl 2009-04-27 13:00:27 UTC (rev 4575) @@ -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 () { + 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 + +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 + +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/tla/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:27 UTC (rev 4575) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/tla/trunk/legacy/sources/tla-solaris.patch =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/sources/tla-solaris.patch (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/sources/tla-solaris.patch 2009-04-27 13:00:27 UTC (rev 4575) @@ -0,0 +1,69 @@ +diff -ru -x{arch} tla-ref/src/PLUGIN/auto tla/src/PLUGIN/auto +--- tla-ref/src/PLUGIN/auto 2004-01-22 10:35:33.000000000 +0900 ++++ tla/src/PLUGIN/auto 2004-01-06 13:57:02.000000000 +0900 +@@ -6,6 +6,10 @@ + + library-test socket-library -lsocket + ++library-test net-library -lnsl ++ ++library-test resolv-library -lresolv ++ + gcc-test gcc-version + + exec-suffix-test +diff -ru -x{arch} tla-ref/src/build-tools/scripts/configure-top tla/src/build-tools/scripts/configure-top +--- tla-ref/src/build-tools/scripts/configure-top 2004-01-22 10:35:33.000000000 +0900 ++++ tla/src/build-tools/scripts/configure-top 2004-01-06 13:57:02.000000000 +0900 +@@ -2,7 +2,7 @@ + # configure - The hackerlab configure script + # + ################################################################ +-# Copyright (C) 2001, 2002 Tom Lord ++# Copyright (C) 2001, 2002, 2004 Tom Lord + # + # See the file "COPYING" for further information about + # the copyright and warranty status of this work. +@@ -845,7 +845,7 @@ + # make is in the works: + # + +-cc_setting="`cat \"$optfile\" \"$tmpoptfile\" | grep -E -e '^string cc=' | tail -n 1 | sed -e 's/string cc=//'`" ++cc_setting="`cat \"$optfile\" \"$tmpoptfile\" | grep -E -e '^string cc=' | sed -n '$p' | sed -e 's/string cc=//'`" + if test -z "$cc_setting" ; then + CC=cc + else +diff -ru -x{arch} tla-ref/src/tla/tests/changeset-tests/edit-tree-randomly tla/src/tla/tests/changeset-tests/edit-tree-randomly +--- tla-ref/src/tla/tests/changeset-tests/edit-tree-randomly 2004-01-22 10:36:45.000000000 +0900 ++++ tla/src/tla/tests/changeset-tests/edit-tree-randomly 2004-01-06 13:56:32.000000000 +0900 +@@ -1,7 +1,7 @@ + # edit-tree-randomly: + # + ################################################################ +-# Copyright (C) 2003 Robert Anderson and Tom Lord ++# Copyright (C) 2003, 2004 Robert Anderson and Tom Lord + # + # See the file "COPYING" for further information about + # the copyright and warranty status of this work. +@@ -409,7 +409,7 @@ + + num=`random_upto $n` + +- name=`head -n $num ,,list | tail -n 1` ++ name=`sed -n "${num}p" ,,list` + + echo -n "$name" + } +diff -ru -x{arch} tla-ref/src/tla/tla/Makefile.in tla/src/tla/tla/Makefile.in +--- tla-ref/src/tla/tla/Makefile.in 2004-01-22 10:36:56.000000000 +0900 ++++ tla/src/tla/tla/Makefile.in 2004-01-06 13:56:35.000000000 +0900 +@@ -4,6 +4,9 @@ + ../libdate/libdate.a \ + $(objroot)/hackerlab/libhackerlab/libhackerlab.a \ + ../libneon/libneon.a \ ++ $(cfg__socket_library) \ ++ $(cfg__resolv_library) \ ++ $(cfg__net_library) \ + -lm + + mains := tla.c Added: csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/sources/tla-tools-shell.patch 2009-04-27 13:00:27 UTC (rev 4575) @@ -0,0 +1,117 @@ +diff -ruN tla-tools-0.31.orig/tla-changelogs-to-log.shpp tla-tools-0.31/tla-changelogs-to-log.shpp +--- tla-tools-0.31.orig/tla-changelogs-to-log.shpp 2004-03-02 14:19:54.000000000 +0100 ++++ tla-tools-0.31/tla-changelogs-to-log.shpp 2004-03-02 14:35:36.532827000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-changelogs-to-log -- Construct an arch patch-log from ChangeLog changes + # Usage: tla-changelogs-to-log SUMMARY + # +diff -ruN tla-tools-0.31.orig/tla-copy-changes.shpp tla-tools-0.31/tla-copy-changes.shpp +--- tla-tools-0.31.orig/tla-copy-changes.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-copy-changes.shpp 2004-03-02 14:35:47.046364000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-copy-changes -- Copy and commit arch changesets from another branch + # Usage: tla-copy-changes [OPTION...] SOURCE_VERSION_OR_REVISION... + # +diff -ruN tla-tools-0.31.orig/tla-cvs-sync.shpp tla-tools-0.31/tla-cvs-sync.shpp +--- tla-tools-0.31.orig/tla-cvs-sync.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-cvs-sync.shpp 2004-03-02 14:35:55.618048000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-cvs-sync -- Propagate changes between arch and CVS + # + # Copyright (C) 2003, 2004 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp tla-tools-0.31/tla-emacs-xids-to-db.shpp +--- tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-emacs-xids-to-db.shpp 2004-03-02 14:36:06.251350000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-emacs-xids-to-db -- Produce a id rename database for emacs + # + # Copyright (C) 2003 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-file-log.shpp tla-tools-0.31/tla-file-log.shpp +--- tla-tools-0.31.orig/tla-file-log.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-file-log.shpp 2004-03-02 14:36:16.966566000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-file-log -- Output a historical log for a file in an arch project tree + # Usage: tla-file-log FILE [VERSION] + # +diff -ruN tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp tla-tools-0.31/tla-fix-changelog-conflicts.shpp +--- tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fix-changelog-conflicts.shpp 2004-03-02 14:36:27.636640000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fix-changelog-conflicts -- Automatically resolve merge conflicts + # in ChangeLog files + # Usage: tla-fix-changelog-conflicts [CHANGELOG...] +diff -ruN tla-tools-0.31.orig/tla-fork-archive.shpp tla-tools-0.31/tla-fork-archive.shpp +--- tla-tools-0.31.orig/tla-fork-archive.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork-archive.shpp 2004-03-02 14:36:42.268565000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork-archive -- Make a new arch archive continuing from an old one + # Usage: tla-fork-archive OLD_ARCHIVE NEW_ARCHIVE + # +diff -ruN tla-tools-0.31.orig/tla-fork.shpp tla-tools-0.31/tla-fork.shpp +--- tla-tools-0.31.orig/tla-fork.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork.shpp 2004-03-02 14:36:51.641449000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork -- Create an arch branch forking off an existing branch + # Usage: tla-fork [OPTION...] NEW_BRANCH + # +diff -ruN tla-tools-0.31.orig/tla-munge-archive-names.shpp tla-tools-0.31/tla-munge-archive-names.shpp +--- tla-tools-0.31.orig/tla-munge-archive-names.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-names.shpp 2004-03-02 14:37:01.087381000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-names -- Destructively modify an arch archive to change + # the names of arch categories/branches/versions + # Usage: tla-munge-archive-names [OPTION...] CHANGE_RULE ARCHIVE_DIR... +diff -ruN tla-tools-0.31.orig/tla-munge-archive-xids.shpp tla-tools-0.31/tla-munge-archive-xids.shpp +--- tla-tools-0.31.orig/tla-munge-archive-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-xids.shpp 2004-03-02 14:37:09.088401000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-xids -- Destructively modify an arch archive to use + # taglines instead of explicit ids + # Usage: tla-munge-archive-xids TAG_RENAME_DB DIR... +diff -ruN tla-tools-0.31.orig/tla-scan-for-xids.shpp tla-tools-0.31/tla-scan-for-xids.shpp +--- tla-tools-0.31.orig/tla-scan-for-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-scan-for-xids.shpp 2004-03-02 14:37:18.985842000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-scan-for-xids -- Print a list of explicit ids used in an arch archive + # Usage: tla-scan-for-xids ARCHIVE_DIR... + # +diff -ruN tla-tools-0.31.orig/tla-switch.shpp tla-tools-0.31/tla-switch.shpp +--- tla-tools-0.31.orig/tla-switch.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-switch.shpp 2004-03-02 14:37:27.335854000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-switch -- Switch an arch project tree to a new branch/version/revision + # Usage: tla-switch [OPTION...] NEW + # +diff -ruN tla-tools-0.31.orig/tla-update-ids.shpp tla-tools-0.31/tla-update-ids.shpp +--- tla-tools-0.31.orig/tla-update-ids.shpp 2004-03-02 14:19:51.000000000 +0100 ++++ tla-tools-0.31/tla-update-ids.shpp 2004-03-02 14:37:36.773607000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-update-ids -- Handle adding arch id-tags to new files, removing + # deleted explicit ids, and some renames + # Added: csw/mgar/pkg/tla/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/specs/Makefile 2009-04-27 13:00:27 UTC (rev 4575) @@ -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/tla/trunk/legacy/specs/tla =================================================================== --- csw/mgar/pkg/tla/trunk/legacy/specs/tla (rev 0) +++ csw/mgar/pkg/tla/trunk/legacy/specs/tla 2009-04-27 13:00:27 UTC (rev 4575) @@ -0,0 +1,55 @@ +# vim: ft=perl +# $Id: tla,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'tla'; +$version = '1.2.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.gnu.org/software/gnu-arch/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['tla-solaris.patch', "${progname}-${version}", '-p1']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - GNU arch - A modern CVS replacement", + dependencies => ['CSWcommon','SUNWbash','CSWdiffutils','CSWgtar','SUNWgpch'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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' +mkdir ${progname}-${version}/build-dir +cd ${progname}-${version} +cd build-dir +ln -s /opt/csw/bin/ggrep grep +ln -s /opt/csw/bin/gawk awk +ln -s /opt/csw/bin/gsed sed +ln -s /opt/csw/bin/gdiff diff +ln -s /opt/csw/bin/gdiff3 diff3 + +export PATH="${builddir}/${progname}-${version}/build-dir:\${PATH}" +../src/configure --prefix=/opt/csw --config-shell /usr/bin/bash --with-posix-shell=/usr/bin/bash --with-gnu-diff /opt/csw/bin/gdiff --with-gnu-diff3 /opt/csw/bin/gdiff3 --with-gnu-patch /usr/bin/gpatch --with-gnu-tar /opt/csw/bin/gtar --destdir ${buildroot} +gmake +gmake install +mkdir -p ${buildroot}/opt/csw/share/doc/tla +gcp -vax ../src/docs-tla/* ${buildroot}/opt/csw/share/doc/tla/ +mv ${buildroot}/opt/csw/share/doc/tla/\=README ${buildroot}/opt/csw/share/doc/tla/README +grm -rfv ${buildroot}/opt/csw/share/doc/tla/\{arch\} ${buildroot}/opt/csw/share/doc/tla/PLUGIN ${buildroot}/opt/csw/share/doc/tla/src ${buildroot}/opt/csw/share/doc/tla/Makefile.in ${buildroot}/opt/csw/share/doc/tla/{html,ps,texi}/.arch-ids +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:43 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:43 +0000 Subject: [csw-devel] SF.net SVN: gar:[4576] csw/mgar/pkg Message-ID: Revision: 4576 http://gar.svn.sourceforge.net/gar/?rev=4576&view=rev Author: dmichelsen Date: 2009-04-27 13:00:43 +0000 (Mon, 27 Apr 2009) Log Message: ----------- tla-tools: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/tla-tools/ csw/mgar/pkg/tla-tools/trunk/ csw/mgar/pkg/tla-tools/trunk/legacy/ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/tla-tools/trunk/legacy/scripts/human.pl csw/mgar/pkg/tla-tools/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/tla-tools/trunk/legacy/sources/ csw/mgar/pkg/tla-tools/trunk/legacy/sources/tla-tools-shell.patch csw/mgar/pkg/tla-tools/trunk/legacy/specs/ csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile csw/mgar/pkg/tla-tools/trunk/legacy/specs/tla-tools Added: csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:43 UTC (rev 4576) @@ -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/tla-tools/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/human.pl 2009-04-27 13:00:43 UTC (rev 4576) @@ -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 () { + 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 + +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 + +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/tla-tools/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:43 UTC (rev 4576) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/tla-tools/trunk/legacy/sources/tla-tools-shell.patch =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/sources/tla-tools-shell.patch (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/sources/tla-tools-shell.patch 2009-04-27 13:00:43 UTC (rev 4576) @@ -0,0 +1,117 @@ +diff -ruN tla-tools-0.31.orig/tla-changelogs-to-log.shpp tla-tools-0.31/tla-changelogs-to-log.shpp +--- tla-tools-0.31.orig/tla-changelogs-to-log.shpp 2004-03-02 14:19:54.000000000 +0100 ++++ tla-tools-0.31/tla-changelogs-to-log.shpp 2004-03-02 14:35:36.532827000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-changelogs-to-log -- Construct an arch patch-log from ChangeLog changes + # Usage: tla-changelogs-to-log SUMMARY + # +diff -ruN tla-tools-0.31.orig/tla-copy-changes.shpp tla-tools-0.31/tla-copy-changes.shpp +--- tla-tools-0.31.orig/tla-copy-changes.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-copy-changes.shpp 2004-03-02 14:35:47.046364000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-copy-changes -- Copy and commit arch changesets from another branch + # Usage: tla-copy-changes [OPTION...] SOURCE_VERSION_OR_REVISION... + # +diff -ruN tla-tools-0.31.orig/tla-cvs-sync.shpp tla-tools-0.31/tla-cvs-sync.shpp +--- tla-tools-0.31.orig/tla-cvs-sync.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-cvs-sync.shpp 2004-03-02 14:35:55.618048000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-cvs-sync -- Propagate changes between arch and CVS + # + # Copyright (C) 2003, 2004 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp tla-tools-0.31/tla-emacs-xids-to-db.shpp +--- tla-tools-0.31.orig/tla-emacs-xids-to-db.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-emacs-xids-to-db.shpp 2004-03-02 14:36:06.251350000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-emacs-xids-to-db -- Produce a id rename database for emacs + # + # Copyright (C) 2003 Miles Bader +diff -ruN tla-tools-0.31.orig/tla-file-log.shpp tla-tools-0.31/tla-file-log.shpp +--- tla-tools-0.31.orig/tla-file-log.shpp 2004-03-02 14:19:37.000000000 +0100 ++++ tla-tools-0.31/tla-file-log.shpp 2004-03-02 14:36:16.966566000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-file-log -- Output a historical log for a file in an arch project tree + # Usage: tla-file-log FILE [VERSION] + # +diff -ruN tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp tla-tools-0.31/tla-fix-changelog-conflicts.shpp +--- tla-tools-0.31.orig/tla-fix-changelog-conflicts.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fix-changelog-conflicts.shpp 2004-03-02 14:36:27.636640000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fix-changelog-conflicts -- Automatically resolve merge conflicts + # in ChangeLog files + # Usage: tla-fix-changelog-conflicts [CHANGELOG...] +diff -ruN tla-tools-0.31.orig/tla-fork-archive.shpp tla-tools-0.31/tla-fork-archive.shpp +--- tla-tools-0.31.orig/tla-fork-archive.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork-archive.shpp 2004-03-02 14:36:42.268565000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork-archive -- Make a new arch archive continuing from an old one + # Usage: tla-fork-archive OLD_ARCHIVE NEW_ARCHIVE + # +diff -ruN tla-tools-0.31.orig/tla-fork.shpp tla-tools-0.31/tla-fork.shpp +--- tla-tools-0.31.orig/tla-fork.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-fork.shpp 2004-03-02 14:36:51.641449000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-fork -- Create an arch branch forking off an existing branch + # Usage: tla-fork [OPTION...] NEW_BRANCH + # +diff -ruN tla-tools-0.31.orig/tla-munge-archive-names.shpp tla-tools-0.31/tla-munge-archive-names.shpp +--- tla-tools-0.31.orig/tla-munge-archive-names.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-names.shpp 2004-03-02 14:37:01.087381000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-names -- Destructively modify an arch archive to change + # the names of arch categories/branches/versions + # Usage: tla-munge-archive-names [OPTION...] CHANGE_RULE ARCHIVE_DIR... +diff -ruN tla-tools-0.31.orig/tla-munge-archive-xids.shpp tla-tools-0.31/tla-munge-archive-xids.shpp +--- tla-tools-0.31.orig/tla-munge-archive-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-munge-archive-xids.shpp 2004-03-02 14:37:09.088401000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-munge-archive-xids -- Destructively modify an arch archive to use + # taglines instead of explicit ids + # Usage: tla-munge-archive-xids TAG_RENAME_DB DIR... +diff -ruN tla-tools-0.31.orig/tla-scan-for-xids.shpp tla-tools-0.31/tla-scan-for-xids.shpp +--- tla-tools-0.31.orig/tla-scan-for-xids.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-scan-for-xids.shpp 2004-03-02 14:37:18.985842000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-scan-for-xids -- Print a list of explicit ids used in an arch archive + # Usage: tla-scan-for-xids ARCHIVE_DIR... + # +diff -ruN tla-tools-0.31.orig/tla-switch.shpp tla-tools-0.31/tla-switch.shpp +--- tla-tools-0.31.orig/tla-switch.shpp 2004-03-02 14:19:47.000000000 +0100 ++++ tla-tools-0.31/tla-switch.shpp 2004-03-02 14:37:27.335854000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-switch -- Switch an arch project tree to a new branch/version/revision + # Usage: tla-switch [OPTION...] NEW + # +diff -ruN tla-tools-0.31.orig/tla-update-ids.shpp tla-tools-0.31/tla-update-ids.shpp +--- tla-tools-0.31.orig/tla-update-ids.shpp 2004-03-02 14:19:51.000000000 +0100 ++++ tla-tools-0.31/tla-update-ids.shpp 2004-03-02 14:37:36.773607000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # tla-update-ids -- Handle adding arch id-tags to new files, removing + # deleted explicit ids, and some renames + # Added: csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/specs/Makefile 2009-04-27 13:00:43 UTC (rev 4576) @@ -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/tla-tools/trunk/legacy/specs/tla-tools =================================================================== --- csw/mgar/pkg/tla-tools/trunk/legacy/specs/tla-tools (rev 0) +++ csw/mgar/pkg/tla-tools/trunk/legacy/specs/tla-tools 2009-04-27 13:00:43 UTC (rev 4576) @@ -0,0 +1,44 @@ +# vim: ft=perl +# $Id: tla-tools,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'tla-tools'; +$version = '0.31'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://wiki.gnuarch.org/moin.cgi/tla_2dtools packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['gpl-copying.patch', "${progname}-${version}", '-p0'], + ['tla-tools-shell.patch',"${progname}-${version}",'-p1']); + + at packages = ({ + pkgname => $progname, + filename => 'tla_tools', + name => "tla_tools - Helpful utilities for use with tla", + dependencies => ['CSWcommon','CSWgsed'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw +gmake +mkdir -p ${buildroot}/opt/csw/bin +gmake prefix=${buildroot}/opt/csw install +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:00:59 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:00:59 +0000 Subject: [csw-devel] SF.net SVN: gar:[4577] csw/mgar/pkg Message-ID: Revision: 4577 http://gar.svn.sourceforge.net/gar/?rev=4577&view=rev Author: dmichelsen Date: 2009-04-27 13:00:59 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wbxml2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wbxml2/ csw/mgar/pkg/wbxml2/trunk/ csw/mgar/pkg/wbxml2/trunk/legacy/ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wbxml2/trunk/legacy/scripts/human.pl csw/mgar/pkg/wbxml2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wbxml2/trunk/legacy/sources/ csw/mgar/pkg/wbxml2/trunk/legacy/specs/ csw/mgar/pkg/wbxml2/trunk/legacy/specs/Makefile csw/mgar/pkg/wbxml2/trunk/legacy/specs/wbxml2 Added: csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:00:59 UTC (rev 4577) @@ -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/wbxml2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/human.pl 2009-04-27 13:00:59 UTC (rev 4577) @@ -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 () { + 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 + +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 + +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/wbxml2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:00:59 UTC (rev 4577) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wbxml2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/specs/Makefile 2009-04-27 13:00:59 UTC (rev 4577) @@ -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/wbxml2/trunk/legacy/specs/wbxml2 =================================================================== --- csw/mgar/pkg/wbxml2/trunk/legacy/specs/wbxml2 (rev 0) +++ csw/mgar/pkg/wbxml2/trunk/legacy/specs/wbxml2 2009-04-27 13:00:59 UTC (rev 4577) @@ -0,0 +1,56 @@ +# vim: ft=perl +# $Id: wbxml2,v 1.3 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wbxml2'; +$version = '0.9.0'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://libwbxml.aymerick.com/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}-src.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "lib".$progname, + filename => "lib".$progname, + name => "lib${progname} - A WBXML parser and encoder", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +#Solche Idioten +egrep -v '(-Wall|O3)' src/Makefile.am >src/Makefile.amnew +mv src/Makefile.amnew src/Makefile.am +egrep -v '(-Wall|O3)' tools/Makefile.am >tools/Makefile.amnew +mv tools/Makefile.amnew tools/Makefile.am + +./bootstrap +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info +rm tools/attgetopt.c tools/getopt.h +touch tools/attgetopt.c tools/getopt.h +gmake || exit 1 +gmake DESTDIR=${buildroot} install +chmod 644 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/* +chmod 755 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images +chmod 644 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images/* +chmod 755 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images/callouts +chmod 644 ${buildroot}/opt/csw/share/doc/wbxml2-0.9.0/manual/images/callouts/* +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:01:17 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:01:17 +0000 Subject: [csw-devel] SF.net SVN: gar:[4578] csw/mgar/pkg Message-ID: Revision: 4578 http://gar.svn.sourceforge.net/gar/?rev=4578&view=rev Author: dmichelsen Date: 2009-04-27 13:01:16 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wmcliphist: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wmcliphist/ csw/mgar/pkg/wmcliphist/trunk/ csw/mgar/pkg/wmcliphist/trunk/legacy/ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/human.pl csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wmcliphist/trunk/legacy/sources/ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/Makefile csw/mgar/pkg/wmcliphist/trunk/legacy/specs/wmcliphist Added: csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:01:16 UTC (rev 4578) @@ -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/wmcliphist/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/human.pl 2009-04-27 13:01:16 UTC (rev 4578) @@ -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 () { + 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 + +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 + +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/wmcliphist/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:01:16 UTC (rev 4578) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wmcliphist/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/Makefile 2009-04-27 13:01:16 UTC (rev 4578) @@ -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/wmcliphist/trunk/legacy/specs/wmcliphist =================================================================== --- csw/mgar/pkg/wmcliphist/trunk/legacy/specs/wmcliphist (rev 0) +++ csw/mgar/pkg/wmcliphist/trunk/legacy/specs/wmcliphist 2009-04-27 13:01:16 UTC (rev 4578) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: wmcliphist,v 1.4 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wmcliphist'; +$version = '0.6'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://linux.nawebu.cz/wmcliphist/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-latest.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Clipboard history dockapp for Window Maker", + 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 -DPATH_MAX=1024 -DS_IRUSR=00400 -DS_IWUSR=00200' +export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib' +cd ${progname}-${version} +gmake || exit 1 +mkdir -p ${buildroot}/opt/csw/bin +gmake DESTDIR=${buildroot}/opt/csw/bin install +mkdir -p ${buildroot}/opt/csw/share/doc/wmcliphist +cp AUTHORS INSTALL NEWS ChangeLog README ${buildroot}/opt/csw/share/doc/wmcliphist +cp .wmcliphistrc ${buildroot}/opt/csw/share/doc/wmcliphist/wmcliphistrc.sample +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:01:33 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:01:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4579] csw/mgar/pkg Message-ID: Revision: 4579 http://gar.svn.sourceforge.net/gar/?rev=4579&view=rev Author: dmichelsen Date: 2009-04-27 13:01:32 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wmclock: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wmclock/ csw/mgar/pkg/wmclock/trunk/ csw/mgar/pkg/wmclock/trunk/legacy/ csw/mgar/pkg/wmclock/trunk/legacy/scripts/ csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wmclock/trunk/legacy/scripts/human.pl csw/mgar/pkg/wmclock/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wmclock/trunk/legacy/sources/ csw/mgar/pkg/wmclock/trunk/legacy/specs/ csw/mgar/pkg/wmclock/trunk/legacy/specs/Makefile csw/mgar/pkg/wmclock/trunk/legacy/specs/wmclock Added: csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:01:32 UTC (rev 4579) @@ -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/wmclock/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/scripts/human.pl 2009-04-27 13:01:32 UTC (rev 4579) @@ -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 () { + 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 + +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 + +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/wmclock/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:01:32 UTC (rev 4579) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wmclock/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/specs/Makefile 2009-04-27 13:01:32 UTC (rev 4579) @@ -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/wmclock/trunk/legacy/specs/wmclock =================================================================== --- csw/mgar/pkg/wmclock/trunk/legacy/specs/wmclock (rev 0) +++ csw/mgar/pkg/wmclock/trunk/legacy/specs/wmclock 2009-04-27 13:01:32 UTC (rev 4579) @@ -0,0 +1,49 @@ +# vim: ft=perl +# $Id: wmclock,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wmclock'; +$version = '1.0.12'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.jmknoble.net/WindowMaker/wmclock/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - A Window Maker clock applet", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man +gmake +mkdir -p ${buildroot}/opt/csw/bin +cp wmclock ${buildroot}/opt/csw/bin/ +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp wmclock.man ${buildroot}/opt/csw/share/man/man1/wmclock.1 +mkdir -p ${buildroot}/opt/csw/share/wmclock +cp -r lang.* ${buildroot}/opt/csw/share/wmclock/ +mkdir -p ${buildroot}/opt/csw/share/doc/wmclock +cp README ${buildroot}/opt/csw/share/doc/wmclock/ +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:08 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4581] csw/mgar/pkg Message-ID: Revision: 4581 http://gar.svn.sourceforge.net/gar/?rev=4581&view=rev Author: dmichelsen Date: 2009-04-27 13:02:08 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wv2: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wv2/ csw/mgar/pkg/wv2/trunk/ csw/mgar/pkg/wv2/trunk/legacy/ csw/mgar/pkg/wv2/trunk/legacy/scripts/ csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wv2/trunk/legacy/scripts/human.pl csw/mgar/pkg/wv2/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wv2/trunk/legacy/sources/ csw/mgar/pkg/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch csw/mgar/pkg/wv2/trunk/legacy/specs/ csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile csw/mgar/pkg/wv2/trunk/legacy/specs/wv2 Added: csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:08 UTC (rev 4581) @@ -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/wv2/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/scripts/human.pl 2009-04-27 13:02:08 UTC (rev 4581) @@ -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 () { + 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 + +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 + +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/wv2/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:08 UTC (rev 4581) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/sources/wv2-nongcc-fixes.patch 2009-04-27 13:02:08 UTC (rev 4581) @@ -0,0 +1,269 @@ +--- src/word97_helper.cpp.orig 2004-12-11 06:59:50.444882000 -0500 ++++ src/word97_helper.cpp 2004-12-11 07:07:11.099394000 -0500 +@@ -358,8 +358,187 @@ + // Apply a grpprl of a given size ("count" bytes long) + // This template function might be a bit sick, but it helps to + // avoid duplicated code, so what ;) +-template +-void apply( T* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++//"word97_helper.cpp", line 571: Error: Could not find a match for wvWare::Word97::SPRM::apply(wvWare::Word97::PAP*, const unsigned char*, unsigned short, const wvWare::Style*, wvWare::OLEStreamReader*, wvWare::WordVersion). ++ ++//template ++//void apply( T* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++void apply( wvWare::Word97::PAP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyPAPSPRM )( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, paragraphStyle, dataStream, version ); ++void apply( wvWare::Word97::CHP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyCHPSPRM)( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, style, dataStream, version ); ++void apply( wvWare::Word97::PICF* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyPICFSPRM)( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, style, dataStream, version ); ++void apply( wvWare::Word97::SEP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) ++{ ++ if ( !grpprl ) ++ return; ++ ++ // We are using an integer here, that we can detect situations where ++ // we read beyond the limit due to a buggy spec/impl. ++ // The plain U16 would overflow and we'd be trapped in a loop. ++ int safeCount = count; ++ ++ // walk through the grpprl, applying one sprm after the other ++ while ( safeCount > 1 ) { ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applySEPSPRM)( grpprl, style, dataStream, version ); ++ if ( result == -1 ) { ++ U16 sprm; ++ if ( version == Word8 ) { ++ sprm = readU16( grpprl ); ++ grpprl += 2; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (0x" << std::hex << sprm << std::dec << ")... skipping" << std::endl; ++#endif ++ } ++ else { ++ sprm = *grpprl++; ++#ifdef WV2_DEBUG_SPRMS ++ wvlog << "Seems like that's a different SPRM (" << sprm << ")... skipping" << std::endl; ++#endif ++ } ++ ++ U16 len = determineParameterLength( sprm, grpprl, version ); ++ grpprl += len; ++ safeCount -= len + ( version == Word8 ? 2 : 1 ); ++ } ++ else { ++ grpprl += result; ++ safeCount -= result; ++ } ++ } ++ if ( safeCount < 0 ) ++ wvlog << "Warning: We read past the end of the grpprl, buggy spec?" << std::endl; ++} ++ ++// SPRM::apply( this, grpprl, count, style, dataStream, version ); ++void apply( wvWare::Word97::TAP* const t, const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + if ( !grpprl ) + return; +@@ -371,7 +550,8 @@ + + // walk through the grpprl, applying one sprm after the other + while ( safeCount > 1 ) { +- S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ //S16 result = ( t->*applySPRM )( grpprl, style, dataStream, version ); ++ S16 result = ( t->applyTAPSPRM)( grpprl, style, dataStream, version ); + if ( result == -1 ) { + U16 sprm; + if ( version == Word8 ) { +@@ -568,7 +748,7 @@ + void PAP::apply( const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + // A PAP grpprl might contain TAP sprms, we just skip them +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + // Helper methods for the more complex sprms +@@ -999,7 +1179,7 @@ + void CHP::apply( const U8* grpprl, U16 count, const Style* paragraphStyle, OLEStreamReader* dataStream, WordVersion version ) + { + // There should be only CHP sprms in the grpprl we get +- SPRM::apply( this, grpprl, count, paragraphStyle, dataStream, version ); ++ SPRM::apply( this, grpprl, count, paragraphStyle, dataStream, version ); + } + + void CHP::applyExceptions( const U8* exceptions, const Style* paragraphStyle, OLEStreamReader* dataStream, WordVersion version ) +@@ -1457,7 +1637,7 @@ + void PICF::apply( const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + // There should be only PICF sprms in the grpprl we get +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + void PICF::applyExceptions(const U8* /*exceptions*/, const StyleSheet* /*stylesheet*/, OLEStreamReader* /*dataStream*/, WordVersion /*version*/ ) +@@ -1520,7 +1700,7 @@ + void SEP::apply( const U8* grpprl, U16 count, const Style* style, OLEStreamReader* dataStream, WordVersion version ) + { + // There should be only SEP sprms in the grpprl we get +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + void SEP::applyExceptions( const U8* exceptions, const StyleSheet* /*stylesheet*/, OLEStreamReader* dataStream, WordVersion version ) +@@ -1733,7 +1913,7 @@ + { + // There should be mostly TAP sprms in the grpprl we get, and we + // have to ignore the remaining PAP sprms, just what the template does +- SPRM::apply( this, grpprl, count, style, dataStream, version ); ++ SPRM::apply( this, grpprl, count, style, dataStream, version ); + } + + void TAP::applyExceptions( const U8* /*exceptions*/, const StyleSheet* /*stylesheet*/, OLEStreamReader* /*dataStream*/, WordVersion /*version*/ ) +--- src/parser9x.h.orig 2004-12-11 07:08:37.949425000 -0500 ++++ src/parser9x.h 2004-12-11 07:10:50.309395000 -0500 +@@ -158,7 +158,7 @@ + // on the parsed content. These variables have to be saved and restored + // to make the parsing code reentrant. + +- private: ++ public: + // Don't copy or assign us + Parser9x( const Parser9x& rhs ); + Parser9x& operator=( const Parser9x& rhs ); +--- src/headers95.cpp.orig 2004-12-11 07:11:55.089459000 -0500 ++++ src/headers95.cpp 2004-12-11 07:12:06.869394000 -0500 +@@ -31,7 +31,7 @@ + { + if ( m_grpfIhdt.size() <= static_cast::size_type>( sectionNumber ) ) { + wvlog << "Warning: You are trying to access a section that has not been registered yet!" << std::endl; +- return std::make_pair( 0, 0 ); ++ return std::make_pair( (unsigned)0, (unsigned)0 ); + } + + // The offset to the begin of the section + offset due to mask/grpfIhdt Added: csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/specs/Makefile 2009-04-27 13:02:08 UTC (rev 4581) @@ -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/wv2/trunk/legacy/specs/wv2 =================================================================== --- csw/mgar/pkg/wv2/trunk/legacy/specs/wv2 (rev 0) +++ csw/mgar/pkg/wv2/trunk/legacy/specs/wv2 2009-04-27 13:02:08 UTC (rev 4581) @@ -0,0 +1,42 @@ +# vim: ft=perl +# $Id: wv2,v 1.5 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'wv2'; +$version = '0.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://wvware.sourceforge.net/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2"); + + at patches = (['wv2-nongcc-fixes.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - a library for accessing Microsoft Word documents", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING.LIB"; + +$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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-libiconv=/opt/csw +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. From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:24 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:24 +0000 Subject: [csw-devel] SF.net SVN: gar:[4582] csw/mgar/pkg Message-ID: Revision: 4582 http://gar.svn.sourceforge.net/gar/?rev=4582&view=rev Author: dmichelsen Date: 2009-04-27 13:02:24 +0000 (Mon, 27 Apr 2009) Log Message: ----------- x11-ssh-askpass: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/x11-ssh-askpass/ csw/mgar/pkg/x11-ssh-askpass/trunk/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/human.pl csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/sources/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/Makefile csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass Added: csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:24 UTC (rev 4582) @@ -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/x11-ssh-askpass/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/human.pl 2009-04-27 13:02:24 UTC (rev 4582) @@ -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 () { + 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 + +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 + +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/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:24 UTC (rev 4582) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/x11-ssh-askpass/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/Makefile 2009-04-27 13:02:24 UTC (rev 4582) @@ -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/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass =================================================================== --- csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass (rev 0) +++ csw/mgar/pkg/x11-ssh-askpass/trunk/legacy/specs/x11-ssh-askpass 2009-04-27 13:02:24 UTC (rev 4582) @@ -0,0 +1,45 @@ +# vim: ft=perl +# $Id: x11-ssh-askpass,v 1.2 2005/03/26 12:38:11 simigern Exp $ + +$progname = 'x11-ssh-askpass'; +$version = '1.2.4.1'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.jmknoble.net/software/x11-ssh-askpass/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => "x11sshaskp", + filename => "x11_ssh_askpass", + name => "x11_ssh_askpass - a lightweight passphrase dialog for OpenSSH", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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} +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-app-defaults-dir=/opt/csw/lib/X11/app-defaults +xmkmf +gmake includes +gmake +gmake DESTDIR=${buildroot} install +tail -36 README | head -34 >COPYING +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dam at opencsw.org Mon Apr 27 15:03:01 2009 From: dam at opencsw.org (Dagobert Michelsen) Date: Mon, 27 Apr 2009 15:03:01 +0200 Subject: [csw-devel] Build descriptions from Michael Gernoth In-Reply-To: <20081107133324.GA2059@zerfleddert.de> References: <49137326.3000605@wbonnet.net> <20081107100724.GA24461@zerfleddert.de> <491441EA.9000302@wbonnet.net> <20081107133324.GA2059@zerfleddert.de> Message-ID: Hi Michael, Am 07.11.2008 um 14:33 schrieb Michael Gernoth: > My old build-scripts and sources for all my packages can be found at: > http://csw.informatik.uni-erlangen.de/csw/users/michael/sources/ > The scripts are in the 'specs' subdirectory. I copied your old build descriptions to the GAR repository in the respective pkg//trunk/legacy/ folders as a reference if someone wants to bring a package in GAR. Best regards -- Dago From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:38 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:38 +0000 Subject: [csw-devel] SF.net SVN: gar:[4583] csw/mgar/pkg Message-ID: Revision: 4583 http://gar.svn.sourceforge.net/gar/?rev=4583&view=rev Author: dmichelsen Date: 2009-04-27 13:02:38 +0000 (Mon, 27 Apr 2009) Log Message: ----------- x2x: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/x2x/ csw/mgar/pkg/x2x/trunk/ csw/mgar/pkg/x2x/trunk/legacy/ csw/mgar/pkg/x2x/trunk/legacy/scripts/ csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/x2x/trunk/legacy/scripts/human.pl csw/mgar/pkg/x2x/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/x2x/trunk/legacy/sources/ csw/mgar/pkg/x2x/trunk/legacy/specs/ csw/mgar/pkg/x2x/trunk/legacy/specs/Makefile csw/mgar/pkg/x2x/trunk/legacy/specs/x2x Added: csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:38 UTC (rev 4583) @@ -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/x2x/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/scripts/human.pl 2009-04-27 13:02:38 UTC (rev 4583) @@ -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 () { + 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 + +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 + +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/x2x/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:38 UTC (rev 4583) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/x2x/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/specs/Makefile 2009-04-27 13:02:38 UTC (rev 4583) @@ -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/x2x/trunk/legacy/specs/x2x =================================================================== --- csw/mgar/pkg/x2x/trunk/legacy/specs/x2x (rev 0) +++ csw/mgar/pkg/x2x/trunk/legacy/specs/x2x 2009-04-27 13:02:38 UTC (rev 4583) @@ -0,0 +1,46 @@ +# vim: ft=perl +# $Id: x2x,v 1.3 2005/07/10 18:33:04 simigern Exp $ + +$progname = 'x2x'; +$version = '1.30'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.odsd.org/x2x/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}-beta.tar.gz"); + +#@patches = (['filename.patch', "${progname}-${version}", '-p0']); + + at packages = ({ + pkgname => $progname, + filename => $progname, + name => "$progname - Control one X display from another", + dependencies => ['CSWcommon'], + filelist => [qw(opt)] + }); + +$copyright = "${progname}-${version}-beta/COPYING"; + +$build = <<"EOF"; +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/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 -R/usr/openwin/lib' +cd ${progname}-${version}-beta +xmkmf +gmake CC=cc +head -38 x2x.c | tail -33 | cut -b4- >COPYING +mkdir -p ${buildroot}/opt/csw/bin +cp x2x ${buildroot}/opt/csw/bin/ +mkdir -p ${buildroot}/opt/csw/share/man/man1 +cp x2x.man ${buildroot}/opt/csw/share/man/man1/x2x.1 +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:01:52 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:01:52 +0000 Subject: [csw-devel] SF.net SVN: gar:[4580] csw/mgar/pkg Message-ID: Revision: 4580 http://gar.svn.sourceforge.net/gar/?rev=4580&view=rev Author: dmichelsen Date: 2009-04-27 13:01:51 +0000 (Mon, 27 Apr 2009) Log Message: ----------- wmmail: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/wmmail/ csw/mgar/pkg/wmmail/trunk/ csw/mgar/pkg/wmmail/trunk/legacy/ csw/mgar/pkg/wmmail/trunk/legacy/scripts/ csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/wmmail/trunk/legacy/scripts/human.pl csw/mgar/pkg/wmmail/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/wmmail/trunk/legacy/sources/ csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-debian.patch csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-proplist.patch csw/mgar/pkg/wmmail/trunk/legacy/specs/ csw/mgar/pkg/wmmail/trunk/legacy/specs/Makefile csw/mgar/pkg/wmmail/trunk/legacy/specs/wmmail Added: csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:01:51 UTC (rev 4580) @@ -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/wmmail/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/scripts/human.pl 2009-04-27 13:01:51 UTC (rev 4580) @@ -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 () { + 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 + +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 + +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/wmmail/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:01:51 UTC (rev 4580) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/wmmail/trunk/legacy/sources/wmmail-debian.patch =================================================================== --- csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-debian.patch (rev 0) +++ csw/mgar/pkg/wmmail/trunk/legacy/sources/wmmail-debian.patch 2009-04-27 13:01:51 UTC (rev 4580) @@ -0,0 +1,7276 @@ +--- wmmail-0.64.orig/ChangeLog ++++ wmmail-0.64/ChangeLog +@@ -1,5 +1,23 @@ + $Id: wmmail-debian.patch,v 1.1 2004/02/29 12:11:17 simigern Exp $ + ++----begin changelog for patch from Daniel Richard G. ---- ++- Factored out 'mailbox->last_update = time(NULL)' from the various ++ mailbox-checking modules to wmmail.c (at least mbox.c wasn't properly ++ doing this in some cases) ++- Removed redundant stat() call from mbox.c ++- Receiving SIGCHLD from an exiting button-click program now causes a ++ status update; now WMMail.app won't say new mail is waiting for so many ++ seconds after you've just finished reading said new mail ++- Added logic to SIGCHLD handler to process any pending X expose events ++ before the status update, in case the button-click program had been ++ obscuring the appicon (otherwise, the appicon can remain annoyingly ++ unpainted during a slow status update) ++- Added handler so that SIGUSR1 causes a status update; now you can say ++ 'killall -USR1 WMMail' in your ~/.procmailrc for non-delayed new mail ++ notification ++- Fixed potential race condition in update_status() ++----end changelog for patch---- ++ + Changes since version 0.63a: + + - added back ExecuteOnUpdate +--- wmmail-0.64.orig/Makefile.in ++++ wmmail-0.64/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -74,11 +81,12 @@ + wmmaildir = @wmmaildir@ + + SUBDIRS = src Defaults Anims Sounds ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_CLEAN_FILES = + DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ +-Makefile.in NEWS configure configure.in install-sh missing \ +-mkinstalldirs ++Makefile.in NEWS aclocal.m4 config.guess config.sub configure \ ++configure.in install-sh missing mkinstalldirs + + + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +@@ -87,17 +95,19 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in ++ cd $(srcdir) && $(ACLOCAL) + + config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ++$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + + # This directory's subdirectories are mostly independent; you can cd +@@ -136,7 +146,7 @@ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +- test "$$subdir" = "." && dot_seen=yes; \ ++ test "$$subdir" != "." || dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ +@@ -178,7 +188,7 @@ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) ++ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) + + mostlyclean-tags: + +@@ -235,7 +245,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/configure ++++ wmmail-0.64/configure +@@ -12,11 +12,10 @@ + ac_default_prefix=/usr/local + # Any additions from configure.in: + ac_help="$ac_help +- --with-x use the X Window System" +-ac_help="$ac_help +- --with-PL-libs pass compiler flags to find libPropList libraries" ++ --enable-maintainer-mode enable make rules and dependencies not useful ++ (and sometimes confusing) to the casual installer" + ac_help="$ac_help +- --with-PL-incs pass compiler flags to find libPropList header files" ++ --with-x use the X Window System" + ac_help="$ac_help + --with-WM-libs pass compiler flags to find Window Maker libraries" + ac_help="$ac_help +@@ -546,7 +545,7 @@ + + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:550: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:549: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -579,10 +578,260 @@ + VERSION=0.64 + + ++ac_aux_dir= ++for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ++ if test -f $ac_dir/install-sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install-sh -c" ++ break ++ elif test -f $ac_dir/install.sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install.sh -c" ++ break ++ fi ++done ++if test -z "$ac_aux_dir"; then ++ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } ++fi ++ac_config_guess=$ac_aux_dir/config.guess ++ac_config_sub=$ac_aux_dir/config.sub ++ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ++ ++am__api_version="1.4" ++# Find a good install program. We prefer a C program (faster), ++# so one script is as good as another. But avoid the broken or ++# incompatible versions: ++# SysV /etc/install, /usr/sbin/install ++# SunOS /usr/etc/install ++# IRIX /sbin/install ++# AIX /bin/install ++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag ++# AFS /usr/afsws/bin/install, which mishandles nonexistent args ++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" ++# ./install, which can be erroneously created by make from ./install.sh. ++echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ++echo "configure:614: checking for a BSD compatible install" >&5 ++if test -z "$INSTALL"; then ++if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ++ for ac_dir in $PATH; do ++ # Account for people who put trailing slashes in PATH elements. ++ case "$ac_dir/" in ++ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ *) ++ # OSF1 and SCO ODT 3.0 have their own names for install. ++ # Don't use installbsd from OSF since it installs stuff as root ++ # by default. ++ for ac_prog in ginstall scoinst install; do ++ if test -f $ac_dir/$ac_prog; then ++ if test $ac_prog = install && ++ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ++ # AIX install. It has an incompatible calling convention. ++ : ++ else ++ ac_cv_path_install="$ac_dir/$ac_prog -c" ++ break 2 ++ fi ++ fi ++ done ++ ;; ++ esac ++ done ++ IFS="$ac_save_IFS" ++ ++fi ++ if test "${ac_cv_path_install+set}" = set; then ++ INSTALL="$ac_cv_path_install" ++ else ++ # As a last resort, use the slow shell script. We don't cache a ++ # path for INSTALL within a source directory, because that will ++ # break other packages using the cache if that directory is ++ # removed, or if the path is relative. ++ INSTALL="$ac_install_sh" ++ fi ++fi ++echo "$ac_t""$INSTALL" 1>&6 ++ ++# Use test -z because SunOS4 sh mishandles braces in ${var-val}. ++# It thinks the first close brace ends the variable substitution. ++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ++ ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ ++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ++ ++echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ++echo "configure:667: checking whether build environment is sane" >&5 ++# Just in case ++sleep 1 ++echo timestamp > conftestfile ++# Do `set' in a subshell so we don't clobber the current shell's ++# arguments. Must try -L first in case configure is actually a ++# symlink; some systems play weird games with the mod time of symlinks ++# (eg FreeBSD returns the mod time of the symlink's containing ++# directory). ++if ( ++ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` ++ if test "$*" = "X"; then ++ # -L didn't work. ++ set X `ls -t $srcdir/configure conftestfile` ++ fi ++ if test "$*" != "X $srcdir/configure conftestfile" \ ++ && test "$*" != "X conftestfile $srcdir/configure"; then ++ ++ # If neither matched, then we have a broken ls. This can happen ++ # if, for instance, CONFIG_SHELL is bash and it inherits a ++ # broken ls alias from the environment. This has actually ++ # happened. Such a system could not be considered "sane". ++ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken ++alias in your environment" 1>&2; exit 1; } ++ fi ++ ++ test "$2" = conftestfile ++ ) ++then ++ # Ok. ++ : ++else ++ { echo "configure: error: newly created file is older than distributed files! ++Check your system clock" 1>&2; exit 1; } ++fi ++rm -f conftest* ++echo "$ac_t""yes" 1>&6 ++if test "$program_transform_name" = s,x,x,; then ++ program_transform_name= ++else ++ # Double any \ or $. echo might interpret backslashes. ++ cat <<\EOF_SED > conftestsed ++s,\\,\\\\,g; s,\$,$$,g ++EOF_SED ++ program_transform_name="`echo $program_transform_name|sed -f conftestsed`" ++ rm -f conftestsed ++fi ++test "$program_prefix" != NONE && ++ program_transform_name="s,^,${program_prefix},; $program_transform_name" ++# Use a double $ so make ignores it. ++test "$program_suffix" != NONE && ++ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" ++ ++# sed with no file args requires a program. ++test "$program_transform_name" = "" && program_transform_name="s,x,x," ++ ++ ++PACKAGE=$PACKAGE ++ ++VERSION=$VERSION ++ ++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ++ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } ++fi ++cat >> confdefs.h <> confdefs.h <&6 ++echo "configure:743: checking for working aclocal-${am__api_version}" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then ++ ACLOCAL=aclocal-${am__api_version} ++ echo "$ac_t""found" 1>&6 ++else ++ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ++echo "configure:756: checking for working autoconf" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (autoconf --version) < /dev/null > /dev/null 2>&1; then ++ AUTOCONF=autoconf ++ echo "$ac_t""found" 1>&6 ++else ++ AUTOCONF="$missing_dir/missing autoconf" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 ++echo "configure:769: checking for working automake-${am__api_version}" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then ++ AUTOMAKE=automake-${am__api_version} ++ echo "$ac_t""found" 1>&6 ++else ++ AUTOMAKE="$missing_dir/missing automake-${am__api_version}" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ++echo "configure:782: checking for working autoheader" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (autoheader --version) < /dev/null > /dev/null 2>&1; then ++ AUTOHEADER=autoheader ++ echo "$ac_t""found" 1>&6 ++else ++ AUTOHEADER="$missing_dir/missing autoheader" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ++echo "configure:795: checking for working makeinfo" >&5 ++# Run test in a subshell; some versions of sh will print an error if ++# an executable is not found, even if stderr is redirected. ++# Redirect stdin to placate older versions of autoconf. Sigh. ++if (makeinfo --version) < /dev/null > /dev/null 2>&1; then ++ MAKEINFO=makeinfo ++ echo "$ac_t""found" 1>&6 ++else ++ MAKEINFO="$missing_dir/missing makeinfo" ++ echo "$ac_t""missing" 1>&6 ++fi ++ ++ ++echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ++echo "configure:809: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. ++if test "${enable_maintainer_mode+set}" = set; then ++ enableval="$enable_maintainer_mode" ++ USE_MAINTAINER_MODE=$enableval ++else ++ USE_MAINTAINER_MODE=no ++fi ++ ++ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 ++ ++ ++if test $USE_MAINTAINER_MODE = yes; then ++ MAINTAINER_MODE_TRUE= ++ MAINTAINER_MODE_FALSE='#' ++else ++ MAINTAINER_MODE_TRUE='#' ++ MAINTAINER_MODE_FALSE= ++fi ++ MAINT=$MAINTAINER_MODE_TRUE ++ ++ ++ + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:586: checking for $ac_word" >&5 ++echo "configure:835: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -612,7 +861,7 @@ + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:616: checking for $ac_word" >&5 ++echo "configure:865: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -663,7 +912,7 @@ + # Extract the first word of "cl", so it can be a program name with args. + set dummy cl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:667: checking for $ac_word" >&5 ++echo "configure:916: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -695,7 +944,7 @@ + fi + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:948: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +@@ -706,12 +955,12 @@ + + cat > conftest.$ac_ext << EOF + +-#line 710 "configure" ++#line 959 "configure" + #include "confdefs.h" + + main(){return(0);} + EOF +-if { (eval echo configure:715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +@@ -737,12 +986,12 @@ + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:741: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:990: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +-echo "configure:746: checking whether we are using GNU C" >&5 ++echo "configure:995: checking whether we are using GNU C" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -751,7 +1000,7 @@ + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no +@@ -770,7 +1019,7 @@ + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +-echo "configure:774: checking whether ${CC-cc} accepts -g" >&5 ++echo "configure:1023: checking whether ${CC-cc} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -801,25 +1050,6 @@ + fi + fi + +-ac_aux_dir= +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +- if test -f $ac_dir/install-sh; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/install-sh -c" +- break +- elif test -f $ac_dir/install.sh; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/install.sh -c" +- break +- fi +-done +-if test -z "$ac_aux_dir"; then +- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +-fi +-ac_config_guess=$ac_aux_dir/config.guess +-ac_config_sub=$ac_aux_dir/config.sub +-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +- + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or + # incompatible versions: +@@ -832,7 +1062,7 @@ + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:836: checking for a BSD compatible install" >&5 ++echo "configure:1066: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -885,7 +1115,7 @@ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:889: checking whether ln -s works" >&5 ++echo "configure:1119: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -929,7 +1159,7 @@ + # Extract the first word of "autoconf", so it can be a program name with args. + set dummy autoconf; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:933: checking for $ac_word" >&5 ++echo "configure:1163: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -964,7 +1194,7 @@ + # Extract the first word of "aclocal", so it can be a program name with args. + set dummy aclocal; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:968: checking for $ac_word" >&5 ++echo "configure:1198: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ACLOCAL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -999,7 +1229,7 @@ + # Extract the first word of "autoheader", so it can be a program name with args. + set dummy autoheader; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1003: checking for $ac_word" >&5 ++echo "configure:1233: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1034,7 +1264,7 @@ + # Extract the first word of "automake", so it can be a program name with args. + set dummy automake; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1038: checking for $ac_word" >&5 ++echo "configure:1268: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AUTOMAKE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1069,7 +1299,7 @@ + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1073: checking how to run the C preprocessor" >&5 ++echo "configure:1303: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1084,13 +1314,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1101,13 +1331,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1118,13 +1348,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1153,7 +1383,7 @@ + # Uses ac_ vars as temps to allow command line to override cache and checks. + # --without-x overrides everything else, but does not touch the cache. + echo $ac_n "checking for X""... $ac_c" 1>&6 +-echo "configure:1157: checking for X" >&5 ++echo "configure:1387: checking for X" >&5 + + # Check whether --with-x or --without-x was given. + if test "${with_x+set}" = set; then +@@ -1215,12 +1445,12 @@ + + # First, try using that file with no special directory specified. + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1289,14 +1519,14 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LIBS="$ac_save_LIBS" + # We can link X programs with no special library path. +@@ -1392,24 +1622,6 @@ + fi + + +-# Check whether --with-PL-libs or --without-PL-libs was given. +-if test "${with_PL_libs+set}" = set; then +- withval="$with_PL_libs" +- PLLIBS=$withval +-else +- PLLIBS="" +-fi +- +- +-# Check whether --with-PL-incs or --without-PL-incs was given. +-if test "${with_PL_incs+set}" = set; then +- withval="$with_PL_incs" +- PLINCS=$withval +-else +- PLINCS="" +-fi +- +- + # Check whether --with-WM-libs or --without-WM-libs was given. + if test "${with_WM_libs+set}" = set; then + withval="$with_WM_libs" +@@ -1428,8 +1640,8 @@ + fi + + +-CFLAGS="$CFLAGS $PLINCS $WMINCS" +-LDFLAGS="$LDFLAGS $PLLIBS $WMLIBS" ++CFLAGS="$CFLAGS $WMINCS" ++LDFLAGS="$LDFLAGS $WMLIBS" + + + appspath="" +@@ -1549,7 +1761,7 @@ + + + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +-echo "configure:1553: checking for gethostbyname in -lnsl" >&5 ++echo "configure:1765: checking for gethostbyname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1557,7 +1769,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1596,7 +1808,7 @@ + fi + + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:1600: checking for socket in -lsocket" >&5 ++echo "configure:1812: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1604,7 +1816,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1645,7 +1857,7 @@ + + + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 +-echo "configure:1649: checking for XOpenDisplay in -lX11" >&5 ++echo "configure:1861: checking for XOpenDisplay in -lX11" >&5 + ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1653,7 +1865,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lX11 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1692,7 +1904,7 @@ + fi + + echo $ac_n "checking for XShapeCombineMask in -lXext""... $ac_c" 1>&6 +-echo "configure:1696: checking for XShapeCombineMask in -lXext" >&5 ++echo "configure:1908: checking for XShapeCombineMask in -lXext" >&5 + ac_lib_var=`echo Xext'_'XShapeCombineMask | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1700,7 +1912,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXext $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1739,7 +1951,7 @@ + fi + + echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6 +-echo "configure:1743: checking for XtAppInitialize in -lXt" >&5 ++echo "configure:1955: checking for XtAppInitialize in -lXt" >&5 + ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1747,7 +1959,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1786,7 +1998,7 @@ + fi + + echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6 +-echo "configure:1790: checking for XpmCreatePixmapFromData in -lXpm" >&5 ++echo "configure:2002: checking for XpmCreatePixmapFromData in -lXpm" >&5 + ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1794,7 +2006,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXpm $LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1832,27 +2044,27 @@ + echo "$ac_t""no" 1>&6 + fi + +-echo $ac_n "checking for PLGetProplistWithPath in -lPropList""... $ac_c" 1>&6 +-echo "configure:1837: checking for PLGetProplistWithPath in -lPropList" >&5 +-ac_lib_var=`echo PropList'_'PLGetProplistWithPath | sed 'y%./+-%__p_%'` ++echo $ac_n "checking for WMReadPropListFromFile in -lWUtil""... $ac_c" 1>&6 ++echo "configure:2049: checking for WMReadPropListFromFile in -lWUtil" >&5 ++ac_lib_var=`echo WUtil'_'WMReadPropListFromFile | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" +-LIBS="-lPropList $LIBS $LIBS" ++LIBS="-lWUtil $LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1867,13 +2079,13 @@ + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 +- ac_tr_lib=HAVE_LIB`echo PropList | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ ac_tr_lib=HAVE_LIB`echo WUtil | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +@@ -1884,12 +2096,12 @@ + + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:1888: checking for ANSI C header files" >&5 ++echo "configure:2100: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1897,7 +2109,7 @@ + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1914,7 +2126,7 @@ + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -1932,7 +2144,7 @@ + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -1953,7 +2165,7 @@ + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -1964,7 +2176,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -1992,12 +2204,12 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +-echo "configure:1996: checking for $ac_hdr that defines DIR" >&5 ++echo "configure:2208: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -2005,7 +2217,7 @@ + DIR *dirp = 0; + ; return 0; } + EOF +-if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +@@ -2030,7 +2242,7 @@ + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +-echo "configure:2034: checking for opendir in -ldir" >&5 ++echo "configure:2246: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2038,7 +2250,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2071,7 +2283,7 @@ + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +-echo "configure:2075: checking for opendir in -lx" >&5 ++echo "configure:2287: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2079,7 +2291,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2116,17 +2328,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2120: checking for $ac_hdr" >&5 ++echo "configure:2332: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2155,12 +2367,12 @@ + + + echo $ac_n "checking for off_t""... $ac_c" 1>&6 +-echo "configure:2159: checking for off_t" >&5 ++echo "configure:2371: checking for off_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -2188,12 +2400,12 @@ + fi + + echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +-echo "configure:2192: checking for pid_t" >&5 ++echo "configure:2404: checking for pid_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -2221,12 +2433,12 @@ + fi + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:2225: checking for size_t" >&5 ++echo "configure:2437: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -2256,12 +2468,12 @@ + + + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +-echo "configure:2260: checking return type of signal handlers" >&5 ++echo "configure:2472: checking return type of signal handlers" >&5 + if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -2278,7 +2490,7 @@ + int i; + ; return 0; } + EOF +-if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void + else +@@ -2297,12 +2509,12 @@ + + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +-echo "configure:2301: checking for vprintf" >&5 ++echo "configure:2513: checking for vprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else +@@ -2349,12 +2561,12 @@ + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:2353: checking for _doprnt" >&5 ++echo "configure:2565: checking for _doprnt" >&5 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else +@@ -2404,12 +2616,12 @@ + for ac_func in socket strstr + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2408: checking for $ac_func" >&5 ++echo "configure:2620: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2608,15 +2820,19 @@ + s%@SET_MAKE@%$SET_MAKE%g + s%@PACKAGE@%$PACKAGE%g + s%@VERSION@%$VERSION%g +-s%@CC@%$CC%g + s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g + s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g + s%@INSTALL_DATA@%$INSTALL_DATA%g +-s%@LN_S@%$LN_S%g +-s%@AUTOCONF@%$AUTOCONF%g + s%@ACLOCAL@%$ACLOCAL%g +-s%@AUTOHEADER@%$AUTOHEADER%g ++s%@AUTOCONF@%$AUTOCONF%g + s%@AUTOMAKE@%$AUTOMAKE%g ++s%@AUTOHEADER@%$AUTOHEADER%g ++s%@MAKEINFO@%$MAKEINFO%g ++s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g ++s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g ++s%@MAINT@%$MAINT%g ++s%@CC@%$CC%g ++s%@LN_S@%$LN_S%g + s%@CPP@%$CPP%g + s%@wmmaildir@%$wmmaildir%g + s%@MBOX_SUPPORT@%$MBOX_SUPPORT%g +--- wmmail-0.64.orig/configure.in ++++ wmmail-0.64/configure.in +@@ -32,6 +32,9 @@ + VERSION=0.64 + AC_SUBST(VERSION) + ++AM_INIT_AUTOMAKE($PACKAGE, $VERSION) ++AM_MAINTAINER_MODE ++ + dnl + dnl check for programs + dnl +@@ -62,18 +65,14 @@ + + + dnl +-dnl get compiler flags for libPropList and Window Maker ++dnl get compiler flags for Window Maker + dnl +-AC_ARG_WITH(PL-libs, [ --with-PL-libs pass compiler flags to find libPropList libraries], [PLLIBS=$withval], [PLLIBS=""]) +- +-AC_ARG_WITH(PL-incs, [ --with-PL-incs pass compiler flags to find libPropList header files], [PLINCS=$withval], [PLINCS=""]) +- + AC_ARG_WITH(WM-libs, [ --with-WM-libs pass compiler flags to find Window Maker libraries], [WMLIBS=$withval], [WMLIBS=""]) + + AC_ARG_WITH(WM-incs, [ --with-WM-incs pass compiler flags to find Window Maker header files], [WMINCS=$withval], [WMINCS=""]) + +-CFLAGS="$CFLAGS $PLINCS $WMINCS" +-LDFLAGS="$LDFLAGS $PLLIBS $WMLIBS" ++CFLAGS="$CFLAGS $WMINCS" ++LDFLAGS="$LDFLAGS $WMLIBS" + + + dnl +@@ -166,7 +165,7 @@ + AC_CHECK_LIB(Xext, XShapeCombineMask) + AC_CHECK_LIB(Xt, XtAppInitialize) + AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, , , $LIBS) +-AC_CHECK_LIB(PropList, PLGetProplistWithPath, , , $LIBS) ++AC_CHECK_LIB(WUtil, WMReadPropListFromFile, , , $LIBS) + + + dnl +--- wmmail-0.64.orig/Anims/NeXT/Makefile.in ++++ wmmail-0.64/Anims/NeXT/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/NeXT/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/Makefile.in ++++ wmmail-0.64/Anims/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -85,7 +92,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -129,7 +136,7 @@ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +- test "$$subdir" = "." && dot_seen=yes; \ ++ test "$$subdir" != "." || dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ +@@ -171,7 +178,7 @@ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) ++ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) + + mostlyclean-tags: + +@@ -195,7 +202,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/asmail/Makefile.in ++++ wmmail-0.64/Anims/asmail/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/asmail/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/e/Makefile.in ++++ wmmail-0.64/Anims/e/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/e/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Anims/monitor-e/Makefile.in ++++ wmmail-0.64/Anims/monitor-e/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Anims/monitor-e/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Defaults/Makefile.in ++++ wmmail-0.64/Defaults/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -93,7 +100,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Defaults/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -136,7 +143,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/Sounds/Makefile.in ++++ wmmail-0.64/Sounds/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -92,7 +99,7 @@ + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Sounds/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -135,7 +142,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/src/Makefile.in ++++ wmmail-0.64/src/Makefile.in +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,15 +57,22 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + CC = @CC@ + DDEBUG = @DDEBUG@ ++HAVE_LIB = @HAVE_LIB@ + IMAP_SUPPORT = @IMAP_SUPPORT@ ++LIB = @LIB@ + LN_S = @LN_S@ ++LTLIB = @LTLIB@ + MAILDIR_SUPPORT = @MAILDIR_SUPPORT@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ + MBOX_SUPPORT = @MBOX_SUPPORT@ + MH_SUPPORT = @MH_SUPPORT@ + PACKAGE = @PACKAGE@ +@@ -116,7 +123,7 @@ + all: all-redirect + .SUFFIXES: + .SUFFIXES: .S .c .o .s +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +@@ -191,7 +198,7 @@ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ +- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) ++ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) + + mostlyclean-tags: + +@@ -215,7 +222,7 @@ + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +--- wmmail-0.64.orig/src/imap.c ++++ wmmail-0.64/src/imap.c +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include "wmmail.h" + #include "wmutil.h" + #include "net.h" +@@ -45,6 +45,7 @@ + * Username + * Password + * Folder (optional) ++ * UseSelect (optional) -- added by Chris Waters + * + * See mbox.c for information on states and transitions. + * +@@ -62,6 +63,7 @@ + char *folder_name; + int socket; + int cmd_seq; ++ int use_sel ; /* added by xtifr */ + } Connection; + + /* internal functions */ +@@ -84,7 +86,6 @@ + prev_new_mail_count; + + connection = init_connection(mailbox); +- mailbox->last_update = time(NULL); + + if (connection == NULL) + return False; +@@ -159,13 +160,15 @@ + port, + username, + password, +- folder; ++ folder, ++ use_sel; + + GET_ENTRY(mailbox->options, hostname, "Hostname"); + GET_ENTRY(mailbox->options, port, "Port"); + GET_ENTRY(mailbox->options, username, "Username"); + GET_ENTRY(mailbox->options, password, "Password"); + GET_ENTRY(mailbox->options, folder, "Folder"); ++ GET_ENTRY(mailbox->options, use_sel, "UseSelect"); /* xtifr */ + + if (!username || !password || !hostname) + { +@@ -178,7 +181,10 @@ + !PLIsString(password) || + (folder && !PLIsString(folder)) || + (port && (!PLIsString(port) || +- sscanf(PLGetString(port), "%i", &port_no) != 1)) ) ++ sscanf(PLGetString(port), "%i", &port_no) != 1)) || ++ (use_sel && (!PLIsString (use_sel) || /* xtifr */ ++ !(!strcasecmp(PLGetString(use_sel), "Yes") || ++ !strcasecmp(PLGetString(use_sel), "No")) )) ) + { + croak("mailbox \"%s\" has invalid options; ignored", mailbox->name); + return (Connection *) NULL; +@@ -233,12 +239,17 @@ + connection->socket = sockfd; + connection->cmd_seq = 1; /* A000 is already issued, above */ + ++ if (use_sel && !strcasecmp(PLGetString(use_sel), "Yes")) /* xtifr */ ++ connection->use_sel = True; ++ else ++ connection->use_sel = False; ++ + return connection; + } + else + { + /* FIXME: remove this debug message before release! */ +- croak("%s", buf); ++ /* croak("%s", buf); */ + /* if we can't login, then don't try any more */ + croak("login failed for mailbox \"%s\"; ignored", mailbox->name); + close(sockfd); +@@ -259,8 +270,14 @@ + buf[MAX_STRING_SIZE] = 0; /* fix buffer overflow */ + cmd[MAX_STRING_SIZE] = 0; + +- sprintf(cmd, "A%03i SELECT %s\r\n", ++ /* changed from "SELECT" to choice of "EXAMINE" or "SELECT" (defaults to ++ * "EXAMINE") by Chris Waters ++ * (According to RFC1730, the EXAMINE command is identical to ++ * SELECT, except that the folder is opened in in read-only mode.) ++ */ ++ sprintf(cmd, "A%03i %s %s\r\n", + connection->cmd_seq++, ++ (connection->use_sel ? "SELECT" : "EXAMINE"), + connection->folder_name); + + if (socket_write(connection->socket, cmd)) +--- wmmail-0.64.orig/src/maildir.c ++++ wmmail-0.64/src/maildir.c +@@ -118,8 +118,6 @@ + + *redraw |= (prev_status != mailbox->status); + +- mailbox->last_update = time(NULL); +- + wfree(mailbox_path); + return True; + } +--- wmmail-0.64.orig/src/mbox.c ++++ wmmail-0.64/src/mbox.c +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include "wmmail.h" + #include "wmutil.h" + +@@ -196,8 +196,6 @@ + + *redraw |= (prev_status != mailbox->status); + +- mailbox->last_update = time(NULL); +- + wfree(mailbox_path); + return True; + } +@@ -299,8 +297,9 @@ + return True; + #endif + +- /* save atime */ ++ /* save atime and mtime */ + xtime.actime = t.st_atime; ++ xtime.modtime = t.st_mtime; + + if ((file = fopen(mailbox_path, "r")) == NULL) + return False; +@@ -366,11 +365,7 @@ + + fclose(file); + +- stat(mailbox_path, &t); +- xtime.modtime = t.st_mtime; /* save mtime */ +- utime(mailbox_path, &xtime); /* reset atime and mtime */ +- +- mailbox->last_update = time(NULL); ++ utime(mailbox_path, &xtime); /* reset atime, keep mtime the same */ + + mailbox->total_mail_count = m; + mailbox->new_mail_count = n; +--- wmmail-0.64.orig/src/mh.c ++++ wmmail-0.64/src/mh.c +@@ -130,8 +130,6 @@ + + *redraw |= (prev_status != mailbox->status); + +- mailbox->last_update = time(NULL); +- + wfree(mailbox_path); + return True; + } +--- wmmail-0.64.orig/src/pop3.c ++++ wmmail-0.64/src/pop3.c +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include "wmmail.h" + #include "wmutil.h" + #include "net.h" +@@ -81,7 +81,6 @@ + prev_new_mail_count; + + connection = init_connection(mailbox); +- mailbox->last_update = time(NULL); + + if (connection == NULL) + return False; +--- wmmail-0.64.orig/src/properties.c ++++ wmmail-0.64/src/properties.c +@@ -44,10 +44,12 @@ + * + */ + ++#include + #include + #include + #include +-#include ++#include ++#include + #include + #include + #include +--- wmmail-0.64.orig/src/std_icons.c ++++ wmmail-0.64/src/std_icons.c +@@ -24,6 +24,7 @@ + * + */ + ++#include + #include "wmmail.h" + #include "wmutil.h" + #include "std_icons.h" +--- wmmail-0.64.orig/src/wmmail.c ++++ wmmail-0.64/src/wmmail.c +@@ -26,6 +26,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -36,6 +37,7 @@ + #include + #include + #include ++#include + + #include "wmmail.h" + #include "wmutil.h" +@@ -43,6 +45,7 @@ + #include "std_icons.h" + + int end_of_cycle = False; ++pid_t click_command_pid = -2; + + #ifdef MBOX_SUPPORT + # include "mbox.h" +@@ -74,7 +77,8 @@ + void redraw_appicon(void); + void animate(XtPointer, XtIntervalId *); + Pixel get_pixel_by_color(char *); +-void update_status(XtPointer, XtIntervalId *); ++void update_status_timeout(XtPointer, XtIntervalId *); ++void update_status(int); + void handle_expose(Widget, XtPointer, XEvent *); + void handle_button(Widget, XtPointer, XEvent *); + +@@ -85,7 +89,7 @@ + + create_appicon(); + +- update_status(NULL, NULL); ++ update_status(True); + animate(NULL, NULL); + + XtAppMainLoop(wmmail_context); +@@ -143,11 +147,45 @@ + /* SIGCHLD handler */ + void sig_chld(int signo) + { +- waitpid((pid_t) -1, NULL, WNOHANG); ++ if (waitpid((pid_t) -1, NULL, WNOHANG) == click_command_pid) ++ { ++ /* Handle any pending exposure events, potentially raised by ++ * the window of the click command process going away. This ++ * prevents the appicon from remaining unpainted during the ++ * (sometimes slow) update procedure. */ ++ while (XtAppPending(wmmail_context) & XtIMXEvent) ++ { ++ XEvent xev; ++ XtAppPeekEvent(wmmail_context, &xev); ++ if (xev.type != Expose) ++ break; ++ ++ XtAppProcessEvent(wmmail_context, XtIMXEvent); ++ } ++ ++#ifdef DEBUG ++ croak("caught SIGCHLD from click command process; performing update"); ++#endif ++ ++ update_status(False); ++ click_command_pid = -2; ++ } + signal(SIGCHLD, sig_chld); + } + + ++/* SIGUSR1 handler */ ++void sig_usr1(int signo) ++{ ++#ifdef DEBUG ++ croak("caught SIGUSR1; performing update"); ++#endif ++ ++ update_status(False); ++ signal(SIGUSR1, sig_usr1); ++} ++ ++ + /* handle command line options, open the configuration file for reading */ + void initialize(int argc, char **argv) + { +@@ -267,6 +305,9 @@ + + /* zombie children are dealt with in the SIG_CHLD handler */ + signal(SIGCHLD, sig_chld); ++ ++ /* mechanism for an external process to signal a mailbox update */ ++ signal(SIGUSR1, sig_usr1); + } + + +@@ -502,27 +543,43 @@ + } + + +-void update_status(XtPointer XtP, XtIntervalId * XtI) ++void update_status_timeout(XtPointer XtP, XtIntervalId * XtI) ++{ ++ update_status(True); ++} ++ ++ ++void update_status(int interval_check) + { + Mailbox *mailbox; + static int update_in_progress = False; ++ static int next_update_scheduled = False; ++ static XtIntervalId next_update_timer; ++ time_t cur_time = time(NULL); + int i, ret; + int new_status = NO_MAIL; + int beep = False, + redraw = False, + run = False, +- next_update = -1; /* time to next update in seconds */ ++ next_update = INT_MAX; /* time to next update in seconds */ + +- if (!update_in_progress) +- { ++ if (update_in_progress) ++ return; + update_in_progress = True; ++ ++#ifdef DEBUG ++ croak("updating status at time %d", cur_time); ++#endif ++ ++ /* FIXME: code below (and above) needs to be re-indented! */ ++ + mailbox_count = list_length(mailbox_list); + + for (i = 0; i < mailbox_count; i++) + { + mailbox = list_nth(i, mailbox_list); + +- if (mailbox->last_update + mailbox->update_interval > time(NULL)) ++ if (interval_check && mailbox->last_update + mailbox->update_interval > cur_time) + { + /* don't check this mailbox if it isn't time yet */ + ret = True; +@@ -563,6 +620,14 @@ + #endif + /* ignore anything that we cannot handle; bug in properties.c? */ + continue; ++ ++ if (ret) ++ { ++ /* Update cur_time, as the mailbox check may have taken a ++ * non-negligible amount of time (e.g. mbox on NFS) */ ++ cur_time = time(NULL); ++ mailbox->last_update = cur_time; ++ } + } + + /* delete mailbox if it has become rotten */ +@@ -581,14 +646,14 @@ + } + else + { +- int tmp = mailbox->last_update + mailbox->update_interval; ++ /* delta == number of seconds till this particular mailbox ++ * is scheduled to be checked again */ ++ int delta = mailbox->last_update + mailbox->update_interval - cur_time; ++ if (delta > 0 && delta < next_update) ++ next_update = delta; + + if (mailbox->status > new_status) + new_status = mailbox->status; +- +- if ( (next_update == -1) || +- (time(NULL) < tmp && time(NULL) + next_update > tmp) ) +- next_update = tmp - time(NULL); + } + } + +@@ -600,9 +665,6 @@ + + wmmail_status = new_status; + +- update_in_progress = False; +- } +- @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:02:55 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:02:55 +0000 Subject: [csw-devel] SF.net SVN: gar:[4584] csw/mgar/pkg Message-ID: Revision: 4584 http://gar.svn.sourceforge.net/gar/?rev=4584&view=rev Author: dmichelsen Date: 2009-04-27 13:02:55 +0000 (Mon, 27 Apr 2009) Log Message: ----------- ximian_connector: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/ximian_connector/ csw/mgar/pkg/ximian_connector/trunk/ csw/mgar/pkg/ximian_connector/trunk/legacy/ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/human.pl csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ximian_connector Added: csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:02:55 UTC (rev 4584) @@ -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/ximian_connector/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/human.pl 2009-04-27 13:02:55 UTC (rev 4584) @@ -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 () { + 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 + +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 + +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/ximian_connector/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:02:55 UTC (rev 4584) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-camel_init.patch 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,27 @@ +=================================================================== +RCS file: /cvs/gnome/evolution-exchange/storage/main.c,v +retrieving revision 1.10 +retrieving revision 1.11 +diff -u -r1.10 -r1.11 +--- storage/main.c 2004/11/26 12:07:10 1.10 ++++ storage/main.c 2004/12/09 05:54:08 1.11 +@@ -201,6 +201,7 @@ + main (int argc, char **argv) + { + char *path; ++ char *config_directory; + + bindtextdomain (PACKAGE, CONNECTOR_LOCALEDIR); + bind_textdomain_codeset (PACKAGE, "UTF-8"); +@@ -211,7 +212,10 @@ + GNOME_PARAM_HUMAN_READABLE_NAME, _("Ximian Connector for Microsoft Exchange"), + NULL); + e_icon_factory_init (); +- camel_init (NULL, FALSE); ++ ++ config_directory = g_build_filename (g_get_home_dir(), ".evolution", NULL); ++ camel_init (config_directory, FALSE); ++ g_free(config_directory); + + path = g_strdup_printf ("/tmp/.exchange-%s", g_get_user_name ()); + if (mkdir (path, 0700) == -1) { Added: csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-e2kautoconfig.diff 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,11 @@ +--- lib/e2k-autoconfig.c.orig 2004-05-11 13:54:31.739024000 -0400 ++++ lib/e2k-autoconfig.c 2004-05-11 13:55:27.249000000 -0400 +@@ -23,6 +23,8 @@ + #include + #endif + ++#include ++#include + #include + #include + #include Added: csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/sources/ximian-connector-nongcc-fixes.patch 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,20 @@ +--- calendar/e-cal-backend-exchange-tasks.c.orig 2004-09-27 18:41:48.290940000 -0400 ++++ calendar/e-cal-backend-exchange-tasks.c 2004-09-27 18:42:22.160879000 -0400 +@@ -644,7 +644,7 @@ + if ((str = e2k_properties_get_prop (result->props, E2K_PR_MAPI_COMMON_END))) { + itt = icaltime_from_timet (e2k_parse_timestamp (str), 0); + if (!icaltime_is_null_time (itt)) { +- itzone = icaltime_get_timezone ((const struct icaltimetype)itt); ++ itzone = icaltime_get_timezone (itt); + tzid = icaltimezone_get_tzid ((icaltimezone *)itzone); + ecdatetime.value = &itt; + ecdatetime.tzid = tzid; +@@ -657,7 +657,7 @@ + E2K_PR_MAPI_COMMON_START))) { + itt = icaltime_from_timet (e2k_parse_timestamp (str), 0); + if (!icaltime_is_null_time (itt)) { +- itzone = icaltime_get_timezone ((const struct icaltimetype) itt); ++ itzone = icaltime_get_timezone (itt); + tzid = icaltimezone_get_tzid ((icaltimezone *)itzone); + ecdatetime.value = &itt; + ecdatetime.tzid = tzid; Added: csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/specs/Makefile 2009-04-27 13:02:55 UTC (rev 4584) @@ -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/ximian_connector/trunk/legacy/specs/ximian_connector =================================================================== --- csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ximian_connector (rev 0) +++ csw/mgar/pkg/ximian_connector/trunk/legacy/specs/ximian_connector 2009-04-27 13:02:55 UTC (rev 4584) @@ -0,0 +1,68 @@ +# vim: ft=perl +# $Id: ximian_connector,v 1.18 2005/04/13 15:17:12 simigern Exp $ + +$progname = 'ximian-connector'; +$version = '2.2.2'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://www.novell.com/products/connector/ packaged for CSW by Michael Gernoth'; + + at sources = ("${progname}-${version}.tar.bz2","openldap-2.2.23.tgz"); + + at patches = (['ximian-connector-nongcc-fixes.patch', "${progname}-${version}", '-p0'], + ['openldap-ntlm.diff' ,"openldap-2.2.23", "-p0"]); + + at packages = ({ + pkgname => "ximian-connector", + filename => "ximian_connector", + name => "ximian_connector - Novell/Ximian connector for Evolution & MS Exchange", + dependencies => ['CSWcommon','CSWgnomespell'], + filelist => [qw(opt)], + postinstall => 'gconf-schema-update.postinstall', + exclude_dependencies => ['SUNWfreetype2','SUNWgnome-base-libs','SUNWgnome-libs','SUNWgnome-audio','SUNWgnome-component','SUNWgnome-config','SUNWgnome-vfs','SUNWlibpopt'] + }); + +$copyright = "${progname}-${version}/COPYING"; + +$build = <<"EOF"; + +export CC=cc +export CXX=CC +export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin:/opt/csw/bin" +if [ "${arch}" = "sparc" ]; then + export CFLAGS='-fast -xarch=v8' +else + export CFLAGS='-xO3 -xspace -xarch=386' +fi + +#openldap +cd ${builddir}/openldap-2.2.23 +./configure --prefix=${builddir}/evo-ldap --disable-shared --disable-slapd --without-cyrus-sasl +gmake || exit 1 +gmake install || exit 1 + +#ximian +export CFLAGS="\$CFLAGS -I${builddir}/evo-ldap/include -I/opt/csw/include" +export CPPFLAGS='-I${builddir}/evo-ldap/include -I/opt/csw/include' +export LD_OPTIONS='-L${builddir}/evo-ldap/lib -R/opt/csw/lib -L/opt/csw/lib -L/opt/csw/lib/evolution/nss/lib -R/opt/csw/lib/evolution/nss/lib' +export LDFLAGS="\$LD_OPTIONS" + +cd ${builddir}/${progname}-${version} +export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin" +./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info --with-openldap=${builddir}/evo-ldap || exit 1 +gmake || exit 1 +gmake DESTDIR=${buildroot} install_sh=ginstall install || exit 1 + +rm -rf ${buildroot}/opt/csw/etc/gconf/gconf.xml.defaults + +#remove mess from libtool-archives +for i in ${buildroot}/opt/csw/lib/evolution/*/camel-providers/*.la; do + if [ -f "\${i}" ]; then + sed -e "s|[^ ]*${buildroot}[^ ]* *||g" "\${i}" >"\${i}.newbuild" && mv "\${i}.newbuild" "\${i}" + fi +done + + +EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Mon Apr 27 15:03:10 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Mon, 27 Apr 2009 13:03:10 +0000 Subject: [csw-devel] SF.net SVN: gar:[4585] csw/mgar/pkg Message-ID: Revision: 4585 http://gar.svn.sourceforge.net/gar/?rev=4585&view=rev Author: dmichelsen Date: 2009-04-27 13:03:10 +0000 (Mon, 27 Apr 2009) Log Message: ----------- xmlparser: Add legacy build description from Michael Gernoth Added Paths: ----------- csw/mgar/pkg/xmlparser/ csw/mgar/pkg/xmlparser/trunk/ csw/mgar/pkg/xmlparser/trunk/legacy/ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl csw/mgar/pkg/xmlparser/trunk/legacy/scripts/human.pl csw/mgar/pkg/xmlparser/trunk/legacy/scripts/pkghelper.pl csw/mgar/pkg/xmlparser/trunk/legacy/sources/ csw/mgar/pkg/xmlparser/trunk/legacy/specs/ csw/mgar/pkg/xmlparser/trunk/legacy/specs/Makefile csw/mgar/pkg/xmlparser/trunk/legacy/specs/xmlparser Added: csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/analyzer.pl 2009-04-27 13:03:10 UTC (rev 4585) @@ -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/xmlparser/trunk/legacy/scripts/human.pl =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/scripts/human.pl (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/human.pl 2009-04-27 13:03:10 UTC (rev 4585) @@ -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 () { + 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 + +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 + +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/xmlparser/trunk/legacy/scripts/pkghelper.pl =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/scripts/pkghelper.pl (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/scripts/pkghelper.pl 2009-04-27 13:03:10 UTC (rev 4585) @@ -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 + +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 () { + # /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 = ; + 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) { + # + $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 use 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/xmlparser/trunk/legacy/specs/Makefile =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/specs/Makefile (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/specs/Makefile 2009-04-27 13:03:10 UTC (rev 4585) @@ -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/xmlparser/trunk/legacy/specs/xmlparser =================================================================== --- csw/mgar/pkg/xmlparser/trunk/legacy/specs/xmlparser (rev 0) +++ csw/mgar/pkg/xmlparser/trunk/legacy/specs/xmlparser 2009-04-27 13:03:10 UTC (rev 4585) @@ -0,0 +1,35 @@ +# vim: ft=perl + +$progname = 'xmlparser'; +$version = '2.34'; + +$buildroot = "${builddir}/${progname}-${version}-buildroot"; + +$category = 'application'; +$vendor = 'http://search.cpan.org/~msergeant/XML-Parser-2.34/ packaged for CSW by Michael Gernoth'; + + at sources = ("XML-Parser-${version}.tar.gz"); + at packages = ({ + pkgname => "pm${progname}", + filename => "pm_${progname}", + name => "pm_${progname} - A perl module for parsing XML documents", + dependencies => ['CSWcommon', 'CSWperl'], + filelist => [qw(opt)] + }); + +$copyright = "XML-Parser-${version}/COPYRIGHT"; + +$build = <<"EOF"; +export CC=${sunwspropath}/cc +export PATH="/opt/csw/bin:${sunwspropath}:/usr/ccs/bin:/usr/bin:/usr/openwin/bin" +cd XML-Parser-${version} +/opt/csw/bin/perl Makefile.PL INSTALLDIRS=vendor +make +gmake DESTDIR=${buildroot} install +echo > ${builddir}/XML-Parser-${version}/COPYRIGHT < Revision: 4586 http://gar.svn.sourceforge.net/gar/?rev=4586&view=rev Author: valholla Date: 2009-04-27 17:48:31 +0000 (Mon, 27 Apr 2009) Log Message: ----------- fix dependencies Modified Paths: -------------- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-27 13:03:10 UTC (rev 4585) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-27 17:48:31 UTC (rev 4586) @@ -4,8 +4,8 @@ CATALOGNAME_CSWmodphp5 = mod_php5 SPKG_DESC_CSWmodphp5 = PHP 5 - Apache 1.3.x Module -REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWbdb44 CSWiconv CSWkrb5lib CSWexpat -REQUIRED_PKGS_CSWmodphp5 += CSWlibmm CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWiconv CSWexpat +REQUIRED_PKGS_CSWmodphp5 += CSWlibxml2 CSWphp5 CSWzlib DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-27 13:03:10 UTC (rev 4585) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-27 17:48:31 UTC (rev 4586) @@ -4,9 +4,8 @@ CATALOGNAME_CSWap2modphp5 = ap2_modphp5 SPKG_DESC_CSWap2modphp5 = PHP 5 - Apache 2.2.x Module -REQUIRED_PKGS_CSWap2modphp5 = CSWap2prefork CSWbdb44 CSWiconv -REQUIRED_PKGS_CSWap2modphp5 += CSWkrb5lib CSWexpat CSWlibmm -REQUIRED_PKGS_CSWap2modphp5 += CSWlibxml2 CSWosslrt CSWphp5 CSWzlib +REQUIRED_PKGS_CSWap2modphp5 = CSWphp5 CSWap2prefork CSWiconv +REQUIRED_PKGS_CSWap2modphp5 += CSWexpat CSWlibxml2 CSWzlib DISTFILES += CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 20:02:25 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 18:02:25 +0000 Subject: [csw-devel] SF.net SVN: gar:[4587] csw/mgar/pkg/php5 Message-ID: Revision: 4587 http://gar.svn.sourceforge.net/gar/?rev=4587&view=rev Author: valholla Date: 2009-04-27 18:02:25 +0000 (Mon, 27 Apr 2009) Log Message: ----------- prep for move Added Paths: ----------- csw/mgar/pkg/php5/trunk/legacy/ Property Changed: ---------------- csw/mgar/pkg/php5-apache/trunk/ csw/mgar/pkg/php5-apache2/trunk/ Property changes on: csw/mgar/pkg/php5-apache/trunk ___________________________________________________________________ Deleted: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 Property changes on: csw/mgar/pkg/php5-apache2/trunk ___________________________________________________________________ Deleted: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 20:16:39 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 18:16:39 +0000 Subject: [csw-devel] SF.net SVN: gar:[4588] csw/mgar/pkg/php5/trunk/legacy Message-ID: Revision: 4588 http://gar.svn.sourceforge.net/gar/?rev=4588&view=rev Author: valholla Date: 2009-04-27 18:16:39 +0000 (Mon, 27 Apr 2009) Log Message: ----------- consolidate old php5* to current php5 trunk/legacy Added Paths: ----------- csw/mgar/pkg/php5/trunk/legacy/php5-apache/ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/files/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/files/ Removed Paths: ------------- csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/files/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/files/ Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5-apache/trunk/Makefile 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,52 +0,0 @@ -GARNAME = php -GARVERSION = 5.2.6 -CATEGORIES = lang - -# This directory is for the build and packaging of the Apache 1.3.x -# SAPI module for PHP5. PHP CGI/CLI and extensions are built along -# with the Apache 2.0.x SAPI. - -DESCRIPTION = A high-level scripting language. -define BLURB - PHP is a widely-used Open Source general-purpose scripting language that is - especially suited for Web development and can be embedded into HTML. Its - syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many - different platforms and can be used as a standalone executable or as a - module under a variety of Web servers. It has excellent support for - databases, XML, LDAP, IMAP, Java, various Internet protocols, and general - data manipulation, and is extensible via its powerful API. It is actively - developed and supported by a talented and energetic international team. - Numerous Open Source and commercial PHP-based application packages are - available. -endef - -# PHP Apache SAPI -ADMFILES = depend prototype preremove postinstall space -DISTFILES += $(call admfiles,CSWmodphp5,$(ADMFILES)) - -# Patches -include files/patches.mk - -# Dependencies -include files/depend.mk -DEPENDS += server/apache - -# SAPI Common Configuration -include files/config.mk - -# Apache SAPI Specific Configuration -CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs -INSTALL_SCRIPTS = sapi-only - -# System Rules/Configuration -include gar/category.mk - -# Common Rules -include files/rules.mk - -# SAPI Specific Rules -STRIP_DIRS += $(DESTDIR)$(prefix)/apache/libexec - -install-sapi-only: - @( cd $(WORKSRC) ; $(INSTALL_ENV) $(MAKE) install-sapi ) - Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile (from rev 4451, csw/mgar/pkg/php5-apache/trunk/Makefile) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,52 @@ +GARNAME = php +GARVERSION = 5.2.6 +CATEGORIES = lang + +# This directory is for the build and packaging of the Apache 1.3.x +# SAPI module for PHP5. PHP CGI/CLI and extensions are built along +# with the Apache 2.0.x SAPI. + +DESCRIPTION = A high-level scripting language. +define BLURB + PHP is a widely-used Open Source general-purpose scripting language that is + especially suited for Web development and can be embedded into HTML. Its + syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many + different platforms and can be used as a standalone executable or as a + module under a variety of Web servers. It has excellent support for + databases, XML, LDAP, IMAP, Java, various Internet protocols, and general + data manipulation, and is extensible via its powerful API. It is actively + developed and supported by a talented and energetic international team. + Numerous Open Source and commercial PHP-based application packages are + available. +endef + +# PHP Apache SAPI +ADMFILES = depend prototype preremove postinstall space +DISTFILES += $(call admfiles,CSWmodphp5,$(ADMFILES)) + +# Patches +include files/patches.mk + +# Dependencies +include files/depend.mk +DEPENDS += server/apache + +# SAPI Common Configuration +include files/config.mk + +# Apache SAPI Specific Configuration +CONFIGURE_ARGS += --with-apxs=$(prefix)/apache/bin/apxs +INSTALL_SCRIPTS = sapi-only + +# System Rules/Configuration +include gar/category.mk + +# Common Rules +include files/rules.mk + +# SAPI Specific Rules +STRIP_DIRS += $(DESTDIR)$(prefix)/apache/libexec + +install-sapi-only: + @( cd $(WORKSRC) ; $(INSTALL_ENV) $(MAKE) install-sapi ) + Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums =================================================================== --- csw/mgar/pkg/php5-apache/trunk/checksums 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,8 +0,0 @@ -c37758ca9bed5b5f9a15fd636acd7149 download/CSWmodphp5.gspec -b226254db72796595d88577d2c769dc9 download/CSWmodphp5.depend -74c60f89b137d7e30882c28aac392133 download/CSWmodphp5.prototype -2e5dbed2c9dd5e24c331753984946822 download/CSWmodphp5.preremove -5f0046fe1b3f8e2228fdb165bdbbe73a download/CSWmodphp5.postinstall -0dd379f20ceb32fc77bb3a9bf045097f download/CSWmodphp5.space -7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 -a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums (from rev 4451, csw/mgar/pkg/php5-apache/trunk/checksums) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,8 @@ +c37758ca9bed5b5f9a15fd636acd7149 download/CSWmodphp5.gspec +b226254db72796595d88577d2c769dc9 download/CSWmodphp5.depend +74c60f89b137d7e30882c28aac392133 download/CSWmodphp5.prototype +2e5dbed2c9dd5e24c331753984946822 download/CSWmodphp5.preremove +5f0046fe1b3f8e2228fdb165bdbbe73a download/CSWmodphp5.postinstall +0dd379f20ceb32fc77bb3a9bf045097f download/CSWmodphp5.space +7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 +a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5-apache2/trunk/Makefile 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,55 +0,0 @@ -GARNAME = php -GARVERSION = 5.2.6 -CATEGORIES = lang - -DESCRIPTION = A high-level scripting language. -define BLURB - PHP is a widely-used Open Source general-purpose scripting language that is - especially suited for Web development and can be embedded into HTML. Its - syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many - different platforms and can be used as a standalone executable or as a - module under a variety of Web servers. It has excellent support for - databases, XML, LDAP, IMAP, Java, various Internet protocols, and general - data manipulation, and is extensible via its powerful API. It is actively - developed and supported by a talented and energetic international team. - Numerous Open Source and commercial PHP-based application packages are - available. -endef - -# Auxilliary files -DISTFILES += httpd-php5.conf.CSW - -# PHP Apache2 SAPI -ADMFILES = depend prototype postinstall preremove space -DISTFILES += $(call admfiles,CSWap2modphp5,$(ADMFILES)) - -# Patches -include files/patches.mk - -# Dependencies -include files/depend.mk -DEPENDS += server/apache2 - -# SAPI Common Configuration -include files/config.mk - -# Apache2 SAPI Specific Configuration -CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs - -# System Rules/Configuration -include gar/category.mk - -# Common Rules -include files/rules.mk - -# SAPI Specific Rules -STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec - -# Copy over template config files and utility scripts -post-install: - ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra - ginstall -m 0644 \ - $(WORKDIR)/httpd-php5.conf.CSW \ - $(DESTDIR)$(prefix)/apache2/etc/extra - @$(MAKECOOKIE) - Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile (from rev 3986, csw/mgar/pkg/php5-apache2/trunk/Makefile) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,55 @@ +GARNAME = php +GARVERSION = 5.2.6 +CATEGORIES = lang + +DESCRIPTION = A high-level scripting language. +define BLURB + PHP is a widely-used Open Source general-purpose scripting language that is + especially suited for Web development and can be embedded into HTML. Its + syntax draws upon C, Java, and Perl, and is easy to learn. PHP runs on many + different platforms and can be used as a standalone executable or as a + module under a variety of Web servers. It has excellent support for + databases, XML, LDAP, IMAP, Java, various Internet protocols, and general + data manipulation, and is extensible via its powerful API. It is actively + developed and supported by a talented and energetic international team. + Numerous Open Source and commercial PHP-based application packages are + available. +endef + +# Auxilliary files +DISTFILES += httpd-php5.conf.CSW + +# PHP Apache2 SAPI +ADMFILES = depend prototype postinstall preremove space +DISTFILES += $(call admfiles,CSWap2modphp5,$(ADMFILES)) + +# Patches +include files/patches.mk + +# Dependencies +include files/depend.mk +DEPENDS += server/apache2 + +# SAPI Common Configuration +include files/config.mk + +# Apache2 SAPI Specific Configuration +CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs + +# System Rules/Configuration +include gar/category.mk + +# Common Rules +include files/rules.mk + +# SAPI Specific Rules +STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec + +# Copy over template config files and utility scripts +post-install: + ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra + ginstall -m 0644 \ + $(WORKDIR)/httpd-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache2/etc/extra + @$(MAKECOOKIE) + Deleted: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums =================================================================== --- csw/mgar/pkg/php5-apache2/trunk/checksums 2009-04-27 18:02:25 UTC (rev 4587) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -1,9 +0,0 @@ -a71677d80f5cfd1aeb03547dfdeb705a download/httpd-php5.conf.CSW -47f2f1ccf059cf948e762fa3628a8cf1 download/CSWap2modphp5.gspec -77076f9a0bab2777c15b84c4c0bd7ba4 download/CSWap2modphp5.depend -05d40405b247a12c25c04a26c68c208a download/CSWap2modphp5.prototype -632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall -e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove -0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space -7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 -a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff Copied: csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums (from rev 3986, csw/mgar/pkg/php5-apache2/trunk/checksums) =================================================================== --- csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums (rev 0) +++ csw/mgar/pkg/php5/trunk/legacy/php5-apache2/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) @@ -0,0 +1,9 @@ +a71677d80f5cfd1aeb03547dfdeb705a download/httpd-php5.conf.CSW +47f2f1ccf059cf948e762fa3628a8cf1 download/CSWap2modphp5.gspec +77076f9a0bab2777c15b84c4c0bd7ba4 download/CSWap2modphp5.depend +05d40405b247a12c25c04a26c68c208a download/CSWap2modphp5.prototype +632cb357e102e18e04bb5666825a912f download/CSWap2modphp5.postinstall +e1381a4ba49e46b2097b76286a1b36fb download/CSWap2modphp5.preremove +0dd379f20ceb32fc77bb3a9bf045097f download/CSWap2modphp5.space +7380ffecebd95c6edb317ef861229ebd download/php-5.2.6.tar.bz2 +a03ecfbc83c95890b9167f7324e5d7a8 download/config.diff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Mon Apr 27 20:18:33 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Mon, 27 Apr 2009 18:18:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4589] csw/mgar/pkg Message-ID: Revision: 4589 http://gar.svn.sourceforge.net/gar/?rev=4589&view=rev Author: valholla Date: 2009-04-27 18:18:33 +0000 (Mon, 27 Apr 2009) Log Message: ----------- misc checkin Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk csw/mgar/pkg/squid/trunk/Makefile csw/mgar/pkg/squid/trunk/checksums csw/mgar/pkg/squirrelmail/trunk/Makefile Added Paths: ----------- csw/mgar/pkg/gcc4/Makefile csw/mgar/pkg/gcc4/branches/ csw/mgar/pkg/gcc4/tags/ csw/mgar/pkg/libffi/Makefile Removed Paths: ------------- csw/mgar/pkg/php5-apache/ csw/mgar/pkg/php5-apache2/ csw/mgar/pkg/sudo-ldap/ Property Changed: ---------------- csw/mgar/pkg/squid/trunk/ Added: csw/mgar/pkg/gcc4/Makefile =================================================================== --- csw/mgar/pkg/gcc4/Makefile (rev 0) +++ csw/mgar/pkg/gcc4/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-27 18:18:33 UTC (rev 4589) @@ -26,7 +26,7 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" - $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) + $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/i386) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) @@ -45,51 +45,48 @@ $(_DBG)$(MAKECOOKIE) ifeq ($(shell uname -p), i386) -ISAEXEC_DIRS = /opt/csw/gcc4/bin -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcov -ISAEXEC_FILES += /opt/csw/gcc4/bin/gccbug -ISAEXEC_FILES += /opt/csw/gcc4/bin/gfortran -ISAEXEC_FILES += /opt/csw/gcc4/bin/c++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/g++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/cpp -ISAEXEC_FILES += /opt/csw/gcc4/bin/addr2name.awk -ISAEXEC_FILES += /opt/csw/gcc4/bin/gc-analyze -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcjh -ISAEXEC_FILES += /opt/csw/gcc4/bin/gjarsigner -ISAEXEC_FILES += /opt/csw/gcc4/bin/grmic -ISAEXEC_FILES += /opt/csw/gcc4/bin/gjavah -ISAEXEC_FILES += /opt/csw/gcc4/bin/grmid -ISAEXEC_FILES += /opt/csw/gcc4/bin/jcf-dump -ISAEXEC_FILES += /opt/csw/gcc4/bin/gkeytool -ISAEXEC_FILES += /opt/csw/gcc4/bin/grmiregistry -ISAEXEC_FILES += /opt/csw/gcc4/bin/jv-convert -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj -ISAEXEC_FILES += /opt/csw/gcc4/bin/gij -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii -ISAEXEC_FILES += /opt/csw/gcc4/bin/gserialver -ISAEXEC_FILES += /opt/csw/gcc4/bin/gappletviewer -ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj-dbtool -ISAEXEC_FILES += /opt/csw/gcc4/bin/gjar -ISAEXEC_FILES += /opt/csw/gcc4/bin/gorbd -ISAEXEC_FILES += /opt/csw/gcc4/bin/gtnameserv -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnat -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbind -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbl -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatmake -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep -ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-c++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-g++ -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcc-4.3.3 -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gcj -ISAEXEC_FILES += /opt/csw/gcc4/bin/i386-pc-solaris2.8-gfortran +EXTRA_PKGFILES_CSWgcc4core = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcc +EXTRA_PKGFILES_CSWgcc4core += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/cpp + +EXTRA_PKGFILES_CSWgcc4g++ = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/c++ +EXTRA_PKGFILES_CSWgcc4g++ += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/g++ + +EXTRA_PKGFILES_CSWgcc4gfortran = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gfortran + +EXTRA_PKGFILES_CSWgcc4java = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcov +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gccbug +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/addr2name.awk +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gc-analyze +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcjh +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjarsigner +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmic +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjavah +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmid +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jcf-dump +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gkeytool +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmiregistry +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jv-convert +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gij +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnative2ascii +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gserialver +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gappletviewer +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj-dbtool +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjar +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gorbd +EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gtnameserv + +EXTRA_PKGFILES_CSWgcc4ada = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnat +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbind +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbl +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatchop +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatclean +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatfind +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatkr +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatlink +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatls +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatmake +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatname +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatprep +EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatxref endif Added: csw/mgar/pkg/libffi/Makefile =================================================================== --- csw/mgar/pkg/libffi/Makefile (rev 0) +++ csw/mgar/pkg/libffi/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -0,0 +1,15 @@ +# vim: ft=make ts=4 sw=4 noet + +default: + @echo "You are in the pkg/ directory." + +%: + $(MAKE) -C trunk $* + +paranoid-%: + $(MAKE) -C trunk $* || exit 2 + +export BUILDLOG ?= $(shell pwd)/buildlog.txt + +report-%: + $(MAKE) -C trunk $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG) Property changes on: csw/mgar/pkg/squid/trunk ___________________________________________________________________ Modified: svn:externals - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1 + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Modified: csw/mgar/pkg/squid/trunk/Makefile =================================================================== --- csw/mgar/pkg/squid/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/squid/trunk/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -1,9 +1,10 @@ GARNAME = squid -GARVERSION = 2.7 +GARVERSION = 3.0 CATEGORIES = server -RELEASE = STABLE3 +RELEASE = STABLE14 DISTVERSION = $(GARVERSION).$(RELEASE) DISTNAME = $(GARNAME)-$(DISTVERSION) +RELVER = $(shell echo $(GARVERSION) |gsed 's/\(^[0-9]\).*\.[0-9]*/\1/') DESCRIPTION = High performance Web proxy cache define BLURB @@ -12,31 +13,36 @@ bandwith usage. Squid runs on all popular Unix and Windows platforms. endef -MASTER_SITES = http://www.squid-cache.org/Versions/v2/2.7/ +MASTER_SITES = http://www.squid-cache.org/Versions/v$(RELVER)/$(GARVERSION)/ DISTFILES = $(DISTNAME).tar.bz2 -DISTFILES += $(call admfiles,CSWsquid, depend prototype copyright postinstall preremove) -CONFIGURE_ARGS = --prefix=$(prefix) --mandir=/opt/csw/share/man -CONFIGURE_ARGS += --localstatedir=/var/$(prefix) +CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_ARGS += --disable-static CONFIGURE_ARGS += --datadir=$(datadir)/$(GARNAME) CONFIGURE_ARGS += --with-large-files CONFIGURE_ARGS += --enable-large-cache-files CONFIGURE_ARGS += --enable-ssl +CONFIGURE_ARGS += --with-openssl=$(prefix) CONFIGURE_ARGS += --enable-icmp CONFIGURE_ARGS += --enable-delay-pools CONFIGURE_ARGS += --enable-useragent-log CONFIGURE_ARGS += --enable-referer-log CONFIGURE_ARGS += --enable-arp-acl CONFIGURE_ARGS += --enable-snmp -CONFIGURE_ARGS += --enable-auth=basic -CONFIGURE_ARGS += --enable-basic-auth-helpers=LDAP,SMB,YP,PAM,SASL,NCSA +#CONFIGURE_ARGS += --enable-auth=basic +#CONFIGURE_ARGS += --enable-basic-auth-helpers=LDAP,SMB,YP,PAM,SASL,NCSA TEST_TARGET = check include gar/category.mk + SPKG_REVSTAMP := $(SPKG_REVSTAMP)_$(RELEASE) -post-install: +pre-configure-modulated: + cd $(WORKSRC) && $(BUILD_ENV) ./bootstrap.sh + @$(MAKECOOKIE) + +post-install-modulated: ( cp -r $(FILEDIR)/etc $(DESTDIR)/etc ) @$(MAKECOOKIE) Modified: csw/mgar/pkg/squid/trunk/checksums =================================================================== --- csw/mgar/pkg/squid/trunk/checksums 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/squid/trunk/checksums 2009-04-27 18:18:33 UTC (rev 4589) @@ -1,7 +1 @@ -eb49bc06ea1a40421b6f1ac9e76d1757 download/squid-2.6.STABLE18.tar.bz2 -18288c834ba98c10a67d0cfc07445879 download/CSWsquid.gspec -1c3e1327ace797a240fc66e36a127f59 download/CSWsquid.depend -ca01a650e044db58f282732f8b9ddbc5 download/CSWsquid.prototype -c492e2d6d32ec5c1aad0e0609a141ce9 download/CSWsquid.copyright -84f3b2fdb7dfd33f05096f5b2051e80e download/CSWsquid.postinstall -97d93eadab6a33c4e0cabf76b351364d download/CSWsquid.preremove +7aaff2319d2263404d788a82a10c8633 download/squid-3.0.STABLE14.tar.bz2 Modified: csw/mgar/pkg/squirrelmail/trunk/Makefile =================================================================== --- csw/mgar/pkg/squirrelmail/trunk/Makefile 2009-04-27 18:16:39 UTC (rev 4588) +++ csw/mgar/pkg/squirrelmail/trunk/Makefile 2009-04-27 18:18:33 UTC (rev 4589) @@ -13,6 +13,7 @@ MIME support, address books, and folder manipulation. endef +ARCHALL = 1 MASTER_SITES = $(SF_MIRRORS) DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2 @@ -20,13 +21,18 @@ CATALOGNAME_CSWsquirrelmail = squirrelmail SPKG_DESC_CSWsquirrelmail = $(DESCRIPTION) -REQUIRED_PKGS_CSWsquirrelmail = CSWimaprt +REQUIRED_PKGS_CSWsquirrelmail = CSWimap CSWapache2c # We define upstream file regex so we can be notifed of # new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2 -CONFIGURE_ARGS = $(DIRPATHS) +CONFIGURE_SCRIPTS = cswize +configure-cswize: + @(perl -i -pe 's|/var/local|/opt/csw|' $(WORKSRC)/config/config_default.php) + @(perl -i -pe 's|/usr/sbin/sendmail|/usr/lib/sendmail|' \ + $(WORKSRC)/config/config_default.php) + @$(MAKECOOKIE) include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 28 21:31:31 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 28 Apr 2009 19:31:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4590] csw/mgar/pkg/subversion/trunk Message-ID: Revision: 4590 http://gar.svn.sourceforge.net/gar/?rev=4590&view=rev Author: valholla Date: 2009-04-28 19:31:31 +0000 (Tue, 28 Apr 2009) Log Message: ----------- add tools and contrib to package Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile csw/mgar/pkg/subversion/trunk/checksums Added Paths: ----------- csw/mgar/pkg/subversion/trunk/files/subversion161.diff Removed Paths: ------------- csw/mgar/pkg/subversion/trunk/files/subversion156.diff Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-27 18:18:33 UTC (rev 4589) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-28 19:31:31 UTC (rev 4590) @@ -80,7 +80,7 @@ # Fix: Add java headers for nested classes # https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-June/004633.html PATCHFILES += javahl_headers_for_nested_classes.diff -PATCHFILES += subversion156.diff +PATCHFILES += subversion161.diff DEPENDS = server/apache2 DEPENDS = lib/neon @@ -113,19 +113,20 @@ TEST_SCRIPTS = skip test-skip: - @$(DONADA) + @$(MAKECOOKIE) include gar/category.mk BINDING_LANGS = java perl python ruby BINDING_TARGETS = $(foreach LANG,$(BINDING_LANGS),svn-$(LANG)) -PI_DEPENDS = $(BINDING_TARGETS) +PI_DEPENDS = install-extras +PI_DEPENDS += $(BINDING_TARGETS) PI_DEPENDS += copy-templates PI_DEPENDS += fix-install post-install-modulated: $(PI_DEPENDS) - $(DONADA) + $(MAKECOOKIE) post-configure-modulated: @echo "~~~ Fixing Libtool ~~~" @@ -147,7 +148,7 @@ else \ perl -i -pe 's|-xarch=386|-march=i386|' $(WORKSRC)/*.gcc; \ fi ) - $(DONADA) + $(MAKECOOKIE) fix-install: @(grm -fr $(DESTDIR)$(prefix)/lib/perl/5.8.8) @@ -160,8 +161,17 @@ ginstall -m 0644 \ $(WORKDIR)/svn_access.conf.CSW \ $(DESTDIR)$(prefix)/apache2/etc - $(DONADA) + $(MAKECOOKIE) +install-extras: + @(ginstall -d $(DESTDIR)$(docdir)/tools) + @(ginstall -d $(DESTDIR)$(docdir)/contrib) + @(gcp -R $(WORKSRC)/tools/* $(DESTDIR)$(docdir)/tools/) + @(gcp -R $(WORKSRC)/contrib/* $(DESTDIR)$(docdir)/contrib/) + @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-tools + @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-contrib + @$(MAKECOOKIE) + svn-python: @echo " ==> Building Python bindings" @touch \ @@ -170,7 +180,7 @@ @$(BUILD_ENV) gmake -C $(WORKSRC) swig-py #@$(TEST_ENV) gmake -C $(WORKSRC) check-swig-py @$(INSTALL_ENV) gmake -C $(WORKSRC) install-swig-py - $(DONADA) + $(MAKECOOKIE) svn-perl: @echo " ==> Building Perl bindings" @@ -180,7 +190,7 @@ @$(BUILD_ENV) gmake -C $(WORKSRC) swig-pl #@$(TEST_ENV) gmake -C $(WORKSRC) check-swig-pl @$(INSTALL_ENV) gmake DESTDIR=$(DESTDIR) -C $(WORKSRC) install-swig-pl - $(DONADA) + $(MAKECOOKIE) svn-ruby: @echo " ==> Building Ruby bindings" @@ -188,13 +198,13 @@ $(BUILD_ENV) gmake -f Makefile.gcc -C $(WORKSRC) swig-rb #@$(TEST_ENV) gmake -f Makefile.gcc -C $(WORKSRC) check-swig-rb @$(INSTALL_ENV) gmake -f Makefile.gcc -C $(WORKSRC) install-swig-rb - $(DONADA) + $(MAKECOOKIE) svn-java: @echo " ==> Building Java bindings" @touch $(WORKSRC)/subversion/bindings/javahl/native/*.c $(BUILD_ENV) gmake -C $(WORKSRC) javahl; $(INSTALL_ENV) gmake -C $(WORKSRC) install-javahl; - $(DONADA) + $(MAKECOOKIE) Modified: csw/mgar/pkg/subversion/trunk/checksums =================================================================== --- csw/mgar/pkg/subversion/trunk/checksums 2009-04-27 18:18:33 UTC (rev 4589) +++ csw/mgar/pkg/subversion/trunk/checksums 2009-04-28 19:31:31 UTC (rev 4590) @@ -3,9 +3,7 @@ 395ec6d1bfe07efadc1c0aa8816673fa download/CSWsvn.checkinstall 41ec540885de7c34625768aa1fb9682b download/fixme.sh f107831ad0c702ff32e51df6a207237b download/httpd-svn.conf.CSW -6caa3c518b84c2b3f6a33b61d1b022e3 download/i386-gcc.diff f0aa58c145ae99f8e4d72499ab826169 download/javahl_headers_for_nested_classes.diff -91d4c5a963192f113602b1bd1917d0cb download/sparc-gcc.diff 95708b96b920faeffca017f43ec96777 download/subversion-1.6.1.tar.bz2 -f7d05c59656dcf01fb844295c9912f78 download/subversion156.diff +f7d05c59656dcf01fb844295c9912f78 download/subversion161.diff 1b532d3055708a97771f5cd959983628 download/svn_access.conf.CSW Deleted: csw/mgar/pkg/subversion/trunk/files/subversion156.diff =================================================================== --- csw/mgar/pkg/subversion/trunk/files/subversion156.diff 2009-04-27 18:18:33 UTC (rev 4589) +++ csw/mgar/pkg/subversion/trunk/files/subversion156.diff 2009-04-28 19:31:31 UTC (rev 4590) @@ -1,33 +0,0 @@ ---- subversion-1.5.5/Makefile.in.orig 2008-08-26 12:27:56.000000000 -0500 -+++ subversion-1.5.5/Makefile.in 2009-02-21 17:26:25.849467074 -0600 -@@ -68,15 +69,15 @@ - swig_rb_libdir = @libdir@ - - ### these possibly need further discussion --swig_pydir = @libdir@/svn-python/libsvn --swig_pydir_extra = @libdir@/svn-python/svn --swig_pldir = @libdir@/svn-perl -+swig_pydir = @prefix@/lib/python/site-packages/libsvn -+swig_pydir_extra = @prefix@/lib/python/site-packages/svn -+#swig_pldir = @libdir@/svn-perl - swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext - contribdir = @bindir@/svn-contrib - toolsdir = @bindir@/svn-tools - --javahl_javadir = @libdir@/svn-javahl --javahl_javahdir = @libdir@/svn-javahl/include -+javahl_javadir = @libdir@ -+javahl_javahdir = @libdir@/include - javahl_libdir = @libdir@ - javahl_test_rootdir=$(abs_builddir)/subversion/bindings/javahl/test-work - ---- subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py.orig 2009-02-21 17:00:06.832094681 -0600 -+++ subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py 2009-02-21 16:59:46.198583440 -0600 -@@ -97,7 +97,7 @@ - - # use an array for the command to avoid the shell and potential - # security exposures -- cmd = ["diff"] \ -+ cmd = ["gdiff"] \ - + self.diffoptions \ - + [self.tempfile1, self.tempfile2] Copied: csw/mgar/pkg/subversion/trunk/files/subversion161.diff (from rev 4589, csw/mgar/pkg/subversion/trunk/files/subversion156.diff) =================================================================== --- csw/mgar/pkg/subversion/trunk/files/subversion161.diff (rev 0) +++ csw/mgar/pkg/subversion/trunk/files/subversion161.diff 2009-04-28 19:31:31 UTC (rev 4590) @@ -0,0 +1,33 @@ +--- subversion-1.5.5/Makefile.in.orig 2008-08-26 12:27:56.000000000 -0500 ++++ subversion-1.5.5/Makefile.in 2009-02-21 17:26:25.849467074 -0600 +@@ -68,15 +69,15 @@ + swig_rb_libdir = @libdir@ + + ### these possibly need further discussion +-swig_pydir = @libdir@/svn-python/libsvn +-swig_pydir_extra = @libdir@/svn-python/svn +-swig_pldir = @libdir@/svn-perl ++swig_pydir = @prefix@/lib/python/site-packages/libsvn ++swig_pydir_extra = @prefix@/lib/python/site-packages/svn ++#swig_pldir = @libdir@/svn-perl + swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext + contribdir = @bindir@/svn-contrib + toolsdir = @bindir@/svn-tools + +-javahl_javadir = @libdir@/svn-javahl +-javahl_javahdir = @libdir@/svn-javahl/include ++javahl_javadir = @libdir@ ++javahl_javahdir = @libdir@/include + javahl_libdir = @libdir@ + javahl_test_rootdir=$(abs_builddir)/subversion/bindings/javahl/test-work + +--- subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py.orig 2009-02-21 17:00:06.832094681 -0600 ++++ subversion-1.5.5/subversion/bindings/swig/python/svn/fs.py 2009-02-21 16:59:46.198583440 -0600 +@@ -97,7 +97,7 @@ + + # use an array for the command to avoid the shell and potential + # security exposures +- cmd = ["diff"] \ ++ cmd = ["gdiff"] \ + + self.diffoptions \ + + [self.tempfile1, self.tempfile2] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Tue Apr 28 23:28:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Tue, 28 Apr 2009 21:28:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4591] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4591 http://gar.svn.sourceforge.net/gar/?rev=4591&view=rev Author: valholla Date: 2009-04-28 21:28:06 +0000 (Tue, 28 Apr 2009) Log Message: ----------- relocate tools and contrib to doc/subversion Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-28 19:31:31 UTC (rev 4590) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-28 21:28:06 UTC (rev 4591) @@ -164,10 +164,10 @@ $(MAKECOOKIE) install-extras: - @(ginstall -d $(DESTDIR)$(docdir)/tools) - @(ginstall -d $(DESTDIR)$(docdir)/contrib) - @(gcp -R $(WORKSRC)/tools/* $(DESTDIR)$(docdir)/tools/) - @(gcp -R $(WORKSRC)/contrib/* $(DESTDIR)$(docdir)/contrib/) + @(ginstall -d $(DESTDIR)$(docdir)/subversion/tools) + @(ginstall -d $(DESTDIR)$(docdir)/subversion/contrib) + @(gcp -R $(WORKSRC)/tools/* $(DESTDIR)$(docdir)/subversion/tools/) + @(gcp -R $(WORKSRC)/contrib/* $(DESTDIR)$(docdir)/subversion/contrib/) @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-tools @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-contrib @$(MAKECOOKIE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 29 01:39:12 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Tue, 28 Apr 2009 23:39:12 +0000 Subject: [csw-devel] SF.net SVN: gar:[4592] csw/mgar/pkg/git/tags/1.6.2.1-2009.04.14/ Message-ID: Revision: 4592 http://gar.svn.sourceforge.net/gar/?rev=4592&view=rev Author: bdwalton Date: 2009-04-28 23:39:12 +0000 (Tue, 28 Apr 2009) Log Message: ----------- Tagged most recent public release. Added Paths: ----------- csw/mgar/pkg/git/tags/1.6.2.1-2009.04.14/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From bdwalton at users.sourceforge.net Wed Apr 29 04:27:41 2009 From: bdwalton at users.sourceforge.net (bdwalton at users.sourceforge.net) Date: Wed, 29 Apr 2009 02:27:41 +0000 Subject: [csw-devel] SF.net SVN: gar:[4593] csw/mgar/pkg/git/trunk Message-ID: Revision: 4593 http://gar.svn.sourceforge.net/gar/?rev=4593&view=rev Author: bdwalton Date: 2009-04-29 02:27:41 +0000 (Wed, 29 Apr 2009) Log Message: ----------- Prepare for 1.6.3 - remove all patches (accepted upstream) - rc3 passes all tests on sparc and i386 Modified Paths: -------------- csw/mgar/pkg/git/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch csw/mgar/pkg/git/trunk/files/doc-makefile.patch Modified: csw/mgar/pkg/git/trunk/Makefile =================================================================== --- csw/mgar/pkg/git/trunk/Makefile 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/Makefile 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,9 +1,10 @@ GARNAME = git -GARVERSION = 1.6.2.1 +GARVERSION = 1.6.3 +PATCHLEVEL = rc3 CATEGORIES = devel # disable tests until next version bump (at the top so it stands out) -TEST_SCRIPTS = +# TEST_SCRIPTS = PACKAGES = CSWgit CSWgitk CSWgitgui CSWgitsvn CSWgitcvs CSWgitemacs CSWgitdoc @@ -69,17 +70,8 @@ #NOTE: If you need to proxy git:// connections, set GIT_USE_PROXY in # your .garrc file. (That leaves this recipe in a more generic form.) GIT_REPOS = git://git.kernel.org/pub/scm/git/git.git -GIT_TREEISH_git.git = v$(GARVERSION) +GIT_TREEISH_git.git = v$(GARVERSION)$(if $(PATCHLEVEL),-$(PATCHLEVEL)) -PATCHFILES = doc-makefile.patch -PATCHFILES += 0001-configure-ensure-settings-from-user-are-also-usable.patch -PATCHFILES += 0002-configure-reorganize-flow-of-argument-checks.patch -PATCHFILES += 0003-configure-add-macros-to-stash-FLAG-variables.patch -PATCHFILES += 0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch -PATCHFILES += 0005-configure-asciidoc-version-test-cleanup.patch -PATCHFILES += 0006-configure-make-iconv-tests-aware-of-user-arguments.patch -PATCHFILES += 0007-configure-rework-pthread-handling-to-allow-for-user.patch - fdirs = $(bindir_install) $(mandir) $(libexecdir_install) define _git_files $(foreach d,$(fdirs),$(d)/.*$(1).*) $(sharedstatedir)/$(1).* Deleted: csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0001-configure-ensure-settings-from-user-are-also-usable.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,56 +0,0 @@ -From 63b740b85248d3ff5a2a458cc5068f5e2c180f0d Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Thu, 12 Mar 2009 17:30:56 +0100 -Subject: [PATCH] configure: ensure settings from user are also usable in the script - -Allow things set by the user (--with-lib, --with-iconv, etc) to set -variables for use by other parts of the script. Display values as -they're set. - -Signed-off-by: Ben Walton ---- - configure.ac | 11 +++++++++++ - 1 files changed, 11 insertions(+), 0 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 082a03d..0b314d7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -42,6 +42,8 @@ else \ - if test "$withval" = "yes"; then \ - AC_MSG_WARN([You should provide path for --with-$1=PATH]); \ - else \ -+ m4_toupper($1)_PATH=$withval; \ -+ AC_MSG_NOTICE([Setting m4_toupper($1)_PATH to $withval]); \ - GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=$withval); \ - fi; \ - fi; \ -@@ -61,6 +63,8 @@ elif test "$withval" = "yes"; then \ - m4_toupper(NO_$1)=; \ - else \ - m4_toupper(NO_$1)=; \ -+ m4_toupper($1)DIR=$withval; \ -+ AC_MSG_NOTICE([Setting m4_toupper($1)DIR to $withval]); \ - GIT_CONF_APPEND_LINE(${PACKAGE}DIR=$withval); \ - fi \ - ])# GIT_PARSE_WITH -@@ -86,9 +90,16 @@ AC_ARG_WITH([lib], - [if test "$withval" = "no" || test "$withval" = "yes"; then \ - AC_MSG_WARN([You should provide name for --with-lib=ARG]); \ - else \ -+ lib=$withval; \ -+ AC_MSG_NOTICE([Setting lib to '$lib']); \ - GIT_CONF_APPEND_LINE(lib=$withval); \ - fi; \ - ],[]) -+ -+if test -z "$lib"; then -+ AC_MSG_NOTICE([Setting lib to 'lib' (the default)]) -+ lib=lib -+fi - # - # Define SHELL_PATH to provide path to shell. - GIT_ARG_SET_PATH(shell) --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0002-configure-reorganize-flow-of-argument-checks.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,212 +0,0 @@ -From 142c46f4db8f7d32ed455316704503fca2bf4857 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Thu, 12 Mar 2009 17:33:38 +0100 -Subject: [PATCH] configure: reorganize flow of argument checks - -Move the argument tests from the 'site overrides' so that they are -ahead of any library tests. This allows for library tests to take -user specified paths into account. The intent here is to avoid things -like NO_DEFLATE_BOUND being set due to finding old zlib when the user -has specified an alternate location for zlib. (Ignore the fact that -properly set *FLAGS can avoid solve this issue.) - -Signed-off-by: Ben Walton ---- - configure.ac | 174 +++++++++++++++++++++++++++++----------------------------- - 1 files changed, 87 insertions(+), 87 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0b314d7..0bff480 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -100,6 +100,93 @@ if test -z "$lib"; then - AC_MSG_NOTICE([Setting lib to 'lib' (the default)]) - lib=lib - fi -+ -+## Site configuration (override autodetection) -+## --with-PACKAGE[=ARG] and --without-PACKAGE -+AC_MSG_NOTICE([CHECKS for site configuration]) -+# -+# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability -+# tests. These tests take up a significant amount of the total test time -+# but are not needed unless you plan to talk to SVN repos. -+# -+# Define MOZILLA_SHA1 environment variable when running make to make use of -+# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast -+# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default -+# choice) has very fast version optimized for i586. -+# -+# Define PPC_SHA1 environment variable when running make to make use of -+# a bundled SHA1 routine optimized for PowerPC. -+# -+# Define ARM_SHA1 environment variable when running make to make use of -+# a bundled SHA1 routine optimized for ARM. -+# -+# Define NO_OPENSSL environment variable if you do not have OpenSSL. -+# This also implies MOZILLA_SHA1. -+# -+# Define OPENSSLDIR=/foo/bar if your openssl header and library files are in -+# /foo/bar/include and /foo/bar/lib directories. -+AC_ARG_WITH(openssl, -+AS_HELP_STRING([--with-openssl],[use OpenSSL library (default is YES)]) -+AS_HELP_STRING([], [ARG can be prefix for openssl library and headers]),\ -+GIT_PARSE_WITH(openssl)) -+# -+# Define NO_CURL if you do not have curl installed. git-http-pull and -+# git-http-push are not built, and you cannot use http:// and https:// -+# transports. -+# -+# Define CURLDIR=/foo/bar if your curl header and library files are in -+# /foo/bar/include and /foo/bar/lib directories. -+AC_ARG_WITH(curl, -+AS_HELP_STRING([--with-curl],[support http(s):// transports (default is YES)]) -+AS_HELP_STRING([], [ARG can be also prefix for curl library and headers]), -+GIT_PARSE_WITH(curl)) -+# -+# Define NO_EXPAT if you do not have expat installed. git-http-push is -+# not built, and you cannot push using http:// and https:// transports. -+# -+# Define EXPATDIR=/foo/bar if your expat header and library files are in -+# /foo/bar/include and /foo/bar/lib directories. -+AC_ARG_WITH(expat, -+AS_HELP_STRING([--with-expat], -+[support git-push using http:// and https:// transports via WebDAV (default is YES)]) -+AS_HELP_STRING([], [ARG can be also prefix for expat library and headers]), -+GIT_PARSE_WITH(expat)) -+# -+# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink -+# installed in /sw, but don't want GIT to link against any libraries -+# installed there. If defined you may specify your own (or Fink's) -+# include directories and library directories by defining CFLAGS -+# and LDFLAGS appropriately. -+# -+# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X, -+# have DarwinPorts installed in /opt/local, but don't want GIT to -+# link against any libraries installed there. If defined you may -+# specify your own (or DarwinPort's) include directories and -+# library directories by defining CFLAGS and LDFLAGS appropriately. -+# -+# Define NO_MMAP if you want to avoid mmap. -+# -+# Define NO_ICONV if your libc does not properly support iconv. -+AC_ARG_WITH(iconv, -+AS_HELP_STRING([--without-iconv], -+[if your architecture doesn't properly support iconv]) -+AS_HELP_STRING([--with-iconv=PATH], -+[PATH is prefix for libiconv library and headers]) -+AS_HELP_STRING([], -+[used only if you need linking with libiconv]), -+GIT_PARSE_WITH(iconv)) -+ -+## --enable-FEATURE[=ARG] and --disable-FEATURE -+# -+# Define USE_NSEC below if you want git to care about sub-second file mtimes -+# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and -+# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely -+# randomly break unless your underlying filesystem supports those sub-second -+# times (my ext3 doesn't). -+# -+# Define USE_STDEV below if you want git to care about the underlying device -+# change being considered an inode change from the update-index perspective. -+ - # - # Define SHELL_PATH to provide path to shell. - GIT_ARG_SET_PATH(shell) -@@ -526,93 +613,6 @@ AC_SUBST(PTHREAD_LIBS) - AC_SUBST(NO_PTHREADS) - AC_SUBST(THREADED_DELTA_SEARCH) - --## Site configuration (override autodetection) --## --with-PACKAGE[=ARG] and --without-PACKAGE --AC_MSG_NOTICE([CHECKS for site configuration]) --# --# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability --# tests. These tests take up a significant amount of the total test time --# but are not needed unless you plan to talk to SVN repos. --# --# Define MOZILLA_SHA1 environment variable when running make to make use of --# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast --# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default --# choice) has very fast version optimized for i586. --# --# Define PPC_SHA1 environment variable when running make to make use of --# a bundled SHA1 routine optimized for PowerPC. --# --# Define ARM_SHA1 environment variable when running make to make use of --# a bundled SHA1 routine optimized for ARM. --# --# Define NO_OPENSSL environment variable if you do not have OpenSSL. --# This also implies MOZILLA_SHA1. --# --# Define OPENSSLDIR=/foo/bar if your openssl header and library files are in --# /foo/bar/include and /foo/bar/lib directories. --AC_ARG_WITH(openssl, --AS_HELP_STRING([--with-openssl],[use OpenSSL library (default is YES)]) --AS_HELP_STRING([], [ARG can be prefix for openssl library and headers]),\ --GIT_PARSE_WITH(openssl)) --# --# Define NO_CURL if you do not have curl installed. git-http-pull and --# git-http-push are not built, and you cannot use http:// and https:// --# transports. --# --# Define CURLDIR=/foo/bar if your curl header and library files are in --# /foo/bar/include and /foo/bar/lib directories. --AC_ARG_WITH(curl, --AS_HELP_STRING([--with-curl],[support http(s):// transports (default is YES)]) --AS_HELP_STRING([], [ARG can be also prefix for curl library and headers]), --GIT_PARSE_WITH(curl)) --# --# Define NO_EXPAT if you do not have expat installed. git-http-push is --# not built, and you cannot push using http:// and https:// transports. --# --# Define EXPATDIR=/foo/bar if your expat header and library files are in --# /foo/bar/include and /foo/bar/lib directories. --AC_ARG_WITH(expat, --AS_HELP_STRING([--with-expat], --[support git-push using http:// and https:// transports via WebDAV (default is YES)]) --AS_HELP_STRING([], [ARG can be also prefix for expat library and headers]), --GIT_PARSE_WITH(expat)) --# --# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink --# installed in /sw, but don't want GIT to link against any libraries --# installed there. If defined you may specify your own (or Fink's) --# include directories and library directories by defining CFLAGS --# and LDFLAGS appropriately. --# --# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X, --# have DarwinPorts installed in /opt/local, but don't want GIT to --# link against any libraries installed there. If defined you may --# specify your own (or DarwinPort's) include directories and --# library directories by defining CFLAGS and LDFLAGS appropriately. --# --# Define NO_MMAP if you want to avoid mmap. --# --# Define NO_ICONV if your libc does not properly support iconv. --AC_ARG_WITH(iconv, --AS_HELP_STRING([--without-iconv], --[if your architecture doesn't properly support iconv]) --AS_HELP_STRING([--with-iconv=PATH], --[PATH is prefix for libiconv library and headers]) --AS_HELP_STRING([], --[used only if you need linking with libiconv]), --GIT_PARSE_WITH(iconv)) -- --## --enable-FEATURE[=ARG] and --disable-FEATURE --# --# Define USE_NSEC below if you want git to care about sub-second file mtimes --# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and --# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely --# randomly break unless your underlying filesystem supports those sub-second --# times (my ext3 doesn't). --# --# Define USE_STDEV below if you want git to care about the underlying device --# change being considered an inode change from the update-index perspective. -- -- - ## Output files - AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"]) - AC_OUTPUT --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0003-configure-add-macros-to-stash-FLAG-variables.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,54 +0,0 @@ -From 620f4827cf3e2899fe9ffd7245f87bb558446832 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 16:59:22 +0100 -Subject: [PATCH] configure: add macros to stash FLAG variables - -Allow for quick stash/unstash of CPPFLAGS and LDFLAGS. Library tests -can now be easily bracketted with these macros to allow for values -set in user/site arguments. - -Signed-off-by: Ben Walton ---- - configure.ac | 26 ++++++++++++++++++++++++++ - 1 files changed, 26 insertions(+), 0 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0bff480..469c9a9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -80,6 +80,32 @@ AC_DEFUN([GIT_CHECK_FUNC],[AC_CHECK_FUNC([$1],[ - AC_SEARCH_LIBS([$1],, - [$2],[$3]) - ],[$3])]) -+ -+dnl -+dnl GIT_STASH_FLAGS(BASEPATH_VAR) -+dnl ----------------------------- -+dnl Allow for easy stashing of LDFLAGS and CPPFLAGS before running -+dnl tests that may want to take user settings into account. -+AC_DEFUN([GIT_STASH_FLAGS],[ -+if test -n "$1"; then -+ old_CPPFLAGS="$CPPFLAGS" -+ old_LDFLAGS="$LDFLAGS" -+ CPPFLAGS="-I$1/include $CPPFLAGS" -+ LDFLAGS="-L$1/$lib $LDFLAGS" -+fi -+]) -+ -+dnl -+dnl GIT_UNSTASH_FLAGS(BASEPATH_VAR) -+dnl ----------------------------- -+dnl Restore the stashed *FLAGS values. -+AC_DEFUN([GIT_UNSTASH_FLAGS],[ -+if test -n "$1"; then -+ CPPFLAGS="$old_CPPFLAGS" -+ LDFLAGS="$old_LDFLAGS" -+fi -+]) -+ - ## Site configuration related to programs (before tests) - ## --with-PACKAGE[=ARG] and --without-PACKAGE - # --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0004-configure-wrap-some-library-tests-with-GIT_STASH_FL.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,113 +0,0 @@ -From 412626c9183b5109e04826c9ce8033636258ee91 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 17:22:45 +0100 -Subject: [PATCH] configure: wrap some library tests with GIT_STASH_FLAGS - -Libraries that can have user specificed base paths are wrapped with -GIT_STASH_FLAGS/GIT_UNSTASH_FLAGS to ensure that the proper versions -on the system are tested. This ensures, for example, that the zlib -tests for deflateUnbound are done with the version of zlib requested -by the user. This is most useful in the absence of good settings for -CPPFLAGS and/or LDFLAGS. - -Signed-off-by: Ben Walton ---- - configure.ac | 36 +++++++++++++++++++++++++++++++++++- - 1 files changed, 35 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 469c9a9..fe9d7eb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -315,33 +315,57 @@ AC_MSG_NOTICE([CHECKS for libraries]) - # - # Define NO_OPENSSL environment variable if you do not have OpenSSL. - # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin). -+ -+GIT_STASH_FLAGS($OPENSSLDIR) -+ - AC_CHECK_LIB([crypto], [SHA1_Init], - [NEEDS_SSL_WITH_CRYPTO=], - [AC_CHECK_LIB([ssl], [SHA1_Init], - [NEEDS_SSL_WITH_CRYPTO=YesPlease - NEEDS_SSL_WITH_CRYPTO=], - [NO_OPENSSL=YesPlease])]) -+ -+GIT_UNSTASH_FLAGS($OPENSSLDIR) -+ - AC_SUBST(NEEDS_SSL_WITH_CRYPTO) - AC_SUBST(NO_OPENSSL) -+ - # - # Define NO_CURL if you do not have libcurl installed. git-http-pull and - # git-http-push are not built, and you cannot use http:// and https:// - # transports. -+ -+GIT_STASH_FLAGS($CURLDIR) -+ - AC_CHECK_LIB([curl], [curl_global_init], - [NO_CURL=], - [NO_CURL=YesPlease]) -+ -+GIT_UNSTASH_FLAGS($CURLDIR) -+ - AC_SUBST(NO_CURL) -+ - # - # Define NO_EXPAT if you do not have expat installed. git-http-push is - # not built, and you cannot push using http:// and https:// transports. -+ -+GIT_STASH_FLAGS($EXPATDIR) -+ - AC_CHECK_LIB([expat], [XML_ParserCreate], - [NO_EXPAT=], - [NO_EXPAT=YesPlease]) -+ -+GIT_UNSTASH_FLAGS($EXPATDIR) -+ - AC_SUBST(NO_EXPAT) -+ - # - # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin and - # some Solaris installations). - # Define NO_ICONV if neither libc nor libiconv support iconv. -+ -+GIT_STASH_FLAGS($ICONVDIR) -+ - AC_DEFUN([ICONVTEST_SRC], [ - #include - -@@ -365,11 +389,17 @@ AC_LINK_IFELSE(ICONVTEST_SRC, - [AC_MSG_RESULT([no]) - NO_ICONV=YesPlease]) - LIBS="$old_LIBS"]) -+ -+GIT_UNSTASH_FLAGS($ICONVDIR) -+ - AC_SUBST(NEEDS_LIBICONV) - AC_SUBST(NO_ICONV) --test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv" -+ - # - # Define NO_DEFLATE_BOUND if deflateBound is missing from zlib. -+ -+GIT_STASH_FLAGS($ZLIB_PATH) -+ - AC_DEFUN([ZLIBTEST_SRC], [ - #include - -@@ -387,7 +417,11 @@ AC_LINK_IFELSE(ZLIBTEST_SRC, - [AC_MSG_RESULT([no]) - NO_DEFLATE_BOUND=yes]) - LIBS="$old_LIBS" -+ -+GIT_UNSTASH_FLAGS($ZLIB_PATH) -+ - AC_SUBST(NO_DEFLATE_BOUND) -+ - # - # Define NEEDS_SOCKET if linking with libc is not enough (SunOS, - # Patrick Mauritz). --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0005-configure-asciidoc-version-test-cleanup.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,30 +0,0 @@ -From 9cf13a507a47de584600cd5daa5af6a9846a2d7b Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 17:23:35 +0100 -Subject: [PATCH] configure: asciidoc version test cleanup - -Redirect stderr to /dev/null instead of stdout. This discards warnings -generated by python 2.6 related to the reorganization of functions within -modules. The warnings were causing the version detection to break. - -Signed-off-by: Ben Walton ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index fe9d7eb..f4b8e49 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -291,7 +291,7 @@ fi - AC_CHECK_PROGS(ASCIIDOC, [asciidoc]) - if test -n "$ASCIIDOC"; then - AC_MSG_CHECKING([for asciidoc version]) -- asciidoc_version=`$ASCIIDOC --version 2>&1` -+ asciidoc_version=`$ASCIIDOC --version 2>/dev/null` - case "${asciidoc_version}" in - asciidoc' '8*) - ASCIIDOC8=YesPlease --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0006-configure-make-iconv-tests-aware-of-user-arguments.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,90 +0,0 @@ -From 983a81ed86532d2563bbeb528f436134a6ab872e Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Wed, 11 Mar 2009 18:32:34 +0100 -Subject: [PATCH] configure: make iconv tests aware of user arguments - ---with-iconv is now taken into account when doing the tests for iconv. -If the user requests alternate handling for libiconv, the -liconv test -is run before the -lc test. - -Signed-off-by: Ben Walton ---- - configure.ac | 48 ++++++++++++++++++++++++++++++++++-------------- - 1 files changed, 34 insertions(+), 14 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f4b8e49..6fe4bfe 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -375,20 +375,35 @@ int main(void) - return 0; - } - ]) --AC_MSG_CHECKING([for iconv in -lc]) --AC_LINK_IFELSE(ICONVTEST_SRC, -+ -+if test -n "$ICONVDIR"; then -+ lib_order="-liconv -lc" -+else -+ lib_order="-lc -liconv" -+fi -+ -+NO_ICONV=YesPlease -+ -+for l in $lib_order; do -+ if test "$l" = "-liconv"; then -+ NEEDS_LIBICONV=YesPlease -+ else -+ NEEDS_LIBICONV= -+ fi -+ -+ old_LIBS="$LIBS" -+ LIBS="$LIBS $l" -+ AC_MSG_CHECKING([for iconv in $l]) -+ AC_LINK_IFELSE(ICONVTEST_SRC, - [AC_MSG_RESULT([yes]) -- NEEDS_LIBICONV=], -- [AC_MSG_RESULT([no]) -- old_LIBS="$LIBS" -- LIBS="$LIBS -liconv" -- AC_MSG_CHECKING([for iconv in -liconv]) -- AC_LINK_IFELSE(ICONVTEST_SRC, -- [AC_MSG_RESULT([yes]) -- NEEDS_LIBICONV=YesPlease], -- [AC_MSG_RESULT([no]) -- NO_ICONV=YesPlease]) -- LIBS="$old_LIBS"]) -+ NO_ICONV= -+ break], -+ [AC_MSG_RESULT([no])]) -+ LIBS="$old_LIBS" -+done -+ -+#in case of break -+LIBS="$old_LIBS" - - GIT_UNSTASH_FLAGS($ICONVDIR) - -@@ -455,13 +470,18 @@ int main(void) - return 0; - } - ]]) -+ -+GIT_STASH_FLAGS($ICONVDIR) -+ - AC_MSG_CHECKING([for old iconv()]) - AC_COMPILE_IFELSE(OLDICONVTEST_SRC, - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - OLD_ICONV=UnfortunatelyYes]) --AC_SUBST(OLD_ICONV) - -+GIT_UNSTASH_FLAGS($ICONVDIR) -+ -+AC_SUBST(OLD_ICONV) - - ## Checks for typedefs, structures, and compiler characteristics. - AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics]) --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/0007-configure-rework-pthread-handling-to-allow-for-user.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,129 +0,0 @@ -From 50df9056b97dc9d6e972e10f6948f0d6761b43b3 Mon Sep 17 00:00:00 2001 -From: Ben Walton -Date: Thu, 12 Mar 2009 19:45:02 +0100 -Subject: [PATCH] configure: rework pthread handling to allow for user defined flags - -The tests for POSIX threads can now be controlled by the user with the ---enable-pthreads=FLAGS option. If this is set (to some value other -than yes or no), the value is passed to the compiler. Thread support -is based solely on the outcome of this test. The user may specify not -to use threading at all or to use the default tests (first -pthread -then -lpthread) by not specifying FLAGS when passing --enable-pthreads. - -Signed-off-by: Ben Walton ---- - configure.ac | 89 ++++++++++++++++++++++++++++++++++++++++++++++++---------- - 1 files changed, 74 insertions(+), 15 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 6fe4bfe..4e728bc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -127,6 +127,27 @@ if test -z "$lib"; then - lib=lib - fi - -+AC_ARG_ENABLE([pthreads], -+ [AS_HELP_STRING([--enable-pthreads=FLAGS], -+ [FLAGS is the value to pass to the compiler to enable POSIX Threads.] -+ [The default if FLAGS is not specified is to try first -pthread] -+ [and then -lpthread.] -+ [--without-pthreads will disable threading.])], -+[ -+if test "x$enableval" = "xyes"; then -+ AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads]) -+elif test "x$enableval" != "xno"; then -+ PTHREAD_CFLAGS=$enableval -+ AC_MSG_NOTICE([Setting '$PTHREAD_CFLAGS' as the FLAGS to enable POSIX Threads]) -+else -+ AC_MSG_NOTICE([POSIX Threads will be disabled.]) -+ NO_PTHREADS=YesPlease -+ USER_NOPTHREAD=1 -+fi], -+[ -+ AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads.]) -+]) -+ - ## Site configuration (override autodetection) - ## --with-PACKAGE[=ARG] and --without-PACKAGE - AC_MSG_NOTICE([CHECKS for site configuration]) -@@ -672,23 +693,61 @@ AC_SUBST(NO_MKDTEMP) - # - # Define PTHREAD_LIBS to the linker flag used for Pthread support and define - # THREADED_DELTA_SEARCH if Pthreads are available. --AC_LANG_CONFTEST([AC_LANG_PROGRAM( -- [[#include ]], -- [[pthread_mutex_t test_mutex;]] --)]) --${CC} -pthread conftest.c -o conftest.o > /dev/null 2>&1 --if test $? -eq 0;then -- PTHREAD_LIBS="-pthread" -- THREADED_DELTA_SEARCH=YesPlease -+AC_DEFUN([PTHREADTEST_SRC], [ -+#include -+ -+int main(void) -+{ -+ pthread_mutex_t test_mutex; -+ return (0); -+} -+]) -+ -+dnl AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+dnl [[#include ]], -+dnl [[pthread_mutex_t test_mutex;]] -+dnl )]) -+ -+NO_PTHREADS=UnfortunatelyYes -+THREADED_DELTA_SEARCH= -+PTHREAD_LIBS= -+ -+if test -n "$USER_NOPTHREAD"; then -+ AC_MSG_NOTICE([Skipping POSIX Threads at user request.]) -+# handle these separately since PTHREAD_CFLAGS could be '-lpthreads -+# -D_REENTRANT' or some such. -+elif test -z "$PTHREAD_CFLAGS"; then -+ for opt in -pthread -lpthread; do -+ old_CFLAGS="$CFLAGS" -+ CFLAGS="$opt $CFLAGS" -+ AC_MSG_CHECKING([Checking for POSIX Threads with '$opt']) -+ AC_LINK_IFELSE(PTHREADTEST_SRC, -+ [AC_MSG_RESULT([yes]) -+ NO_PTHREADS= -+ PTHREAD_LIBS="$opt" -+ THREADED_DELTA_SEARCH=YesPlease -+ break -+ ], -+ [AC_MSG_RESULT([no])]) -+ CFLAGS="$old_CFLAGS" -+ done - else -- ${CC} -lpthread conftest.c -o conftest.o > /dev/null 2>&1 -- if test $? -eq 0;then -- PTHREAD_LIBS="-lpthread" -- THREADED_DELTA_SEARCH=YesPlease -- else -- NO_PTHREADS=UnfortunatelyYes -- fi -+ old_CFLAGS="$CFLAGS" -+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS" -+ AC_MSG_CHECKING([Checking for POSIX Threads with '$PTHREAD_CFLAGS']) -+ AC_LINK_IFELSE(PTHREADTEST_SRC, -+ [AC_MSG_RESULT([yes]) -+ NO_PTHREADS= -+ PTHREAD_LIBS="$PTHREAD_CFLAGS" -+ THREADED_DELTA_SEARCH=YesPlease -+ ], -+ [AC_MSG_RESULT([no])]) -+ -+ CFLAGS="$old_CFLAGS" - fi -+ -+CFLAGS="$old_CFLAGS" -+ - AC_SUBST(PTHREAD_LIBS) - AC_SUBST(NO_PTHREADS) - AC_SUBST(THREADED_DELTA_SEARCH) --- -1.6.0.5 - Deleted: csw/mgar/pkg/git/trunk/files/doc-makefile.patch =================================================================== --- csw/mgar/pkg/git/trunk/files/doc-makefile.patch 2009-04-28 23:39:12 UTC (rev 4592) +++ csw/mgar/pkg/git/trunk/files/doc-makefile.patch 2009-04-29 02:27:41 UTC (rev 4593) @@ -1,56 +0,0 @@ ---- git-1.6.1.3/Documentation/Makefile.orig 2009-02-07 20:46:30.000000000 +0100 -+++ git-1.6.1.3/Documentation/Makefile 2009-02-18 20:53:41.159467914 +0100 -@@ -57,6 +57,8 @@ - -include ../config.mak.autogen - -include ../config.mak - -+SHELL = $(SHELL_PATH) -+ - ifdef ASCIIDOC8 - ASCIIDOC_EXTRA += -a asciidoc7compatible - endif -@@ -108,7 +110,7 @@ - fi - - install-html: html -- sh ./install-webdoc.sh $(DESTDIR)$(htmldir) -+ $(SHELL) ./install-webdoc.sh $(DESTDIR)$(htmldir) - - ../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE - $(MAKE) -C ../ GIT-VERSION-FILE -@@ -170,7 +172,7 @@ - - technical/api-index.txt: technical/api-index-skel.txt \ - technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS)) -- cd technical && sh ./api-index.sh -+ cd technical && $(SHELL) ./api-index.sh - - $(patsubst %,%.html,$(API_DOCS) technical/api-index): %.html : %.txt - $(ASCIIDOC) -b xhtml11 -f asciidoc.conf \ -@@ -206,7 +208,7 @@ - - howto-index.txt: howto-index.sh $(wildcard howto/*.txt) - $(RM) $@+ $@ -- sh ./howto-index.sh $(wildcard howto/*.txt) >$@+ -+ $(SHELL) ./howto-index.sh $(wildcard howto/*.txt) >$@+ - mv $@+ $@ - - $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt -@@ -220,14 +222,14 @@ - mv $@+ $@ - - install-webdoc : html -- sh ./install-webdoc.sh $(WEBDOC_DEST) -+ $(SHELL) ./install-webdoc.sh $(WEBDOC_DEST) - - quick-install: quick-install-man - - quick-install-man: -- sh ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) -+ $(SHELL) ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) - - quick-install-html: -- sh ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) -+ $(SHELL) ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) - - .PHONY: .FORCE-GIT-VERSION-FILE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 29 16:19:57 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 29 Apr 2009 14:19:57 +0000 Subject: [csw-devel] SF.net SVN: gar:[4594] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4594 http://gar.svn.sourceforge.net/gar/?rev=4594&view=rev Author: valholla Date: 2009-04-29 14:19:57 +0000 (Wed, 29 Apr 2009) Log Message: ----------- remove extra dependencies in ruby and java bindings Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 02:27:41 UTC (rev 4593) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 14:19:57 UTC (rev 4594) @@ -44,9 +44,8 @@ REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt CSWiconv SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn -REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWgcc3g++rt CSWgcc3corert CSWapache2rt +REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWapache2rt CSWneon CSWoldaprt REQUIRED_PKGS_CSWjavasvn += CSWbdb44 CSWexpat CSWggettextrt CSWiconv -REQUIRED_PKGS_CSWjavasvn += CSWneon CSWoldaprt SPKG_DESC_CSWpmsvn = Subversion Perl Language Binding CATALOGNAME_CSWpmsvn = pmsvn REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl CSWapache2rt CSWbdb44 CSWexpat @@ -57,9 +56,8 @@ REQUIRED_PKGS_CSWpysvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWrbsvn = Subversion Ruby Language Binding CATALOGNAME_CSWrbsvn = rbsvn -REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWgcc3g++rt CSWgcc3corert +REQUIRED_PKGS_CSWrbsvn = CSWsvn CSWruby CSWiconv CSWoldaprt REQUIRED_PKGS_CSWrbsvn += CSWapache2rt CSWbdb44 CSWexpat CSWggettextrt -REQUIRED_PKGS_CSWrbsvn += CSWiconv CSWoldaprt PKGFILES_CSWsvn-devel = $(PKGFILES_DEVEL) PKGFILES_CSWap2svn = $(prefix)/apache2.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 17:32:23 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 15:32:23 +0000 Subject: [csw-devel] SF.net SVN: gar:[4595] csw/mgar/pkg/libcairo/trunk/Makefile Message-ID: Revision: 4595 http://gar.svn.sourceforge.net/gar/?rev=4595&view=rev Author: dmichelsen Date: 2009-04-29 15:32:23 +0000 (Wed, 29 Apr 2009) Log Message: ----------- libcairo: Make docs archall Modified Paths: -------------- csw/mgar/pkg/libcairo/trunk/Makefile Modified: csw/mgar/pkg/libcairo/trunk/Makefile =================================================================== --- csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-29 14:19:57 UTC (rev 4594) +++ csw/mgar/pkg/libcairo/trunk/Makefile 2009-04-29 15:32:23 UTC (rev 4595) @@ -37,6 +37,8 @@ REQUIRED_PKGS_CSWlibcairodevel = CSWlibcairo REQUIRED_PKGS_CSWlibcairodoc = +ARCHALL_CSWlibcairodoc = 1 + # Wait for libpixman, libfontconfig and libXrender to be 64 bit #BUILD64 = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 17:40:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 15:40:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4596] csw/mgar/gar/v2 Message-ID: Revision: 4596 http://gar.svn.sourceforge.net/gar/?rev=4596&view=rev Author: dmichelsen Date: 2009-04-29 15:40:22 +0000 (Wed, 29 Apr 2009) Log Message: ----------- mGAR v2: Allow resetting prefix in categories to completely relocate trees, here: x11 Modified Paths: -------------- csw/mgar/gar/v2/categories/x11/category.mk csw/mgar/gar/v2/gar.conf.mk Modified: csw/mgar/gar/v2/categories/x11/category.mk =================================================================== --- csw/mgar/gar/v2/categories/x11/category.mk 2009-04-29 15:32:23 UTC (rev 4595) +++ csw/mgar/gar/v2/categories/x11/category.mk 2009-04-29 15:40:22 UTC (rev 4596) @@ -14,24 +14,27 @@ # Preprocessor flags # Linker flags -LDFLAGS += -L/opt/csw/lib -R/opt/csw/lib +#LDFLAGS += -L/opt/csw/lib -R/opt/csw/lib # Defines some tools used by autostuff GREP = ggrep +_CATEGORY_COMMON_EXPORTS = GREP # export the variables -export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP +#export LDFLAGS CXXFLAGS CFLAGS CPPFLAGS GREP # pkg-config options -_CATEGORY_PKG_CONFIG_PATH = $(abspath $(prefix)/X11/lib/$(MM_LIBDIR)/pkgconfig) +#_CATEGORY_PKG_CONFIG_PATH = $(abspath $(prefix)/X11/lib/$(MM_LIBDIR)/pkgconfig) +prefix = $(BUILD_PREFIX)/X11 + # Configure common options -CONFIGURE_ARGS = --prefix=/opt/csw/X11 -CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 -CONFIGURE_ARGS += --libdir=/opt/csw/X11/lib -CONFIGURE_ARGS += --includedir=/opt/csw/X11/include -CONFIGURE_ARGS += --datadir=/opt/csw/X11/share -CONFIGURE_ARGS += --mandir=/opt/csw/X11/share/man +#CONFIGURE_ARGS = --prefix=/opt/csw/X11 +#CONFIGURE_ARGS += --exec-prefix=/opt/csw/X11 +#CONFIGURE_ARGS += --libdir=/opt/csw/X11/lib +#CONFIGURE_ARGS += --includedir=/opt/csw/X11/include +#CONFIGURE_ARGS += --datadir=/opt/csw/X11/share +#CONFIGURE_ARGS += --mandir=/opt/csw/X11/share/man # No tests scripts, thus there is no "gmake test" target TEST_SCRIPTS = Modified: csw/mgar/gar/v2/gar.conf.mk =================================================================== --- csw/mgar/gar/v2/gar.conf.mk 2009-04-29 15:32:23 UTC (rev 4595) +++ csw/mgar/gar/v2/gar.conf.mk 2009-04-29 15:40:22 UTC (rev 4596) @@ -121,6 +121,8 @@ binpath ?= $(abspath $(binpath_install)/$(MM_BINDIR)) sbinpath_install ?= $(BUILD_PREFIX)/sbin sbinpath ?= $(abspath $(sbinpath_install)/$(MM_BINDIR)) +libpath_install ?= $(BUILD_PREFIX)/lib +libpath ?= $(abspath $(libpath_install)/$(MM_LIBDIR)) # DESTDIR is used at INSTALL TIME ONLY to determine what the # filesystem root should be. @@ -448,10 +450,10 @@ # may not be a subdirectory for the 32-bit standard case (this would normally # be a symlink of the form lib/sparcv8 -> . and lib/i386 -> .). This is most likely # the case for libraries in $(EXTRA_LIBS) for which no links generated in CSWcommon. -RUNPATH_DIRS ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_DIRS) +RUNPATH_DIRS ?= $(libpath_install) $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_DIRS) ifndef NOISALIST -RUNPATH_ISALIST ?= $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_ISALIST) +RUNPATH_ISALIST ?= $(libpath_install) $(libdir_install) $(EXTRA_LIB) $(EXTRA_RUNPATH_ISALIST) endif # Iterate over all directories in RUNPATH_DIRS, prefix each directory with one @@ -493,7 +495,7 @@ PATH = $(if $(filter SOS12,$(GARCOMPILER)),$(abspath $(GARBIN)/sos12-wrappers):)$(if $(IGNORE_DESTDIR),,$(abspath $(DESTDIR)$(binpath_install)/$(MM_BINDIR)):$(DESTDIR)$(binpath_install):$(abspath $(DESTDIR)$(sbinpath_install)/$(MM_BINDIR)):$(DESTDIR)$(sbinpath_install):)$(abspath $(binpath_install)/$(MM_BINDIR)):$(binpath_install):$(abspath $(sbinpath_install)/$(MM_BINDIR)):$(sbinpath_install):$(CC_HOME)/bin:$(abspath $(GARBIN)):/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin # This is for foo-config chaos -PKG_CONFIG_DIRS ?= $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) +PKG_CONFIG_DIRS ?= $(libpath_install) $(libdir_install) $(EXTRA_PKG_CONFIG_DIRS) PKG_CONFIG_PATH ?= $(call MAKEPATH,$(foreach D,$(PKG_CONFIG_DIRS),$(abspath $D/$(MM_LIBDIR)/pkgconfig)) $(_CATEGORY_PKG_CONFIG_PATH) $(EXTRA_PKG_CONFIG_PATH)) # @@ -557,7 +559,7 @@ GARPKG_EXPORTS += GARCH GAROSREL GARPACKAGE endif -COMMON_EXPORTS ?= $(DIRECTORY_EXPORTS) $(COMPILER_EXPORTS) $(GARPKG_EXPORTS) $(EXTRA_COMMON_EXPORTS) +COMMON_EXPORTS ?= $(DIRECTORY_EXPORTS) $(COMPILER_EXPORTS) $(GARPKG_EXPORTS) $(EXTRA_COMMON_EXPORTS) $(_CATEGORY_COMMON_EXPORTS) # LD_OPTIONS = $(LINKER_FLAGS) ifneq ($(LD_OPTIONS),) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 17:54:35 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 15:54:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4597] csw/mgar/pkg/x11/libXdmcp/trunk Message-ID: Revision: 4597 http://gar.svn.sourceforge.net/gar/?rev=4597&view=rev Author: dmichelsen Date: 2009-04-29 15:54:34 +0000 (Wed, 29 Apr 2009) Log Message: ----------- libXdmcp: Prepare for dynamic gspec and 64 bit Modified Paths: -------------- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile csw/mgar/pkg/x11/libXdmcp/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec Modified: csw/mgar/pkg/x11/libXdmcp/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/Makefile 2009-04-29 15:54:34 UTC (rev 4597) @@ -4,17 +4,22 @@ DESCRIPTION = X11 display manager control protocol library define BLURB -This package provides the main interface to the X11 display manager control protocol library, which allows for remote logins to display managers. + This package provides the main interface to the X11 display manager control + protocol library, which allows for remote logins to display managers. endef -MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ +MASTER_SITES = http://xorg.freedesktop.org/releases/individual/lib/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibxdmcpdevel, ) -DISTFILES += $(call admfiles,CSWlibxdmcp, ) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +PACKAGES = CSWlibxdmcp CSWlibxdmcpdevel +CATALOGNAME_CSWlibxdmcp = libxdmcp +CATALOGNAME_CSWlibxdmcpdevel = libxdmcp_devel + +REQUIRED_PKGS_CSWlibxdmcpdevel = CSWlibxdmcp + SPKG_DESC_CSWlibxdmcp = X11 display manager control protocol library SPKG_DESC_CSWlibxdmcpdevel = X11 display manager control protocol library development package @@ -22,17 +27,15 @@ PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/include/.* PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/lib/.*\.a PKGFILES_CSWlibxdmcpdevel += $(prefix)/X11/lib/pkgconfig/.* -PKGFILES_CSWlibxdmcpdevel += $(prefix)/share/doc/$(GARNAME)/License-devel.txt BUILD64 = 1 - +NOISALIST = 1 CONFIGURE_ARGS = $(DIRPATHS) -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License-devel.txt - include gar/category.mk +post-merge: + gln -s . $(PKGROOT)$(libdir)/32 + gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/64 + @$(MAKECOOKIE) Modified: csw/mgar/pkg/x11/libXdmcp/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/checksums 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/checksums 2009-04-29 15:54:34 UTC (rev 4597) @@ -1,3 +1 @@ a7e23f356a2b4fe8668f9ff4a2b0413a download/libXdmcp-1.0.2.tar.gz -624a709339fbb4feaaad957025c543eb download/CSWlibxdmcpdevel.gspec -e232536fb776ff75d8905a9ddf00fd90 download/CSWlibxdmcp.gspec Deleted: csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcp.gspec 2009-04-29 15:54:34 UTC (rev 4597) @@ -1,6 +0,0 @@ -%var bitname libxdmcp -%var pkgname CSWlibxdmcp -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information Deleted: csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec =================================================================== --- csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec 2009-04-29 15:40:22 UTC (rev 4596) +++ csw/mgar/pkg/x11/libXdmcp/trunk/files/CSWlibxdmcpdevel.gspec 2009-04-29 15:54:34 UTC (rev 4597) @@ -1,6 +0,0 @@ -%var bitname libxdmcp_devel -%var pkgname CSWlibxdmcpdevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License-devel.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 18:54:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 16:54:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4598] csw/mgar/pkg/x11/inputproto/trunk Message-ID: Revision: 4598 http://gar.svn.sourceforge.net/gar/?rev=4598&view=rev Author: dmichelsen Date: 2009-04-29 16:54:31 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/inputproto: Use dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/inputproto/trunk/Makefile Removed Paths: ------------- csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec Modified: csw/mgar/pkg/x11/inputproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 15:54:34 UTC (rev 4597) +++ csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 16:54:31 UTC (rev 4598) @@ -5,21 +5,18 @@ DESCRIPTION = Input extension headers from X.org project define BLURB -This provides the input extension headers from modular X.org X11 project + This provides the input extension headers from modular X.org X11 project endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles, CSWinputproto) # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz - -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +BUILD64 = 1 +CONFIGURE_ARGS = $(DIRPATHS) + include gar/category.mk - - Deleted: csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec =================================================================== --- csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec 2009-04-29 15:54:34 UTC (rev 4597) +++ csw/mgar/pkg/x11/inputproto/trunk/files/CSWinputproto.gspec 2009-04-29 16:54:31 UTC (rev 4598) @@ -1,7 +0,0 @@ -%var bitname inputproto -%var pkgname CSWinputproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 18:59:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 16:59:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4599] csw/mgar/pkg/x11/kbproto/trunk Message-ID: Revision: 4599 http://gar.svn.sourceforge.net/gar/?rev=4599&view=rev Author: dmichelsen Date: 2009-04-29 16:59:13 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/kbproto: Use dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/kbproto/trunk/Makefile csw/mgar/pkg/x11/kbproto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec Modified: csw/mgar/pkg/x11/kbproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/kbproto/trunk/Makefile 2009-04-29 16:54:31 UTC (rev 4598) +++ csw/mgar/pkg/x11/kbproto/trunk/Makefile 2009-04-29 16:59:13 UTC (rev 4599) @@ -5,19 +5,17 @@ DESCRIPTION = KB extension headers from X.org define BLURB -This provides the KB extension headers from modular X.org X11 project. + This provides the KB extension headers from modular X.org X11 project. endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWkbproto) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/kbproto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/kbproto/trunk/checksums 2009-04-29 16:54:31 UTC (rev 4598) +++ csw/mgar/pkg/x11/kbproto/trunk/checksums 2009-04-29 16:59:13 UTC (rev 4599) @@ -1,2 +1 @@ 1efc6a4d97acb3ec3f34c4b2508478dc download/kbproto-1.0.3.tar.gz -d6ad9e150887bbed709f99db1dc86e7e download/CSWkbproto.gspec Deleted: csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec =================================================================== --- csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec 2009-04-29 16:54:31 UTC (rev 4598) +++ csw/mgar/pkg/x11/kbproto/trunk/files/CSWkbproto.gspec 2009-04-29 16:59:13 UTC (rev 4599) @@ -1,7 +0,0 @@ -%var bitname kbproto -%var pkgname CSWkbproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:00:15 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:00:15 +0000 Subject: [csw-devel] SF.net SVN: gar:[4600] csw/mgar/pkg/x11/inputproto/trunk/Makefile Message-ID: Revision: 4600 http://gar.svn.sourceforge.net/gar/?rev=4600&view=rev Author: dmichelsen Date: 2009-04-29 17:00:15 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/inputproto: Skip superflous 64 bit in includefiles Modified Paths: -------------- csw/mgar/pkg/x11/inputproto/trunk/Makefile Modified: csw/mgar/pkg/x11/inputproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 16:59:13 UTC (rev 4599) +++ csw/mgar/pkg/x11/inputproto/trunk/Makefile 2009-04-29 17:00:15 UTC (rev 4600) @@ -15,7 +15,6 @@ UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz ARCHALL = 1 -BUILD64 = 1 CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:23:28 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:23:28 +0000 Subject: [csw-devel] SF.net SVN: gar:[4601] csw/mgar/pkg/x11/xtrans/trunk Message-ID: Revision: 4601 http://gar.svn.sourceforge.net/gar/?rev=4601&view=rev Author: dmichelsen Date: 2009-04-29 17:23:28 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xtrans: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xtrans/trunk/Makefile csw/mgar/pkg/x11/xtrans/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec Modified: csw/mgar/pkg/x11/xtrans/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xtrans/trunk/Makefile 2009-04-29 17:00:15 UTC (rev 4600) +++ csw/mgar/pkg/x11/xtrans/trunk/Makefile 2009-04-29 17:23:28 UTC (rev 4601) @@ -4,19 +4,18 @@ DESCRIPTION = X transport library define BLURB -xtrans includes a number of routines to make X implementations transport-independent; at time of writing, it includes support for UNIX sockets, IPv4, IPv6, and DECnet. + xtrans includes a number of routines to make X implementations transport-independent; + at time of writing, it includes support for UNIX sockets, IPv4, IPv6, and DECnet. endef MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PKGDIST = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -SPKG_DESC_CSWxtrans = X transport library +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) -DISTFILES += $(call admfiles,CSWxtrans, ) - include gar/category.mk Modified: csw/mgar/pkg/x11/xtrans/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xtrans/trunk/checksums 2009-04-29 17:00:15 UTC (rev 4600) +++ csw/mgar/pkg/x11/xtrans/trunk/checksums 2009-04-29 17:23:28 UTC (rev 4601) @@ -1,2 +1 @@ 1b9362b6c7577f1cd5009703949ac5d0 download/xtrans-1.2.2.tar.gz -c1c9b2429bbfb10c8c8c915cbf01ee93 download/CSWxtrans.gspec Deleted: csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec =================================================================== --- csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec 2009-04-29 17:00:15 UTC (rev 4600) +++ csw/mgar/pkg/x11/xtrans/trunk/files/CSWxtrans.gspec 2009-04-29 17:23:28 UTC (rev 4601) @@ -1,4 +0,0 @@ -%var bitname libxtrans -%var pkgname CSWlibxtrans -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:38:48 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:38:48 +0000 Subject: [csw-devel] SF.net SVN: gar:[4602] csw/mgar/pkg/x11/xrender/trunk Message-ID: Revision: 4602 http://gar.svn.sourceforge.net/gar/?rev=4602&view=rev Author: dmichelsen Date: 2009-04-29 17:38:48 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xrender: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xrender/trunk/Makefile csw/mgar/pkg/x11/xrender/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec Modified: csw/mgar/pkg/x11/xrender/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/Makefile 2009-04-29 17:38:48 UTC (rev 4602) @@ -4,37 +4,33 @@ DESCRIPTION = X Render extension library define BLURB -The X Rendering Extension (Render) introduces digital image composition as the foundation of a new rendering model within the X Window System. Rendering geometric figures is accomplished by client-side tesselation into either triangles or trapezoids. + The X Rendering Extension (Render) introduces digital image composition as + the foundation of a new rendering model within the X Window System. + Rendering geometric figures is accomplished by client-side tesselation + into either triangles or trapezoids. endef -MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ -DISTFILES = libXrender-$(GARVERSION).tar.gz -PKGDIST = libXrender-$(GARVERSION).tar.gz +MASTER_SITES = http://xorg.freedesktop.org/releases/individual/lib/ +DISTNAME = libXrender-$(GARVERSION) +DISTFILES = $(DISTNAME).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = libXrender-(\d+(?:\.\d+)*).tar.gz +PACKAGES = CSWlibxrender CSWrenderdev + +REQUIRED_PKGS_CSWrenderdev = CSWlibxrender +REQUIRED_PKGS_CSWlibxrender = CSWlibx11 + SPKG_DESC_CSWlibxrender = $(DESCRIPTION) SPKG_DESC_CSWrenderdev = $(DESCRIPTION) development package -DISTFILES += $(call admfiles,CSWlibxrender, ) -DISTFILES += $(call admfiles,CSWrenderdev, ) - PKGFILES_CSWrenderdev = $(PKGFILES_DEVEL) -PKGFILES_CSWrenderdev += $(prefix)/X11/include/.* -PKGFILES_CSWrenderdev += $(prefix)/X11/lib/.*\.a -PKGFILES_CSWrenderdev += $(prefix)/X11/lib/pkgconfig/.* -REQUIRED_PKGS_CSWrenderdev = CSWlibxrender -REQUIRED_PKGS_CSWlibxrender = CSWlibx11 - BUILD64 = 1 +NOARCHLIST = 1 +CONFIGURE_ARGS = $(DIRPATHS) -post-extract: - ( cd $(WORKROOTDIR)/build-$(firstword $(MODULATIONS)) ; \ - mv libXrender-$(GARVERSION) $(DISTNAME) ) - @$(MAKECOOKIE) - include gar/category.mk Modified: csw/mgar/pkg/x11/xrender/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/checksums 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/checksums 2009-04-29 17:38:48 UTC (rev 4602) @@ -1,3 +1 @@ 1d9cb49e6c9149d5a5eca118c9c2bcf6 download/libXrender-0.9.4.tar.gz -3322ccec3c0c00155a5c2600dfbe8798 download/CSWlibxrender.gspec -459f8856062d315597cb957fc16e8850 download/CSWrenderdev.gspec Deleted: csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/files/CSWlibxrender.gspec 2009-04-29 17:38:48 UTC (rev 4602) @@ -1,4 +0,0 @@ -%var bitname libxrender -%var pkgname CSWlibxrender -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec =================================================================== --- csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec 2009-04-29 17:23:28 UTC (rev 4601) +++ csw/mgar/pkg/x11/xrender/trunk/files/CSWrenderdev.gspec 2009-04-29 17:38:48 UTC (rev 4602) @@ -1,4 +0,0 @@ -%var bitname renderdev -%var pkgname CSWrenderdev -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:48:20 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:48:20 +0000 Subject: [csw-devel] SF.net SVN: gar:[4603] csw/mgar/pkg/x11/xproto/trunk Message-ID: Revision: 4603 http://gar.svn.sourceforge.net/gar/?rev=4603&view=rev Author: dmichelsen Date: 2009-04-29 17:48:20 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xproto: Use dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xproto/trunk/Makefile csw/mgar/pkg/x11/xproto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec Modified: csw/mgar/pkg/x11/xproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xproto/trunk/Makefile 2009-04-29 17:38:48 UTC (rev 4602) +++ csw/mgar/pkg/x11/xproto/trunk/Makefile 2009-04-29 17:48:20 UTC (rev 4603) @@ -4,19 +4,17 @@ DESCRIPTION = X protocol and ancillary headers from X.org X11 define BLURB -X protocol and ancillary headers from modular X.org X11 + X protocol and ancillary headers from modular X.org X11 endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWxproto) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/xproto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xproto/trunk/checksums 2009-04-29 17:38:48 UTC (rev 4602) +++ csw/mgar/pkg/x11/xproto/trunk/checksums 2009-04-29 17:48:20 UTC (rev 4603) @@ -1,2 +1 @@ 9186713de3ec8a9fdd6ec3f4c4534fde download/xproto-7.0.15.tar.gz -613afd970a2e684a1b6a5323569acdef download/CSWxproto.gspec Deleted: csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec =================================================================== --- csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec 2009-04-29 17:38:48 UTC (rev 4602) +++ csw/mgar/pkg/x11/xproto/trunk/files/CSWxproto.gspec 2009-04-29 17:48:20 UTC (rev 4603) @@ -1,7 +0,0 @@ -%var bitname xproto -%var pkgname CSWxproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 19:54:09 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 17:54:09 +0000 Subject: [csw-devel] SF.net SVN: gar:[4604] csw/mgar/pkg/x11/xextproto/trunk Message-ID: Revision: 4604 http://gar.svn.sourceforge.net/gar/?rev=4604&view=rev Author: dmichelsen Date: 2009-04-29 17:54:09 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xextproto: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xextproto/trunk/Makefile csw/mgar/pkg/x11/xextproto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec Modified: csw/mgar/pkg/x11/xextproto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xextproto/trunk/Makefile 2009-04-29 17:48:20 UTC (rev 4603) +++ csw/mgar/pkg/x11/xextproto/trunk/Makefile 2009-04-29 17:54:09 UTC (rev 4604) @@ -5,19 +5,17 @@ DESCRIPTION = XExt extension headers from X.org define BLURB -This provides the XExt extension headers from modular X.org X11 + This provides the XExt extension headers from modular X.org X11 endef MASTER_SITES = $(X11_PROTO_MASTER_SITE) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWxextproto) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/xextproto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xextproto/trunk/checksums 2009-04-29 17:48:20 UTC (rev 4603) +++ csw/mgar/pkg/x11/xextproto/trunk/checksums 2009-04-29 17:54:09 UTC (rev 4604) @@ -1,2 +1 @@ f6274c778e571130484fb0650651ac02 download/xextproto-7.0.5.tar.gz -e30e1b897995ae6d0044ae87f3e58756 download/CSWxextproto.gspec Deleted: csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec =================================================================== --- csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec 2009-04-29 17:48:20 UTC (rev 4603) +++ csw/mgar/pkg/x11/xextproto/trunk/files/CSWxextproto.gspec 2009-04-29 17:54:09 UTC (rev 4604) @@ -1,8 +0,0 @@ -%var bitname xextproto -%var pkgname CSWxextproto -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:34:42 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:34:42 +0000 Subject: [csw-devel] SF.net SVN: gar:[4605] csw/mgar/pkg/x11/xcb-proto/trunk Message-ID: Revision: 4605 http://gar.svn.sourceforge.net/gar/?rev=4605&view=rev Author: dmichelsen Date: 2009-04-29 19:34:42 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/xcb-proto: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/xcb-proto/trunk/Makefile csw/mgar/pkg/x11/xcb-proto/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec Modified: csw/mgar/pkg/x11/xcb-proto/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/xcb-proto/trunk/Makefile 2009-04-29 17:54:09 UTC (rev 4604) +++ csw/mgar/pkg/x11/xcb-proto/trunk/Makefile 2009-04-29 19:34:42 UTC (rev 4605) @@ -5,35 +5,37 @@ DESCRIPTION = XCB protocol descriptions (in XML) define BLURB -The xcb-proto package provides the XML-XCB (X C Bindings) protocol -descriptions that libxcb uses to generate the majority of its code and API. -We provide them separately from libxcb to allow reuse by other projects, -such as additional language bindings, protocol dissectors, or -documentation generators. + The xcb-proto package provides the XML-XCB (X C Bindings) protocol + descriptions that libxcb uses to generate the majority of its code and API. + We provide them separately from libxcb to allow reuse by other projects, + such as additional language bindings, protocol dissectors, or + documentation generators. -Separation of XCB's transport and protocol layers simplifies both -writing extensions and client-side support for extensions. -By contrast, with the xlib infrastructure, client-side support for -new extensions requires significant duplication of effort. With XCB and -the XML-XCB protocol descriptions, client-side support for a new -extension requires only an XML description of the extension--and not a -single line of code. + Separation of XCB's transport and protocol layers simplifies both + writing extensions and client-side support for extensions. + By contrast, with the xlib infrastructure, client-side support for + new extensions requires significant duplication of effort. With XCB and + the XML-XCB protocol descriptions, client-side support for a new + extension requires only an XML description of the extension--and not a + single line of code. -Python libraries: xcb-proto also contains language-independent Python -libraries that are used to parse an XML description and create objects -used by Python code generators in individual language bindings. + Python libraries: xcb-proto also contains language-independent Python + libraries that are used to parse an XML description and create objects + used by Python code generators in individual language bindings. endef MASTER_SITES = $(XCB_MASTER_SITES) DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWxcb-proto) +PACKAGES = CSWxcbproto + +REQUIRED_PKGS = CSWpython + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/xcb-proto/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/xcb-proto/trunk/checksums 2009-04-29 17:54:09 UTC (rev 4604) +++ csw/mgar/pkg/x11/xcb-proto/trunk/checksums 2009-04-29 19:34:42 UTC (rev 4605) @@ -1,2 +1 @@ 475312ad5b41e6a543f92da82b9dd959 download/xcb-proto-1.4.tar.gz -187ab0fada6adab4e77ad04abfe9a093 download/CSWxcb-proto.gspec Deleted: csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec =================================================================== --- csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec 2009-04-29 17:54:09 UTC (rev 4604) +++ csw/mgar/pkg/x11/xcb-proto/trunk/files/CSWxcb-proto.gspec 2009-04-29 19:34:42 UTC (rev 4605) @@ -1,6 +0,0 @@ -%var bitname xcbproto -%var pkgname CSWxcbproto -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:52:49 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:52:49 +0000 Subject: [csw-devel] SF.net SVN: gar:[4606] csw/mgar/pkg Message-ID: Revision: 4606 http://gar.svn.sourceforge.net/gar/?rev=4606&view=rev Author: dmichelsen Date: 2009-04-29 19:52:49 +0000 (Wed, 29 Apr 2009) Log Message: ----------- pango: Unify legacy tree to tag of new package Added Paths: ----------- csw/mgar/pkg/pango/tags/legacy/ Removed Paths: ------------- csw/mgar/pkg/libpango/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:53:31 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:53:31 +0000 Subject: [csw-devel] SF.net SVN: gar:[4607] csw/mgar/pkg/x11/libXau/trunk Message-ID: Revision: 4607 http://gar.svn.sourceforge.net/gar/?rev=4607&view=rev Author: dmichelsen Date: 2009-04-29 19:53:31 +0000 (Wed, 29 Apr 2009) Log Message: ----------- x11/libxau: Update to dynamic gspec, license and 64 bit Modified Paths: -------------- csw/mgar/pkg/x11/libXau/trunk/Makefile csw/mgar/pkg/x11/libXau/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec Modified: csw/mgar/pkg/x11/libXau/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/Makefile 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/Makefile 2009-04-29 19:53:31 UTC (rev 4607) @@ -4,27 +4,29 @@ DESCRIPTION = X11 authorisation library define BLURB -This package provides the main interface to the X11 authorisation handling, which controls authorisation for X connections, both client-side and server-side. + This package provides the main interface to the X11 authorisation handling, + which controls authorisation for X connections, both client-side and server-side. endef -MASTER_SITES =http://xorg.freedesktop.org/releases/individual/lib/ +MASTER_SITES = http://xorg.freedesktop.org/releases/individual/lib/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PKGDIST = $(GARNAME)-$(GARVERSION).tar.gz +PACKAGES = CSWlibxau CSWlibxaudevel + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz +CATALOGNAME_CSWlibxau = libxau +CATALOGNAME_CSWlibxaudevel = libxau_devel + SPKG_DESC_CSWlibxau = X11 authorisation library SPKG_DESC_CSWlibxaudevel = X11 authorisation library development package -DISTFILES += $(call admfiles,CSWlibxaudevel, ) -DISTFILES += $(call admfiles,CSWlibxau, ) - PKGFILES_CSWlibxaudevel = $(PKGFILES_DEVEL) -PKGFILES_CSWlibxaudevel += $(prefix)/X11/include/.* -PKGFILES_CSWlibxaudevel += $(prefix)/X11/lib/.*\.a -PKGFILES_CSWlibxaudevel += $(prefix)/X11/lib/pkgconfig/.* +BUILD64 = 1 +NOISALIST = 1 +CONFIGURE_ARGS = $(DIRPATHS) + include gar/category.mk - Modified: csw/mgar/pkg/x11/libXau/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/checksums 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/checksums 2009-04-29 19:53:31 UTC (rev 4607) @@ -1,3 +1 @@ 77c3de874155456c857b331063ad2fd9 download/libXau-1.0.4.tar.gz -03fd9250999932312a8f773cf5bc036d download/CSWlibxaudevel.gspec -4dba507bb4e471f3f15a039958063ee8 download/CSWlibxau.gspec Deleted: csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxau.gspec 2009-04-29 19:53:31 UTC (rev 4607) @@ -1,4 +0,0 @@ -%var bitname libxau -%var pkgname CSWlibxau -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec =================================================================== --- csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec 2009-04-29 19:52:49 UTC (rev 4606) +++ csw/mgar/pkg/x11/libXau/trunk/files/CSWlibxaudevel.gspec 2009-04-29 19:53:31 UTC (rev 4607) @@ -1,4 +0,0 @@ -%var bitname libxau_devel -%var pkgname CSWlibxaudevel -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Wed Apr 29 21:55:40 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Wed, 29 Apr 2009 19:55:40 +0000 Subject: [csw-devel] SF.net SVN: gar:[4608] csw/mgar/pkg Message-ID: Revision: 4608 http://gar.svn.sourceforge.net/gar/?rev=4608&view=rev Author: dmichelsen Date: 2009-04-29 19:55:40 +0000 (Wed, 29 Apr 2009) Log Message: ----------- xrender: Unify legacy tree to tag of new package Added Paths: ----------- csw/mgar/pkg/x11/xrender/tags/legacy/ Removed Paths: ------------- csw/mgar/pkg/libxrender/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Wed Apr 29 23:38:51 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Wed, 29 Apr 2009 21:38:51 +0000 Subject: [csw-devel] SF.net SVN: gar:[4609] csw/mgar/pkg/subversion/trunk/Makefile Message-ID: Revision: 4609 http://gar.svn.sourceforge.net/gar/?rev=4609&view=rev Author: valholla Date: 2009-04-29 21:38:51 +0000 (Wed, 29 Apr 2009) Log Message: ----------- archall for devel and fix catelog names for ap2 and pm Modified Paths: -------------- csw/mgar/pkg/subversion/trunk/Makefile Modified: csw/mgar/pkg/subversion/trunk/Makefile =================================================================== --- csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 19:55:40 UTC (rev 4608) +++ csw/mgar/pkg/subversion/trunk/Makefile 2009-04-29 21:38:51 UTC (rev 4609) @@ -30,6 +30,7 @@ PACKAGES = CSWsvn CSWsvn-devel CSWap2svn CSWpmsvn PACKAGES += CSWpysvn CSWrbsvn CSWjavasvn +ARCHALL_CSWsvn-devel = 1 SPKG_DESC_CSWsvn = Version control rethought CATALOGNAME_CSWsvn = subversion @@ -40,14 +41,14 @@ CATALOGNAME_CSWsvn-devel = subversion_devel REQUIRED_PKGS_CSWsvn-devel = CSWsvn SPKG_DESC_CSWap2svn = Subversion Modules for Apache 2 -CATALOGNAME_CSWap2svn = ap2svn +CATALOGNAME_CSWap2svn = ap2_subversion REQUIRED_PKGS_CSWap2svn = CSWsvn CSWggettextrt CSWiconv SPKG_DESC_CSWjavasvn = Subversion Java Language Binding CATALOGNAME_CSWjavasvn = javasvn REQUIRED_PKGS_CSWjavasvn = CSWsvn CSWapache2rt CSWneon CSWoldaprt REQUIRED_PKGS_CSWjavasvn += CSWbdb44 CSWexpat CSWggettextrt CSWiconv SPKG_DESC_CSWpmsvn = Subversion Perl Language Binding -CATALOGNAME_CSWpmsvn = pmsvn +CATALOGNAME_CSWpmsvn = pm_subversion REQUIRED_PKGS_CSWpmsvn = CSWsvn CSWperl CSWapache2rt CSWbdb44 CSWexpat REQUIRED_PKGS_CSWpmsvn += CSWggettextrt CSWiconv CSWoldaprt SPKG_DESC_CSWpysvn = Subversion Python Language Binding This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 02:22:46 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 00:22:46 +0000 Subject: [csw-devel] SF.net SVN: gar:[4610] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4610 http://gar.svn.sourceforge.net/gar/?rev=4610&view=rev Author: valholla Date: 2009-04-30 00:22:46 +0000 (Thu, 30 Apr 2009) Log Message: ----------- attempt to fix amd_merge Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-29 21:38:51 UTC (rev 4609) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 00:22:46 UTC (rev 4610) @@ -27,6 +27,7 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/i386) + $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/amd64) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 03:13:27 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 01:13:27 +0000 Subject: [csw-devel] SF.net SVN: gar:[4611] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4611 http://gar.svn.sourceforge.net/gar/?rev=4611&view=rev Author: valholla Date: 2009-04-30 01:13:27 +0000 (Thu, 30 Apr 2009) Log Message: ----------- another fix attempt Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 00:22:46 UTC (rev 4610) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 01:13:27 UTC (rev 4611) @@ -26,7 +26,7 @@ merge-i386-files: @echo "[===== Merging isa-i386 =====]" - $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v * $(PPREFIX)/bin/i386) + $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/amd64) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:26:07 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:26:07 +0000 Subject: [csw-devel] SF.net SVN: gar:[4612] csw/mgar/pkg/alpine/trunk/ Message-ID: Revision: 4612 http://gar.svn.sourceforge.net/gar/?rev=4612&view=rev Author: valholla Date: 2009-04-30 02:26:07 +0000 (Thu, 30 Apr 2009) Log Message: ----------- checkin Property Changed: ---------------- csw/mgar/pkg/alpine/trunk/ Property changes on: csw/mgar/pkg/alpine/trunk ___________________________________________________________________ Added: svn:ignore + work cookies download This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:27:00 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:27:00 +0000 Subject: [csw-devel] SF.net SVN: gar:[4613] csw/mgar/pkg/alpine/trunk/files/install_scripts.mk Message-ID: Revision: 4613 http://gar.svn.sourceforge.net/gar/?rev=4613&view=rev Author: valholla Date: 2009-04-30 02:26:59 +0000 (Thu, 30 Apr 2009) Log Message: ----------- custom install script Added Paths: ----------- csw/mgar/pkg/alpine/trunk/files/install_scripts.mk Added: csw/mgar/pkg/alpine/trunk/files/install_scripts.mk =================================================================== --- csw/mgar/pkg/alpine/trunk/files/install_scripts.mk (rev 0) +++ csw/mgar/pkg/alpine/trunk/files/install_scripts.mk 2009-04-30 02:26:59 UTC (rev 4613) @@ -0,0 +1,38 @@ +PI_SCRIPTS = cleanup-web +PI_SCRIPTS += install-mlock +PI_SCRIPTS += install-web + +post-install-modulated: $(PI_SCRIPTS) + + +install-mlock: + @(echo "==> Installing mlock") + (ginstall -d $(DESTDIR)$(sbindir)) + @(gcp $(WORKSRC)/imap/mlock/mlock $(DESTDIR)$(sbindir)) + @$(MAKECOOKIE) + +cleanup-web: + @(grm -fr $(DESTDIR)/home) + +install-web: + @(echo "==> Installing Web Interface") + @(ginstall -d $(DESTDIR)$(libexecdir)/alpine-2.00) + @(gcp -R $(WORKSRC)/web/* $(DESTDIR)$(libexecdir)/alpine-2.00) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_gssapi_proxy \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_tclsh \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_uidmapper \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/wp_umc \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(gcp $(WORKSRC)/web/src/pubcookie/debug.cgi \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin) + @(grm -fr $(DESTDIR)$(libexecdir)/alpine-2.00/src) + @(grm -f $(DESTDIR)$(libexecdir)/alpine-2.00/bin/tclsh) + @(gln -s $(bindir)/tclsh \ + $(DESTDIR)$(libexecdir)/alpine-2.00/bin/tclsh) + @(cd $(DESTDIR)$(libexecdir); gln -s ./alpine-2.00 ./alpine) + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:34:35 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:34:35 +0000 Subject: [csw-devel] SF.net SVN: gar:[4614] csw/mgar/pkg/alpine/trunk/Makefile Message-ID: Revision: 4614 http://gar.svn.sourceforge.net/gar/?rev=4614&view=rev Author: valholla Date: 2009-04-30 02:34:35 +0000 (Thu, 30 Apr 2009) Log Message: ----------- package checkin Modified Paths: -------------- csw/mgar/pkg/alpine/trunk/Makefile Modified: csw/mgar/pkg/alpine/trunk/Makefile =================================================================== --- csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:26:59 UTC (rev 4613) +++ csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:34:35 UTC (rev 4614) @@ -58,7 +58,7 @@ TEST_TARGET = check -REQUIRED_PKGS = CSWgcc3corert CSWggettextrt CSWiconv +REQUIRED_PKGS = CSWgcc4corert CSWggettextrt CSWiconv REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWaspell REQUIRED_PKGS += CSWoldaprt CSWosslrt CSWsasl CSWtcl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 04:43:08 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 02:43:08 +0000 Subject: [csw-devel] SF.net SVN: gar:[4615] csw/mgar/pkg/alpine/trunk/Makefile Message-ID: Revision: 4615 http://gar.svn.sourceforge.net/gar/?rev=4615&view=rev Author: valholla Date: 2009-04-30 02:43:08 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix depends Modified Paths: -------------- csw/mgar/pkg/alpine/trunk/Makefile Modified: csw/mgar/pkg/alpine/trunk/Makefile =================================================================== --- csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:34:35 UTC (rev 4614) +++ csw/mgar/pkg/alpine/trunk/Makefile 2009-04-30 02:43:08 UTC (rev 4615) @@ -58,9 +58,8 @@ TEST_TARGET = check -REQUIRED_PKGS = CSWgcc4corert CSWggettextrt CSWiconv -REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWaspell -REQUIRED_PKGS += CSWoldaprt CSWosslrt CSWsasl CSWtcl +REQUIRED_PKGS = CSWggettextrt CSWiconv CSWtcl CSWsasl CSWosslrt +REQUIRED_PKGS += CSWkrb5lib CSWlibnet CSWncurses CSWoldaprt include files/install_scripts.mk include gar/category.mk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 30 14:42:37 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 30 Apr 2009 12:42:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4616] csw/mgar/pkg/x11/libpthread-stubs/trunk Message-ID: Revision: 4616 http://gar.svn.sourceforge.net/gar/?rev=4616&view=rev Author: dmichelsen Date: 2009-04-30 12:42:37 +0000 (Thu, 30 Apr 2009) Log Message: ----------- x11/libpthread-stubs:Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec Modified: csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile 2009-04-30 02:43:08 UTC (rev 4615) +++ csw/mgar/pkg/x11/libpthread-stubs/trunk/Makefile 2009-04-30 12:42:37 UTC (rev 4616) @@ -8,15 +8,16 @@ endef MASTER_SITES = $(XCB_MASTER_SITES) -DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -DISTFILES += $(call admfiles,CSWlibpthreadstubs) +DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz +PACKAGES = CSWlibpthreadstubs + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -pre-install: - @ginstall -d $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME) - @gcp -fp $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)/COPYING $(WORKROOTDIR)/install-$(firstword $(MODULATIONS))$(datadir)/doc/$(GARNAME)/License.txt +BUILD64 = 1 +ARCHALL = 1 +CONFIGURE_ARGS = $(DIRPATHS) include gar/category.mk Modified: csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums 2009-04-30 02:43:08 UTC (rev 4615) +++ csw/mgar/pkg/x11/libpthread-stubs/trunk/checksums 2009-04-30 12:42:37 UTC (rev 4616) @@ -1,2 +1 @@ 5e3e75160ab6a8c212d0ecd82aa04651 download/libpthread-stubs-0.1.tar.gz -f5b34f077f7dfdb644340b71164c8c78 download/CSWlibpthreadstubs.gspec Deleted: csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec =================================================================== --- csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec 2009-04-30 02:43:08 UTC (rev 4615) +++ csw/mgar/pkg/x11/libpthread-stubs/trunk/files/CSWlibpthreadstubs.gspec 2009-04-30 12:42:37 UTC (rev 4616) @@ -1,7 +0,0 @@ -%var bitname libpthreadstubs -%var pkgname CSWlibpthreadstubs -%var arch all -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright - -Please see /opt/csw/share/doc/%{GARNAME}/License.txt for license information This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 30 14:53:26 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 30 Apr 2009 12:53:26 +0000 Subject: [csw-devel] SF.net SVN: gar:[4617] csw/mgar/pkg/x11/libxcb/trunk Message-ID: Revision: 4617 http://gar.svn.sourceforge.net/gar/?rev=4617&view=rev Author: dmichelsen Date: 2009-04-30 12:53:26 +0000 (Thu, 30 Apr 2009) Log Message: ----------- x11/libxcb: Update to dynamic gspec and license Modified Paths: -------------- csw/mgar/pkg/x11/libxcb/trunk/Makefile csw/mgar/pkg/x11/libxcb/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec Modified: csw/mgar/pkg/x11/libxcb/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:53:26 UTC (rev 4617) @@ -4,35 +4,37 @@ DESCRIPTION = The XCB library define BLURB -The XCB library provides an interface to the X Window System protocol, designed to replace the Xlib interface + The XCB library provides an interface to the X Window System protocol, + designed to replace the Xlib interface endef -MASTER_SITES =http://xcb.freedesktop.org/dist/ +MASTER_SITES = http://xcb.freedesktop.org/dist/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -PKGDIST = $(GARNAME)-$(GARVERSION).tar.gz +PREREQUISITE_PKGS = CSWlibxaudevel CSWlibpthreadstubs CSWdoxygen +REQUIRED_PKGS = CSWxcbproto CSWlibxau +PACKAGES = CSWlibxcb CSWlibxcbdevel CSWlibxcbdoc + # We define upstream file regex so we can be notifed of new upstream software release UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz -SPKG_DESC_CSWlibxcb = The XCB library +SPKG_DESC_CSWlibxcb = The XCB library SPKG_DESC_CSWlibxcbdevel = The XCB library development package -SPKG_DESC_CSWlibxcbdoc = The XCB library documentation +SPKG_DESC_CSWlibxcbdoc = The XCB library documentation -DISTFILES += $(call admfiles,CSWlibxcbdevel, ) -DISTFILES += $(call admfiles,CSWlibxcbdoc, ) -DISTFILES += $(call admfiles,CSWlibxcb, ) +CATALOGNAME_CSWlibxcb = libxcb +CATALOGNAME_CSWlibxcbdevel = libxcb_dev +CATALOGNAME_CSWlibxcbdoc = libxcb_doc -PKGFILES_CSWlibxcbdevel = $(PKGFILES_DEVEL) -PKGFILES_CSWlibxcbdevel += $(prefix)/X11/include/.* -PKGFILES_CSWlibxcbdevel += $(prefix)/X11/lib/.*\.a -PKGFILES_CSWlibxcbdevel += $(prefix)/X11/lib/pkgconfig/.* +PKGFILES_CSWlibxcbdevel = $(PKGFILES_DEVEL) +PKGFILES_CSWlibxcbdoc = $(PKGFILES_DOC) -PKGFILES_CSWlibxcbdoc += $(prefix)/X11/share/doc/.* - REQUIRED_PKGS_CSWlibxcbdevel = CSWlibxcb -REQUIRED_PKGS_CSWlibxcb = CSWlibxau CSWlibxdmcp +REQUIRED_PKGS_CSWlibxcb = CSWlibxau CSWlibxdmcp +BUILD64 = 1 +NOISALIST = 1 +CONFIGURE_ARGS = $(DIRPATHS) + include gar/category.mk - - Modified: csw/mgar/pkg/x11/libxcb/trunk/checksums =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/checksums 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/checksums 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +1 @@ 90e02378256d5dec96ddc6c7d72119b6 download/libxcb-1.1.tar.gz -5ea9d5ef0b88062e38c0987c0ef48806 download/CSWlibxcbdevel.gspec -78e2027279d9012eb201138cf565d92a download/CSWlibxcbdoc.gspec -3a12038cc886e84f7e7a1d93dbe98c3a download/CSWlibxcb.gspec Deleted: csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcb.gspec 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +0,0 @@ -%var bitname libxcb -%var pkgname CSWlibxcb -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdevel.gspec 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +0,0 @@ -%var bitname libxcb_dev -%var pkgname CSWlibxcbdev -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING Deleted: csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec 2009-04-30 12:42:37 UTC (rev 4616) +++ csw/mgar/pkg/x11/libxcb/trunk/files/CSWlibxcbdoc.gspec 2009-04-30 12:53:26 UTC (rev 4617) @@ -1,4 +0,0 @@ -%var bitname libxcb_doc -%var pkgname CSWlibxcbdoc -%include url file://%{PKGLIB}/csw_dyndepend.gspec -%copyright url file://%{WORKSRC_FIRSTMOD}/COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From dmichelsen at users.sourceforge.net Thu Apr 30 14:56:13 2009 From: dmichelsen at users.sourceforge.net (dmichelsen at users.sourceforge.net) Date: Thu, 30 Apr 2009 12:56:13 +0000 Subject: [csw-devel] SF.net SVN: gar:[4618] csw/mgar/pkg/x11/libxcb/trunk/Makefile Message-ID: Revision: 4618 http://gar.svn.sourceforge.net/gar/?rev=4618&view=rev Author: dmichelsen Date: 2009-04-30 12:56:13 +0000 (Thu, 30 Apr 2009) Log Message: ----------- x11/libxcb: Fix dependency Modified Paths: -------------- csw/mgar/pkg/x11/libxcb/trunk/Makefile Modified: csw/mgar/pkg/x11/libxcb/trunk/Makefile =================================================================== --- csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:53:26 UTC (rev 4617) +++ csw/mgar/pkg/x11/libxcb/trunk/Makefile 2009-04-30 12:56:13 UTC (rev 4618) @@ -12,7 +12,7 @@ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz PREREQUISITE_PKGS = CSWlibxaudevel CSWlibpthreadstubs CSWdoxygen -REQUIRED_PKGS = CSWxcbproto CSWlibxau +REQUIRED_PKGS_CSWlibxcb = CSWxcbproto CSWlibxau PACKAGES = CSWlibxcb CSWlibxcbdevel CSWlibxcbdoc # We define upstream file regex so we can be notifed of new upstream software release @@ -30,7 +30,7 @@ PKGFILES_CSWlibxcbdoc = $(PKGFILES_DOC) REQUIRED_PKGS_CSWlibxcbdevel = CSWlibxcb -REQUIRED_PKGS_CSWlibxcb = CSWlibxau CSWlibxdmcp +REQUIRED_PKGS_CSWlibxcb = CSWlibxau BUILD64 = 1 NOISALIST = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:00:06 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:00:06 +0000 Subject: [csw-devel] SF.net SVN: gar:[4619] csw/mgar/pkg/php5/trunk Message-ID: Revision: 4619 http://gar.svn.sourceforge.net/gar/?rev=4619&view=rev Author: valholla Date: 2009-04-30 15:00:05 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix apache modphp5 Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 12:56:13 UTC (rev 4618) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 15:00:05 UTC (rev 4619) @@ -85,9 +85,6 @@ SKIPTEST = 1 ENABLE_CHECK = 0 -# SAPI Specific Rules -STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec - # Rebuild Configure Args to build mod_php5 NEW_CONFIGURE_ARGS = $(shell echo $(CONFIGURE_ARGS) |sed -e 's/apxs2/apxs/' \ -e 's/apache2\/sbin\/apxs/apache\/bin\/apxs/') @@ -115,6 +112,14 @@ @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @( gfind $(DESTDIR)$(prefix)/apache* \ -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) + @(ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra) + @(ginstall -m 0644 \ + $(WORKDIR)/http-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache2/etc/extra) + @(ginstall -d $(DESTDIR)$(prefix)/apache/etc/extra) + @(ginstall -m 0644 \ + $(WORKDIR)/http-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache/etc/extra) @$(MAKECOOKIE) post-configure-modulated: Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-30 12:56:13 UTC (rev 4618) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache/Makefile 2009-04-30 15:00:05 UTC (rev 4619) @@ -7,6 +7,8 @@ REQUIRED_PKGS_CSWmodphp5 = CSWapache CSWiconv CSWexpat REQUIRED_PKGS_CSWmodphp5 += CSWlibxml2 CSWphp5 CSWzlib +STRIP_DIRS += $(DESTDIR)$(prefix)/apache/libexec + DISTFILES += CSWmodphp5.postinstall CSWmodphp5.preremove CSWmodphp5.space PKGFILES_CSWmodphp5 = .*/csw/apache/.* Modified: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-30 12:56:13 UTC (rev 4618) +++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/Makefile 2009-04-30 15:00:05 UTC (rev 4619) @@ -10,6 +10,8 @@ DISTFILES += CSWap2modphp5.preremove httpd-php5.conf.CSW DISTFILES += CSWap2modphp5.postinstall CSWap2modphp5.space +STRIP_DIRS += $(DESTDIR)$(prefix)/apache2/libexec + CONFIGURE_ARGS += --with-apxs2=$(prefix)/apache2/sbin/apxs PKGFILES_CSWap2modphp5 = .*/csw/apache2/.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:33:19 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:33:19 +0000 Subject: [csw-devel] SF.net SVN: gar:[4620] csw/mgar/pkg/gcc4/trunk Message-ID: Revision: 4620 http://gar.svn.sourceforge.net/gar/?rev=4620&view=rev Author: valholla Date: 2009-04-30 15:33:19 +0000 (Thu, 30 Apr 2009) Log Message: ----------- add new target to amd_merge.mk Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/Makefile csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/Makefile =================================================================== --- csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-30 15:00:05 UTC (rev 4619) +++ csw/mgar/pkg/gcc4/trunk/Makefile 2009-04-30 15:33:19 UTC (rev 4620) @@ -38,11 +38,9 @@ CONFIGURE_ARGS += --enable-languages=ada,c,c++,fortran,java,objc ## For cleanliness I split the Configuration into separate files -#include files/amd_merge.mk include files/gar_override.mk include files/package_def.mk include files/pkg_scripts.mk include files/package_files.mk include files/amd_merge.mk -## include mGar definitions include gar/category.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:00:05 UTC (rev 4619) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:33:19 UTC (rev 4620) @@ -12,6 +12,7 @@ PPREFIX = $(PKGROOT)/$(MPREFIX) AMD_MERGE_TARGETS = merge-dirs-amd +AMD_MERGE_TARGETS += merge-fix-links AMD_MERGE_TARGETS += merge-i386-files AMD_MERGE_TARGETS += merge-amd64-files @@ -24,10 +25,36 @@ $(_DBG)(ginstall -d $(PPREFIX)/bin/i386) $(_DBG)$(MAKECOOKIE) +## Remove the Hard Links and re-create as files +merge-fix-links: + @echo "[===== Merging Fixing Hard Links =====]" + $(_DBG)(cd $(IPREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) + $(_DBG)(cd $(IPREFIX)/bin; \ + gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + $(_DBG)(cd $(IPREFIX)/bin; \ + gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) + $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + $(_DBG)(cd $(APREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) + $(_DBG)(cd $(APREFIX)/bin; \ + gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + $(_DBG)(cd $(APREFIX)/bin; \ + gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + $(_DBG)$(MAKECOOKIE) + merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) - $(_DBG)(cd $(IPREFIX)/bin; /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/amd64) + $(_DBG)(cd $(IPREFIX)/bin; \ + /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/i386) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:35:58 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:35:58 +0000 Subject: [csw-devel] SF.net SVN: gar:[4621] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4621 http://gar.svn.sourceforge.net/gar/?rev=4621&view=rev Author: valholla Date: 2009-04-30 15:35:58 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix typos Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:33:19 UTC (rev 4620) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:35:58 UTC (rev 4621) @@ -40,14 +40,14 @@ $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) $(_DBG)(cd $(APREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + gcp sparc-sun-solaris2.10-gcc-4.3.3 sparc-sun-solaris2.10-gcc) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcc-4.3.3 gcc) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + gcp sparc-sun-solaris2.10-g++ sparc-sun-solaris2.10-c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ g++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ c++) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcj gcj) + $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gfortran gfortran) $(_DBG)$(MAKECOOKIE) merge-i386-files: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 17:54:50 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 15:54:50 +0000 Subject: [csw-devel] SF.net SVN: gar:[4622] csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Message-ID: Revision: 4622 http://gar.svn.sourceforge.net/gar/?rev=4622&view=rev Author: valholla Date: 2009-04-30 15:54:50 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix isaexec Modified Paths: -------------- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk Modified: csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk =================================================================== --- csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:35:58 UTC (rev 4621) +++ csw/mgar/pkg/gcc4/trunk/files/amd_merge.mk 2009-04-30 15:54:50 UTC (rev 4622) @@ -1,3 +1,4 @@ +AMD_DEBUG = 1 ifeq ($(AMD_DEBUG),) _DBG=@ else @@ -30,31 +31,30 @@ @echo "[===== Merging Fixing Hard Links =====]" $(_DBG)(cd $(IPREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) $(_DBG)(cd $(IPREFIX)/bin; \ - gcp sparc-sun-solaris2.8-gcc-4.3.3 sparc-sun-solaris2.8-gcc) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcc-4.3.3 gcc) + gcp i386-pc-solaris2.8-gcc-4.3.3 i386-pc-solaris2.8-gcc) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-gcc-4.3.3 gcc) $(_DBG)(cd $(IPREFIX)/bin; \ - gcp sparc-sun-solaris2.8-g++ sparc-sun-solaris2.8-c++) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ g++) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-g++ c++) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gcj gcj) - $(_DBG)(cd $(IPREFIX)/bin; gcp sparc-sun-solaris2.8-gfortran gfortran) + gcp i386-pc-solaris2.8-g++ i386-pc-solaris2.8-c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-g++ g++) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-g++ c++) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-gcj gcj) + $(_DBG)(cd $(IPREFIX)/bin; gcp i386-pc-solaris2.8-gfortran gfortran) $(_DBG)(cd $(APREFIX)/bin; grm -f *gcc *c++ g++ gcj gfortran) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.10-gcc-4.3.3 sparc-sun-solaris2.10-gcc) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcc-4.3.3 gcc) + gcp i386-pc-solaris2.10-gcc-4.3.3 i386-pc-solaris2.10-gcc) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-gcc-4.3.3 gcc) $(_DBG)(cd $(APREFIX)/bin; \ - gcp sparc-sun-solaris2.10-g++ sparc-sun-solaris2.10-c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ g++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-g++ c++) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gcj gcj) - $(_DBG)(cd $(APREFIX)/bin; gcp sparc-sun-solaris2.10-gfortran gfortran) + gcp i386-pc-solaris2.10-g++ i386-pc-solaris2.10-c++) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-g++ g++) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-g++ c++) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-gcj gcj) + $(_DBG)(cd $(APREFIX)/bin; gcp i386-pc-solaris2.10-gfortran gfortran) $(_DBG)$(MAKECOOKIE) merge-i386-files: @echo "[===== Merging isa-i386 =====]" $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/bin $(PKGROOT)) - $(_DBG)(cd $(IPREFIX)/bin; \ - /usr/bin/pax -rw -v *solaris2* $(PPREFIX)/bin/i386) + $(_DBG)(cd $(PPREFIX)/bin; gmv *solaris2* $(PPREFIX)/bin/i386) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/include $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/info $(PKGROOT)) $(_DBG)(cd $(I386_BASE); /usr/bin/pax -rw -v $(MPREFIX)/man $(PKGROOT)) @@ -73,48 +73,46 @@ $(_DBG)$(MAKECOOKIE) ifeq ($(shell uname -p), i386) -EXTRA_PKGFILES_CSWgcc4core = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcc -EXTRA_PKGFILES_CSWgcc4core += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/cpp - -EXTRA_PKGFILES_CSWgcc4g++ = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/c++ -EXTRA_PKGFILES_CSWgcc4g++ += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/g++ - -EXTRA_PKGFILES_CSWgcc4gfortran = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gfortran - -EXTRA_PKGFILES_CSWgcc4java = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcov -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gccbug -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/addr2name.awk -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gc-analyze -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcjh -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjarsigner -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmic -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjavah -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmid -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jcf-dump -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gkeytool -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/grmiregistry -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/jv-convert -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gij -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnative2ascii -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gserialver -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gappletviewer -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gcj-dbtool -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gjar -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gorbd -EXTRA_PKGFILES_CSWgcc4java += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gtnameserv - -EXTRA_PKGFILES_CSWgcc4ada = l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnat -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbind -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatbl -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatchop -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatclean -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatfind -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatkr -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatlink -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatls -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatmake -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatname -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatprep -EXTRA_PKGFILES_CSWgcc4ada += l none /opt/csw/bin/isaexec=/opt/csw/gcc4/bin/gnatxref +ISAEXEC_DIRS = /opt/csw/gcc4/bin +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcc +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcov +ISAEXEC_FILES += /opt/csw/gcc4/bin/gccbug +ISAEXEC_FILES += /opt/csw/gcc4/bin/gfortran +ISAEXEC_FILES += /opt/csw/gcc4/bin/c++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/g++ +ISAEXEC_FILES += /opt/csw/gcc4/bin/cpp +ISAEXEC_FILES += /opt/csw/gcc4/bin/addr2name.awk +ISAEXEC_FILES += /opt/csw/gcc4/bin/gc-analyze +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcjh +ISAEXEC_FILES += /opt/csw/gcc4/bin/gjarsigner +ISAEXEC_FILES += /opt/csw/gcc4/bin/grmic +ISAEXEC_FILES += /opt/csw/gcc4/bin/gjavah +ISAEXEC_FILES += /opt/csw/gcc4/bin/grmid +ISAEXEC_FILES += /opt/csw/gcc4/bin/jcf-dump +ISAEXEC_FILES += /opt/csw/gcc4/bin/gkeytool +ISAEXEC_FILES += /opt/csw/gcc4/bin/grmiregistry +ISAEXEC_FILES += /opt/csw/gcc4/bin/jv-convert +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj +ISAEXEC_FILES += /opt/csw/gcc4/bin/gij +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii +ISAEXEC_FILES += /opt/csw/gcc4/bin/gserialver +ISAEXEC_FILES += /opt/csw/gcc4/bin/gappletviewer +ISAEXEC_FILES += /opt/csw/gcc4/bin/gcj-dbtool +ISAEXEC_FILES += /opt/csw/gcc4/bin/gjar +ISAEXEC_FILES += /opt/csw/gcc4/bin/gorbd +ISAEXEC_FILES += /opt/csw/gcc4/bin/gtnameserv +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnat +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatbl +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatchop +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatclean +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatfind +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnative2ascii +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatkr +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatlink +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatls +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatmake +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatname +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatprep +ISAEXEC_FILES += /opt/csw/gcc4/bin/gnatxref endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 20:18:33 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 18:18:33 +0000 Subject: [csw-devel] SF.net SVN: gar:[4623] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4623 http://gar.svn.sourceforge.net/gar/?rev=4623&view=rev Author: valholla Date: 2009-04-30 18:18:33 +0000 (Thu, 30 Apr 2009) Log Message: ----------- fix typo Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 15:54:50 UTC (rev 4622) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 18:18:33 UTC (rev 4623) @@ -102,6 +102,10 @@ ginstall -m 0644 \ $(WORKDIR)/pear.conf.CSW \ $(DESTDIR)$(prefix)/php5/etc + ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra + ginstall -m 0644 \ + $(WORKDIR)/httpd-php5.conf.CSW \ + $(DESTDIR)$(prefix)/apache2/etc/extra @(grm -fr $(DESTDIR)/.[a-z]*) @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) @( echo " ==> Now Building mod_php5 <==" ) @@ -112,14 +116,6 @@ @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @( gfind $(DESTDIR)$(prefix)/apache* \ -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) - @(ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra) - @(ginstall -m 0644 \ - $(WORKDIR)/http-php5.conf.CSW \ - $(DESTDIR)$(prefix)/apache2/etc/extra) - @(ginstall -d $(DESTDIR)$(prefix)/apache/etc/extra) - @(ginstall -m 0644 \ - $(WORKDIR)/http-php5.conf.CSW \ - $(DESTDIR)$(prefix)/apache/etc/extra) @$(MAKECOOKIE) post-configure-modulated: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From valholla at users.sourceforge.net Thu Apr 30 21:39:37 2009 From: valholla at users.sourceforge.net (valholla at users.sourceforge.net) Date: Thu, 30 Apr 2009 19:39:37 +0000 Subject: [csw-devel] SF.net SVN: gar:[4624] csw/mgar/pkg/php5/trunk/Makefile Message-ID: Revision: 4624 http://gar.svn.sourceforge.net/gar/?rev=4624&view=rev Author: valholla Date: 2009-04-30 19:39:37 +0000 (Thu, 30 Apr 2009) Log Message: ----------- redo post-install Modified Paths: -------------- csw/mgar/pkg/php5/trunk/Makefile Modified: csw/mgar/pkg/php5/trunk/Makefile =================================================================== --- csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 18:18:33 UTC (rev 4623) +++ csw/mgar/pkg/php5/trunk/Makefile 2009-04-30 19:39:37 UTC (rev 4624) @@ -91,31 +91,35 @@ # Copy over template config files and utility scripts -post-install-modulated: - ginstall -m 0755 \ - $(WORKDIR)/phpext \ - $(DESTDIR)$(prefix)/php5/bin - gsed -i -e s,PHPEXTDIR,$(shell $(DESTDIR)$(prefix)/php5/bin/php-config --extension-dir), $(WORKDIR)/php.ini.CSW - ginstall -m 0644 \ - $(WORKDIR)/php.ini.CSW \ - $(DESTDIR)$(prefix)/php5/lib - ginstall -m 0644 \ - $(WORKDIR)/pear.conf.CSW \ - $(DESTDIR)$(prefix)/php5/etc +PI_SCRIPTS = install-extras +PI_SCRIPTS += install-modphp5 + +post-install-modulated: $(PI_SCRIPTS) + @$(MAKECOOKIE) + +install-extras: + ginstall -m 0755 $(WORKDIR)/phpext $(DESTDIR)$(prefix)/php5/bin + gsed -i -e s,PHPEXTDIR,$(shell $(PHP5ROOT)/bin/php-config --extension-dir),\ + $(WORKDIR)/php.ini.CSW + ginstall -m 0644 $(WORKDIR)/php.ini.CSW $(DESTDIR)$(prefix)/php5/lib + ginstall -m 0644 $(WORKDIR)/pear.conf.CSW $(DESTDIR)$(prefix)/php5/etc ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra - ginstall -m 0644 \ - $(WORKDIR)/httpd-php5.conf.CSW \ + ginstall -m 0644 $(WORKDIR)/httpd-php5.conf.CSW \ $(DESTDIR)$(prefix)/apache2/etc/extra @(grm -fr $(DESTDIR)/.[a-z]*) @(gfind $(PHP5ROOT)/lib -name "*.a" -exec grm {} \;) + @$(MAKECOOKIE) + +install-modphp5: @( echo " ==> Now Building mod_php5 <==" ) @( if [ -f $(WORKSRC)/Makefile ]; then \ - $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi) - cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) + $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi ) + @( cd $(WORKSRC) && $(BUILD_ENV) ./configure $(NEW_CONFIGURE_ARGS) ) + @( $(DOWNLOADDIR)/fixme.sh $(WORKSRC) ) @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi ) @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so ) @( gfind $(DESTDIR)$(prefix)/apache* \ - -mindepth 1 -type d | grep -v libexec | xargs grm -fr ) + -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr ) @$(MAKECOOKIE) post-configure-modulated: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.