dev-libs/libutf8proc: add static-libs USE flag
authorAkinori Hattori <hattya@gentoo.org>
Wed, 6 May 2020 12:41:28 +0000 (21:41 +0900)
committerAkinori Hattori <hattya@gentoo.org>
Wed, 6 May 2020 12:43:01 +0000 (21:43 +0900)
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Akinori Hattori <hattya@gentoo.org>
dev-libs/libutf8proc/files/libutf8proc-2.3.0-no-static.patch [deleted file]
dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild

diff --git a/dev-libs/libutf8proc/files/libutf8proc-2.3.0-no-static.patch b/dev-libs/libutf8proc/files/libutf8proc-2.3.0-no-static.patch
deleted file mode 100644 (file)
index 75e9eaa..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/Makefile b/Makefile
-index e3310f7..44c8977 100644
---- a/Makefile
-+++ b/Makefile
-@@ -46,7 +46,7 @@ pkgincludedir=$(includedir:$(prefix)/%=%)
- .PHONY: all clean data update manifest install
--all: libutf8proc.a libutf8proc.$(SHLIB_EXT)
-+all: libutf8proc.$(SHLIB_EXT)
- clean:
-       rm -f utf8proc.o libutf8proc.a libutf8proc.$(SHLIB_VERS_EXT) libutf8proc.$(SHLIB_EXT)
-@@ -104,7 +104,6 @@ install: libutf8proc.a libutf8proc.$(SHLIB_EXT) libutf8proc.$(SHLIB_VERS_EXT) li
-       mkdir -m 755 -p $(DESTDIR)$(includedir)
-       $(INSTALL) -m 644 utf8proc.h $(DESTDIR)$(includedir)
-       mkdir -m 755 -p $(DESTDIR)$(libdir)
--      $(INSTALL) -m 644 libutf8proc.a $(DESTDIR)$(libdir)
-       $(INSTALL) -m 755 libutf8proc.$(SHLIB_VERS_EXT) $(DESTDIR)$(libdir)
-       mkdir -m 755 -p $(DESTDIR)$(pkgconfigdir)
-       $(INSTALL) -m 644 libutf8proc.pc $(DESTDIR)$(pkgconfigdir)/libutf8proc.pc
index 7998589fb90db8f45d5dcc6b13c1a1cfbf43aee4..9657f0d5e0c0eb970e810f8bf42b71d3fa297474 100644 (file)
@@ -12,18 +12,14 @@ SRC_URI="https://github.com/JuliaStrings/${PN#lib}/archive/v${PV}.tar.gz -> ${P}
 LICENSE="MIT"
 SLOT="0/${PV}"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux"
-IUSE="test"
+IUSE="static-libs test"
 RESTRICT="!test? ( test )"
 
 BDEPEND="test? ( =app-i18n/unicode-data-12.0* )"
 
 S="${WORKDIR}/${P#lib}"
 
-PATCHES=(
-       # Don't build or install static libs
-       "${FILESDIR}/${PN}-2.3.0-no-static.patch"
-       "${FILESDIR}"/${PN}-grapheme-test.patch
-)
+PATCHES=( "${FILESDIR}"/${PN}-grapheme-test.patch )
 
 src_compile() {
        emake \
@@ -37,6 +33,7 @@ src_install() {
                prefix="/usr" \
                libdir="/usr/$(get_libdir)" \
                install
+       use static-libs || find "${ED}" -name '*.a' -delete || die
        # This package used to use netsurf's version as an upstream, which lives in
        # its own little world. Unlike julia's version, it puts its header file
        # in libutf8proc/utf8proc.h instead of utf8proc.h. The problem is that