# HG changeset patch # User Norm Jacobs # Date 1283443642 18000 # Node ID 280a7444e782061dffe44e0cda4200d3d4556896 # Parent 90e0c3ea328132de1962ebfa3168125910ae304a automatically generate intercomponent dependencies for build ordering automatically generate component requirements for build environment construction add missing component dependencies add libmng for dependency validation diff -r 90e0c3ea3281 -r 280a7444e782 components/Makefile --- a/components/Makefile Wed Aug 25 11:58:58 2010 -0700 +++ b/components/Makefile Thu Sep 02 11:07:22 2010 -0500 @@ -28,7 +28,16 @@ # level build, it may make different decisions and will need to include # appropriate dependency information. -COMPONENT_DIRS = $(shell echo */Makefile | sed -e 's;/Makefile;;g') +# components.mk is auto-generated by the build tools. It populates the +# COMPONENT_DIRS macro with a list of all directories in the workspace that +# contain a component. +components.mk: Makefile # $(WS_TOP)/components + @echo "Generating component list..." + @$(TOOLS)/bass-o-matic.py --workspace=$(WS_TOP) --components=paths \ + | sed -e 's;^$(shell pwd)/;COMPONENT_DIRS += ;g' >$@ + +include components.mk + download: TARGET = download prep: TARGET = prep @@ -38,7 +47,7 @@ validate: TARGET = validate clean: TARGET = clean clobber: TARGET = clobber -prep build install publish: LOG = >$(WS_LOGS)/$(TARGET):$@.log 2>&1 +prep build install publish: LOG = >$(WS_LOGS)/$(TARGET):$@.log 2>&1 .DEFAULT: publish @@ -50,6 +59,7 @@ ifeq ($(findstring file://, $(PKG_REPO)),file://) $(RM) -r $(PKG_REPO:file://%=%) $(WS_LOGS) endif + $(RM) components.mk depends.mk setup: $(WS_LOGS) repo tools @@ -63,8 +73,15 @@ tools: @cd ../tools ; echo "building tools..." ; $(GMAKE) setup -$(COMPONENT_DIRS): FORCE - @cd $@ ; echo "$(TARGET) \c" ; pwd ; \ - $(GMAKE) $(TARGET) $(LOG) +$(COMPONENT_DIRS): setup FORCE + @cd $@ ; echo "$(TARGET) $@" ; $(GMAKE) $(TARGET) $(LOG) + +# depends.mk is auto-generated by the build tools, bass-o-matic.py in particular +depends.mk: components.mk + @echo "Generating component dependencies..." + @$(TOOLS)/bass-o-matic.py --workspace=$(WS_TOP) --components=depend \ + | sed -e 's;$(shell pwd)/;;g' >$@ + +include depends.mk FORCE: diff -r 90e0c3ea3281 -r 280a7444e782 components/bind/Makefile --- a/components/bind/Makefile Wed Aug 25 11:58:58 2010 -0700 +++ b/components/bind/Makefile Thu Sep 02 11:07:22 2010 -0500 @@ -22,8 +22,6 @@ # include ../../make-rules/shared-macros.mk -PATH=/usr/bin:/usr/gnu/bin - COMPONENT_NAME= bind COMPONENT_VERSION= 9.7.0-P2 IPS_PKG_NAME = network/dns/bind @@ -77,3 +75,136 @@ install: $(INSTALL_32_and_64) BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) + +REQUIRED_TOOL += /sbin/uname +REQUIRED_TOOL += /usr/bin/ar +REQUIRED_TOOL += /usr/bin/arch +REQUIRED_TOOL += /usr/bin/basename +REQUIRED_TOOL += /usr/bin/bash +REQUIRED_TOOL += /usr/bin/chmod +REQUIRED_TOOL += /usr/bin/cp +REQUIRED_TOOL += /usr/bin/diff +REQUIRED_TOOL += /usr/bin/dirname +REQUIRED_TOOL += /usr/bin/echo +REQUIRED_TOOL += /usr/bin/env +REQUIRED_TOOL += /usr/bin/expr +REQUIRED_TOOL += /usr/bin/find +REQUIRED_TOOL += /usr/bin/getconf +REQUIRED_TOOL += /usr/bin/ggrep +REQUIRED_TOOL += /usr/bin/gmake +REQUIRED_TOOL += /usr/bin/grep +REQUIRED_TOOL += /usr/bin/gsed +REQUIRED_TOOL += /usr/bin/gtar +REQUIRED_TOOL += /usr/bin/gzip +REQUIRED_TOOL += /usr/bin/hostname +REQUIRED_TOOL += /usr/bin/ksh93 +REQUIRED_TOOL += /usr/bin/ld +REQUIRED_TOOL += /usr/bin/ln +REQUIRED_TOOL += /usr/bin/ls +REQUIRED_TOOL += /usr/bin/make +REQUIRED_TOOL += /usr/bin/mkdir +REQUIRED_TOOL += /usr/bin/mv +REQUIRED_TOOL += /usr/bin/nm +REQUIRED_TOOL += /usr/bin/ranlib +REQUIRED_TOOL += /usr/bin/rm +REQUIRED_TOOL += /usr/bin/rmdir +REQUIRED_TOOL += /usr/bin/sed +REQUIRED_TOOL += /usr/bin/sort +REQUIRED_TOOL += /usr/bin/strip +REQUIRED_TOOL += /usr/bin/touch +REQUIRED_TOOL += /usr/bin/tr +REQUIRED_TOOL += /usr/bin/xml2-config +REQUIRED_TOOL += /usr/gnu/bin/as +REQUIRED_TOOL += /usr/gnu/bin/echo +REQUIRED_TOOL += /usr/gnu/bin/etags +REQUIRED_TOOL += $(SPRO_ROOT)/bin/cc +REQUIRED_TOOL += $(SPRO_ROOT)/bin/CC + +REQUIRED_FILE += /lib/$(MACH64)/libc.so +REQUIRED_FILE += /lib/$(MACH64)/libcrypto.so +REQUIRED_FILE += /lib/$(MACH64)/libm.so +REQUIRED_FILE += /lib/$(MACH64)/libnsl.so +REQUIRED_FILE += /lib/$(MACH64)/libpthread.so +REQUIRED_FILE += /lib/$(MACH64)/libscf.so +REQUIRED_FILE += /lib/$(MACH64)/libsocket.so +REQUIRED_FILE += /lib/$(MACH64)/libthread.so +REQUIRED_FILE += /lib/$(MACH64)/libxml2.so +REQUIRED_FILE += /lib/$(MACH64)/libz.so +REQUIRED_FILE += /lib/libc.so +REQUIRED_FILE += /lib/libcrypto.so +REQUIRED_FILE += /lib/libm.so +REQUIRED_FILE += /lib/libnsl.so +REQUIRED_FILE += /lib/libpthread.so +REQUIRED_FILE += /lib/libscf.so +REQUIRED_FILE += /lib/libsocket.so +REQUIRED_FILE += /lib/libthread.so +REQUIRED_FILE += /lib/libxml2.so +REQUIRED_FILE += /lib/libz.so +REQUIRED_FILE += /usr/include/arpa/inet.h +REQUIRED_FILE += /usr/include/assert.h +REQUIRED_FILE += /usr/include/ctype.h +REQUIRED_FILE += /usr/include/dirent.h +REQUIRED_FILE += /usr/include/dlfcn.h +REQUIRED_FILE += /usr/include/errno.h +REQUIRED_FILE += /usr/include/execinfo.h +REQUIRED_FILE += /usr/include/fcntl.h +REQUIRED_FILE += /usr/include/float.h +REQUIRED_FILE += /usr/include/grp.h +REQUIRED_FILE += /usr/include/iconv.h +REQUIRED_FILE += /usr/include/inttypes.h +REQUIRED_FILE += /usr/include/libgen.h +REQUIRED_FILE += /usr/include/libintl.h +REQUIRED_FILE += /usr/include/libscf.h +REQUIRED_FILE += /usr/include/libxml2/libxml/encoding.h +REQUIRED_FILE += /usr/include/libxml2/libxml/xmlwriter.h +REQUIRED_FILE += /usr/include/limits.h +REQUIRED_FILE += /usr/include/locale.h +REQUIRED_FILE += /usr/include/memory.h +REQUIRED_FILE += /usr/include/net/if_dl.h +REQUIRED_FILE += /usr/include/net/if.h +REQUIRED_FILE += /usr/include/netdb.h +REQUIRED_FILE += /usr/include/netinet/in.h +REQUIRED_FILE += /usr/include/nl_types.h +REQUIRED_FILE += /usr/include/openssl/bn.h +REQUIRED_FILE += /usr/include/openssl/conf.h +REQUIRED_FILE += /usr/include/openssl/crypto.h +REQUIRED_FILE += /usr/include/openssl/dh.h +REQUIRED_FILE += /usr/include/openssl/dsa.h +REQUIRED_FILE += /usr/include/openssl/e_os2.h +REQUIRED_FILE += /usr/include/openssl/engine.h +REQUIRED_FILE += /usr/include/openssl/err.h +REQUIRED_FILE += /usr/include/openssl/evp.h +REQUIRED_FILE += /usr/include/openssl/objects.h +REQUIRED_FILE += /usr/include/openssl/opensslv.h +REQUIRED_FILE += /usr/include/openssl/rand.h +REQUIRED_FILE += /usr/include/openssl/rsa.h +REQUIRED_FILE += /usr/include/openssl/x509.h +REQUIRED_FILE += /usr/include/pthread.h +REQUIRED_FILE += /usr/include/pwd.h +REQUIRED_FILE += /usr/include/regex.h +REQUIRED_FILE += /usr/include/signal.h +REQUIRED_FILE += /usr/include/stdarg.h +REQUIRED_FILE += /usr/include/stddef.h +REQUIRED_FILE += /usr/include/stdint.h +REQUIRED_FILE += /usr/include/stdio.h +REQUIRED_FILE += /usr/include/stdlib.h +REQUIRED_FILE += /usr/include/string.h +REQUIRED_FILE += /usr/include/strings.h +REQUIRED_FILE += /usr/include/sys/ioctl.h +REQUIRED_FILE += /usr/include/sys/param.h +REQUIRED_FILE += /usr/include/sys/resource.h +REQUIRED_FILE += /usr/include/sys/select.h +REQUIRED_FILE += /usr/include/sys/socket.h +REQUIRED_FILE += /usr/include/sys/sockio.h +REQUIRED_FILE += /usr/include/sys/stat.h +REQUIRED_FILE += /usr/include/sys/time.h +REQUIRED_FILE += /usr/include/sys/types.h +REQUIRED_FILE += /usr/include/sys/uio.h +REQUIRED_FILE += /usr/include/sys/un.h +REQUIRED_FILE += /usr/include/sys/wait.h +REQUIRED_FILE += /usr/include/syslog.h +REQUIRED_FILE += /usr/include/termios.h +REQUIRED_FILE += /usr/include/time.h +REQUIRED_FILE += /usr/include/unistd.h + +include ../../make-rules/depend.mk diff -r 90e0c3ea3281 -r 280a7444e782 components/file/Makefile --- a/components/file/Makefile Wed Aug 25 11:58:58 2010 -0700 +++ b/components/file/Makefile Thu Sep 02 11:07:22 2010 -0500 @@ -22,8 +22,6 @@ # include ../../make-rules/shared-macros.mk -PATH=/usr/bin:/usr/gnu/bin - COMPONENT_NAME= file COMPONENT_VERSION= 5.0.4 IPS_PKG_NAME= file/file @@ -47,4 +45,96 @@ install: $(INSTALL_32_and_64) -BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) +REQUIRED_TOOL += /sbin/uname +REQUIRED_TOOL += /usr/bin/aclocal-1.10 +REQUIRED_TOOL += /usr/bin/ar +REQUIRED_TOOL += /usr/bin/arch +REQUIRED_TOOL += /usr/bin/autoconf +REQUIRED_TOOL += /usr/bin/autoheader +REQUIRED_TOOL += /usr/bin/autom4te +REQUIRED_TOOL += /usr/bin/automake-1.10 +REQUIRED_TOOL += /usr/bin/basename +REQUIRED_TOOL += /usr/bin/bash +REQUIRED_TOOL += /usr/bin/chmod +REQUIRED_TOOL += /usr/bin/cp +REQUIRED_TOOL += /usr/bin/diff +REQUIRED_TOOL += /usr/bin/dirname +REQUIRED_TOOL += /usr/bin/echo +REQUIRED_TOOL += /usr/bin/env +REQUIRED_TOOL += /usr/bin/expr +REQUIRED_TOOL += /usr/bin/find +REQUIRED_TOOL += /usr/bin/gawk +REQUIRED_TOOL += /usr/bin/getconf +REQUIRED_TOOL += /usr/bin/ggrep +REQUIRED_TOOL += /usr/bin/ginstall +REQUIRED_TOOL += /usr/bin/gmake +REQUIRED_TOOL += /usr/bin/grep +REQUIRED_TOOL += /usr/bin/gsed +REQUIRED_TOOL += /usr/bin/gpatch +REQUIRED_TOOL += /usr/bin/gtar +REQUIRED_TOOL += /usr/bin/gzip +REQUIRED_TOOL += /usr/bin/hostname +REQUIRED_TOOL += /usr/bin/ksh93 +REQUIRED_TOOL += /usr/bin/ld +REQUIRED_TOOL += /usr/bin/ln +REQUIRED_TOOL += /usr/bin/ls +REQUIRED_TOOL += /usr/bin/make +REQUIRED_TOOL += /usr/bin/mkdir +REQUIRED_TOOL += /usr/bin/mv +REQUIRED_TOOL += /usr/bin/nm +REQUIRED_TOOL += /usr/bin/ranlib +REQUIRED_TOOL += /usr/bin/rm +REQUIRED_TOOL += /usr/bin/rmdir +REQUIRED_TOOL += /usr/bin/sed +REQUIRED_TOOL += /usr/bin/sort +REQUIRED_TOOL += /usr/bin/strip +REQUIRED_TOOL += /usr/bin/touch +REQUIRED_TOOL += /usr/bin/tr +REQUIRED_TOOL += /usr/gnu/bin/as +REQUIRED_TOOL += /usr/gnu/bin/echo +REQUIRED_TOOL += /usr/gnu/bin/m4 +REQUIRED_TOOL += /usr/gnu/bin/mkdir +REQUIRED_TOOL += $(SPRO_ROOT)/bin/cc +REQUIRED_TOOL += $(SPRO_ROOT)/bin/CC + +REQUIRED_FILE += /lib/$(MACH64)/libc.so +REQUIRED_FILE += /lib/$(MACH64)/libm.so +REQUIRED_FILE += /lib/$(MACH64)/libz.so +REQUIRED_FILE += /lib/libc.so +REQUIRED_FILE += /lib/libm.so +REQUIRED_FILE += /lib/libz.so +REQUIRED_FILE += /usr/include/assert.h +REQUIRED_FILE += /usr/include/ctype.h +REQUIRED_FILE += /usr/include/dirent.h +REQUIRED_FILE += /usr/include/err.h +REQUIRED_FILE += /usr/include/errno.h +REQUIRED_FILE += /usr/include/fcntl.h +REQUIRED_FILE += /usr/include/getopt.h +REQUIRED_FILE += /usr/include/limits.h +REQUIRED_FILE += /usr/include/locale.h +REQUIRED_FILE += /usr/include/memory.h +REQUIRED_FILE += /usr/include/regex.h +REQUIRED_FILE += /usr/include/stdarg.h +REQUIRED_FILE += /usr/include/stddef.h +REQUIRED_FILE += /usr/include/stdint.h +REQUIRED_FILE += /usr/include/stdio.h +REQUIRED_FILE += /usr/include/stdlib.h +REQUIRED_FILE += /usr/include/string.h +REQUIRED_FILE += /usr/include/sys/dirent.h +REQUIRED_FILE += /usr/include/sys/ioctl.h +REQUIRED_FILE += /usr/include/sys/mkdev.h +REQUIRED_FILE += /usr/include/sys/mman.h +REQUIRED_FILE += /usr/include/sys/param.h +REQUIRED_FILE += /usr/include/sys/stat.h +REQUIRED_FILE += /usr/include/sys/time.h +REQUIRED_FILE += /usr/include/sys/types.h +REQUIRED_FILE += /usr/include/sys/utime.h +REQUIRED_FILE += /usr/include/sys/wait.h +REQUIRED_FILE += /usr/include/time.h +REQUIRED_FILE += /usr/include/unistd.h +REQUIRED_FILE += /usr/include/utime.h +REQUIRED_FILE += /usr/include/wchar.h +REQUIRED_FILE += /usr/include/wctype.h +REQUIRED_FILE += /usr/include/zlib.h + +include ../../make-rules/depend.mk diff -r 90e0c3ea3281 -r 280a7444e782 components/lcms/Makefile --- a/components/lcms/Makefile Wed Aug 25 11:58:58 2010 -0700 +++ b/components/lcms/Makefile Thu Sep 02 11:07:22 2010 -0500 @@ -22,8 +22,6 @@ # include ../../make-rules/shared-macros.mk -PATH=/usr/bin:/usr/gnu/bin - COMPONENT_NAME= lcms COMPONENT_VERSION= 1.19 IPS_PKG_NAME= library/lcms @@ -39,6 +37,9 @@ include ../../make-rules/configure.mk include ../../make-rules/ips.mk +CONFIGURE_OPTIONS += --disable-static +CONFIGURE_OPTIONS += --includedir=/usr/include/lcms + PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/archive-libraries-drop PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/libtool-drop @@ -51,3 +52,82 @@ install: $(INSTALL_32_and_64) BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) + + +REQUIRED_TOOL += /sbin/uname +REQUIRED_TOOL += /usr/bin/arch +REQUIRED_TOOL += /usr/bin/basename +REQUIRED_TOOL += /usr/bin/bash +REQUIRED_TOOL += /usr/bin/chmod +REQUIRED_TOOL += /usr/bin/cp +REQUIRED_TOOL += /usr/bin/diff +REQUIRED_TOOL += /usr/bin/dirname +REQUIRED_TOOL += /usr/bin/echo +REQUIRED_TOOL += /usr/bin/env +REQUIRED_TOOL += /usr/bin/expr +REQUIRED_TOOL += /usr/bin/find +REQUIRED_TOOL += /usr/bin/ggrep +REQUIRED_TOOL += /usr/bin/gmake +REQUIRED_TOOL += /usr/bin/grep +REQUIRED_TOOL += /usr/bin/gsed +REQUIRED_TOOL += /usr/bin/gtar +REQUIRED_TOOL += /usr/bin/gzip +REQUIRED_TOOL += /usr/bin/hostname +REQUIRED_TOOL += /usr/bin/ksh93 +REQUIRED_TOOL += /usr/bin/ld +REQUIRED_TOOL += /usr/bin/ln +REQUIRED_TOOL += /usr/bin/ls +REQUIRED_TOOL += /usr/bin/make +REQUIRED_TOOL += /usr/bin/mkdir +REQUIRED_TOOL += /usr/bin/mv +REQUIRED_TOOL += /usr/bin/nm +REQUIRED_TOOL += /usr/bin/rm +REQUIRED_TOOL += /usr/bin/rmdir +REQUIRED_TOOL += /usr/bin/sed +REQUIRED_TOOL += /usr/bin/sort +REQUIRED_TOOL += /usr/bin/strip +REQUIRED_TOOL += /usr/bin/touch +REQUIRED_TOOL += /usr/bin/tr +REQUIRED_TOOL += /usr/gnu/bin/as +REQUIRED_TOOL += /usr/gnu/bin/echo +REQUIRED_TOOL += /usr/gnu/bin/mkdir +REQUIRED_TOOL += $(SPRO_ROOT)/bin/cc +REQUIRED_TOOL += $(SPRO_ROOT)/bin/CC + +REQUIRED_FILE += /lib/$(MACH64)/libc.so +REQUIRED_FILE += /lib/$(MACH64)/libm.so +REQUIRED_FILE += /lib/$(MACH64)/libz.so +REQUIRED_FILE += /lib/libc.so +REQUIRED_FILE += /lib/libm.so +REQUIRED_FILE += /lib/libz.so +REQUIRED_FILE += /usr/include/assert.h +REQUIRED_FILE += /usr/include/ctype.h +REQUIRED_FILE += /usr/include/dlfcn.h +REQUIRED_FILE += /usr/include/errno.h +REQUIRED_FILE += /usr/include/float.h +REQUIRED_FILE += /usr/include/jconfig.h +REQUIRED_FILE += /usr/include/jerror.h +REQUIRED_FILE += /usr/include/jmorecfg.h +REQUIRED_FILE += /usr/include/jpeglib.h +REQUIRED_FILE += /usr/include/limits.h +REQUIRED_FILE += /usr/include/math.h +REQUIRED_FILE += /usr/include/stdarg.h +REQUIRED_FILE += /usr/include/stdbool.h +REQUIRED_FILE += /usr/include/stdint.h +REQUIRED_FILE += /usr/include/stdio.h +REQUIRED_FILE += /usr/include/stdlib.h +REQUIRED_FILE += /usr/include/string.h +REQUIRED_FILE += /usr/include/sys/param.h +REQUIRED_FILE += /usr/include/sys/stat.h +REQUIRED_FILE += /usr/include/sys/types.h +REQUIRED_FILE += /usr/include/tiff.h +REQUIRED_FILE += /usr/include/tiffio.h +REQUIRED_FILE += /usr/include/time.h +REQUIRED_FILE += /usr/include/unistd.h +REQUIRED_FILE += /usr/include/wchar.h +REQUIRED_FILE += /usr/include/zconf.h +REQUIRED_FILE += /usr/include/zlib.h +REQUIRED_FILE += /usr/lib/$(MACH64)/libjpeg.so +REQUIRED_FILE += /usr/lib/$(MACH64)/libtiff.so +REQUIRED_FILE += /usr/lib/libjpeg.so +REQUIRED_FILE += /usr/lib/libtiff.so diff -r 90e0c3ea3281 -r 280a7444e782 components/lcms/lcms.p5m --- a/components/lcms/lcms.p5m Wed Aug 25 11:58:58 2010 -0700 +++ b/components/lcms/lcms.p5m Thu Sep 02 11:07:22 2010 -0500 @@ -34,6 +34,7 @@ dir path=usr/bin dir path=usr/bin/$(MACH64) variant.arch=$(ARCH) dir path=usr/include +dir path=usr/include/lcms dir path=usr/lib dir path=usr/lib/$(MACH64) variant.arch=$(ARCH) dir path=usr/lib/$(MACH64)/pkgconfig variant.arch=$(ARCH) @@ -55,13 +56,11 @@ file path=usr/bin/tiffdiff variant.arch=$(ARCH) file path=usr/bin/tifficc variant.arch=$(ARCH) file path=usr/bin/wtpt variant.arch=$(ARCH) -file path=usr/include/icc34.h -file path=usr/include/lcms.h -file path=usr/lib/$(MACH64)/liblcms.a variant.arch=$(ARCH) +file path=usr/include/lcms/icc34.h +file path=usr/include/lcms/lcms.h file path=usr/lib/$(MACH64)/liblcms.la variant.arch=$(ARCH) file path=usr/lib/$(MACH64)/liblcms.so.1.0.19 variant.arch=$(ARCH) file path=usr/lib/$(MACH64)/pkgconfig/lcms.pc variant.arch=$(ARCH) -file path=usr/lib/liblcms.a variant.arch=$(ARCH) file path=usr/lib/liblcms.la variant.arch=$(ARCH) file path=usr/lib/liblcms.so.1.0.19 variant.arch=$(ARCH) file path=usr/lib/pkgconfig/lcms.pc diff -r 90e0c3ea3281 -r 280a7444e782 components/libmng/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/libmng/Makefile Thu Sep 02 11:07:22 2010 -0500 @@ -0,0 +1,146 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved. +# +include ../../make-rules/shared-macros.mk + +COMPONENT_NAME= libmng +COMPONENT_VERSION= 1.0.10 +IPS_PKG_NAME= library/libmng +COMPONENT_DESCRIPTION= "Multiple-image Network Graphics (MNG) format image files." +COMPONENT_CLASSIFICATION="System/Multimedia Libraries" +COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) +COMPONENT_PROJECT_URL= http://www.libmng.com/ +COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz +COMPONENT_ARCHIVE_HASH= sha1:78ad516a1de79d00de720bf2a7c9afea2c896b09 +COMPONENT_ARCHIVE_URL= http://prdownloads.sourceforge.net/libmng/$(COMPONENT_ARCHIVE) + +# The tarball doesn't come with a configure script. We have to use the +# GNU auto* tools to generate one when we prep the code. +COMPONENT_PREP_ACTION = (cd $(COMPONENT_SRC) ; \ + $(CP) makefiles/configure.in makefiles/Makefile.am . ;\ + aclocal-1.10 ; \ + libtoolize ; \ + automake-1.10 --add-missing ; \ + autoconf ) + +CONFIGURE_OPTIONS += --includedir=/usr/include/libmng +CONFIGURE_OPTIONS += --localstatedir=/var +CONFIGURE_OPTIONS += --disable-static +CONFIGURE_OPTIONS += --disable-libtool-lock +CONFIGURE_OPTIONS += --enable-largefile +CONFIGURE_OPTIONS += --enable-buildso +CONFIGURE_OPTIONS += --enable-read +CONFIGURE_OPTIONS += --enable-write +CONFIGURE_OPTIONS += --enable-display +CONFIGURE_OPTIONS += --enable-dynamic +CONFIGURE_OPTIONS += --enable-chunks +CONFIGURE_OPTIONS += --enable-storechunks +CONFIGURE_OPTIONS += --with-lcms +CONFIGURE_OPTIONS += --with-pic + +# because Solaris puts the headers in a non-standard place +CONFIGURE_ENV += CPPFLAGS=-I/usr/include/lcms + + +include ../../make-rules/prep.mk +include ../../make-rules/configure.mk +include ../../make-rules/ips.mk + +PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/archive-libraries-drop +PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/libtool-drop + +# common targets +build: $(BUILD_32_and_64) + +install: $(INSTALL_32_and_64) + +BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) + + +REQUIRED_TOOL += /opt/sunstudio12.1/prod/bin/CC +REQUIRED_TOOL += /opt/sunstudio12.1/prod/bin/cc +REQUIRED_TOOL += /sbin/uname +REQUIRED_TOOL += /usr/bin/aclocal-1.10 +REQUIRED_TOOL += /usr/bin/amd64/ld +REQUIRED_TOOL += /usr/bin/amd64/nm +REQUIRED_TOOL += /usr/bin/amd64/sort +REQUIRED_TOOL += /usr/bin/amd64/strip +REQUIRED_TOOL += /usr/bin/arch +REQUIRED_TOOL += /usr/bin/autoconf +REQUIRED_TOOL += /usr/bin/autom4te +REQUIRED_TOOL += /usr/bin/automake-1.10 +REQUIRED_TOOL += /usr/bin/basename +REQUIRED_TOOL += /usr/bin/bash +REQUIRED_TOOL += /usr/bin/chmod +REQUIRED_TOOL += /usr/bin/cp +REQUIRED_TOOL += /usr/bin/diff +REQUIRED_TOOL += /usr/bin/dirname +REQUIRED_TOOL += /usr/bin/echo +REQUIRED_TOOL += /usr/bin/env +REQUIRED_TOOL += /usr/bin/expr +REQUIRED_TOOL += /usr/bin/gawk +REQUIRED_TOOL += /usr/bin/gfind +REQUIRED_TOOL += /usr/bin/ggrep +REQUIRED_TOOL += /usr/bin/ginstall +REQUIRED_TOOL += /usr/bin/gmake +REQUIRED_TOOL += /usr/bin/grep +REQUIRED_TOOL += /usr/bin/gsed +REQUIRED_TOOL += /usr/bin/gtar +REQUIRED_TOOL += /usr/bin/gzip +REQUIRED_TOOL += /usr/bin/hostname +REQUIRED_TOOL += /usr/bin/i86/ksh93 +REQUIRED_TOOL += /usr/bin/ld +REQUIRED_TOOL += /usr/bin/libtoolize +REQUIRED_TOOL += /usr/bin/ln +REQUIRED_TOOL += /usr/bin/ls +REQUIRED_TOOL += /usr/bin/make +REQUIRED_TOOL += /usr/bin/mkdir +REQUIRED_TOOL += /usr/bin/mv +REQUIRED_TOOL += /usr/bin/nm +REQUIRED_TOOL += /usr/bin/rm +REQUIRED_TOOL += /usr/bin/rmdir +REQUIRED_TOOL += /usr/bin/sed +REQUIRED_TOOL += /usr/bin/sort +REQUIRED_TOOL += /usr/bin/strip +REQUIRED_TOOL += /usr/bin/touch +REQUIRED_TOOL += /usr/bin/tr +REQUIRED_TOOL += /usr/gnu/bin/as +REQUIRED_TOOL += /usr/gnu/bin/echo +REQUIRED_TOOL += /usr/gnu/bin/m4 +REQUIRED_TOOL += /usr/gnu/bin/mkdir +REQUIRED_TOOL += /usr/gnu/bin/sort +REQUIRED_TOOL += /usr/gnu/bin/uname + +REQUIRED_FILE += /usr/include/jpeglib.h +REQUIRED_FILE += /usr/include/lcms/lcms.h +REQUIRED_FILE += /usr/include/limits.h +REQUIRED_FILE += /usr/include/math.h +REQUIRED_FILE += /usr/include/memory.h +REQUIRED_FILE += /usr/include/setjmp.h +REQUIRED_FILE += /usr/include/stddef.h +REQUIRED_FILE += /usr/include/stdio.h +REQUIRED_FILE += /usr/include/stdlib.h +REQUIRED_FILE += /usr/include/string.h +REQUIRED_FILE += /usr/include/strings.h +REQUIRED_FILE += /usr/include/zlib.h + +include ../../make-rules/depend.mk diff -r 90e0c3ea3281 -r 280a7444e782 components/libmng/libmng.p5m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/libmng/libmng.p5m Thu Sep 02 11:07:22 2010 -0500 @@ -0,0 +1,70 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +set name=pkg.fmri \ + value=pkg:/library/libmng@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) +set name=pkg.description value="$(COMPONENT_DESCRIPTION) " +set name=pkg.summary value="$(COMPONENT_SUMMARY) " +set name=info.classification \ + value="org.opensolaris.category.2008:$(COMPONENT_CLASSIFICATION) " +set name=info.source_url value=$(COMPONENT_ARCHIVE_URL) +set name=info.upstream_url value=$(COMPONENT_PROJECT_URL) +set name=org.opensolaris.consolidation value=$(CONSOLIDATION) +license LICENSE license="BSD-Like" +dir path=usr +dir path=usr/include +dir path=usr/include/libmng +dir path=usr/lib +dir path=usr/lib/$(MACH64) variant.arch=$(ARCH) +#dir path=usr/lib/$(MACH64)/pkgconfig variant.arch=$(ARCH) +#dir path=usr/lib/pkgconfig +dir path=usr/share +dir path=usr/share/man +dir path=usr/share/man/man3 +dir path=usr/share/man/man5 +file path=usr/include/libmng/libmng.h +file path=usr/include/libmng/libmng_conf.h +file path=usr/include/libmng/libmng_types.h +file path=usr/lib/$(MACH64)/libmng.la variant.arch=$(ARCH) +file path=usr/lib/$(MACH64)/libmng.so.1.0.0 variant.arch=$(ARCH) +#file path=usr/lib/$(MACH64)/llib-lmng.ln +#file path=usr/lib/$(MACH64)/pkgconfig/libmng.pc variant.arch=$(ARCH) +file path=usr/lib/libmng.la variant.arch=$(ARCH) +file path=usr/lib/libmng.so.1.0.0 variant.arch=$(ARCH) +#file path=usr/lib/llib-lmng +#file path=usr/lib/llib-lmng.ln +#file path=usr/lib/pkgconfig/libmng.pc +file path=usr/share/man/man3/libmng.3 +file path=usr/share/man/man5/jng.5 +file path=usr/share/man/man5/mng.5 +link path=usr/lib/$(MACH64)/libmng.so target=libmng.so.1.0.0 \ + variant.arch=$(ARCH) +link path=usr/lib/$(MACH64)/libmng.so.1 target=libmng.so.1.0.0 \ + variant.arch=$(ARCH) +link path=usr/lib/libmng.so target=libmng.so.1.0.0 +link path=usr/lib/libmng.so.1 target=libmng.so.1.0.0 +depend fmri=pkg:/image/library/libjpeg@0.5.11-0.146 type=require +depend fmri=pkg:/library/lcms@1.19-0.146 type=require +depend fmri=pkg:/library/zlib@1.2.3-0.146 type=require +depend fmri=pkg:/system/library/math@0.5.11-0.146 type=require +depend fmri=pkg:/system/library@0.5.11-0.146 type=require diff -r 90e0c3ea3281 -r 280a7444e782 components/pycups/Makefile --- a/components/pycups/Makefile Wed Aug 25 11:58:58 2010 -0700 +++ b/components/pycups/Makefile Thu Sep 02 11:07:22 2010 -0500 @@ -22,8 +22,6 @@ # include ../../make-rules/shared-macros.mk -PATH=/usr/bin:/usr/gnu/bin - COMPONENT_NAME= pycups COMPONENT_VERSION= 1.9.46 IPS_PKG_NAME= library/python-2/pycups @@ -47,3 +45,48 @@ install: $(INSTALL_32_and_64) BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) + +REQUIRED_TOOL += /sbin/uname +REQUIRED_TOOL += /usr/bin/basename +REQUIRED_TOOL += /usr/bin/env +REQUIRED_TOOL += /usr/bin/find +REQUIRED_TOOL += /usr/bin/grep +REQUIRED_TOOL += /usr/bin/gtar +REQUIRED_TOOL += /usr/bin/gzip +REQUIRED_TOOL += /usr/bin/ksh93 +REQUIRED_TOOL += /usr/bin/ld +REQUIRED_TOOL += /usr/bin/mkdir +REQUIRED_TOOL += /usr/bin/python2.4 +REQUIRED_TOOL += /usr/bin/python2.6 +REQUIRED_TOOL += /usr/bin/rm +REQUIRED_TOOL += /usr/bin/sed +REQUIRED_TOOL += /usr/bin/sort +REQUIRED_TOOL += /usr/bin/touch +REQUIRED_TOOL += /usr/lib/python2.4/pycc +REQUIRED_TOOL += /usr/lib/python2.6/pycc +REQUIRED_TOOL += $(SPRO_ROOT)/bin/cc + +REQUIRED_FILE += /lib/libc.so +REQUIRED_FILE += /usr/include/ctype.h +REQUIRED_FILE += /usr/include/cups/adminutil.h +REQUIRED_FILE += /usr/include/cups/cups.h +REQUIRED_FILE += /usr/include/cups/language.h +REQUIRED_FILE += /usr/include/cups/ppd.h +REQUIRED_FILE += /usr/include/iconv.h +REQUIRED_FILE += /usr/include/locale.h +REQUIRED_FILE += /usr/include/python2.4/Python.h +REQUIRED_FILE += /usr/include/python2.6/Python.h +REQUIRED_FILE += /usr/include/stdarg.h +REQUIRED_FILE += /usr/include/stdbool.h +REQUIRED_FILE += /usr/include/stdio.h +REQUIRED_FILE += /usr/include/stdlib.h +REQUIRED_FILE += /usr/include/string.h +REQUIRED_FILE += /usr/include/unistd.h +REQUIRED_FILE += /usr/include/wchar.h +REQUIRED_FILE += /usr/include/wctype.h +REQUIRED_FILE += /usr/lib/libc.so +REQUIRED_FILE += /usr/lib/libcups.so +REQUIRED_FILE += /usr/lib/libpython2.4.so.1.0 +REQUIRED_FILE += /usr/lib/libpython2.6.so + +include ../../make-rules/depend.mk diff -r 90e0c3ea3281 -r 280a7444e782 components/rsync/Makefile --- a/components/rsync/Makefile Wed Aug 25 11:58:58 2010 -0700 +++ b/components/rsync/Makefile Thu Sep 02 11:07:22 2010 -0500 @@ -22,8 +22,6 @@ # include ../../make-rules/shared-macros.mk -PATH=/usr/bin:/usr/gnu/bin - COMPONENT_NAME= rsync COMPONENT_VERSION= 3.0.7 IPS_PKG_NAME= network/rsync @@ -49,3 +47,97 @@ install: $(INSTALL_32) BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) + +REQUIRED_TOOL += /sbin/uname +REQUIRED_TOOL += /usr/bin/arch +REQUIRED_TOOL += /usr/bin/awk +REQUIRED_TOOL += /usr/bin/basename +REQUIRED_TOOL += /usr/bin/bash +REQUIRED_TOOL += /usr/bin/chmod +REQUIRED_TOOL += /usr/bin/cp +REQUIRED_TOOL += /usr/bin/diff +REQUIRED_TOOL += /usr/bin/dirname +REQUIRED_TOOL += /usr/bin/echo +REQUIRED_TOOL += /usr/bin/env +REQUIRED_TOOL += /usr/bin/expr +REQUIRED_TOOL += /usr/bin/find +REQUIRED_TOOL += /usr/bin/ggrep +REQUIRED_TOOL += /usr/bin/ginstall +REQUIRED_TOOL += /usr/bin/gmake +REQUIRED_TOOL += /usr/bin/grep +REQUIRED_TOOL += /usr/bin/gtar +REQUIRED_TOOL += /usr/bin/gzip +REQUIRED_TOOL += /usr/bin/hostname +REQUIRED_TOOL += /usr/bin/ksh93 +REQUIRED_TOOL += /usr/bin/ld +REQUIRED_TOOL += /usr/bin/ln +REQUIRED_TOOL += /usr/bin/ls +REQUIRED_TOOL += /usr/bin/mkdir +REQUIRED_TOOL += /usr/bin/mv +REQUIRED_TOOL += /usr/bin/rm +REQUIRED_TOOL += /usr/bin/sed +REQUIRED_TOOL += /usr/bin/sort +REQUIRED_TOOL += /usr/bin/touch +REQUIRED_TOOL += /usr/bin/tr +REQUIRED_TOOL += /usr/perl5/bin/perl +REQUIRED_TOOL += $(SPRO_ROOT)/bin/cc + +REQUIRED_FILE += /lib/libnsl.so +REQUIRED_FILE += /lib/libsec.so +REQUIRED_FILE += /lib/libsocket.so +REQUIRED_FILE += /usr/bin/arch +REQUIRED_FILE += /usr/include/alloca.h +REQUIRED_FILE += /usr/include/arpa/inet.h +REQUIRED_FILE += /usr/include/assert.h +REQUIRED_FILE += /usr/include/ctype.h +REQUIRED_FILE += /usr/include/dirent.h +REQUIRED_FILE += /usr/include/errno.h +REQUIRED_FILE += /usr/include/fcntl.h +REQUIRED_FILE += /usr/include/float.h +REQUIRED_FILE += /usr/include/grp.h +REQUIRED_FILE += /usr/include/iconv.h +REQUIRED_FILE += /usr/include/langinfo.h +REQUIRED_FILE += /usr/include/libintl.h +REQUIRED_FILE += /usr/include/limits.h +REQUIRED_FILE += /usr/include/locale.h +REQUIRED_FILE += /usr/include/malloc.h +REQUIRED_FILE += /usr/include/math.h +REQUIRED_FILE += /usr/include/netdb.h +REQUIRED_FILE += /usr/include/netinet/in_systm.h +REQUIRED_FILE += /usr/include/netinet/in.h +REQUIRED_FILE += /usr/include/netinet/ip.h +REQUIRED_FILE += /usr/include/netinet/ip6.h +REQUIRED_FILE += /usr/include/netinet/tcp.h +REQUIRED_FILE += /usr/include/popt.h +REQUIRED_FILE += /usr/include/pwd.h +REQUIRED_FILE += /usr/include/signal.h +REQUIRED_FILE += /usr/include/stdarg.h +REQUIRED_FILE += /usr/include/stdbool.h +REQUIRED_FILE += /usr/include/stddef.h +REQUIRED_FILE += /usr/include/stdio.h +REQUIRED_FILE += /usr/include/stdlib.h +REQUIRED_FILE += /usr/include/string.h +REQUIRED_FILE += /usr/include/strings.h +REQUIRED_FILE += /usr/include/sys/acl.h +REQUIRED_FILE += /usr/include/sys/attr.h +REQUIRED_FILE += /usr/include/sys/fcntl.h +REQUIRED_FILE += /usr/include/sys/file.h +REQUIRED_FILE += /usr/include/sys/filio.h +REQUIRED_FILE += /usr/include/sys/ioctl.h +REQUIRED_FILE += /usr/include/sys/mkdev.h +REQUIRED_FILE += /usr/include/sys/mode.h +REQUIRED_FILE += /usr/include/sys/param.h +REQUIRED_FILE += /usr/include/sys/select.h +REQUIRED_FILE += /usr/include/sys/socket.h +REQUIRED_FILE += /usr/include/sys/stat.h +REQUIRED_FILE += /usr/include/sys/time.h +REQUIRED_FILE += /usr/include/sys/types.h +REQUIRED_FILE += /usr/include/sys/un.h +REQUIRED_FILE += /usr/include/sys/wait.h +REQUIRED_FILE += /usr/include/syslog.h +REQUIRED_FILE += /usr/include/time.h +REQUIRED_FILE += /usr/include/unistd.h +REQUIRED_FILE += /usr/include/utime.h +REQUIRED_FILE += /usr/include/wchar.h + +include ../../make-rules/depend.mk diff -r 90e0c3ea3281 -r 280a7444e782 make-rules/depend.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make-rules/depend.mk Thu Sep 02 11:07:22 2010 -0500 @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved. +# + +DEPENDS += $(REQUIRED_TOOL) +DEPENDS += $(REQUIRED_FILE) + +depend:: $(DEPENDS) + +print-required-paths:: + @for path in $(DEPENDS) ; do \ + echo $$path ; \ + done diff -r 90e0c3ea3281 -r 280a7444e782 make-rules/ips.mk --- a/make-rules/ips.mk Wed Aug 25 11:58:58 2010 -0700 +++ b/make-rules/ips.mk Thu Sep 02 11:07:22 2010 -0500 @@ -172,6 +172,16 @@ $(COMPONENT_SRC)/.published: manifest-compare $(PUBLISHED) $(TOUCH) $@ +print-package-names: canonical-manifests + @cat $(CANONICAL_MANIFESTS) $(WS_TOP)/transforms/print-pkgs | \ + $(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 | \ + sed -e '/^$$/d' -e '/^#.*$$/d' | sort -u + +print-package-paths: canonical-manifests + @cat $(CANONICAL_MANIFESTS) $(WS_TOP)/transforms/print-paths | \ + $(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 | \ + sed -e '/^$$/d' -e '/^#.*$$/d' | sort -u + canonical-manifests: $(CANONICAL_MANIFESTS) ifeq ($(strip $(CANONICAL_MANIFESTS)),) # If there were no canonical manifests in the workspace, nothing will @@ -182,3 +192,12 @@ # workspace. $(error Missing canonical manifest(s)) endif + +# This converts required paths to containing package names for be able to +# properly setup the build environment for a component. +required-pkgs.mk: Makefile + @echo "generating $@ from Makefile REQUIRED_* data" + @pkg search -H -l '<$(DEPENDS:%=% OR) /bin/true>' \ + | sed -e 's/pkg:\/\(.*\)@.*/REQUIRED_PKGS += \1/g' >$@ + +CLEAN_PATHS += required-pkgs.mk diff -r 90e0c3ea3281 -r 280a7444e782 make-rules/shared-macros.mk --- a/make-rules/shared-macros.mk Wed Aug 25 11:58:58 2010 -0700 +++ b/make-rules/shared-macros.mk Thu Sep 02 11:07:22 2010 -0500 @@ -21,6 +21,8 @@ # Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved. # +PATH=/usr/bin:/usr/gnu/bin + CONSOLIDATION = userland PUBLISHER = $(CONSOLIDATION)-build @@ -40,7 +42,7 @@ TOOLS = $(WS_TOP)/tools WS_LOGS = $(WS_TOP)/logs -MAKE_RULES = $(WS_TOP)/components/make-rules +MAKE_RULES = $(WS_TOP)/make-rules PKG_REPO = file://$(WS_TOP)/repo PROTO_DIR = $(shell pwd)/$(COMPONENT_SRC)/installed-prototype-$(MACH) diff -r 90e0c3ea3281 -r 280a7444e782 tools/bass-o-matic.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/bass-o-matic.py Thu Sep 02 11:07:22 2010 -0500 @@ -0,0 +1,169 @@ +#!/usr/bin/python2.6 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved. +# +# +# bass-o-matic.py +# A simple program to enumerate components in the userland gate and report +# on dependency related information. +# + +import os +import sys +import re + +# Locate SCM directories containing Userland components by searching from +# from a supplied top of tree for .p5m files. Once a .p5m file is located, +# that directory is added to the list and no children are searched. +def FindComponentPaths(path, debug=None): + expression = re.compile(".+\.p5m$", re.IGNORECASE) + + paths = [] + + if debug: + print >>debug, "searching %s for component directories" % path + + for dirpath, dirnames, filenames in os.walk(path + '/components'): + found = 0 + + for name in filenames: + if expression.match(name): + if debug: + print >>debug, "found %s" % dirpath + paths.append(dirpath) + del dirnames[:] + break + + return sorted(paths) + +class BassComponent: + def __init__(self, path=None, debug=None): + self.debug = debug + self.path = path + if path: + # get supplied packages (cd path ; gmake print-package-names) + self.supplied_packages = self.run_make(path, 'print-package-names') + + # get supplied paths (cd path ; gmake print-package-paths) + self.supplied_paths = self.run_make(path, 'print-package-paths') + + # get required paths (cd path ; gmake print-required-paths) + self.required_paths = self.run_make(path, 'print-required-paths') + + def required(self, component): + result = False + + s1 = set(self.required_paths) + s2 = set(component.supplied_paths) + if s1.intersection(s2): + result = True + + return result + + def run_make(self, path, targets): + import subprocess + + result = list() + + if self.debug: + print >>self.debug, "Executing 'gmake %s' in %s" % (targets, path) + + proc = subprocess.Popen(['gmake', targets], cwd=path, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = proc.stdout + + for out in p: + result.append(out) + + if self.debug: + proc.wait() + if proc.returncode != 0: + print >>self.debug, "exit: %d, %s" % (proc.returncode, proc.stderr.read()) + + return result + + def __str__(self): + result = "Component:\n\tPath: %s\n" % self.path + result = result + "\tProvides Package(s):\n\t\t%s\n" % '\t\t'.join(self.supplied_packages) + result = result + "\tProvides Path(s):\n\t\t%s\n" % '\t\t'.join(self.supplied_paths) + result = result + "\tRequired Path(s):\n\t\t%s\n" % '\t\t'.join(self.required_paths) + + return result + +def usage(): + print "Usage: %s [-c|--components=(path|depend)] [-z|--zone (zone)]" % (sys.argv[0].split('/')[-1]) + sys.exit(1) + +def main(): + import getopt + import sys + + # FLUSH STDOUT + sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) + + components = {} + debug=None + components_arg=None + workspace = os.getenv('WS_TOP') + + try: + opts, args = getopt.getopt(sys.argv[1:], "w:c:d", + [ "debug", "workspace=", "components=" ]) + except getopt.GetoptError, err: + print str(err) + usage() + + for opt, arg in opts: + if opt in [ "-w", "--workspace" ]: + workspace = arg + elif opt in [ "-l", "--components" ]: + components_arg = arg + elif opt in [ "-d", "--debug" ]: + debug = sys.stdout + else: + assert False, "unknown option" + + component_paths = FindComponentPaths(workspace, debug) + + if components_arg: + if components_arg in [ 'path', 'paths', 'dir', 'dirs', 'directories' ]: + for path in component_paths: + print "%s" % path + + elif components_arg in [ 'depend', 'dependencies' ]: + for path in component_paths: + components[path] = BassComponent(path, debug) + + for c_path in components.keys(): + component = components[c_path] + + for d_path in components.keys(): + if (c_path != d_path and + component.required(components[d_path])): + print "%s: %s" % (c_path, d_path) + + sys.exit(0) + + sys.exit(1) + +if __name__ == "__main__": + main() diff -r 90e0c3ea3281 -r 280a7444e782 tools/build-watch.pl --- a/tools/build-watch.pl Wed Aug 25 11:58:58 2010 -0700 +++ b/tools/build-watch.pl Thu Sep 02 11:07:22 2010 -0500 @@ -116,7 +116,7 @@ # Main execution begins here # GetOptions("c|command=s" => \$cmd, "i|input-file=s" => \@file, - "v|verbose" => \$verbose); + "p|pkg" => \$pkg_flag, "v|verbose" => \$verbose); if (defined($cmd)) { $file = (tempfile(UNLINK => 1))[1]; @@ -132,8 +132,10 @@ ($verbose == 1) && printf("*** Processing results...\n"); my ($tools, $files) = process_dtrace_results($file); -($verbose == 1) && printf("*** Generating package requirements...\n"); -my ($pkgs) = generate_package_requirements($tools, $files); +if (defined($pkg_flag)) { + ($verbose == 1) && printf("*** Generating package requirements...\n"); + my ($pkgs) = generate_package_requirements($tools, $files); +} if (defined($tools)) { print "\n"; diff -r 90e0c3ea3281 -r 280a7444e782 transforms/print-paths --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/transforms/print-paths Thu Sep 02 11:07:22 2010 -0500 @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# These transforms print only the package paths from the manifest. +# + + drop> + print /%<1> > + drop> diff -r 90e0c3ea3281 -r 280a7444e782 transforms/print-pkgs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/transforms/print-pkgs Thu Sep 02 11:07:22 2010 -0500 @@ -0,0 +1,29 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# These transforms print only the package name from the manifest. +# + + print %<1> > + drop>