summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2022-10-17 01:54:13 +0200
committerMaciej Barć <xgqt@gentoo.org>2022-10-17 02:12:41 +0200
commitbe71396de3829ddab171ade3d31f196c905341f4 (patch)
tree8168d10ef4cd0ff08f57a649c22f02a85f181eb5 /dev-scheme
parentdev-scheme/guile-ssh: new package; add 0.16.0 (diff)
downloadgentoo-be71396de3829ddab171ade3d31f196c905341f4.tar.gz
gentoo-be71396de3829ddab171ade3d31f196c905341f4.tar.bz2
gentoo-be71396de3829ddab171ade3d31f196c905341f4.zip
dev-scheme/guile-zlib: new package; add 0.1.0
Bug: https://github.com/trofi/nix-guix-gentoo/issues/24 Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-scheme')
-rw-r--r--dev-scheme/guile-zlib/Manifest1
-rw-r--r--dev-scheme/guile-zlib/files/guile-zlib-0.1.0-gentoo.patch13
-rw-r--r--dev-scheme/guile-zlib/guile-zlib-0.1.0.ebuild43
-rw-r--r--dev-scheme/guile-zlib/metadata.xml12
4 files changed, 69 insertions, 0 deletions
diff --git a/dev-scheme/guile-zlib/Manifest b/dev-scheme/guile-zlib/Manifest
new file mode 100644
index 000000000000..b45debe18ed0
--- /dev/null
+++ b/dev-scheme/guile-zlib/Manifest
@@ -0,0 +1 @@
+DIST guile-zlib-0.1.0.tar.gz 14652 BLAKE2B 10f0c4d312b07415f3846927a3a1d59aa62106bf0e4a4446ba6764486104053da544fc994491af6611154edb459bba7c55e79095695b90c28ce4237e24e3b98b SHA512 bf9201c7c01324a44ae86a673f4d1b92fd6f346d0be9d5a6390cc8be11d79d00a1cdee88c28ceb7fc5b99215198cf3ac368884381933e40babc85a21cbd300e3
diff --git a/dev-scheme/guile-zlib/files/guile-zlib-0.1.0-gentoo.patch b/dev-scheme/guile-zlib/files/guile-zlib-0.1.0-gentoo.patch
new file mode 100644
index 000000000000..9d63512f8499
--- /dev/null
+++ b/dev-scheme/guile-zlib/files/guile-zlib-0.1.0-gentoo.patch
@@ -0,0 +1,13 @@
+Not upstreamable hack. Gentoo installs /usr/${libdir}/libz.so
+linker script that redirects to /${libdir}/libz.so.1
+
+Let's use ELF file directly. It also requires guile to support
+direct loading and enforces >=guile-3.
+--- a/zlib/config.scm.in
++++ b/zlib/config.scm.in
+@@ -20,4 +20,4 @@
+ #:export (%libz))
+
+ (define %libz
+- "@LIBZ_LIBDIR@/libz")
++ "@LIBZ_LIBDIR@/libz.so.1")
diff --git a/dev-scheme/guile-zlib/guile-zlib-0.1.0.ebuild b/dev-scheme/guile-zlib/guile-zlib-0.1.0.ebuild
new file mode 100644
index 000000000000..fb293dfdba44
--- /dev/null
+++ b/dev-scheme/guile-zlib/guile-zlib-0.1.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="GNU Guile library providing bindings to zlib"
+HOMEPAGE="https://notabug.org/guile-zlib/guile-zlib/"
+SRC_URI="https://notabug.org/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/${PN}
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=dev-scheme/guile-2.0.0:=
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog HACKING NEWS README.org )
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+# guile generates ELF files without use of C or machine code
+# It's a portage's false positive. bug #677600
+QA_PREBUILT='*[.]go'
+
+src_prepare() {
+ default
+
+ # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112
+ find "${S}" -name "*.scm" -exec touch {} + || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # Gentoo installs zlib to /${libdir} and to /usr/${libdir}.
+ # We need /${libdir} with shared library here.
+ econf LIBZ_LIBDIR="${EPREFIX}/$(get_libdir)"
+}
diff --git a/dev-scheme/guile-zlib/metadata.xml b/dev-scheme/guile-zlib/metadata.xml
new file mode 100644
index 000000000000..fdc4b2dc1015
--- /dev/null
+++ b/dev-scheme/guile-zlib/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="project">
+ <email>scheme@gentoo.org</email>
+ <name>Gentoo Scheme Project</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://notabug.org/guile-zlib/guile-zlib/</bugs-to>
+ </upstream>
+</pkgmetadata>