public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libmissing/
Date: Mon, 19 Aug 2019 18:30:53 +0000 (UTC)	[thread overview]
Message-ID: <1566239446.097f3a38eec2ff00dbba3f890d5af00787db787b.grobian@gentoo> (raw)

commit:     097f3a38eec2ff00dbba3f890d5af00787db787b
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 19 18:30:06 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Aug 19 18:30:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=097f3a38

dev-libs/libmissing: initial ebuild by me

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-libs/libmissing/Manifest                |   1 +
 dev-libs/libmissing/libmissing-1.0.0.ebuild | 122 ++++++++++++++++++++++++++++
 dev-libs/libmissing/metadata.xml            |  12 +++
 3 files changed, 135 insertions(+)

diff --git a/dev-libs/libmissing/Manifest b/dev-libs/libmissing/Manifest
new file mode 100644
index 00000000000..39d4a175c2a
--- /dev/null
+++ b/dev-libs/libmissing/Manifest
@@ -0,0 +1 @@
+DIST gnulib-b451121ab45497e78cb6f612c8673a9705193391.tar.gz 6666079 BLAKE2B e7d3b9478697067b57ab198e044f3c854128d5fe390d30947829ce4f34c695a748668c33ae19690e9927fff6df3e194a3160cb4adb7cf47235c603241c66889a SHA512 f6e165cfc0a3999c778d9f43ffc90ff9b569a77ff1e54ff5c50b12b0eddf262c24da8cd2719548574e0397535bb0eb835eef603cc74769f7876ef9db101bebec

diff --git a/dev-libs/libmissing/libmissing-1.0.0.ebuild b/dev-libs/libmissing/libmissing-1.0.0.ebuild
new file mode 100644
index 00000000000..270db24a778
--- /dev/null
+++ b/dev-libs/libmissing/libmissing-1.0.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+# NOTE: PV is the libtool version number current:revision:age
+
+DESCRIPTION="Library with missing functions based on GNUlib"
+HOMEPAGE="https://prefix.gentoo.org"
+GIT_TAG="b451121ab45497e78cb6f612c8673a9705193391"
+SRC_URI="https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-${GIT_TAG}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+S="${WORKDIR}/gnulib-${GIT_TAG}"
+
+src_prepare() {
+	default
+
+	mkdir "${PN}" || die
+	cd "${PN}" || die
+	cat > configure.ac <<- EOS
+		AC_PREREQ([2.69])
+		AC_INIT([${PN}], [${PV}], [prefix@gentoo.org])
+		AM_INIT_AUTOMAKE
+		LT_INIT
+
+		AC_CONFIG_MACRO_DIR([m4])
+		AC_CONFIG_HEADER([config.h])
+
+		AC_PROG_CC
+		gl_INIT
+		gl_EARLY
+
+		AC_CONFIG_FILES([Makefile lib/Makefile])
+
+		AC_OUTPUT
+	EOS
+
+	cat > Makefile.am <<- EOS
+		SUBDIRS = lib
+	EOS
+
+	local modules
+	local platform
+	local rev
+
+	case "${CHOST}" in
+		*-apple-darwin*)
+			rev=${CHOST##*-darwin}
+			platform="Mac OS X 10.$((rev - 4))"
+			;;
+		*-solaris2.*)
+			rev=${CHOST##*-solaris2.}
+			# we only support Solaris 10 (and perhaps 9) and up, so we
+			# don't have to bother about 2.x, just X
+			platform="Solaris ${rev}"
+			;;
+	esac
+
+	# blacklist some modules that cause collisions
+	# iconv      provided by virtual/iconv -> sys-libs/libiconv
+	modules=( $(
+		cd "${S}"/doc/posix-functions
+		grep -A1 "This function is missing" *.texi | \
+			grep "${platform}" | \
+			sed -e 's:^\(.[^-]*\)-.*$:\1:' | \
+			xargs sed -n 's/^Gnulib module: \([a-z].*\)$/\1/p' | \
+			sed -e 's: or .*$::' -e 's:, :\n:g' | \
+			sort -u | \
+			grep -v "iconv"
+	) )
+
+	# get platform specific set of missing functions
+	einfo "Including sources for missing functions on ${platform}:"
+	einfo "${modules[*]}"
+	"${S}"/gnulib-tool \
+		--import \
+		--lib=libmissing \
+		--libtool \
+		--no-vc-files \
+		"${modules[@]}"
+
+	sed -i -e '/^noinst_LTLIBRARIES /s/noinst_/lib_/' lib/Makefile.am || die
+	echo "libmissing_la_LDFLAGS += version-info ${PV//./:}" >> lib/Makefile.am
+	cat >> lib/Makefile.am << 'EOS'
+install-data-local: $(BUILT_SOURCES)
+	@for hdr in $(BUILT_SOURCES); do \
+		$(mkinstalldirs) $(DESTDIR)$(includedir)/$${hdr%/*}; \
+		$(INSTALL_HEADER) "$$hdr" $(DESTDIR)$(includedir)/$${hdr}; \
+	done;
+EOS
+
+	eautoreconf
+}
+
+src_configure() {
+	cd "${PN}" || die
+	default
+}
+
+src_compile() {
+	cd "${PN}" || die
+	default
+}
+
+src_install() {
+	cd "${PN}" || die
+	default
+
+	rm "${ED}"/usr/lib/libmissing.la \
+		"$(use static-libs || echo "${ED}"/usr/lib/libmissing.a)" || die
+}

diff --git a/dev-libs/libmissing/metadata.xml b/dev-libs/libmissing/metadata.xml
new file mode 100644
index 00000000000..ac8fbe34045
--- /dev/null
+++ b/dev-libs/libmissing/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+	<email>prefix@gentoo.org</email>
+	<name>Prefix Project</name>
+</maintainer>
+<longdescription lang="en">
+	libmissing provides missing POSIX functions using the gnulib sources
+	as library and system headers.
+</longdescription>
+</pkgmetadata>


             reply	other threads:[~2019-08-19 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 18:30 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-19 19:16 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libmissing/ Fabian Groffen
2019-10-13 18:12 Fabian Groffen
2020-12-23  8:35 Fabian Groffen

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=1566239446.097f3a38eec2ff00dbba3f890d5af00787db787b.grobian@gentoo \
    --to=grobian@gentoo.org \
    --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