Fix support for FreeBSD 10.0. Force /usr/share/mk there, and fix version comparison...
authorMichał Górny <mgorny@gentoo.org>
Sun, 22 Feb 2015 14:16:03 +0000 (14:16 +0000)
committerMichał Górny <mgorny@gentoo.org>
Sun, 22 Feb 2015 14:16:03 +0000 (14:16 +0000)
eclass/ChangeLog
eclass/freebsd.eclass

index 7254282b3cec3a002f88c29061f7837bb5afad29..db4318c854f17c7fb8eb5989693136bb0534fc27 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1548 2015/02/21 13:51:34 kensington Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1549 2015/02/22 14:16:03 mgorny Exp $
+
+  22 Feb 2015; Michał Górny <mgorny@gentoo.org> freebsd.eclass:
+  Fix support for FreeBSD 10.0. Force /usr/share/mk there, and fix version
+  comparison for install commands.
+  https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/36 by nigoro.
 
   21 Feb 2015; Michael Palimaka <kensington@gentoo.org> kde4-base.eclass:
   Add new and remove old SRC_URI. Update live ebuild branching.
index f293e4b4ef98692771b32521cc62bac711bebdfc..d708b4b266fd2da68e298bc8849ae4068f39c257 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.35 2013/08/28 15:56:11 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.36 2015/02/22 14:16:03 mgorny Exp $
 #
 # Diego Pettenò <flameeyes@gentoo.org>
 
@@ -129,6 +129,12 @@ freebsd_rename_libraries() {
 freebsd_src_unpack() {
        if [[ ${MY_PV} == *9999* ]]; then
                S="${WORKDIR}" subversion_src_unpack
+
+               # When share/mk exists in ${WORKDIR}, it is used on FreeBSD 10.0
+               # Removed "${WORKDIR}"/share/mk/*.mk, use to force /usr/share/mk.
+               if [[ ${PN} != freebsd-mk-defs ]] ; then
+                       [[ -e "${WORKDIR}"/share/mk ]] && rm -rf "${WORKDIR}"/share/mk/*.mk
+               fi
        else
                unpack ${A}
        fi
@@ -141,7 +147,7 @@ freebsd_src_unpack() {
 
        # Starting from FreeBSD 9.2, its install command supports the -l option and
        # they now use it. Emulate it if we are on a system that does not have it.
-       if [[ ${RV} > 9.1 ]] && ! has_version '>=sys-freebsd/freebsd-ubin-9.2_beta1' ; then
+       if version_is_at_least 9.2 ${RV} && ! has_version '>=sys-freebsd/freebsd-ubin-9.2_beta1' ; then
                export INSTALL_LINK="ln -f"
                export INSTALL_SYMLINK="ln -fs"
        fi