Skip to content

Commit

Permalink
dev-scheme/guile-zlib: new package; add 0.1.0
Browse files Browse the repository at this point in the history
Bug: trofi/nix-guix-gentoo#24
Signed-off-by: Maciej Barć <[email protected]>
  • Loading branch information
xgqt committed Oct 17, 2022
1 parent 8ca7b51 commit be71396
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-scheme/guile-zlib/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST guile-zlib-0.1.0.tar.gz 14652 BLAKE2B 10f0c4d312b07415f3846927a3a1d59aa62106bf0e4a4446ba6764486104053da544fc994491af6611154edb459bba7c55e79095695b90c28ce4237e24e3b98b SHA512 bf9201c7c01324a44ae86a673f4d1b92fd6f346d0be9d5a6390cc8be11d79d00a1cdee88c28ceb7fc5b99215198cf3ac368884381933e40babc85a21cbd300e3
13 changes: 13 additions & 0 deletions dev-scheme/guile-zlib/files/guile-zlib-0.1.0-gentoo.patch
Original file line number Diff line number Diff line change
@@ -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")
43 changes: 43 additions & 0 deletions dev-scheme/guile-zlib/guile-zlib-0.1.0.ebuild
Original file line number Diff line number Diff line change
@@ -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)"
}
12 changes: 12 additions & 0 deletions dev-scheme/guile-zlib/metadata.xml
Original file line number Diff line number Diff line change
@@ -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>[email protected]</email>
<name>Gentoo Scheme Project</name>
</maintainer>
<upstream>
<bugs-to>https://notabug.org/guile-zlib/guile-zlib/</bugs-to>
</upstream>
</pkgmetadata>

0 comments on commit be71396

Please sign in to comment.