diff options
author | 2012-07-27 21:33:37 +0900 | |
---|---|---|
committer | 2012-07-27 21:33:37 +0900 | |
commit | 7839486f0128a3ec5bae6962624ee4d3f141c651 (patch) | |
tree | b5687f0e644a3563b7f42b74cf63ecd60c70e134 /dev-util | |
parent | added freebsd 9.1 profiles (diff) | |
download | gentoo-bsd-7839486f0128a3ec5bae6962624ee4d3f141c651.tar.gz gentoo-bsd-7839486f0128a3ec5bae6962624ee4d3f141c651.tar.bz2 gentoo-bsd-7839486f0128a3ec5bae6962624ee4d3f141c651.zip |
catalyst -- fixes FreeBSD support code, bug #363577
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/catalyst/Manifest | 4 | ||||
-rw-r--r-- | dev-util/catalyst/catalyst-2.0.10.1.ebuild | 104 | ||||
-rw-r--r-- | dev-util/catalyst/files/2.0.8.1-arm-softfp.patch | 36 | ||||
-rw-r--r-- | dev-util/catalyst/files/catalyst-2.0.10.1-fbsd.patch | 133 |
4 files changed, 277 insertions, 0 deletions
diff --git a/dev-util/catalyst/Manifest b/dev-util/catalyst/Manifest new file mode 100644 index 0000000..26fe9ee --- /dev/null +++ b/dev-util/catalyst/Manifest @@ -0,0 +1,4 @@ +AUX 2.0.8.1-arm-softfp.patch 1551 RMD160 20b47d803443136ab511ef5ad5b7d5b2ea0e0715 SHA1 c51b4dc05bffaed7911d447bea7993400854152e SHA256 54ae43557d15bd51d6227aec8160d61c07e45b1cb6b6c8f11fe1c4804772afcc +AUX catalyst-2.0.10.1-fbsd.patch 5415 RMD160 481b6eccbac39d389443a7907ea36e47fe05db15 SHA1 47a03f8ead1b72714da89bdf4b7881293d88c4fc SHA256 a071a7e6816b0df2e5f658b2d2ff086bf8630f705dbf3fa37858ca7e16579bc5 +DIST catalyst-2.0.10.1.tar.bz2 909073 RMD160 48d4eeb7e3dfd14f1c1f04542371580999d97e63 SHA1 c8cc79c635b531fdc5592a8cf230706817a8458a SHA256 3ed2217c579dcc01e13afc017dbfea869d2c99a0c169290e678fc113db6891ed +EBUILD catalyst-2.0.10.1.ebuild 3440 RMD160 751e7cf35536bcbbf3f6ef1d9ab1792eb7fe9a32 SHA1 35af1d15ee5557e65103155a3847fc7f6f0c3557 SHA256 14b53f8a934c12a9f08e91f9f80de6d65799e8bc9e606408a26fbb0f28f5b0fa diff --git a/dev-util/catalyst/catalyst-2.0.10.1.ebuild b/dev-util/catalyst/catalyst-2.0.10.1.ebuild new file mode 100644 index 0000000..cf9d830 --- /dev/null +++ b/dev-util/catalyst/catalyst-2.0.10.1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/catalyst/catalyst-2.0.10.1.ebuild,v 1.1 2012/07/27 05:14:07 jmbsvicetto Exp $ + +# catalyst-9999 -> latest Git +# catalyst-2.9999 -> catalyst_2 branch from Git +# catalyst-VER -> normal catalyst release + +EAPI=3 +PYTHON_DEPEND="2" + +if [[ ${PV} == 9999* || ${PV} == 2.9999* ]]; then + EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/catalyst.git" + inherit git-2 + SRC_URI="" + S="${WORKDIR}/${PN}" + KEYWORDS="" +else + SRC_URI="mirror://gentoo/${P}.tar.bz2 + http://dev.gentoo.org/~jmbsvicetto/distfiles/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +fi +inherit eutils multilib python + +DESCRIPTION="release metatool used for creating releases based on Gentoo Linux" +HOMEPAGE="http://www.gentoo.org/proj/en/releng/catalyst/" + +LICENSE="GPL-2" +SLOT="0" +RESTRICT="" +IUSE="ccache kernel_linux" + +DEPEND="app-text/asciidoc" +RDEPEND="app-crypt/shash + virtual/cdrtools + ccache? ( dev-util/ccache ) + ia64? ( sys-fs/dosfstools ) + kernel_linux? ( app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )" + +pkg_setup() { + if use ccache ; then + einfo "Enabling ccache support for catalyst." + else + ewarn "By default, ccache support for catalyst is disabled." + ewarn "If this is not what you intended," + ewarn "then you should add ccache to your USE." + fi + echo + einfo "The template spec files are now installed by default. You can find" + einfo "them under /usr/share/doc/${PF}/examples" + einfo "and they are considered to be the authorative source of information" + einfo "on catalyst." + echo + if [[ ${PV} == 9999* || ${PV} == 2.9999* ]]; then + ewarn "The ${EGIT_BRANCH:-master} branch (what you get with this ${PV} ebuild) contains" + ewarn "work-in-progress code. Be aware that it's likely that it will not" + ewarn "be in a working state at any given point. Please do not file bugs" + ewarn "until you have posted on the gentoo-catalyst mailing list and we" + ewarn "have asked you to do so." + fi + python_set_active_version 2 +} + +src_prepare() { + python_convert_shebangs 2 catalyst modules/catalyst_lock.py + + epatch "${FILESDIR}"/2.0.8.1-arm-softfp.patch + use elibc_FreeBSD && epatch "${FILESDIR}"/${PN}-2.0.10.1-fbsd.patch +} + +src_install() { + insinto /usr/$(get_libdir)/${PN} + exeinto /usr/$(get_libdir)/${PN} + doexe catalyst || die "copying catalyst" + if [[ ${PV} == 9999* ]]; then + doins -r modules files || die "copying files" + else + doins -r arch modules livecd || die "copying files" + fi + for x in targets/*; do + exeinto /usr/$(get_libdir)/${PN}/$x + doexe $x/* || die "copying ${x}" + done + make_wrapper catalyst /usr/$(get_libdir)/${PN}/catalyst + insinto /etc/catalyst + doins files/catalyst.conf files/catalystrc || die "copying configuration" + insinto /usr/share/doc/${PF}/examples + doins examples/* || die + dodoc README ChangeLog AUTHORS + doman files/catalyst.1 + # Here is where we actually enable ccache + use ccache && \ + dosed 's:options="autoresume kern:options="autoresume ccache kern:' \ + /etc/catalyst/catalyst.conf + dosed "s:/usr/lib/catalyst:/usr/$(get_libdir)/catalyst:" \ + /etc/catalyst/catalyst.conf +} + +pkg_postinst() { + einfo "You can find more information about catalyst by checking out the" + einfo "catalyst project page at:" + einfo "http://www.gentoo.org/proj/en/releng/catalyst/index.xml" + echo +} diff --git a/dev-util/catalyst/files/2.0.8.1-arm-softfp.patch b/dev-util/catalyst/files/2.0.8.1-arm-softfp.patch new file mode 100644 index 0000000..51ae1e7 --- /dev/null +++ b/dev-util/catalyst/files/2.0.8.1-arm-softfp.patch @@ -0,0 +1,36 @@ +diff -ur catalyst-2.0.8.1.orig//arch/arm.py catalyst-2.0.8.1/arch/arm.py +--- catalyst-2.0.8.1.orig//arch/arm.py 2012-07-07 20:28:46.788719269 +0200 ++++ catalyst-2.0.8.1/arch/arm.py 2012-07-07 20:29:28.099721112 +0200 +@@ -67,28 +67,28 @@ + "Builder class for armv6j target" + def __init__(self,myspec): + generic_arm.__init__(self,myspec) +- self.settings["CHOST"]="armv6j-unknown-linux-gnueabi" ++ self.settings["CHOST"]="armv6j-softfp-linux-gnueabi" + self.settings["CFLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=softfp" + + class arch_armv6z(generic_arm): + "Builder class for armv6z target" + def __init__(self,myspec): + generic_arm.__init__(self,myspec) +- self.settings["CHOST"]="armv6z-unknown-linux-gnueabi" ++ self.settings["CHOST"]="armv6z-softfp-linux-gnueabi" + self.settings["CFLAGS"]+=" -march=armv6z -mfpu=vfp -mfloat-abi=softfp" + + class arch_armv6zk(generic_arm): + "Builder class for armv6zk target" + def __init__(self,myspec): + generic_arm.__init__(self,myspec) +- self.settings["CHOST"]="armv6zk-unknown-linux-gnueabi" ++ self.settings["CHOST"]="armv6zk-softfp-linux-gnueabi" + self.settings["CFLAGS"]+=" -march=armv6zk -mfpu=vfp -mfloat-abi=softfp" + + class arch_armv7a(generic_arm): + "Builder class for armv7a target" + def __init__(self,myspec): + generic_arm.__init__(self,myspec) +- self.settings["CHOST"]="armv7a-unknown-linux-gnueabi" ++ self.settings["CHOST"]="armv7a-softfp-linux-gnueabi" + self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp" + + class arch_armv6j_hardfp(generic_arm):
\ No newline at end of file diff --git a/dev-util/catalyst/files/catalyst-2.0.10.1-fbsd.patch b/dev-util/catalyst/files/catalyst-2.0.10.1-fbsd.patch new file mode 100644 index 0000000..406ddd8 --- /dev/null +++ b/dev-util/catalyst/files/catalyst-2.0.10.1-fbsd.patch @@ -0,0 +1,133 @@ +diff -Nur catalyst-2.0.8.1.orig/modules/generic_stage_target.py catalyst-2.0.8.1/modules/generic_stage_target.py +--- catalyst-2.0.8.1.orig/modules/generic_stage_target.py 2012-05-12 05:19:57.000000000 +0900 ++++ catalyst-2.0.8.1/modules/generic_stage_target.py 2012-06-04 00:36:35.000000000 +0900 +@@ -1078,9 +1078,14 @@ + if os.path.exists(self.settings["chroot_path"]+"/usr/local/portage"): + cmd("rm -rf "+self.settings["chroot_path"]+"/usr/local/portage",\ + "Could not remove /usr/local/portage",env=self.env) +- cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ +- "/etc/portage/make.conf",\ +- "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) ++ if os.path.exists("/usr/bin/gsed"): ++ cmd("gsed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ ++ "/etc/portage/make.conf",\ ++ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) ++ else: ++ cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ ++ "/etc/portage/make.conf",\ ++ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) + + """ Clean up old and obsoleted files in /etc """ + if os.path.exists(self.settings["stage_path"]+"/etc"): +diff -Nur catalyst-2.0.8.1.orig/targets/stage1/stage1-chroot.sh catalyst-2.0.8.1/targets/stage1/stage1-chroot.sh +--- catalyst-2.0.8.1.orig/targets/stage1/stage1-chroot.sh 2012-05-12 05:19:57.000000000 +0900 ++++ catalyst-2.0.8.1/targets/stage1/stage1-chroot.sh 2012-06-04 00:36:35.000000000 +0900 +@@ -4,6 +4,7 @@ + export clst_buildpkgs="$(/tmp/build.py)" + + source /tmp/chroot-functions.sh ++sed_selector + + # Setup our environment + BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)" +@@ -23,7 +24,7 @@ + [ -e /etc/portage/make.conf ] && \ + echo 'USE="${USE} -build"' >> /etc/portage/make.conf + run_merge "--oneshot --nodeps sys-apps/baselayout" +-sed -i '/USE="${USE} -build"/d' /etc/portage/make.conf ++${SED} -i '/USE="${USE} -build"/d' /etc/portage/make.conf + + # Next, we install the package manager + clst_root_path=/ setup_pkgmgr +@@ -34,5 +35,5 @@ + echo "USE=\"-* bindist build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" \ + >> /etc/portage/make.conf + run_merge "--oneshot ${clst_buildpkgs}" +-sed -i "/USE=\"-* bindist build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \ ++${SED} -i "/USE=\"-* bindist build ${STAGE1_USE} ${clst_HOSTUSE}\"/d" \ + /etc/portage/make.conf +diff -Nur catalyst-2.0.8.1.orig/targets/stage1/stage1-preclean-chroot.sh catalyst-2.0.8.1/targets/stage1/stage1-preclean-chroot.sh +--- catalyst-2.0.8.1.orig/targets/stage1/stage1-preclean-chroot.sh 2012-05-12 05:19:57.000000000 +0900 ++++ catalyst-2.0.8.1/targets/stage1/stage1-preclean-chroot.sh 2012-06-04 00:36:35.000000000 +0900 +@@ -4,6 +4,8 @@ + + source /tmp/chroot-functions.sh + ++sed_selector ++${SED} -i '/^PORTDIR_OVERLAY/d' /etc/portage/make.conf + update_env_settings + show_debug + +diff -Nur catalyst-2.0.8.1.orig/targets/support/chroot-functions.sh catalyst-2.0.8.1/targets/support/chroot-functions.sh +--- catalyst-2.0.8.1.orig/targets/support/chroot-functions.sh 2012-05-12 05:19:57.000000000 +0900 ++++ catalyst-2.0.8.1/targets/support/chroot-functions.sh 2012-06-04 00:38:07.000000000 +0900 +@@ -60,6 +60,7 @@ + } + + setup_myfeatures(){ ++ sed_selector + setup_myemergeopts + export FEATURES="-news" + if [ -n "${clst_CCACHE}" ] +@@ -84,7 +85,7 @@ + else + clst_root_path=/ run_merge --oneshot --nodeps --noreplace sys-devel/distcc || exit 1 + fi +- sed -i '/USE="${USE} -avahi -gtk -gnome"/d' /etc/portage/make.conf ++ ${SED} -i '/USE="${USE} -avahi -gtk -gnome"/d' /etc/portage/make.conf + mkdir -p /etc/distcc + echo "${clst_distcc_hosts}" > /etc/distcc/hosts + +@@ -168,7 +169,8 @@ + # Use --update or portage won't reinstall the same version. + [ -e /etc/portage/make.conf ] && echo 'USE="${USE} build"' >> /etc/portage/make.conf + run_merge --oneshot --nodeps --update sys-apps/portage +- sed -i '/USE="${USE} build"/d' /etc/portage/make.conf ++ sed_selector ++ ${SED} -i '/USE="${USE} build"/d' /etc/portage/make.conf + } + + cleanup_distcc() { +@@ -234,7 +236,8 @@ + + make_destpath() { + # ROOT is / by default, so remove any ROOT= settings from make.conf +- sed -i '/ROOT=/d' /etc/portage/make.conf ++ sed_selector ++ ${SED} -i '/ROOT=/d' /etc/portage/make.conf + export ROOT=/ + if [ "${1}" != "/" -a -n "${1}" ] + then +@@ -410,6 +413,14 @@ + Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop + } + ++sed_selector() { ++ if [ -e "/usr/bin/gsed" ]; then ++ SED="gsed" ++ else ++ SED="sed" ++ fi ++} ++ + # We do this everywhere, so why not put it in this script + run_default_funcs + +diff -Nur catalyst.orig-2.0.8.1/modules/stage1_target.py catalyst-2.0.8.1/modules/stage1_target.py +--- catalyst-2.0.8.1.orig/modules/stage1_target.py 2012-06-04 00:43:34.000000000 +0900 ++++ catalyst-2.0.8.1/modules/stage1_target.py 2012-06-04 00:50:19.000000000 +0900 +@@ -87,10 +87,14 @@ + # stage_path/proc probably doesn't exist yet, so create it + if not os.path.exists(self.settings["stage_path"]+"/proc"): + os.makedirs(self.settings["stage_path"]+"/proc") ++ if not os.path.exists(self.settings["stage_path"]+"/dev"): ++ os.makedirs(self.settings["stage_path"]+"/dev") + + # alter the mount mappings to bind mount proc onto it + self.mounts.append("/tmp/stage1root/proc") + self.mountmap["/tmp/stage1root/proc"]="/proc" ++ self.mounts.append("/tmp/stage1root/dev") ++ self.mountmap["/tmp/stage1root/dev"]="/dev" + + + def register(foo): |