Gentoo Archives: gentoo-commits

From: "Naohiro Aota (naota)" <naota@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-freebsd/freebsd-sources: freebsd-sources-8.2-r1.ebuild ChangeLog freebsd-sources-8.2.ebuild
Date: Mon, 02 Apr 2012 10:13:32
Message-Id: 20120402101319.465BC2004B@flycatcher.gentoo.org
1 naota 12/04/02 10:13:19
2
3 Modified: ChangeLog
4 Added: freebsd-sources-8.2-r1.ebuild
5 Removed: freebsd-sources-8.2.ebuild
6 Log:
7 Add patch to deal with FreeBSD SA 11:05. #408889
8
9 (Portage version: 2.2.0_alpha89/cvs/FreeBSD i386)
10
11 Revision Changes Path
12 1.64 sys-freebsd/freebsd-sources/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.64&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.64&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?r1=1.63&r2=1.64
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v
21 retrieving revision 1.63
22 retrieving revision 1.64
23 diff -u -r1.63 -r1.64
24 --- ChangeLog 30 Mar 2012 15:49:23 -0000 1.63
25 +++ ChangeLog 2 Apr 2012 10:13:19 -0000 1.64
26 @@ -1,6 +1,13 @@
27 # ChangeLog for sys-freebsd/freebsd-sources
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.63 2012/03/30 15:49:23 aballier Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.64 2012/04/02 10:13:19 naota Exp $
31 +
32 +*freebsd-sources-8.2-r1 (02 Apr 2012)
33 +
34 + 02 Apr 2012; Naohiro Aota <naota@g.o>
35 + +files/freebsd-sources-8.2-unix2.patch, +freebsd-sources-8.2-r1.ebuild,
36 + -freebsd-sources-8.2.ebuild:
37 + Add patch to deal with FreeBSD SA 11:05. #408889
38
39 30 Mar 2012; Alexis Ballier <aballier@g.o>
40 -freebsd-sources-9.0_rc1.ebuild, -freebsd-sources-9.0_rc2.ebuild,
41
42
43
44 1.1 sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: freebsd-sources-8.2-r1.ebuild
50 ===================================================================
51 # Copyright 1999-2012 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild,v 1.1 2012/04/02 10:13:19 naota Exp $
54
55 inherit bsdmk freebsd flag-o-matic
56
57 DESCRIPTION="FreeBSD kernel sources"
58 SLOT="${PVR}"
59 KEYWORDS="~sparc-fbsd ~x86-fbsd"
60
61 IUSE="symlink"
62
63 SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
64
65 RDEPEND=">=sys-freebsd/freebsd-mk-defs-8.0"
66 DEPEND=""
67
68 RESTRICT="strip binchecks"
69
70 S="${WORKDIR}/sys"
71
72 MY_PVR="${PVR}"
73
74 [[ ${MY_PVR} == "${RV}" ]] && MY_PVR="${MY_PVR}-r0"
75
76 src_unpack() {
77 unpack ${A}
78 cd "${S}"
79
80 # This replaces the gentoover patch, it doesn't need reapply every time.
81 sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
82 -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
83 -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
84 "${S}/conf/newvers.sh"
85
86 # __FreeBSD_cc_version comes from FreeBSD's gcc.
87 # on 8.2-RELEASE it's 800001.
88 sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=800001:g" \
89 -i "${S}/conf/kern.pre.mk" \
90 -i "${S}/conf/kmod.mk" || die "Couldn't set __FreeBSD_cc_version"
91
92 # Remove -Werror
93 sed -e "s:-Werror:-Wno-error:g" \
94 -i "${S}/conf/kern.pre.mk" \
95 -i "${S}/conf/kmod.mk" || die
96
97 epatch "${FILESDIR}/${PN}-8.0-gentoo.patch"
98 epatch "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
99 sed -e 's/elf64-sparc/elf64-sparc-freebsd/g' -i "${S}/conf/ldscript.sparc64" || die
100 epatch "${FILESDIR}/${PN}-6.1-ntfs.patch"
101 epatch "${FILESDIR}/${PN}-7.2-debug-O2.patch"
102 epatch "${FILESDIR}/${PN}-7.1-types.h-fix.patch"
103 epatch "${FILESDIR}/${PN}-8.0-subnet-route-pr40133.patch"
104 epatch "${FILESDIR}/${PN}-7.1-includes.patch"
105 # http://security.FreeBSD.org/patches/SA-11:05/unix2.patch
106 epatch "${FILESDIR}"/${P}-unix2.patch
107
108 # By adding -DGENTOO_LIVECD to CFLAGS activate this stub
109 # vop_whiteout to tmpfs, so it can be used as an overlay
110 # unionfs filesystem over the cd9660 readonly filesystem.
111 epatch "${FILESDIR}/${PN}-7.0-tmpfs_whiteout_stub.patch"
112
113 # See http://sourceware.org/bugzilla/show_bug.cgi?id=5391
114 # ld doesn't provide symbols constructed as the __start_set_(s) ones
115 # are on FreeBSD modules.
116 # This patch adds code to generate a list of these and adds them
117 # as undefined references to ld's commandline to get them.
118 # Without this kernel modules will not load.
119 epatch "${FILESDIR}/${PN}-7.1-binutils_link.patch"
120 }
121
122 src_compile() {
123 einfo "Nothing to compile.."
124 }
125
126 src_install() {
127 insinto "/usr/src/sys-${MY_PVR}"
128 doins -r "${S}/"*
129 }
130
131 pkg_postinst() {
132 if [[ ! -L "${ROOT}/usr/src/sys" ]]; then
133 einfo "/usr/src/sys symlink doesn't exist; creating symlink to sys-${MY_PVR}..."
134 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
135 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
136 # just in case...
137 [[ -L ""${ROOT}/usr/src/sys-${RV}"" ]] && rm "${ROOT}/usr/src/sys-${RV}"
138 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
139 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
140 elif use symlink; then
141 einfo "Updating /usr/src/sys symlink to sys-${MY_PVR}..."
142 rm "${ROOT}/usr/src/sys" "${ROOT}/usr/src/sys-${RV}" || \
143 eerror "Couldn't remove previous symlinks, please fix manually."
144 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
145 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
146 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
147 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
148 fi
149
150 if use sparc-fbsd ; then
151 ewarn "WARNING: kldload currently causes kernel panics"
152 ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
153 ewarn "we need gcc-4.1 to compile the kernel correctly :/"
154 ewarn "Please compile all modules you need into the kernel"
155 fi
156 }