1 |
commit: 097f3a38eec2ff00dbba3f890d5af00787db787b |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 19 18:30:06 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 19 18:30:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=097f3a38 |
7 |
|
8 |
dev-libs/libmissing: initial ebuild by me |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
dev-libs/libmissing/Manifest | 1 + |
14 |
dev-libs/libmissing/libmissing-1.0.0.ebuild | 122 ++++++++++++++++++++++++++++ |
15 |
dev-libs/libmissing/metadata.xml | 12 +++ |
16 |
3 files changed, 135 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/libmissing/Manifest b/dev-libs/libmissing/Manifest |
19 |
new file mode 100644 |
20 |
index 00000000000..39d4a175c2a |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/libmissing/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST gnulib-b451121ab45497e78cb6f612c8673a9705193391.tar.gz 6666079 BLAKE2B e7d3b9478697067b57ab198e044f3c854128d5fe390d30947829ce4f34c695a748668c33ae19690e9927fff6df3e194a3160cb4adb7cf47235c603241c66889a SHA512 f6e165cfc0a3999c778d9f43ffc90ff9b569a77ff1e54ff5c50b12b0eddf262c24da8cd2719548574e0397535bb0eb835eef603cc74769f7876ef9db101bebec |
25 |
|
26 |
diff --git a/dev-libs/libmissing/libmissing-1.0.0.ebuild b/dev-libs/libmissing/libmissing-1.0.0.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..270db24a778 |
29 |
--- /dev/null |
30 |
+++ b/dev-libs/libmissing/libmissing-1.0.0.ebuild |
31 |
@@ -0,0 +1,122 @@ |
32 |
+# Copyright 2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+inherit autotools |
38 |
+ |
39 |
+# NOTE: PV is the libtool version number current:revision:age |
40 |
+ |
41 |
+DESCRIPTION="Library with missing functions based on GNUlib" |
42 |
+HOMEPAGE="https://prefix.gentoo.org" |
43 |
+GIT_TAG="b451121ab45497e78cb6f612c8673a9705193391" |
44 |
+SRC_URI="https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-${GIT_TAG}.tar.gz" |
45 |
+ |
46 |
+LICENSE="GPL-2" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
49 |
+IUSE="static-libs" |
50 |
+ |
51 |
+DEPEND="" |
52 |
+RDEPEND="${DEPEND}" |
53 |
+BDEPEND="" |
54 |
+ |
55 |
+S="${WORKDIR}/gnulib-${GIT_TAG}" |
56 |
+ |
57 |
+src_prepare() { |
58 |
+ default |
59 |
+ |
60 |
+ mkdir "${PN}" || die |
61 |
+ cd "${PN}" || die |
62 |
+ cat > configure.ac <<- EOS |
63 |
+ AC_PREREQ([2.69]) |
64 |
+ AC_INIT([${PN}], [${PV}], [prefix@g.o]) |
65 |
+ AM_INIT_AUTOMAKE |
66 |
+ LT_INIT |
67 |
+ |
68 |
+ AC_CONFIG_MACRO_DIR([m4]) |
69 |
+ AC_CONFIG_HEADER([config.h]) |
70 |
+ |
71 |
+ AC_PROG_CC |
72 |
+ gl_INIT |
73 |
+ gl_EARLY |
74 |
+ |
75 |
+ AC_CONFIG_FILES([Makefile lib/Makefile]) |
76 |
+ |
77 |
+ AC_OUTPUT |
78 |
+ EOS |
79 |
+ |
80 |
+ cat > Makefile.am <<- EOS |
81 |
+ SUBDIRS = lib |
82 |
+ EOS |
83 |
+ |
84 |
+ local modules |
85 |
+ local platform |
86 |
+ local rev |
87 |
+ |
88 |
+ case "${CHOST}" in |
89 |
+ *-apple-darwin*) |
90 |
+ rev=${CHOST##*-darwin} |
91 |
+ platform="Mac OS X 10.$((rev - 4))" |
92 |
+ ;; |
93 |
+ *-solaris2.*) |
94 |
+ rev=${CHOST##*-solaris2.} |
95 |
+ # we only support Solaris 10 (and perhaps 9) and up, so we |
96 |
+ # don't have to bother about 2.x, just X |
97 |
+ platform="Solaris ${rev}" |
98 |
+ ;; |
99 |
+ esac |
100 |
+ |
101 |
+ # blacklist some modules that cause collisions |
102 |
+ # iconv provided by virtual/iconv -> sys-libs/libiconv |
103 |
+ modules=( $( |
104 |
+ cd "${S}"/doc/posix-functions |
105 |
+ grep -A1 "This function is missing" *.texi | \ |
106 |
+ grep "${platform}" | \ |
107 |
+ sed -e 's:^\(.[^-]*\)-.*$:\1:' | \ |
108 |
+ xargs sed -n 's/^Gnulib module: \([a-z].*\)$/\1/p' | \ |
109 |
+ sed -e 's: or .*$::' -e 's:, :\n:g' | \ |
110 |
+ sort -u | \ |
111 |
+ grep -v "iconv" |
112 |
+ ) ) |
113 |
+ |
114 |
+ # get platform specific set of missing functions |
115 |
+ einfo "Including sources for missing functions on ${platform}:" |
116 |
+ einfo "${modules[*]}" |
117 |
+ "${S}"/gnulib-tool \ |
118 |
+ --import \ |
119 |
+ --lib=libmissing \ |
120 |
+ --libtool \ |
121 |
+ --no-vc-files \ |
122 |
+ "${modules[@]}" |
123 |
+ |
124 |
+ sed -i -e '/^noinst_LTLIBRARIES /s/noinst_/lib_/' lib/Makefile.am || die |
125 |
+ echo "libmissing_la_LDFLAGS += version-info ${PV//./:}" >> lib/Makefile.am |
126 |
+ cat >> lib/Makefile.am << 'EOS' |
127 |
+install-data-local: $(BUILT_SOURCES) |
128 |
+ @for hdr in $(BUILT_SOURCES); do \ |
129 |
+ $(mkinstalldirs) $(DESTDIR)$(includedir)/$${hdr%/*}; \ |
130 |
+ $(INSTALL_HEADER) "$$hdr" $(DESTDIR)$(includedir)/$${hdr}; \ |
131 |
+ done; |
132 |
+EOS |
133 |
+ |
134 |
+ eautoreconf |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ cd "${PN}" || die |
139 |
+ default |
140 |
+} |
141 |
+ |
142 |
+src_compile() { |
143 |
+ cd "${PN}" || die |
144 |
+ default |
145 |
+} |
146 |
+ |
147 |
+src_install() { |
148 |
+ cd "${PN}" || die |
149 |
+ default |
150 |
+ |
151 |
+ rm "${ED}"/usr/lib/libmissing.la \ |
152 |
+ "$(use static-libs || echo "${ED}"/usr/lib/libmissing.a)" || die |
153 |
+} |
154 |
|
155 |
diff --git a/dev-libs/libmissing/metadata.xml b/dev-libs/libmissing/metadata.xml |
156 |
new file mode 100644 |
157 |
index 00000000000..ac8fbe34045 |
158 |
--- /dev/null |
159 |
+++ b/dev-libs/libmissing/metadata.xml |
160 |
@@ -0,0 +1,12 @@ |
161 |
+<?xml version="1.0" encoding="UTF-8"?> |
162 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
163 |
+<pkgmetadata> |
164 |
+<maintainer type="project"> |
165 |
+ <email>prefix@g.o</email> |
166 |
+ <name>Prefix Project</name> |
167 |
+</maintainer> |
168 |
+<longdescription lang="en"> |
169 |
+ libmissing provides missing POSIX functions using the gnulib sources |
170 |
+ as library and system headers. |
171 |
+</longdescription> |
172 |
+</pkgmetadata> |