From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6F61D1388BF for ; Wed, 17 Feb 2016 18:42:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D55A21C04B; Wed, 17 Feb 2016 18:42:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1BD3921C04B for ; Wed, 17 Feb 2016 18:42:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 01DA3340C9D for ; Wed, 17 Feb 2016 18:42:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A9FF615E7 for ; Wed, 17 Feb 2016 18:42:36 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1455734546.2d365dd353b15bf43b65049f4f9056f379607200.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/ustr/, dev-libs/ustr/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/ustr/files/ustr-1.0.4-build-libs.patch dev-libs/ustr/metadata.xml dev-libs/ustr/ustr-1.0.4-r8.ebuild X-VCS-Directories: dev-libs/ustr/ dev-libs/ustr/files/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 2d365dd353b15bf43b65049f4f9056f379607200 X-VCS-Branch: master Date: Wed, 17 Feb 2016 18:42:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fdedb571-d9fe-4d54-8328-caa736950278 X-Archives-Hash: 7d6c6a7bb06399f397a77d3a0c52d2ef commit: 2d365dd353b15bf43b65049f4f9056f379607200 Author: Mike Frysinger gentoo org> AuthorDate: Wed Feb 17 18:31:53 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Wed Feb 17 18:42:26 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d365dd3 dev-libs/ustr: make installed file set more minimal Add USE=static-libs to control install of the static archive. Add USE=ustr-import to control install of the dev tool and source tree. Punt the xxx-debug libs as this isn't how we handle debugging in Gentoo. dev-libs/ustr/files/ustr-1.0.4-build-libs.patch | 49 +++++++++++++++ dev-libs/ustr/metadata.xml | 3 + dev-libs/ustr/ustr-1.0.4-r8.ebuild | 84 +++++++++++++++++++++++++ 3 files changed, 136 insertions(+) diff --git a/dev-libs/ustr/files/ustr-1.0.4-build-libs.patch b/dev-libs/ustr/files/ustr-1.0.4-build-libs.patch new file mode 100644 index 0000000..79fe818 --- /dev/null +++ b/dev-libs/ustr/files/ustr-1.0.4-build-libs.patch @@ -0,0 +1,49 @@ +make static lib build/install controllable so we can disable it by default + +punt the -debug lib variants ... if people want debug libs, they can rebuild +the package using their desired build settings. + +--- a/Makefile ++++ b/Makefile +@@ -291,8 +291,10 @@ + OPT_LIB_SHARED = libustr-$(VERS_BSO).so.$(VERS_ESO) + OPT_LIB_STATIC = libustr.a + +-LIB_SHARED = $(DBG_LIB_SHARED) $(OPT_LIB_SHARED) +-LIB_STATIC = $(DBG_LIB_STATIC) $(OPT_LIB_STATIC) ++LIB_SHARED = $(OPT_LIB_SHARED) ++ifeq ($(USE_STATIC),yes) ++LIB_STATIC = $(OPT_LIB_STATIC) ++endif + + DEPS_NONC_ALL = $(SRC_HDRS) $(SRC_SRCS_H) + DEPS_C_ALL = $(SRC_HDRS) +@@ -388,17 +390,14 @@ + install -d $(DESTDIR)$(bindir) + install -d $(DESTDIR)$(libdir)/pkgconfig + $(HIDE)echo Installing files ++ifeq ($(USE_STATIC),yes) + install -m 644 -t $(DESTDIR)$(libdir) $(LIB_STATIC) ++endif + install -m 755 -t $(DESTDIR)$(libdir) $(LIB_SHARED) + -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME) + ln -s $(OPT_LIB_SHARED) $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME) + -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV) + ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV) +- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME) +- ln -s $(DBG_LIB_SHARED) $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME) +- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV) +- ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV) +- $(LDCONFIG) -n $(DESTDIR)$(libdir) + install -pm 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS) + install -pm 644 -t $(DESTDIR)$(SHRDIR) $(SRC_SRCS) + install -pm 644 -t $(DESTDIR)$(SHRDIR) $(XSRC_SRCS) +@@ -406,7 +406,7 @@ endif + install -pm 644 -t $(DESTDIR)$(mandir)/man1 $(MAN_PAGES_1) + install -pm 644 -t $(DESTDIR)$(mandir)/man3 $(MAN_PAGES_3) + install -m 755 -t $(DESTDIR)$(bindir) ustr-import +- install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc ustr-debug.pc ++ install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc + + ustr-import-multilib: ustr-import-multilib.in + sed -e 's,@INCLUDEDIR@,$(includedir),g' -e 's,@MBINDIR@,$(MBINDIR),g' < $< > $@ diff --git a/dev-libs/ustr/metadata.xml b/dev-libs/ustr/metadata.xml index 3d12db6..524aa43 100644 --- a/dev-libs/ustr/metadata.xml +++ b/dev-libs/ustr/metadata.xml @@ -10,4 +10,7 @@ proxy-maint@gentoo.org Proxy Maintainers + + Install ustr-import developer program and source code for bundling. + diff --git a/dev-libs/ustr/ustr-1.0.4-r8.ebuild b/dev-libs/ustr/ustr-1.0.4-r8.ebuild new file mode 100644 index 0000000..a540dad --- /dev/null +++ b/dev-libs/ustr/ustr-1.0.4-r8.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="Low-overhead managed string library for C" +HOMEPAGE="http://www.and.org/ustr" +SRC_URI="ftp://ftp.and.org/pub/james/ustr/${PV}/${P}.tar.bz2" + +LICENSE="|| ( BSD-2 MIT LGPL-2 )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~x86" +IUSE="static-libs ustr-import" + +DOCS=(ChangeLog README README-DEVELOPERS AUTHORS NEWS TODO) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/ustr-conf.h + /usr/include/ustr-conf-debug.h +) + +src_prepare() { + epatch "${FILESDIR}/${P}-gcc_5-check.patch" + epatch "${FILESDIR}/${PN}-1.0.4-build-libs.patch" + multilib_copy_sources +} + +_emake() { + emake \ + USE_STATIC=$(usex static-libs) \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} ${CPPFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + prefix="${EPREFIX}/usr" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + mandir="${EPREFIX}/usr/share/man" \ + SHRDIR="${EPREFIX}/usr/share/${P}" \ + DOCSHRDIR="${EPREFIX}/usr/share/doc/${PF}" \ + HIDE= \ + "$@" +} + +multilib_src_configure() { + # The included configure tests require execution. + + # We require vsnprintf everywhere as it's in POSIX. + printf '#!/bin/sh\necho 0\n' > autoconf_vsnprintf + chmod a+rx autoconf_vsnprintf + + # Always use stdint.h as it's in POSIX. + sed -i '/have_stdint_h=0/s:=0:=1:' Makefile || die + + # Figure out the size of size_t. + printf '#include \nint main() { char buf[sizeof(size_t) - 8]; }\n' > sizet_test.c + $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c sizet_test.c 2>/dev/null + printf '#!/bin/sh\necho %s\n' $(( $? == 0 )) > autoconf_64b + chmod a+rx autoconf_64b + + # Generate the config file now to avoid bad makefile deps. + _emake ustr-import +} + +multilib_src_compile() { + _emake all-shared +} + +multilib_src_install() { + _emake DESTDIR="${D}" install + + if ! use ustr-import ; then + rm -r \ + "${ED}/usr/bin/ustr-import" \ + "${ED}/usr/share/man/man1/ustr-import.1" \ + "${ED}/usr/share/${P}" || die + fi +} + +multilib_src_test() { + _emake check +}