From a86e22f994318984353a0a6c4223fc8d6a7bf072 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Sun, 25 Oct 2020 16:26:33 -0700 Subject: dev-lang/jsonnet: fix libdir Closes: https://bugs.gentoo.org/751160 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Georgy Yakovlev --- dev-lang/jsonnet/files/jsonnet-0.16.0-libdir.patch | 35 ++++++++++ dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild | 75 ---------------------- dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild | 75 ++++++++++++++++++++++ 3 files changed, 110 insertions(+), 75 deletions(-) create mode 100644 dev-lang/jsonnet/files/jsonnet-0.16.0-libdir.patch delete mode 100644 dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild create mode 100644 dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild (limited to 'dev-lang/jsonnet') diff --git a/dev-lang/jsonnet/files/jsonnet-0.16.0-libdir.patch b/dev-lang/jsonnet/files/jsonnet-0.16.0-libdir.patch new file mode 100644 index 000000000000..552837112d59 --- /dev/null +++ b/dev-lang/jsonnet/files/jsonnet-0.16.0-libdir.patch @@ -0,0 +1,35 @@ +From 94d25e4845e46b27d0e425dc923480abc81a95ae Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Sun, 25 Oct 2020 16:21:56 -0700 +Subject: [PATCH] respect libdir + +--- + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 52c674a..ffcd666 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,6 +30,7 @@ OD ?= od + OPT ?= -O3 + + PREFIX ?= /usr/local ++LIBDIR ?= lib + + CXXFLAGS += -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC + CXXFLAGS += -Iinclude -Ithird_party/md5 -Ithird_party/json +@@ -128,8 +129,8 @@ default: jsonnet jsonnetfmt + install: bins libs + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp $(BINS) $(DESTDIR)$(PREFIX)/bin/ +- mkdir -p $(DESTDIR)$(PREFIX)/lib +- cp $(LIBS) $(DESTDIR)$(PREFIX)/lib/ ++ mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR) ++ cp $(LIBS) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ + mkdir -p $(DESTDIR)$(PREFIX)/include + cp $(INCS) $(DESTDIR)$(PREFIX)/include/ + +-- +2.29.1 + diff --git a/dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild b/dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild deleted file mode 100644 index 7df6256a2ccb..000000000000 --- a/dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( pypy3 python3_{6..9} ) - -inherit toolchain-funcs flag-o-matic distutils-r1 - -DESCRIPTION="A data templating language for app and tool developers " -HOMEPAGE="https://jsonnet.org/" -SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz" -IUSE="custom-optimization doc examples python" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 arm64 ~ppc64 x86" -DEPEND=" - python? ( ${PYTHON_DEPS} ) -" -RDEPEND=" - python? ( ${PYTHON_DEPS} ) -" -BDEPEND=" - python? ( - ${PYTHON_DEPS} - dev-python/setuptools[${PYTHON_USEDEP}] - ) -" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -PATCHES=( - "${FILESDIR}/jsonnet-0.14.0-makefile.patch" - "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch" -) - -distutils_enable_tests setup.py - -src_prepare() { - default - use python && distutils-r1_src_prepare - sed -i "s@\(PREFIX\)/lib@\(PREFIX\)/$(get_libdir)@g" Makefile || die -} - -src_configure() { - use custom-optimization || replace-flags '-O*' -O3 - tc-export CC CXX - default -} - -src_compile() { - emake bins libs - use python && distutils-r1_src_compile -} - -src_test() { - emake test - use python && distutils-r1_src_test -} - -src_install() { - emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install - use python && distutils-r1_src_install - if use doc; then - find doc -name '.gitignore' -delete || die - docinto html - dodoc -r doc/. - fi - if use examples; then - docinto examples - dodoc -r examples/. - fi -} diff --git a/dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild b/dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild new file mode 100644 index 000000000000..60961d97d63d --- /dev/null +++ b/dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( pypy3 python3_{6..9} ) + +inherit toolchain-funcs flag-o-matic distutils-r1 + +DESCRIPTION="A data templating language for app and tool developers " +HOMEPAGE="https://jsonnet.org/" +SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz" +IUSE="custom-optimization doc examples python" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 arm64 ~ppc64 x86" +DEPEND=" + python? ( ${PYTHON_DEPS} ) +" +RDEPEND=" + python? ( ${PYTHON_DEPS} ) +" +BDEPEND=" + python? ( + ${PYTHON_DEPS} + dev-python/setuptools[${PYTHON_USEDEP}] + ) +" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}/jsonnet-0.14.0-makefile.patch" + "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch" + "${FILESDIR}/jsonnet-0.16.0-libdir.patch" +) + +distutils_enable_tests setup.py + +src_prepare() { + default + use python && distutils-r1_src_prepare +} + +src_configure() { + use custom-optimization || replace-flags '-O*' -O3 + tc-export CC CXX + default +} + +src_compile() { + emake bins libs + use python && distutils-r1_src_compile +} + +src_test() { + emake test + use python && distutils-r1_src_test +} + +src_install() { + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" LIBDIR="$(get_libdir)" install + use python && distutils-r1_src_install + if use doc; then + find doc -name '.gitignore' -delete || die + docinto html + dodoc -r doc/. + fi + if use examples; then + docinto examples + dodoc -r examples/. + fi +} -- cgit v1.2.3-65-gdbad