--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.txt Thu Oct 13 18:10:12 2011 +0400
@@ -0,0 +1,1 @@
+illlumos-userland HG repo.
--- a/make-rules/makemaker.mk Mon Aug 08 22:20:31 2011 +0100
+++ b/make-rules/makemaker.mk Thu Oct 13 18:10:12 2011 +0400
@@ -35,13 +35,16 @@
# directories.
PERLBD_ARCH = $(BUILD_DIR)/$(MACH32)
-$(PERLBD_ARCH)-5.8.4/.configured: PERL_VERSION=5.8.4
+$(PERLBD_ARCH)-5.10/.configured: PERL_VERSION=5.10
$(PERLBD_ARCH)-5.12/.configured: PERL_VERSION=5.12
BUILD_32 = $(PERL_VERSIONS:%=$(PERLBD_ARCH)-%/.built)
INSTALL_32 = $(BUILD_32:%/.built=%/.installed)
TEST_32 = $(BUILD_32:%/.built=%/.tested)
+STUDIOFLAGS_GCC_PERL_FIX= (cd $(@D); /usr/gnu/bin/sed 's/^CCCDLFLAGS = -KPIC/^CCCDLFLAGS = -fPIC/' Makefile > Makefile.tmp; \
+ grep -v '^OPTIMIZE =' Makefile.tmp > Makefile)
+
COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV)
COMPONENT_CONFIGURE_ENV += PERL="$(PERL)"
@@ -51,6 +54,7 @@
$(COMPONENT_PRE_CONFIGURE_ACTION)
(cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \
Makefile.PL $(CONFIGURE_OPTIONS))
+ $(STUDIOFLAGS_GCC_PERL_FIX)
$(COMPONENT_POST_CONFIGURE_ACTION)
$(TOUCH) $@
--- a/make-rules/shared-macros.mk Mon Aug 08 22:20:31 2011 +0100
+++ b/make-rules/shared-macros.mk Thu Oct 13 18:10:12 2011 +0400
@@ -30,7 +30,7 @@
export DOWNLOAD_SEARCH_PATH += $(ARCHIVE_MIRROR)
# The workspace starts at the mercurial root
-export WS_TOP ?= $(shell hg root)
+export WS_TOP ?= $(shell hg root)/src/icore
# we want our pkg piplines to fail if there is an error
# (like if pkgdepend fails in the middle of a pipe), but
@@ -46,7 +46,7 @@
SHELL= /bin/bash
-CONSOLIDATION = oi-build
+CONSOLIDATION = icore
PUBLISHER ?= $(CONSOLIDATION)
ROOT = /
@@ -59,7 +59,7 @@
BUILD_VERSION = $(OS_VERSION)-$(BUILD_NUM)
-COMPILER = studio
+COMPILER = gcc
BITS = 32
PYTHON_VERSION = 2.6
PYTHON_VERSIONS = 2.6
@@ -89,7 +89,7 @@
COMPONENT_DIR = $(shell pwd)
SOURCE_DIR = $(COMPONENT_DIR)/$(COMPONENT_SRC)
BUILD_DIR = $(COMPONENT_DIR)/build
-PROTO_DIR = $(BUILD_DIR)/prototype/$(MACH)
+PROTO_DIR = $(BUILD_DIR)/proto/$(MACH)
ETCDIR = /etc
USRDIR = /usr
@@ -209,7 +209,7 @@
SPRO_ROOT = $(BUILD_TOOLS)/SUNWspro
SPRO_VROOT = $(SPRO_ROOT)/sunstudio12.1
-GCC_ROOT = /usr/sfw
+GCC_ROOT = /usr
CC.studio.32 = $(SPRO_VROOT)/bin/cc
CXX.studio.32 = $(SPRO_VROOT)/bin/CC
@@ -224,6 +224,7 @@
CXX.gcc.64 = $(GCC_ROOT)/bin/g++
CC = $(CC.$(COMPILER).$(BITS))
+
CXX = $(CXX.$(COMPILER).$(BITS))
lint.32 = $(SPRO_VROOT)/bin/lint -m32
@@ -253,11 +254,11 @@
# This is the default BUILD version of perl
# Not necessarily the system's default version, i.e. /usr/bin/perl
-PERL_VERSION = 5.12
+PERL_VERSION = 5.10
-PERL_VERSIONS = 5.8.4 5.12
+PERL_VERSIONS = 5.10
-PERL.5.8.4 = /usr/perl5/5.8.4/bin/perl
+PERL.5.10 = /usr/bin/perl
PERL.5.12 = /usr/perl5/5.12/bin/perl
PERL = $(PERL.$(PERL_VERSION))
@@ -450,7 +451,7 @@
#
# GCC Compiler optimization flag
-gcc_OPT = -O3
+gcc_OPT = -O2
# GCC PIC code generation. Use CC_PIC instead to select PIC code generation.
gcc_PIC = -fPIC -DPIC
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/cpan2ips.sh Thu Oct 13 18:10:12 2011 +0400
@@ -0,0 +1,115 @@
+#!/bin/bash
+
+set -e
+set -u
+
+
+url="$1"
+tarball=$(basename "$url")
+
+eval $(echo "$tarball" | sed -r 's!^(.+)-([^-]+)\.tar\.(\w+)$!name=\1\nver=\2\ncomp=\3\n!')
+
+name_lc=${name,,}
+
+mkdir -p $name_lc
+cd $name_lc
+wget -O $tarball -c "$url"
+
+cat <<Makefile > Makefile
+# 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) 2011, Nexenta Systems, Inc. and/or its affiliates. All rights reserved.
+#
+
+include ../../../make-rules/shared-macros.mk
+COMPONENT_NAME= $name
+COMPONENT_VERSION= $ver
+COMPONENT_SRC= \$(COMPONENT_NAME)-\$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE= \$(COMPONENT_SRC).tar.$comp
+COMPONENT_ARCHIVE_HASH= sha1:$(sha1sum $tarball | cut -d ' ' -f 1)
+COMPONENT_ARCHIVE_URL= $(dirname $url)/\$(COMPONENT_ARCHIVE)
+
+include \$(WS_TOP)/make-rules/prep.mk
+include \$(WS_TOP)/make-rules/ips.mk
+include \$(WS_TOP)/make-rules/makemaker.mk
+
+COMPILER = gcc
+CONFIGURE_OPTIONS<----->+=CC=gcc
+
+build: \$(BUILD_32)
+
+install: \$(INSTALL_32)
+
+COMPONENT_TEST_TARGETS = test
+test: \$(TEST_32)
+
+BUILD_PKG_DEPENDENCIES = \$(BUILD_TOOLS)
+
+include \$(WS_TOP)/make-rules/depend.mk
+
+Makefile
+
+make install
+
+if tar xf "$tarball" "$name-$ver/META.yml" --strip-components=1; then
+ summary=$(grep abstract: META.yml | sed 's,abstract: *,,')
+ rm META.yml
+else
+ summary=''
+fi
+
+cat <<Manifest > $name_lc.p5m
+# 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) 2011, Nexenta Systems, Inc. and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
+set name=pkg.fmri value=pkg:/library/perl-5/$name_lc@\$(IPS_COMPONENT_VERSION),\$(BUILD_VERSION)
+set name=info.classification value="org.opensolaris.category.2008:Development/Perl"
+set name=pkg.summary value="$summary"
+
+$(../../../tools/make-payload.sh build/proto/i386 | grep -v 'perllocal\.pod' | grep -v '\.packlist')
+
+depend fmri=runtime-perl-510 type=require
+#depend fmri=library/perl-5/ type=require
+
+Manifest
+
+
+exit 0
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/make-payload.sh Thu Oct 13 18:10:12 2011 +0400
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+set -u
+
+usage() {
+ echo "$0 [directory]"
+ exit 1
+}
+
+if [ $# = 1 ]; then
+ cd "$1" || usage
+elif [ $# != 0 ]; then
+ usage
+fi
+
+gfind * -type d -printf 'dir path=%p\n'
+gfind * -type f -printf 'file path=%p\n'
+gfind * -type l -printf 'link path=%p target=%l\n'
+
+exit 0
+