public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Yuta SATOH" <nigoro@gentoo.gr.jp>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-bsd:master commit in: eclass/
Date: Sun,  9 Oct 2016 08:28:45 +0000 (UTC)	[thread overview]
Message-ID: <1476001166.33612af8cae165e0549873ae64e6713d4de5e004.yuta_satoh@gentoo> (raw)

commit:     33612af8cae165e0549873ae64e6713d4de5e004
Author:     Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Sun Oct  9 08:19:26 2016 +0000
Commit:     Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sun Oct  9 08:19:26 2016 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=33612af8

eclass/bsdmk.eclass: import from latest tree

 eclass/bsdmk.eclass | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/eclass/bsdmk.eclass b/eclass/bsdmk.eclass
new file mode 100644
index 0000000..3ce3572
--- /dev/null
+++ b/eclass/bsdmk.eclass
@@ -0,0 +1,83 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: bsdmk.eclass
+# @MAINTAINER:
+# maintainer-needed@gentoo.org
+# @BLURB: Some functions for BSDmake
+
+inherit toolchain-funcs portability flag-o-matic
+
+EXPORT_FUNCTIONS src_compile src_install
+
+RDEPEND=""
+# this should actually be BDEPEND, but this works.
+DEPEND="virtual/pmake"
+
+ESED="/usr/bin/sed"
+
+# @ECLASS-VARIABLE: mymakeopts
+# @DESCRIPTION:
+# Options for bsd-make
+
+# @FUNCTION: append-opt
+# @USAGE: < options >
+# @DESCRIPTION:
+# append options to enable or disable features
+append-opt() {
+	mymakeopts="${mymakeopts} $@"
+}
+
+# @FUNCTION: mkmake
+# @USAGE: [ options ]
+# @DESCRIPTION:
+# calls bsd-make command with the given options, passing ${mymakeopts} to
+# enable ports to useflags bridge.
+mkmake() {
+	[[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
+
+	tc-export CC CXX LD RANLIB
+
+	${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@"
+}
+
+# @FUNCTION: mkinstall
+# @USAGE: [ options ]
+# @DESCRIPTION:
+# Calls "bsd-make install" with the given options, passing ${mamakeopts} to
+# enable ports to useflags bridge
+mkinstall() {
+	[[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
+
+	# STRIP= will replace the default value of -s, leaving to portage the
+	# task of stripping executables.
+	${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install
+}
+
+# @FUNCTION: dummy_mk
+# @USAGE: < dirnames >
+# @DESCRIPTION:
+# removes the specified subdirectories and creates a dummy makefile in them
+# useful to remove the need for "minimal" patches
+dummy_mk() {
+	for dir in $@; do
+		[ -d ${dir} ] || ewarn "dummy_mk called on a non-existing directory: $dir"
+		[ -f ${dir}/Makefile ] || ewarn "dummy_mk called on a directory without Makefile: $dir"
+		echo ".include <bsd.lib.mk>" > ${dir}/Makefile
+	done
+}
+
+# @FUNCTION: bsdmk_src_compile
+# @DESCRIPTION:
+# The bsdmk src_compile function, which is exported
+bsdmk_src_compile() {
+	mkmake "$@" || die "make failed"
+}
+
+# @FUNCTION: bsdmk_src_install
+# @DESCRIPTION:
+# The bsdmk src_install function, which is exported
+bsdmk_src_install() {
+	mkinstall || die "install failed"
+}


             reply	other threads:[~2016-10-09  8:28 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-09  8:28 Yuta SATOH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-10-11 13:46 [gentoo-commits] proj/gentoo-bsd:master commit in: eclass/ Yuta SATOH
2016-10-09  9:18 Yuta SATOH
2016-10-09  8:28 Yuta SATOH
2016-10-09  8:28 Yuta SATOH
2016-10-07 12:12 Yuta SATOH
2016-09-28 12:25 Yuta SATOH
2016-09-28 12:25 Yuta SATOH
2015-07-11 23:32 Yuta SATOH
2014-10-28 12:03 Yuta SATOH
2013-10-31 17:08 Yuta SATOH
2013-08-31 16:01 Yuta SATOH
2013-08-30 18:30 Yuta SATOH
2013-08-30 18:30 Yuta SATOH
2013-08-30 18:30 Yuta SATOH
2013-08-29 13:46 Yuta SATOH
2013-08-13 13:06 Yuta SATOH
2013-07-23 16:14 Yuta SATOH
2013-07-11 15:11 Yuta SATOH
2013-06-20 12:20 Yuta SATOH
2013-06-18 12:57 Yuta SATOH
2013-02-16 15:05 Yuta SATOH
2013-02-11 11:26 Yuta SATOH
2013-02-07 15:56 Yuta SATOH
2013-02-07 15:48 Yuta SATOH
2013-02-01 11:25 Yuta SATOH
2013-01-10 11:58 Yuta SATOH
2013-01-08 13:55 Yuta SATOH
2013-01-08 11:56 Yuta SATOH
2013-01-06 11:19 Yuta SATOH
2013-01-04 10:59 Yuta SATOH
2013-01-01 15:10 Yuta SATOH
2012-12-31 10:04 Yuta SATOH
2012-12-31  9:51 Yuta SATOH
2012-12-31  9:51 Yuta SATOH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476001166.33612af8cae165e0549873ae64e6713d4de5e004.yuta_satoh@gentoo \
    --to=nigoro@gentoo.gr.jp \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox