summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2024-08-16 01:50:02 +0200
committerSam James <sam@gentoo.org>2024-08-16 03:18:34 +0100
commit96287bc84761a85c048e6b470b05a5a31cc389df (patch)
tree796c26f792b0bd614c76366eeb7a371002dff3b6 /net-misc
parentpackage.mask: Last rite app-text/cuneiform (diff)
downloadgentoo-96287bc84761a85c048e6b470b05a5a31cc389df.tar.gz
gentoo-96287bc84761a85c048e6b470b05a5a31cc389df.tar.bz2
gentoo-96287bc84761a85c048e6b470b05a5a31cc389df.zip
net-misc/trurl: add latest 0.14, fix 9999 build
The old Makefile patch can no longer be applied; so I wrote a new patch that applies to 0.14 that is also applied to the 9999 version for now, and sent it upstream. Additionally, I added an export NDEBUG=1 command in src_compile: without this, -g and -Werror are added after CFLAGS by the Makefile possibly shadowing options like -ggdb3 that user might have set, or causing a build to fail just because a warning was reported. Bump copyright of touched ebuild files. Ref: https://github.com/curl/trurl/pull/322 Signed-off-by: Emanuele Torre <torreemanuele6@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/trurl/Manifest1
-rw-r--r--net-misc/trurl/files/trurl-0.14-fix-makefile.patch25
-rw-r--r--net-misc/trurl/trurl-0.14.ebuild53
-rw-r--r--net-misc/trurl/trurl-9999.ebuild5
4 files changed, 82 insertions, 2 deletions
diff --git a/net-misc/trurl/Manifest b/net-misc/trurl/Manifest
index 316593446d28..71fbfab765ea 100644
--- a/net-misc/trurl/Manifest
+++ b/net-misc/trurl/Manifest
@@ -1 +1,2 @@
+DIST trurl-0.14.tar.gz 47830 BLAKE2B 15be36ef5c5989cf15d3983827055c793f15ae59efe8e02cc2f55ad9b19c528bb568aacc0583590017a6d6a3a74db1bd6bd3e18d3fee1c7c7d86e71f503d57f7 SHA512 25c1a3035095065368c8a11547e1d918b6f688e293982895a7bc27d9e161c0193ceccfaa0c2440f5c42a8ba4d5176a3f6a4fb843f5fa573328ef9baf5a438165
DIST trurl-0.7.tar.gz 36624 BLAKE2B a63e8ec7f0b57006b5fa7a1d2ade1284dc2076474ef0425574ecb9b452c49d9a6148461a97e760287340d67a924612c1eb1fe188b6597b8147f818c18681190f SHA512 9ecccd9b688d7bddba760bbd408a1b864d5818b2c538904662ab81b13bca6226d03a4d209c74841c83ee368e656243e92bc7f7be876dbd5c1736b7fc2c3f82d6
diff --git a/net-misc/trurl/files/trurl-0.14-fix-makefile.patch b/net-misc/trurl/files/trurl-0.14-fix-makefile.patch
new file mode 100644
index 000000000000..2787f21015fd
--- /dev/null
+++ b/net-misc/trurl/files/trurl-0.14-fix-makefile.patch
@@ -0,0 +1,25 @@
+See https://github.com/curl/trurl/pull/322
+--- a/Makefile
++++ b/Makefile
+@@ -28,10 +28,10 @@ ifndef TRURL_IGNORE_CURL_CONFIG
+ LDLIBS += $$(curl-config --libs)
+ CFLAGS += $$(curl-config --cflags)
+ endif
+-CFLAGS += -W -Wall -Wshadow -Werror -pedantic
++CFLAGS += -W -Wall -Wshadow -pedantic
+ CFLAGS += -Wconversion -Wmissing-prototypes -Wwrite-strings -Wsign-compare -Wno-sign-conversion
+ ifndef NDEBUG
+-CFLAGS += -g
++CFLAGS += -Werror -g
+ endif
+ MANUAL = trurl.1
+
+@@ -43,7 +43,7 @@ INSTALL ?= install
+ PYTHON3 ?= python3
+
+ $(TARGET): $(OBJS)
+- $(CC) $(OBJS) -o $(TARGET) $(LDFLAGS) $(LDLIBS)
++ $(CC) $(LDFLAGS) $(OBJS) -o $(TARGET) $(LDLIBS)
+
+ trurl.o: trurl.c version.h
+
diff --git a/net-misc/trurl/trurl-0.14.ebuild b/net-misc/trurl/trurl-0.14.ebuild
new file mode 100644
index 000000000000..5dfbbc31163e
--- /dev/null
+++ b/net-misc/trurl/trurl-0.14.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit toolchain-funcs python-any-r1
+
+DESCRIPTION="Command line tool for URL parsing and manipulation"
+HOMEPAGE="https://curl.se/trurl/ https://daniel.haxx.se/blog/2023/04/03/introducing-trurl/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/curl/trurl"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/curl/trurl/archive/refs/tags/${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-${P}
+
+ KEYWORDS="~amd64 ~arm ~arm64"
+fi
+
+LICENSE="curl"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# Older curls may work but not all features will be present
+DEPEND=">=net-misc/curl-7.81.0"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.14-fix-makefile.patch
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_compile() {
+ tc-export CC
+ export NDEBUG=1
+
+ default
+}
+
+src_test() {
+ emake PYTHON3="${EPYTHON}" test
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
+}
diff --git a/net-misc/trurl/trurl-9999.ebuild b/net-misc/trurl/trurl-9999.ebuild
index 2a3befe7c83d..5dfbbc31163e 100644
--- a/net-misc/trurl/trurl-9999.ebuild
+++ b/net-misc/trurl/trurl-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -30,7 +30,7 @@ RDEPEND="${DEPEND}"
BDEPEND="test? ( ${PYTHON_DEPS} )"
PATCHES=(
- "${FILESDIR}"/${PN}-0.7-fix-makefile.patch
+ "${FILESDIR}"/${PN}-0.14-fix-makefile.patch
)
pkg_setup() {
@@ -39,6 +39,7 @@ pkg_setup() {
src_compile() {
tc-export CC
+ export NDEBUG=1
default
}