Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-freebsd/freebsd-sources: ChangeLog freebsd-sources-9.0-r1.ebuild
Date: Fri, 25 May 2012 15:28:21
Message-Id: 20120525152806.8F7FC2004B@flycatcher.gentoo.org
1 aballier 12/05/25 15:28:06
2
3 Modified: ChangeLog
4 Added: freebsd-sources-9.0-r1.ebuild
5 Log:
6 Make the disable-optimizations patch unconditional and add a patch to allow sys/sysctl.h to be included alone
7
8 (Portage version: 2.2.0_alpha108/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.70 sys-freebsd/freebsd-sources/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.70&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.70&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?r1=1.69&r2=1.70
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v
20 retrieving revision 1.69
21 retrieving revision 1.70
22 diff -u -r1.69 -r1.70
23 --- ChangeLog 4 May 2012 18:12:40 -0000 1.69
24 +++ ChangeLog 25 May 2012 15:28:06 -0000 1.70
25 @@ -1,6 +1,13 @@
26 # ChangeLog for sys-freebsd/freebsd-sources
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.69 2012/05/04 18:12:40 aballier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.70 2012/05/25 15:28:06 aballier Exp $
30 +
31 +*freebsd-sources-9.0-r1 (25 May 2012)
32 +
33 + 25 May 2012; Alexis Ballier <aballier@g.o>
34 + +freebsd-sources-9.0-r1.ebuild, +files/freebsd-sources-9.0-sysctluint.patch:
35 + Make the disable-optimizations patch unconditional and add a patch to allow
36 + sys/sysctl.h to be included alone
37
38 04 May 2012; Alexis Ballier <aballier@g.o> freebsd-sources-9.0.ebuild,
39 +files/freebsd-sources-9.0-disable-optimizations.patch:
40
41
42
43 1.1 sys-freebsd/freebsd-sources/freebsd-sources-9.0-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-9.0-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-9.0-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: freebsd-sources-9.0-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-9.0-r1.ebuild,v 1.1 2012/05/25 15:28:06 aballier Exp $
53
54 inherit bsdmk freebsd flag-o-matic
55
56 DESCRIPTION="FreeBSD kernel sources"
57 SLOT="${PVR}"
58 KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
59
60 IUSE="symlink"
61
62 SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
63
64 RDEPEND=">=sys-freebsd/freebsd-mk-defs-8.0"
65 DEPEND=""
66
67 RESTRICT="strip binchecks"
68
69 S="${WORKDIR}/sys"
70
71 MY_PVR="${PVR}"
72
73 [[ ${MY_PVR} == "${RV}" ]] && MY_PVR="${MY_PVR}-r0"
74
75 src_unpack() {
76 unpack ${A}
77 cd "${S}"
78
79 # This replaces the gentoover patch, it doesn't need reapply every time.
80 sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
81 -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
82 -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
83 "${S}/conf/newvers.sh"
84
85 # workaround a kernel panic for amd64-fbsd, bug #408019
86 epatch "${FILESDIR}/${PN}-9.0-disable-optimizations.patch"
87
88 # __FreeBSD_cc_version comes from FreeBSD's gcc.
89 # on 9.0-RELEASE it's 900001.
90 sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=900001:g" \
91 -i "${S}/conf/kern.pre.mk" \
92 -i "${S}/conf/kmod.mk" || die "Couldn't set __FreeBSD_cc_version"
93
94 # Remove -Werror
95 sed -e "s:-Werror:-Wno-error:g" \
96 -i "${S}/conf/kern.pre.mk" \
97 -i "${S}/conf/kmod.mk" || die
98
99 epatch "${FILESDIR}/${PN}-9.0-gentoo.patch"
100 epatch "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
101 sed -e 's/elf64-sparc/elf64-sparc-freebsd/g' -i "${S}/conf/ldscript.sparc64" || die
102 epatch "${FILESDIR}/${PN}-6.1-ntfs.patch"
103 epatch "${FILESDIR}/${PN}-7.1-types.h-fix.patch"
104 epatch "${FILESDIR}/${PN}-8.0-subnet-route-pr40133.patch"
105 epatch "${FILESDIR}/${PN}-7.1-includes.patch"
106 epatch "${FILESDIR}/${PN}-9.0-sysctluint.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
114 src_compile() {
115 einfo "Nothing to compile.."
116 }
117
118 src_install() {
119 insinto "/usr/src/sys-${MY_PVR}"
120 doins -r "${S}/"*
121 }
122
123 pkg_postinst() {
124 if [[ ! -L "${ROOT}/usr/src/sys" ]]; then
125 einfo "/usr/src/sys symlink doesn't exist; creating symlink to sys-${MY_PVR}..."
126 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
127 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
128 # just in case...
129 [[ -L ""${ROOT}/usr/src/sys-${RV}"" ]] && rm "${ROOT}/usr/src/sys-${RV}"
130 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
131 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
132 elif use symlink; then
133 einfo "Updating /usr/src/sys symlink to sys-${MY_PVR}..."
134 rm "${ROOT}/usr/src/sys" "${ROOT}/usr/src/sys-${RV}" || \
135 eerror "Couldn't remove previous symlinks, please fix manually."
136 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
137 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
138 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
139 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
140 fi
141
142 if use sparc-fbsd ; then
143 ewarn "WARNING: kldload currently causes kernel panics"
144 ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
145 ewarn "we need gcc-4.1 to compile the kernel correctly :/"
146 ewarn "Please compile all modules you need into the kernel"
147 fi
148 }