[csw-devel] SF.net SVN: gar:[15711] csw/mgar/pkg/gcc4/branches/gccgo/Makefile

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Sep 22 14:01:26 CEST 2011


Revision: 15711
          http://gar.svn.sourceforge.net/gar/?rev=15711&view=rev
Author:   wahwah
Date:     2011-09-22 12:01:26 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
pkg/gcc4/branches/gccgo: work in progress

Modified Paths:
--------------
    csw/mgar/pkg/gcc4/branches/gccgo/Makefile

Modified: csw/mgar/pkg/gcc4/branches/gccgo/Makefile
===================================================================
--- csw/mgar/pkg/gcc4/branches/gccgo/Makefile	2011-09-22 08:40:14 UTC (rev 15710)
+++ csw/mgar/pkg/gcc4/branches/gccgo/Makefile	2011-09-22 12:01:26 UTC (rev 15711)
@@ -11,6 +11,9 @@
 CATEGORIES   = lang
 GARTYPE = v2
 BASE_VERSION = $(shell echo $(VERSION) | gsed -e 's/^\([0-9]\+\.[0-9]\+\)\(.*\)/\1/')
+PKG_VERSION_TOKEN = gcc47
+PKG_BASENAME = CSW$(PKG_VERSION_TOKEN)
+# PKG_BASENAME = CSWgcc-$(subst .,-,$(BASE_VERION))
 
 DESCRIPTION  = The GNU Compiler Collection
 define BLURB
@@ -23,6 +26,8 @@
 # MASTER_SITES = $(GNU_MIRROR)/$(NAME)-$(VERSION)/
 MASTER_SITES = ftp://ftp.fu-berlin.de/unix/languages/gcc/snapshots/$(VERSION)/
 
+LIBOBJC = 4
+
 PACKAGING_PLATFORMS = solaris9-sparc solaris9-i386
 PACKAGING_PLATFORMS += solaris10-sparc solaris10-i386
 
@@ -35,17 +40,23 @@
 ## Copyright File
 LICENSE = COPYING3
 
-# prefix = $(BUILD_PREFIX)/gcc4
+# prefix = $(BUILD_PREFIX)/$(PKG_VERSION_TOKEN)
 # libdir_install = $(BUILD_PREFIX)/lib
 # libdir = $(abspath $(BUILD_PREFIX)/lib/$(MM_LIBDIR))
 # CONFIGURE_ARGS += --prefix=$(prefix)
 # CONFIGURE_ARGS += --libdir=$(libdir)
-# CONFIGURE_ARGS += --exec-prefix=$(BUILD_PREFIX)/gcc4
+# CONFIGURE_ARGS += --exec-prefix=$(BUILD_PREFIX)/$(PKG_VERSION_TOKEN)
 
+BUILD_DEP_PKGS += CSWlibz-dev
+BUILD_DEP_PKGS += CSWlibgmp-dev
+BUILD_DEP_PKGS += CSWlibmpc-dev
+BUILD_DEP_PKGS += CSWlibmpfr-dev
+BUILD_DEP_PKGS += CSWlibppl-dev
+
 ## build options
 # http://gcc.gnu.org/install/configure.html
 
-# Could be used to break out of the /opt/csw/gcc4 prefix
+# Could be used to break out of the /opt/csw/$(PKG_VERSION_TOKEN) prefix
 PROGRAM_SUFFIX = -$(BASE_VERSION)
 CONFIGURE_ARGS += --program-suffix=$(PROGRAM_SUFFIX)
 
@@ -67,12 +78,10 @@
 CONFIGURE_ARGS += --enable-libssp
 CONFIGURE_ARGS += --enable-objc-gc
 CONFIGURE_ARGS += --enable-threads=posix 
-CONFIGURE_ARGS += --enable-stage1-languages=c
 # We'll build ada later. It requires the PPL library.
 # CONFIGURE_ARGS += --enable-languages=ada,c,c++,fortran,java,objc
 CONFIGURE_ARGS += --enable-languages=c,c++,fortran,java,objc,go
-CONFIGURE_ARGS += --enable-bootstrap
-CONFIGURE_ARGS += --with-system-zlib
+CONFIGURE_ARGS += --with-system-zlib=/opt/csw
 
 # there could be some abstractions in gar.conf.mk, but at the moment there
 # aren't so let's specify architectures by hand.
@@ -102,18 +111,13 @@
 EXTRA_EXPORTS += CFLAGS_FOR_TARGET
 EXTRA_EXPORTS += CXXFLAGS_FOR_TARGET
 
-# The theory goes that the CFLAGS and others cause problems with the multilib
-# builds where 64-bit binaries are built.  This is triggered by the gcc build;
-# the compiler binaries are 32-bit only, but since the compiler can generate
-# 32-bit and 64-bit binaries, the libraries have to be built for both
+# The theory goes that the CFLAGS and CXXFLAGS cause problems with the
+# multilib builds where 64-bit binaries are built.  This is triggered by the
+# gcc build; the compiler binaries are 32-bit only, but since the compiler can
+# generate 32-bit and 64-bit binaries, the libraries have to be built for both
 # architectures.
-ifeq ($(MODULATION),isa-i386)
 CFLAGS =
 CXXFLAGS =
-FFLAGS =
-FCFLAGS =
-OPTFLAGS =
-endif
 
 # Might be necessary, but CFLAGS_FOR_TARGET seem to be enough for now.
 # BOOT_CFLAGS = $(CFLAGS_FOR_TARGET)
@@ -135,74 +139,87 @@
 GARCOMPILER = GNU
 
 # There's a lot of failing checks. Probably a lot of porting work.
-SKIPTEST = 1
+SKIPTEST ?= 1
 
 # Used multiple times in package definitions
-JAVA_LIB_VERSION = 13
+JAVA_LIB_VERSION = 12
 
 ALTERNATIVES_PRIO = 460
 
-PACKAGES = CSWgcc4core
-SPKG_DESC_CSWgcc4core = GNU C compiler
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibffi4
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibgcc-s1
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibgcj-tools$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibgcj$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibgij$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibgmp10
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibgomp1
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibmpc2
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibmpfr4
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibssp0
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibz1
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWpython
+PACKAGES = $(PKG_BASENAME)core
+SPKG_DESC_$(PKG_BASENAME)core = GNU C compiler
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibffi4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibgcj$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibgcj-tools$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibgij$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibgmp10
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibgmpxx4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibgomp1
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibmpc2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibmpfr4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibppl-c4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibppl9
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibpwl5
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibssp0
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibz1
 
-ALTERNATIVES_CSWgcc4core += gcc4core
-ALTERNATIVE_gcc4core += $(bindir)/cpp gcc_core $(bindir)/cpp$(PROGRAM_SUFFIX) $(ALTERNATIVES_PRIO)
-ALTERNATIVE_gcc4core += $(bindir)/gcc gcc_core $(bindir)/gcc$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4core += $(bindir)/gcov gcc_core $(bindir)/gcov$(PROGRAM_SUFFIX)
+# checkpkg-undetectable dependencies
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWbinutils
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWgsed
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWcoreutils
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWggrep
 
+ALTERNATIVES_$(PKG_BASENAME)core += $(PKG_VERSION_TOKEN)core
+ALTERNATIVE_$(PKG_VERSION_TOKEN)core += $(bindir)/cpp gcc_core $(bindir)/cpp$(PROGRAM_SUFFIX) $(ALTERNATIVES_PRIO)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)core += $(bindir)/gcc gcc_core $(bindir)/gcc$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)core += $(bindir)/gcov gcc_core $(bindir)/gcov$(PROGRAM_SUFFIX)
+
 # Because I can.
-CHECKPKG_OVERRIDES_CSWgcc4core += file-with-bad-content
-CHECKPKG_OVERRIDES_CSWgcc4g++ += file-with-bad-content
-CHECKPKG_OVERRIDES_CSWgcc4java += file-with-bad-content
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-with-bad-content
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)g++ += file-with-bad-content
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)java += file-with-bad-content
 CHECKPKG_OVERRIDES_CSWlibgcj$(JAVA_LIB_VERSION) += file-with-bad-content
-CHECKPKG_OVERRIDES_CSWgcc4core += discouraged-path-in-pkgmap|$(libexecdir)/gcc/i386-pc-solaris2.9/$(VERSION)/liblto_plugin.la
-CHECKPKG_OVERRIDES_CSWgcc4core += discouraged-path-in-pkgmap|$(libexecdir)/gcc/sparc-sun-solaris2.9/$(VERSION)/liblto_plugin.la
-CHECKPKG_OVERRIDES_CSWgcc4core += discouraged-path-in-pkgmap|$(libexecdir)/gcc/sparc-sun-solaris2.10/$(VERSION)/liblto_plugin.la
-CHECKPKG_OVERRIDES_CSWgcc4objc += file-with-bad-content
-CHECKPKG_OVERRIDES_CSWgcc4gfortran += file-with-bad-content
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += discouraged-path-in-pkgmap|$(libexecdir)/gcc/i386-pc-solaris2.9/$(VERSION)/liblto_plugin.la
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += discouraged-path-in-pkgmap|$(libexecdir)/gcc/sparc-sun-solaris2.9/$(VERSION)/liblto_plugin.la
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += discouraged-path-in-pkgmap|$(libexecdir)/gcc/sparc-sun-solaris2.10/$(VERSION)/liblto_plugin.la
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)objc += file-with-bad-content
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)gfortran += file-with-bad-content
 # Due to complex regular expressions
-CHECKPKG_OVERRIDES_CSWgcc4java += file-collision|$(includedir)/c++/$(VERSION)/sun/awt/CausedFocusEvent.h|CSWgcc4g++|CSWgcc4java
-CHECKPKG_OVERRIDES_CSWgcc4java += file-collision|/opt/csw/include/c++/4.7.0/sun/awt/CausedFocusEvent.h|CSWgcc4g++|CSWgcc4java
-CHECKPKG_OVERRIDES_CSWgcc4g++ += file-collision|/opt/csw/include/c++/4.7.0/sun/awt/CausedFocusEvent.h|CSWgcc4g++|CSWgcc4java
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)java += file-collision|$(includedir)/c++/$(VERSION)/sun/awt/CausedFocusEvent.h|$(PKG_BASENAME)g++|$(PKG_BASENAME)java
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)g++ += file-collision|$(includedir)/c++/$(VERSION)/sun/awt/CausedFocusEvent.h|$(PKG_BASENAME)g++|$(PKG_BASENAME)java
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += missing-dependency|CSWpython
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += surplus-dependency|CSWbinutils
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += surplus-dependency|CSWcoreutils
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += surplus-dependency|CSWggrep
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += surplus-dependency|CSWgsed
 
 # Only man pages, so not a big problem. Alternatives could be used, but it
 # requires rebuilding libffi.
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(mandir)/man3/ffi_call.3|CSWgcc4core|CSWlibffi-dev
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(mandir)/man3/ffi.3|CSWgcc4core|CSWlibffi-dev
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(mandir)/man3/ffi_prep_cif.3|CSWgcc4core|CSWlibffi-dev
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(mandir)/man3/ffi_call.3|$(PKG_BASENAME)core|CSWlibffi-dev
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(mandir)/man3/ffi.3|$(PKG_BASENAME)core|CSWlibffi-dev
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(mandir)/man3/ffi_prep_cif.3|$(PKG_BASENAME)core|CSWlibffi-dev
 
 # The .a files are necessary
-CHECKPKG_OVERRIDES_CSWgcc4core += discouraged-path-in-pkgmap
-CHECKPKG_OVERRIDES_CSWgcc4objc += discouraged-path-in-pkgmap
-CHECKPKG_OVERRIDES_CSWgcc4java += discouraged-path-in-pkgmap
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += discouraged-path-in-pkgmap
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)objc += discouraged-path-in-pkgmap
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)java += discouraged-path-in-pkgmap
 
-CHECKPKG_OVERRIDES_CSWgcc4gfortran += discouraged-path-in-pkgmap
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)gfortran += discouraged-path-in-pkgmap
 
 # From the 'hopeless errors' department:
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/libffi.so|CSWgcc3javart|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/libgcc_s.so|CSWgcc3core|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/libgcj.so|CSWgcc3javart|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/libobjc.so|CSWgcc3objcrt|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/sparcv9/lib-gnu-awt-xlib.so|CSWgcc3javart|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/sparcv9/libffi.so|CSWgcc3javart|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/sparcv9/libgcj.so|CSWgcc3javart|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/sparcv9/libobjc.so|CSWgcc3objcrt|CSWgcc4core
-CHECKPKG_OVERRIDES_CSWgcc4objc += file-collision|$(libdir)/libobjc.so|CSWgcc3objcrt|CSWgcc4objc
-CHECKPKG_OVERRIDES_CSWgcc4objc += file-collision|$(libdir)/sparcv9/libobjc.so|CSWgcc3objcrt|CSWgcc4objc
-CHECKPKG_OVERRIDES_CSWgcc4core += file-collision|$(libdir)/lib-gnu-awt-xlib.so|CSWgcc3javart|CSWgcc4core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/libffi.so|CSWgcc3javart|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/libgcc_s.so|CSWgcc3core|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/libgcj.so|CSWgcc3javart|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/libobjc.so|CSWgcc3objcrt|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/sparcv9/lib-gnu-awt-xlib.so|CSWgcc3javart|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/sparcv9/libffi.so|CSWgcc3javart|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/sparcv9/libgcj.so|CSWgcc3javart|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/sparcv9/libobjc.so|CSWgcc3objcrt|$(PKG_BASENAME)core
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)objc += file-collision|$(libdir)/libobjc.so|CSWgcc3objcrt|$(PKG_BASENAME)objc
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)objc += file-collision|$(libdir)/sparcv9/libobjc.so|CSWgcc3objcrt|$(PKG_BASENAME)objc
+CHECKPKG_OVERRIDES_$(PKG_BASENAME)core += file-collision|$(libdir)/lib-gnu-awt-xlib.so|CSWgcc3javart|$(PKG_BASENAME)core
 
 # Some static libraries are required to build binaries with gcc, for example
 # libgcc.a and libgcc_eh.a. Otherwise: ld: fatal: library -lgcc: not found
@@ -216,22 +233,22 @@
 CATALOGNAME_CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION) = lib_gnu_awt_xlib$(JAVA_LIB_VERSION)
 PKGFILES_CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION) += $(call baseisadirs,$(libdir),lib-gnu-awt-xlib\.so\.$(JAVA_LIB_VERSION)(\.\d+)*)
 SPKG_DESC_CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION) += $(DESCRIPTION), lib-gnu-awt-xlib.so.$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4 += CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION) += CSWlibstdc++6
+RUNTIME_DEP_PKGS_$(PKG_BASENAME) += CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION) += CSWlibstdc++$(LIBSTDCXX_VERSION)
 RUNTIME_DEP_PKGS_CSWlib-gnu-awt-xlib$(JAVA_LIB_VERSION) += CSWlibgcc-s1
 
 PACKAGES += CSWlibffi4
 CATALOGNAME_CSWlibffi4 = libffi4
 PKGFILES_CSWlibffi4 += $(call baseisadirs,$(libdir),libffi\.so\.4(\.\d+)*)
 SPKG_DESC_CSWlibffi4 += $(DESCRIPTION), libffi.so.4
-RUNTIME_DEP_PKGS_CSWgcc4 += CSWlibffi4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME) += CSWlibffi4
 RUNTIME_DEP_PKGS_CSWlibffi4 += CSWlibgcc-s1
 
 PACKAGES += CSWlibgcc-s1
 CATALOGNAME_CSWlibgcc-s1 = libgcc_s1
 PKGFILES_CSWlibgcc-s1 += $(call baseisadirs,$(libdir),libgcc_s\.so\.1(\.\d+)*)
 SPKG_DESC_CSWlibgcc-s1 += $(DESCRIPTION), libgcc_s.so.1
-RUNTIME_DEP_PKGS_CSWgcc4 += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_$(PKG_BASENAME) += CSWlibgcc-s1
 # For reference, the old CSWgcc3corert:
 # http://buildfarm.opencsw.org/pkgdb/srv4/1991387f2cb9f545b2a1b254b50638ef/
 OBSOLETED_BY_CSWlibgcc-s1 = CSWgcc3corert
@@ -240,65 +257,66 @@
 CATALOGNAME_CSWlibgcj-tools$(JAVA_LIB_VERSION) = libgcj_tools$(JAVA_LIB_VERSION)
 PKGFILES_CSWlibgcj-tools$(JAVA_LIB_VERSION) += $(call baseisadirs,$(libdir),libgcj-tools\.so\.$(JAVA_LIB_VERSION)(\.\d+)*)
 SPKG_DESC_CSWlibgcj-tools$(JAVA_LIB_VERSION) += $(DESCRIPTION), libgcj-tools.so.$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4 += CSWlibgcj-tools$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME) += CSWlibgcj-tools$(JAVA_LIB_VERSION)
 RUNTIME_DEP_PKGS_CSWlibgcj-tools$(JAVA_LIB_VERSION) += CSWlibgcc-s1
 RUNTIME_DEP_PKGS_CSWlibgcj-tools$(JAVA_LIB_VERSION) += CSWlibgcj$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWlibgcj-tools$(JAVA_LIB_VERSION) += CSWlibz1
 
 PACKAGES += CSWlibgcj$(JAVA_LIB_VERSION)
 CATALOGNAME_CSWlibgcj$(JAVA_LIB_VERSION) = libgcj$(JAVA_LIB_VERSION)
 PKGFILES_CSWlibgcj$(JAVA_LIB_VERSION) += $(call baseisadirs,$(libdir),libgcj\.so\.$(JAVA_LIB_VERSION)(\.\d+)*)
 SPKG_DESC_CSWlibgcj$(JAVA_LIB_VERSION) += $(DESCRIPTION), libgcj.so.$(JAVA_LIB_VERSION)
 RUNTIME_DEP_PKGS_CSWlibgcj$(JAVA_LIB_VERSION) += CSWlibgcc-s1
-RUNTIME_DEP_PKGS_CSWlibgcj$(JAVA_LIB_VERSION) += CSWlibz1
 
 PACKAGES += CSWlibgfortran3
 CATALOGNAME_CSWlibgfortran3 = libgfortran3
 PKGFILES_CSWlibgfortran3 += $(call baseisadirs,$(libdir),libgfortran\.so\.3(\.\d+)*)
 SPKG_DESC_CSWlibgfortran3 += $(DESCRIPTION), libgfortran.so.3
-RUNTIME_DEP_PKGS_CSWgcc4 += CSWlibgfortran3
+RUNTIME_DEP_PKGS_$(PKG_BASENAME) += CSWlibgfortran3
 RUNTIME_DEP_PKGS_CSWlibgfortran3 += CSWlibgcc-s1
-OBSOLETED_BY_CSWlibgfortran3 = CSWgcc4gfortranrt
+OBSOLETED_BY_CSWlibgfortran3 = $(PKG_BASENAME)gfortranrt
 
 PACKAGES += CSWlibgij$(JAVA_LIB_VERSION)
 CATALOGNAME_CSWlibgij$(JAVA_LIB_VERSION) = libgij$(JAVA_LIB_VERSION)
 PKGFILES_CSWlibgij$(JAVA_LIB_VERSION) += $(call baseisadirs,$(libdir),libgij\.so\.$(JAVA_LIB_VERSION)(\.\d+)*)
 SPKG_DESC_CSWlibgij$(JAVA_LIB_VERSION) += $(DESCRIPTION), libgij.so.$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWlibgij$(JAVA_LIB_VERSION) += CSWlibz1
+RUNTIME_DEP_PKGS_CSWlibgij$(JAVA_LIB_VERSION) += CSWlibgcj$(JAVA_LIB_VERSION)
 
 PACKAGES += CSWlibgomp1
 CATALOGNAME_CSWlibgomp1 = libgomp1
 PKGFILES_CSWlibgomp1 += $(call baseisadirs,$(libdir),libgomp\.so\.1(\.\d+)*)
 SPKG_DESC_CSWlibgomp1 += $(DESCRIPTION), libgomp.so.1
 RUNTIME_DEP_PKGS_CSWlibgomp1 += CSWlibgcc-s1
-OBSOLETED_BY_CSWlibgomp1 += CSWgcc4corert
+OBSOLETED_BY_CSWlibgomp1 += $(PKG_BASENAME)corert
 
-PACKAGES += CSWlibobjc4
-CATALOGNAME_CSWlibobjc4 = libobjc4
-PKGFILES_CSWlibobjc4 += $(call baseisadirs,$(libdir),libobjc\.so\.4(\.\d+)*)
-SPKG_DESC_CSWlibobjc4 += $(DESCRIPTION), libobjc.so.4
-RUNTIME_DEP_PKGS_CSWlibobjc4 += CSWlibgcc-s1
 
-PACKAGES += CSWlibobjc-gc4
-CATALOGNAME_CSWlibobjc-gc4 = libobjc_gc4
-PKGFILES_CSWlibobjc-gc4 += $(call baseisadirs,$(libdir),libobjc_gc\.so\.4(\.\d+)*)
-SPKG_DESC_CSWlibobjc-gc4 += $(DESCRIPTION), libobjc_gc.so.4
-RUNTIME_DEP_PKGS_CSWlibobjc-gc4 += CSWlibgcc-s1
+PACKAGES += CSWlibobjc$(LIBOBJC)
+CATALOGNAME_CSWlibobjc$(LIBOBJC) = libobjc$(LIBOBJC)
+PKGFILES_CSWlibobjc$(LIBOBJC) += $(call baseisadirs,$(libdir),libobjc\.so\.$(LIBOBJC)(\.\d+)*)
+SPKG_DESC_CSWlibobjc$(LIBOBJC) += $(DESCRIPTION), libobjc.so.$(LIBOBJC)
+RUNTIME_DEP_PKGS_CSWlibobjc$(LIBOBJC) += CSWlibgcc-s1
 
+PACKAGES += CSWlibobjc-gc$(LIBOBJC)
+CATALOGNAME_CSWlibobjc-gc$(LIBOBJC) = libobjc_gc$(LIBOBJC)
+PKGFILES_CSWlibobjc-gc$(LIBOBJC) += $(call baseisadirs,$(libdir),libobjc_gc\.so\.$(LIBOBJC)(\.\d+)*)
+SPKG_DESC_CSWlibobjc-gc$(LIBOBJC) += $(DESCRIPTION), libobjc_gc.so.$(LIBOBJC)
+RUNTIME_DEP_PKGS_CSWlibobjc-gc$(LIBOBJC) += CSWlibgcc-s1
+
 PACKAGES += CSWlibssp0
 CATALOGNAME_CSWlibssp0 = libssp0
 PKGFILES_CSWlibssp0 += $(call baseisadirs,$(libdir),libssp\.so\.0(\.\d+)*)
 SPKG_DESC_CSWlibssp0 += $(DESCRIPTION), libssp.so.0
 RUNTIME_DEP_PKGS_CSWlibssp0 += CSWlibgcc-s1
-OBSOLETED_BY_CSWlibssp0 += CSWgcc4corert
+OBSOLETED_BY_CSWlibssp0 += $(PKG_BASENAME)corert
 
-PACKAGES += CSWlibstdc++6
-CATALOGNAME_CSWlibstdc++6 = libstdc++6
-PKGFILES_CSWlibstdc++6 += $(call baseisadirs,$(libdir),libstdc\+\+\.so\.6(\.\d+)*)
-SPKG_DESC_CSWlibstdc++6 += $(DESCRIPTION), libstdc++.so.6
-RUNTIME_DEP_PKGS_CSWlibstdc++6 += CSWlibgcc-s1
-OBSOLETED_BY_CSWlibstdc++6 = CSWgcc4g++rt
+LIBSTDCXX_VERSION = 6
 
+PACKAGES += CSWlibstdc++$(LIBSTDCXX_VERSION)
+CATALOGNAME_CSWlibstdc++$(LIBSTDCXX_VERSION) = libstdc++$(LIBSTDCXX_VERSION)
+PKGFILES_CSWlibstdc++$(LIBSTDCXX_VERSION) += $(call baseisadirs,$(libdir),libstdc\+\+\.so\.$(LIBSTDCXX_VERSION)(\.\d+)*)
+SPKG_DESC_CSWlibstdc++$(LIBSTDCXX_VERSION) += $(DESCRIPTION), libstdc++.so.$(LIBSTDCXX_VERSION)
+RUNTIME_DEP_PKGS_CSWlibstdc++$(LIBSTDCXX_VERSION) += CSWlibgcc-s1
+OBSOLETED_BY_CSWlibstdc++$(LIBSTDCXX_VERSION) = $(PKG_BASENAME)g++rt
+
 # The libquadmath.so.0 library is only build on Intel
 PACKAGES_i386 += CSWlibquadmath0
 CATALOGNAME_CSWlibquadmath0 = libquadmath0
@@ -307,149 +325,163 @@
 RUNTIME_DEP_PKGS_CSWlibquadmath0 += CSWlibgcc-s1
 
 # Dependencies only on Intel
-RUNTIME_DEP_PKGS_CSWgcc4core_i386 += CSWlibquadmath0
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core_i386 += CSWlibquadmath0
 RUNTIME_DEP_PKGS_CSWlibgfortran3_i386 += CSWlibquadmath0
-RUNTIME_DEP_PKGS_CSWgcc4core += $(RUNTIME_DEP_PKGS_CSWgcc4core_$(GARCH))
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += $(RUNTIME_DEP_PKGS_$(PKG_BASENAME)core_$(GARCH))
 RUNTIME_DEP_PKGS_CSWlibgfortran3 += $(RUNTIME_DEP_PKGS_CSWlibgfortran3_$(GARCH))
 
-PACKAGES += CSWgcc4g++
-CATALOGNAME_CSWgcc4g++ = gcc4g++
-SPKG_DESC_CSWgcc4g++ = GNU C++ Compiler
-PKGFILES_CSWgcc4g++  = $(foreach F,$(CXX_BINARIES),$(bindir)/$(F)$(PROGRAM_SUFFIX))
-PKGFILES_CSWgcc4g++ += $(foreach F,$(CXX_BINARIES),$(prefix)/gcc4/bin/$(F))
-PKGFILES_CSWgcc4g++ += $(bindir)/\w+-\w+-solaris[\d\.]+-[cg]\+\+$(PROGRAM_SUFFIX)
-PKGFILES_CSWgcc4g++ += $(libexecdir)/.*cc1plus
-PKGFILES_CSWgcc4g++ += $(libdir)/.*libstdc.*a
-PKGFILES_CSWgcc4g++ += $(call baseisadirs,$(libdir),libstdc\+\+\.so)
-PKGFILES_CSWgcc4g++ += $(mandir)/.*g\+\+.1
+PACKAGES += $(PKG_BASENAME)g++
+SPKG_DESC_$(PKG_BASENAME)g++ = GNU C++ Compiler
+PKGFILES_$(PKG_BASENAME)g++  = $(foreach F,$(CXX_BINARIES),$(bindir)/$(F)$(PROGRAM_SUFFIX))
+PKGFILES_$(PKG_BASENAME)g++ += $(foreach F,$(CXX_BINARIES),$(prefix)/$(PKG_VERSION_TOKEN)/bin/$(F))
+PKGFILES_$(PKG_BASENAME)g++ += $(bindir)/\w+-\w+-solaris[\d\.]+-[cg]\+\+$(PROGRAM_SUFFIX)
+PKGFILES_$(PKG_BASENAME)g++ += $(libexecdir)/.*cc1plus
+PKGFILES_$(PKG_BASENAME)g++ += $(libdir)/.*libstdc.*a
+PKGFILES_$(PKG_BASENAME)g++ += $(call baseisadirs,$(libdir),libstdc\+\+\.so)
+PKGFILES_$(PKG_BASENAME)g++ += $(mandir)/.*g\+\+.1
 # I do not understand this regular expression.
-PKGFILES_CSWgcc4g++ += $(includedir)/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.*
-PKGFILES_CSWgcc4g++ += $(includedir)/c\+\+/(\d+(?:\.\d+)*)/ostream.*
-RUNTIME_DEP_PKGS_CSWgcc4g++ += CSWlibgmp10
-RUNTIME_DEP_PKGS_CSWgcc4g++ += CSWlibmpc2
-RUNTIME_DEP_PKGS_CSWgcc4g++ += CSWlibmpfr4
-RUNTIME_DEP_PKGS_CSWgcc4g++ += CSWlibstdc++6
-RUNTIME_DEP_PKGS_CSWgcc4g++ += CSWlibz1
+PKGFILES_$(PKG_BASENAME)g++ += $(includedir)/c\+\+/(\d+(?:\.\d+)*)/[a-fA-F,h-iH-I,k-nI-N,p-zP-Z,]+.*
+PKGFILES_$(PKG_BASENAME)g++ += $(includedir)/c\+\+/(\d+(?:\.\d+)*)/ostream.*
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibgmp10
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibgmpxx4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibmpc2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibmpfr4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibppl-c4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibppl9
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibpwl5
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibstdc++$(LIBSTDCXX_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibz1
 
-ALTERNATIVES_CSWgcc4g++ += gcc4g++
-ALTERNATIVE_gcc4g++ += $(bindir)/g++ gcc_gplusplus $(bindir)/g++$(PROGRAM_SUFFIX) $(ALTERNATIVES_PRIO)
+# The C++ compiler needs the C compiler.
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += $(PKG_BASENAME)core
 
-OBSOLETED_BY_CSWlibgcc-s1 += CSWgcc4corert
+ALTERNATIVES_$(PKG_BASENAME)g++ += $(PKG_VERSION_TOKEN)g++
+ALTERNATIVE_$(PKG_VERSION_TOKEN)g++ += $(bindir)/g++ gcc_gplusplus $(bindir)/g++$(PROGRAM_SUFFIX) $(ALTERNATIVES_PRIO)
+
+OBSOLETED_BY_CSWlibgcc-s1 += $(PKG_BASENAME)corert
 RUNTIME_DEP_PKGS_CSWlibgij$(JAVA_LIB_VERSION) += CSWlibgcc-s1
-RUNTIME_DEP_PKGS_CSWlibgij$(JAVA_LIB_VERSION) += CSWlibgcj$(JAVA_LIB_VERSION)
 
-PACKAGES += CSWgcc4gfortran
-CATALOGNAME_CSWgcc4gfortran   = gcc4gfortran
-SPKG_DESC_CSWgcc4gfortran   = GNU Fortran Compiler
-RUNTIME_DEP_PKGS_CSWgcc4gfortran += CSWlibmpfr4
-RUNTIME_DEP_PKGS_CSWgcc4gfortran += CSWlibgmp10
-RUNTIME_DEP_PKGS_CSWgcc4gfortran += CSWlibgfortran3
-RUNTIME_DEP_PKGS_CSWgcc4gfortran += CSWlibmpc2
-RUNTIME_DEP_PKGS_CSWgcc4gfortran += CSWlibz1
-PKGFILES_CSWgcc4gfortran += $(foreach F,$(FORTRAN_BINARIES),$(bindir)/$(F)$(PROGRAM_SUFFIX))
-PKGFILES_CSWgcc4gfortran += $(foreach F,$(FORTRAN_BINARIES),$(prefix)/gcc4/bin/$(F))
-PKGFILES_CSWgcc4gfortran += $(bindir)/\w+-\w+-solaris[\d\.]+-gfortran$(PROGRAM_SUFFIX)
-PKGFILES_CSWgcc4gfortran += $(libdir)/.*libgfortran.*a
-PKGFILES_CSWgcc4gfortran += $(libexecdir)/.*f951
-PKGFILES_CSWgcc4gfortran += $(mandir)/.*gfortran.1
-PKGFILES_CSWgcc4gfortran += $(infodir)/gfortran.*
-PKGFILES_CSWgcc4gfortran += $(call baseisadirs,$(libdir),libgfortran\.so)
-OBSOLETED_BY_CSWgcc4gfortran  = CSWgcc4g95
-OBSOLETED_BY_CSWgcc4gfortran += CSWgcc4g95rt
+PACKAGES += $(PKG_BASENAME)gfortran
+SPKG_DESC_$(PKG_BASENAME)gfortran   = GNU Fortran Compiler
+PKGFILES_$(PKG_BASENAME)gfortran += $(foreach F,$(FORTRAN_BINARIES),$(bindir)/$(F)$(PROGRAM_SUFFIX))
+PKGFILES_$(PKG_BASENAME)gfortran += $(foreach F,$(FORTRAN_BINARIES),$(prefix)/$(PKG_VERSION_TOKEN)/bin/$(F))
+PKGFILES_$(PKG_BASENAME)gfortran += $(bindir)/\w+-\w+-solaris[\d\.]+-gfortran$(PROGRAM_SUFFIX)
+PKGFILES_$(PKG_BASENAME)gfortran += $(libdir)/.*libgfortran.*a
+PKGFILES_$(PKG_BASENAME)gfortran += $(libexecdir)/.*f951
+PKGFILES_$(PKG_BASENAME)gfortran += $(mandir)/.*gfortran.1
+PKGFILES_$(PKG_BASENAME)gfortran += $(infodir)/gfortran.*
+PKGFILES_$(PKG_BASENAME)gfortran += $(call baseisadirs,$(libdir),libgfortran\.so)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibmpfr4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibgmp10
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibgfortran3
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibmpc2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibz1
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibppl-c4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibgmpxx4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibpwl5
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibppl9
+OBSOLETED_BY_$(PKG_BASENAME)gfortran  = $(PKG_BASENAME)g95
+OBSOLETED_BY_$(PKG_BASENAME)gfortran += $(PKG_BASENAME)g95rt
 
-ALTERNATIVES_CSWgcc4gfortran += gfortran
+ALTERNATIVES_$(PKG_BASENAME)gfortran += gfortran
 ALTERNATIVE_gfortran += $(bindir)/gfortran gcc_gfortran $(bindir)/gfortran$(PROGRAM_SUFFIX) $(ALTERNATIVES_PRIO)
 
-PACKAGES += CSWgcc4java
-CATALOGNAME_CSWgcc4java       = gcc4java
-SPKG_DESC_CSWgcc4java       = GNU Java Compiler
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibmpfr4
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibgmp10
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibgcc-s1
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibgcj-tools$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibgcj$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibgij$(JAVA_LIB_VERSION)
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibmpc2
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibz1
+PACKAGES += $(PKG_BASENAME)java
+SPKG_DESC_$(PKG_BASENAME)java       = GNU Java Compiler
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibgcj$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibgcj-tools$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibgij$(JAVA_LIB_VERSION)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibgmp10
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibgmpxx4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibmpc2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibmpfr4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibppl-c4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibppl9
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibpwl5
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibz1
 
-PKGFILES_CSWgcc4java  = $(foreach F,$(JAVA_BINARIES),$(bindir)/$(F)$(PROGRAM_SUFFIX))
-PKGFILES_CSWgcc4java += $(foreach F,$(JAVA_BINARIES),$(prefix)/gcc4/bin/$(F))
-PKGFILES_CSWgcc4java += $(bindir)/\w+-\w+-solaris[\d\.]+-gcj$(PROGRAM_SUFFIX)
-PKGFILES_CSWgcc4java += $(mandir)/.*/gcj.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gij.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/jv.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/jcf.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/grmi.*
-PKGFILES_CSWgcc4java += $(mandir)/.*jar.*
-PKGFILES_CSWgcc4java += $(mandir)/.*jni.*
-PKGFILES_CSWgcc4java += $(mandir)/.*java.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gorbd.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gapplet.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gkeytool.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gserialver.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gtnameserv.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gnative2ascii.*
-PKGFILES_CSWgcc4java += $(mandir)/.*/gc-analyze.*
-PKGFILES_CSWgcc4java += $(datadir)/java/.*
-PKGFILES_CSWgcc4java += $(libdir)/.*libgij.*a
-PKGFILES_CSWgcc4java += $(libdir)/.*libffi.*a
-PKGFILES_CSWgcc4java += $(libdir)/.*lib-gnu-awt.*a
-PKGFILES_CSWgcc4java += $(libdir)/.*security.*
-PKGFILES_CSWgcc4java += $(libdir)/.*logging.properties
-PKGFILES_CSWgcc4java += $(libdir)/.*pkgconfig.*
-PKGFILES_CSWgcc4java += $(libdir)/.*gcj.*a
-PKGFILES_CSWgcc4java += $(libdir)/.*libgcj.*a
-PKGFILES_CSWgcc4java += $(libexecdir)/.*collect.*
-PKGFILES_CSWgcc4java += $(libexecdir)/.*jvgenmain
-PKGFILES_CSWgcc4java += $(libexecdir)/.*jc1.*
-PKGFILES_CSWgcc4java += $(infodir)/gcj.*
-PKGFILES_CSWgcc4java += $(includedir)/.*gcj/.*
-PKGFILES_CSWgcc4java += $(includedir)/.*awt/.*
-PKGFILES_CSWgcc4java += $(includedir)/.*classpath/.*
-PKGFILES_CSWgcc4java += $(includedir)/.*java.*
-PKGFILES_CSWgcc4java += $(includedir)/.*ffi.h
-PKGFILES_CSWgcc4java += $(includedir)/.*org/.*
+PKGFILES_$(PKG_BASENAME)java  = $(foreach F,$(JAVA_BINARIES),$(bindir)/$(F)$(PROGRAM_SUFFIX))
+PKGFILES_$(PKG_BASENAME)java += $(foreach F,$(JAVA_BINARIES),$(prefix)/$(PKG_VERSION_TOKEN)/bin/$(F))
+PKGFILES_$(PKG_BASENAME)java += $(bindir)/\w+-\w+-solaris[\d\.]+-gcj$(PROGRAM_SUFFIX)
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gcj.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gij.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/jv.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/jcf.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/grmi.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*jar.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*jni.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*java.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gorbd.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gapplet.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gkeytool.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gserialver.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gtnameserv.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gnative2ascii.*
+PKGFILES_$(PKG_BASENAME)java += $(mandir)/.*/gc-analyze.*
+PKGFILES_$(PKG_BASENAME)java += $(datadir)/java/.*
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*libgij.*a
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*libffi.*a
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*lib-gnu-awt.*a
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*security.*
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*logging.properties
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*pkgconfig.*
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*gcj.*a
+PKGFILES_$(PKG_BASENAME)java += $(libdir)/.*libgcj.*a
+PKGFILES_$(PKG_BASENAME)java += $(libexecdir)/.*collect.*
+PKGFILES_$(PKG_BASENAME)java += $(libexecdir)/.*jvgenmain
+PKGFILES_$(PKG_BASENAME)java += $(libexecdir)/.*jc1.*
+PKGFILES_$(PKG_BASENAME)java += $(infodir)/gcj.*
+PKGFILES_$(PKG_BASENAME)java += $(includedir)/.*gcj/.*
+PKGFILES_$(PKG_BASENAME)java += $(includedir)/.*awt/.*
+PKGFILES_$(PKG_BASENAME)java += $(includedir)/.*classpath/.*
+PKGFILES_$(PKG_BASENAME)java += $(includedir)/.*java.*
+PKGFILES_$(PKG_BASENAME)java += $(includedir)/.*ffi.h
+PKGFILES_$(PKG_BASENAME)java += $(includedir)/.*org/.*
 
 # The following list could be probably expanded from $(JAVA_BINARIES)
-ALTERNATIVES_CSWgcc4java += gcc4java
-ALTERNATIVE_gcc4java += $(bindir)/aot-compile gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX) $(ALTERNATIVES_PRIO)
-ALTERNATIVE_gcc4java += $(bindir)/gappletviewer gcc_gjava $(bindir)/gappletviewer$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gc-analyze gcc_gjava $(bindir)/gc-analyze$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gcj gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gcj-dbtool gcc_gjava $(bindir)/gcj-dbtool$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gcjh gcc_gjava $(bindir)/gcjh$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gij gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gjar gcc_gjava $(bindir)/gjar$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gjarsigner gcc_gjava $(bindir)/gjarsigner$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gjavah gcc_gjava $(bindir)/gjavah$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gkeytool gcc_gjava $(bindir)/gkeytool$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gnative2ascii gcc_gjava $(bindir)/$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gorbd gcc_gjava $(bindir)/gorbd$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/grmic gcc_gjava $(bindir)/grmic$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/grmid gcc_gjava $(bindir)/grmid$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/grmregistry gcc_gjava $(bindir)/grmregistry$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/grmregistry gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gserialver gcc_gjava $(bindir)/gserialver$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/gtnameserv gcc_gjava $(bindir)/gtnameserv$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/jcf-dump gcc_gjava $(bindir)/jcf-dump$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/jv-convert gcc_gjava $(bindir)/jv-convert$(PROGRAM_SUFFIX)
-ALTERNATIVE_gcc4java += $(bindir)/rebuild-gcj-db gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
+ALTERNATIVES_$(PKG_BASENAME)java += $(PKG_VERSION_TOKEN)java
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/aot-compile gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX) $(ALTERNATIVES_PRIO)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gappletviewer gcc_gjava $(bindir)/gappletviewer$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gc-analyze gcc_gjava $(bindir)/gc-analyze$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gcj gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gcj-dbtool gcc_gjava $(bindir)/gcj-dbtool$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gcjh gcc_gjava $(bindir)/gcjh$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gij gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gjar gcc_gjava $(bindir)/gjar$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gjarsigner gcc_gjava $(bindir)/gjarsigner$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gjavah gcc_gjava $(bindir)/gjavah$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gkeytool gcc_gjava $(bindir)/gkeytool$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gnative2ascii gcc_gjava $(bindir)/$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gorbd gcc_gjava $(bindir)/gorbd$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/grmic gcc_gjava $(bindir)/grmic$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/grmid gcc_gjava $(bindir)/grmid$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/grmregistry gcc_gjava $(bindir)/grmregistry$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/grmregistry gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gserialver gcc_gjava $(bindir)/gserialver$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/gtnameserv gcc_gjava $(bindir)/gtnameserv$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/jcf-dump gcc_gjava $(bindir)/jcf-dump$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/jv-convert gcc_gjava $(bindir)/jv-convert$(PROGRAM_SUFFIX)
+ALTERNATIVE_$(PKG_VERSION_TOKEN)java += $(bindir)/rebuild-gcj-db gcc_gjava $(bindir)/rebuild-gcj-db$(PROGRAM_SUFFIX)
 
-PACKAGES += CSWgcc4objc
-CATALOGNAME_CSWgcc4objc       = gcc4objc
-SPKG_DESC_CSWgcc4objc       = GNU Objective C Compiler
-PKGFILES_CSWgcc4objc  = $(libexecdir)/.*cc1obj
-PKGFILES_CSWgcc4objc += $(libdir)/.*libobjc.*a
-PKGFILES_CSWgcc4objc += $(includedir)/.*objc/.*
-PKGFILES_CSWgcc4objc += $(libdir)/.*/include/objc/.*
-PKGFILES_CSWgcc4objc += $(call baseisadirs,$(libdir),libobjc.so)
-PKGFILES_CSWgcc4objc += $(call baseisadirs,$(libdir),libobjc_gc.so)
-RUNTIME_DEP_PKGS_CSWgcc4objc += CSWlibgmp10
-RUNTIME_DEP_PKGS_CSWgcc4objc += CSWlibmpc2
-RUNTIME_DEP_PKGS_CSWgcc4objc += CSWlibmpfr4
-RUNTIME_DEP_PKGS_CSWgcc4objc += CSWlibobjc-gc4
-RUNTIME_DEP_PKGS_CSWgcc4objc += CSWlibobjc4
-RUNTIME_DEP_PKGS_CSWgcc4objc += CSWlibz1
+PACKAGES += $(PKG_BASENAME)objc
+SPKG_DESC_$(PKG_BASENAME)objc       = GNU Objective C Compiler
+PKGFILES_$(PKG_BASENAME)objc  = $(libexecdir)/.*cc1obj
+PKGFILES_$(PKG_BASENAME)objc += $(libdir)/.*libobjc.*a
+PKGFILES_$(PKG_BASENAME)objc += $(includedir)/.*objc/.*
+PKGFILES_$(PKG_BASENAME)objc += $(libdir)/.*/include/objc/.*
+PKGFILES_$(PKG_BASENAME)objc += $(call baseisadirs,$(libdir),libobjc.so)
+PKGFILES_$(PKG_BASENAME)objc += $(call baseisadirs,$(libdir),libobjc_gc.so)
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibgmp10
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibgmpxx4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibmpc2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibmpfr4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibobjc-gc3
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibobjc3
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibppl-c4
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibppl9
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibpwl5
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibz1
 
 PACKAGES += CSWlibgo0
 CATALOGNAME_CSWlibgo0 = libgo0
@@ -461,25 +493,35 @@
 
 # libiconv deps cropped up relatively late in the porting process. Perhaps
 # they apply to all arch/OS combinations.
-RUNTIME_DEP_PKGS_CSWgcc4core += CSWlibiconv2
-RUNTIME_DEP_PKGS_CSWgcc4g++ += CSWlibiconv2
-RUNTIME_DEP_PKGS_CSWgcc4gfortran += CSWlibiconv2
-RUNTIME_DEP_PKGS_CSWgcc4java += CSWlibiconv2
-RUNTIME_DEP_PKGS_CSWgcc4objc += CSWlibiconv2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += CSWlibiconv2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += CSWlibiconv2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += CSWlibiconv2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += CSWlibiconv2
+RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += CSWlibiconv2
 
 # Maybe it's unnecessary.
 # # Solaris 10 on i386 specific:
-# RUNTIME_DEP_PKGS_CSWgcc4core_i386_5.10 += CSWlibiconv2
-# RUNTIME_DEP_PKGS_CSWgcc4g++_i386_5.10 += CSWlibiconv2
-# RUNTIME_DEP_PKGS_CSWgcc4gfortran_i386_5.10 += CSWlibiconv2
-# RUNTIME_DEP_PKGS_CSWgcc4objc_i386_5.10 += CSWlibiconv2
-# RUNTIME_DEP_PKGS_CSWgcc4java_i386_5.10 += CSWlibiconv2
-# RUNTIME_DEP_PKGS_CSWgcc4core += $(RUNTIME_DEP_PKGS_CSWgcc4core_$(GARCH)_$(GAROSREL))
-# RUNTIME_DEP_PKGS_CSWgcc4g++ += $(RUNTIME_DEP_PKGS_CSWgcc4g++_$(GARCH)_$(GAROSREL))
-# RUNTIME_DEP_PKGS_CSWgcc4gfortran += $(RUNTIME_DEP_PKGS_CSWgcc4gfortran_$(GARCH)_$(GAROSREL))
-# RUNTIME_DEP_PKGS_CSWgcc4objc += $(RUNTIME_DEP_PKGS_CSWgcc4objc_$(GARCH)_$(GAROSREL))
-# RUNTIME_DEP_PKGS_CSWgcc4java += $(RUNTIME_DEP_PKGS_CSWgcc4java_$(GARCH)_$(GAROSREL))
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)core_i386_5.10 += CSWlibiconv2
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++_i386_5.10 += CSWlibiconv2
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran_i386_5.10 += CSWlibiconv2
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc_i386_5.10 += CSWlibiconv2
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)java_i386_5.10 += CSWlibiconv2
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)core += $(RUNTIME_DEP_PKGS_$(PKG_BASENAME)core_$(GARCH)_$(GAROSREL))
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++ += $(RUNTIME_DEP_PKGS_$(PKG_BASENAME)g++_$(GARCH)_$(GAROSREL))
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran += $(RUNTIME_DEP_PKGS_$(PKG_BASENAME)gfortran_$(GARCH)_$(GAROSREL))
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc += $(RUNTIME_DEP_PKGS_$(PKG_BASENAME)objc_$(GARCH)_$(GAROSREL))
+# RUNTIME_DEP_PKGS_$(PKG_BASENAME)java += $(RUNTIME_DEP_PKGS_$(PKG_BASENAME)java_$(GARCH)_$(GAROSREL))
 
+# Not needed even on i386/5.10?
+#
+# # These dependencies seem to exist only in the i386 packages on 5.10
+# RUNTIME_DEP_PKGS_CSWlibgcj$(JAVA_LIB_VERSION)_i386_5.10 = CSWlibz1
+# RUNTIME_DEP_PKGS_CSWlibgcj$(JAVA_LIB_VERSION) += $(RUNTIME_DEP_PKGS_CSWlibgcj$(JAVA_LIB_VERSION)_$(GARCH)_$(GAROSREL))
+# RUNTIME_DEP_PKGS_CSWlibgij$(JAVA_LIB_VERSION)_i386_5.10 = CSWlibz1
+# RUNTIME_DEP_PKGS_CSWlibgij$(JAVA_LIB_VERSION) += $(RUNTIME_DEP_PKGS_CSWlibgij$(JAVA_LIB_VERSION)_$(GARCH)_$(GAROSREL))
+# RUNTIME_DEP_PKGS_CSWlibgcj-tools$(JAVA_LIB_VERSION)_i386_5.10 += CSWlibz1
+# RUNTIME_DEP_PKGS_CSWlibgcj-tools$(JAVA_LIB_VERSION) += $(RUNTIME_DEP_PKGS_CSWlibgcj-tools$(JAVA_LIB_VERSION)_$(GARCH)_$(GAROSREL))
+
 PACKAGES += $(PACKAGES_$(GARCH))
 CORE_BINARIES = cpp gcc gcov
 CXX_BINARIES = g\+\+ c\+\+
@@ -493,13 +535,19 @@
 include gar/category.mk
 
 post-install-modulated:
-	ginstall -d -m 755 $(DESTDIR)$(prefix)/gcc4/bin
+	ginstall -d -m 755 $(DESTDIR)$(prefix)/$(PKG_VERSION_TOKEN)/bin
 	for b in $(CORE_BINARIES) $(CXX_BINARIES) \
 		$(FORTRAN_BINARIES) $(JAVA_BINARIES); do \
 		gln -v -s ../../bin/$${b}$(PROGRAM_SUFFIX) \
-		$(DESTDIR)$(prefix)/gcc4/bin/$${b}; \
+		$(DESTDIR)$(prefix)/$(PKG_VERSION_TOKEN)/bin/$${b}; \
 	done
 	@$(MAKECOOKIE)
 
 # We need GNU find as find
 PATH := /opt/csw/gnu:$(PATH)
+
+# This override sets the right RPATH on libstdc++ and other libraries.
+LD_OPTIONS := -R/opt/csw/lib -R/opt/csw/lib/\$$ISALIST
+CONFIGURE_ENV := PATH=$(PATH) CC=$(CC) LD_OPTIONS="$(LD_OPTIONS)"
+BUILD_ENV := PATH=$(PATH) LD_OPTIONS="$(LD_OPTIONS)"
+INSTALL_ENV := PATH=$(PATH)

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list