1 |
commit: 9794a7f0497a2d879b1227d50140963b037e6d13 |
2 |
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp> |
3 |
AuthorDate: Thu Aug 29 11:07:25 2013 +0000 |
4 |
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com> |
5 |
CommitDate: Thu Aug 29 11:07:25 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=9794a7f0 |
7 |
|
8 |
removed freebsd.eclass, live ebuild support merged into main tree. |
9 |
|
10 |
--- |
11 |
eclass/freebsd.eclass | 210 -------------------------------------------------- |
12 |
1 file changed, 210 deletions(-) |
13 |
|
14 |
diff --git a/eclass/freebsd.eclass b/eclass/freebsd.eclass |
15 |
deleted file mode 100644 |
16 |
index 68d19cf..0000000 |
17 |
--- a/eclass/freebsd.eclass |
18 |
+++ /dev/null |
19 |
@@ -1,210 +0,0 @@ |
20 |
-# Copyright 1999-2011 Gentoo Foundation |
21 |
-# Distributed under the terms of the GNU General Public License v2 |
22 |
-# $Header: $ |
23 |
-# |
24 |
-# Diego Pettenò <flameeyes@g.o> |
25 |
- |
26 |
-inherit versionator eutils flag-o-matic bsdmk |
27 |
- |
28 |
-MY_PV=${PV/_p*} |
29 |
-PLEVEL=${PV##*_p} |
30 |
- |
31 |
-LICENSE="BSD" |
32 |
-HOMEPAGE="http://www.freebsd.org/" |
33 |
- |
34 |
-# Define global package names |
35 |
-LIB="freebsd-lib-${PV}" |
36 |
-BIN="freebsd-bin-${PV}" |
37 |
-CONTRIB="freebsd-contrib-${PV}" |
38 |
-SHARE="freebsd-share-${PV}" |
39 |
-UBIN="freebsd-ubin-${PV}" |
40 |
-USBIN="freebsd-usbin-${PV}" |
41 |
-CRYPTO="freebsd-crypto-${PV}" |
42 |
-LIBEXEC="freebsd-libexec-${PV}" |
43 |
-SBIN="freebsd-sbin-${PV}" |
44 |
-GNU="freebsd-gnu-${PV}" |
45 |
-ETC="freebsd-etc-${PV}" |
46 |
-SYS="freebsd-sys-${PV}" |
47 |
-INCLUDE="freebsd-include-${PV}" |
48 |
-RESCUE="freebsd-rescue-${PV}" |
49 |
-CDDL="freebsd-cddl-${PV}" |
50 |
-SECURE="freebsd-secure-${PV}" |
51 |
- |
52 |
-# Release version (5.3, 5.4, 6.0, etc) |
53 |
-# Drop patch level from RV using ${MY_PV}. |
54 |
-RV="$(get_version_component_range 1-2 ${MY_PV})" |
55 |
- |
56 |
-if [[ ${PV} == *9999* ]]; then |
57 |
- inherit subversion |
58 |
- |
59 |
- # Set SVN revision using patch level. |
60 |
- [[ ${PV} == *_p* ]] && ESVN_REVISION="${PLEVEL}" |
61 |
- |
62 |
- # freebsd-mk-defs is always run svn checkout/update. |
63 |
- # Other packages use sources that it checked out. |
64 |
- [[ ${PN} == "freebsd-mk-defs" ]] || ESVN_OFFLINE="1" |
65 |
- |
66 |
- case ${MY_PV%.9999} in |
67 |
- *.*.*) BRANCH="release";; |
68 |
- *.*) BRANCH="releng" ;; |
69 |
- 9999) BRANCH="head" ;; |
70 |
- *) BRANCH="stable" ;; |
71 |
- esac |
72 |
- [[ ${BRANCH} == head ]] || SVN_SUB_URI="${BRANCH}/${MY_PV%.9999}" |
73 |
- [[ ${BRANCH} == head ]] && SVN_SUB_URI="${BRANCH}" |
74 |
- ESVN_REPO_URI="svn://svn.freebsd.org/base/${SVN_SUB_URI}" |
75 |
- ESVN_PROJECT="freebsd-${BRANCH}" |
76 |
-fi |
77 |
- |
78 |
-if [[ ${PN} != "freebsd-share" ]] && [[ ${PN} != freebsd-sources ]]; then |
79 |
- IUSE="profile" |
80 |
-fi |
81 |
- |
82 |
-#unalias -a |
83 |
-alias install-info='/usr/bin/bsdinstall-info' |
84 |
- |
85 |
-EXPORT_FUNCTIONS src_compile src_install src_unpack |
86 |
- |
87 |
-# doperiodic <kind> <file> ... |
88 |
-doperiodic() { |
89 |
- local kind=$1 |
90 |
- shift |
91 |
- |
92 |
- ( # dont want to pollute calling env |
93 |
- insinto /etc/periodic/${kind} |
94 |
- insopts -m 0755 |
95 |
- doins "$@" |
96 |
- ) |
97 |
-} |
98 |
- |
99 |
-freebsd_get_bmake() { |
100 |
- local bmake |
101 |
- bmake=$(get_bmake) |
102 |
- [[ ${CBUILD} == *-freebsd* ]] || bmake="${bmake} -m /usr/share/mk/freebsd" |
103 |
- |
104 |
- echo "${bmake}" |
105 |
-} |
106 |
- |
107 |
-freebsd_do_patches() { |
108 |
- if [[ ${#PATCHES[@]} -gt 1 ]] ; then |
109 |
- for x in "${PATCHES[@]}"; do |
110 |
- epatch "${x}" |
111 |
- done |
112 |
- else |
113 |
- for x in ${PATCHES} ; do |
114 |
- epatch "${x}" |
115 |
- done |
116 |
- fi |
117 |
- epatch_user |
118 |
-} |
119 |
- |
120 |
-freebsd_rename_libraries() { |
121 |
- ebegin "Renaming libraries" |
122 |
- # We don't use libtermcap, we use libncurses |
123 |
- find "${S}" -name Makefile -print0 | xargs -0 \ |
124 |
- sed -i -e 's:-ltermcap:-lncurses:g; s:{LIBTERMCAP}:{LIBNCURSES}:g' |
125 |
- # flex provides libfl, not libl |
126 |
- find "${S}" -name Makefile -print0 | xargs -0 \ |
127 |
- sed -i -e 's:-ll$:-lfl:g; s:-ll :-lfl :g; s:{LIBL}:{LIBFL}:g' |
128 |
- # ncurses provides libncursesw not libcursesw |
129 |
- find "${S}" -name Makefile -print0 | xargs -0 \ |
130 |
- sed -i -e 's:-lcursesw:-lncursesw:g' |
131 |
- # we use expat instead of bsdxml |
132 |
- find "${S}" -name Makefile -print0 | xargs -0 \ |
133 |
- sed -i -e 's:-lbsdxml:-lexpat:g' |
134 |
- |
135 |
- eend $? |
136 |
-} |
137 |
- |
138 |
-freebsd_src_unpack() { |
139 |
- if [[ ${PV} == *9999* ]]; then |
140 |
- S="${WORKDIR}" subversion_src_unpack |
141 |
- else |
142 |
- unpack ${A} |
143 |
- fi |
144 |
- cd "${S}" |
145 |
- |
146 |
- dummy_mk ${REMOVE_SUBDIRS} |
147 |
- |
148 |
- freebsd_do_patches |
149 |
- freebsd_rename_libraries |
150 |
- |
151 |
- # Starting from FreeBSD 9.2, its install command supports the -l option and |
152 |
- # they now use it. Emulate it if we are on a system that does not have it. |
153 |
- if [[ ${RV} > 9.1 ]] && ! has_version '>=sys-freebsd/freebsd-ubin-9.2_beta1' ; then |
154 |
- export INSTALL_LINK="ln -f" |
155 |
- export INSTALL_SYMLINK="ln -fs" |
156 |
- fi |
157 |
-} |
158 |
- |
159 |
-freebsd_src_compile() { |
160 |
- use profile && filter-flags "-fomit-frame-pointer" |
161 |
- use profile || mymakeopts="${mymakeopts} NO_PROFILE= " |
162 |
- |
163 |
- mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= NO_FSCHG=" |
164 |
- |
165 |
- # Make sure to use FreeBSD definitions while crosscompiling |
166 |
- [[ -z "${BMAKE}" ]] && BMAKE="$(freebsd_get_bmake)" |
167 |
- |
168 |
- # Create objdir if MAKEOBJDIRPREFIX is defined, so that we can make out of |
169 |
- # tree builds easily. |
170 |
- if [[ -n "${MAKEOBJDIRPREFIX}" ]] ; then |
171 |
- mkmake obj || die |
172 |
- fi |
173 |
- |
174 |
- bsdmk_src_compile "$@" |
175 |
-} |
176 |
- |
177 |
-# Helper function to make a multilib build with FreeBSD Makefiles. |
178 |
-# Usage: |
179 |
-# MULTIBUILD_VARIANTS=( $(get_all_abis) ) |
180 |
-# multibuild_foreach_variant freebsd_multilib_multibuild_wrapper my_function |
181 |
-# |
182 |
-# Important note: To use this function you _have_ to: |
183 |
-# - inherit multilib.eclass and multibuild.eclass |
184 |
-# - set MULTIBUILD_VARIANTS |
185 |
- |
186 |
-freebsd_multilib_multibuild_wrapper() { |
187 |
- # Get the ABI from multibuild.eclass |
188 |
- # This assumes MULTIBUILD_VARIANTS contains only valid ABIs. |
189 |
- local ABI=${MULTIBUILD_VARIANT} |
190 |
- |
191 |
- # First, save the variables: CFLAGS, CXXFLAGS, LDFLAGS, LDADD and mymakeopts. |
192 |
- for i in CFLAGS CXXFLAGS LDFLAGS LDADD mymakeopts ; do |
193 |
- export ${i}_SAVE="${!i}" |
194 |
- done |
195 |
- |
196 |
- # Setup the variables specific to this ABI. |
197 |
- multilib_toolchain_setup "${ABI}" |
198 |
- |
199 |
- local target="$(tc-arch-kernel ${CHOST})" |
200 |
- mymakeopts="${mymakeopts} TARGET=${target} MACHINE=${target} MACHINE_ARCH=${target} SHLIBDIR=/usr/$(get_libdir) LIBDIR=/usr/$(get_libdir)" |
201 |
- if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then |
202 |
- mymakeopts="${mymakeopts} COMPAT_32BIT=" |
203 |
- fi |
204 |
- |
205 |
- einfo "Building for ABI=${ABI} and TARGET=${target}" |
206 |
- |
207 |
- export MAKEOBJDIRPREFIX="${BUILD_DIR}" |
208 |
- if [ ! -d "${MAKEOBJDIRPREFIX}" ] ; then |
209 |
- mkdir "${MAKEOBJDIRPREFIX}" || die "Could not create ${MAKEOBJDIRPREFIX}." |
210 |
- fi |
211 |
- |
212 |
- CTARGET="${CHOST}" "$@" |
213 |
- |
214 |
- # Restore the variables now. |
215 |
- for i in CFLAGS CXXFLAGS LDFLAGS LDADD mymakeopts ; do |
216 |
- ii="${i}_SAVE" |
217 |
- export ${i}="${!ii}" |
218 |
- done |
219 |
-} |
220 |
- |
221 |
-freebsd_src_install() { |
222 |
- use profile || mymakeopts="${mymakeopts} NO_PROFILE= " |
223 |
- |
224 |
- mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= NO_FSCHG=" |
225 |
- |
226 |
- [[ -z "${BMAKE}" ]] && BMAKE="$(freebsd_get_bmake)" |
227 |
- |
228 |
- bsdmk_src_install |
229 |
-} |