public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/trurl/, net-misc/trurl/files/
Date: Tue, 18 Apr 2023 04:29:00 +0000 (UTC)	[thread overview]
Message-ID: <1681790594.6aae086aadec1c30eb0186d54952548df1d7d41f.sam@gentoo> (raw)

commit:     6aae086aadec1c30eb0186d54952548df1d7d41f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 18 04:03:14 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 18 04:03:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6aae086a

net-misc/trurl: add 0.5

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/trurl/Manifest                            |  1 +
 net-misc/trurl/files/trurl-0.5-fix-makefile.patch  | 22 ++++++++++++++++++++++
 .../trurl/{trurl-9999.ebuild => trurl-0.5.ebuild}  | 22 +++++++++++++++-------
 net-misc/trurl/trurl-9999.ebuild                   | 22 +++++++++++++++-------
 4 files changed, 53 insertions(+), 14 deletions(-)

diff --git a/net-misc/trurl/Manifest b/net-misc/trurl/Manifest
index ef7b691cf43f..25e2f1333270 100644
--- a/net-misc/trurl/Manifest
+++ b/net-misc/trurl/Manifest
@@ -1 +1,2 @@
 DIST trurl-0.4.tar.gz 23602 BLAKE2B c780fc52010f868fddbe1a06feb1ed1df627eb9ff8916d0212c8196c1efeb282b06900d2259dbaa4abdbc3c68002b1f3dfeb308c4ae2202578c40c112120b77c SHA512 7d106bf7dd39fb39316a9890bc562a5824dc046acfa50b97954e87ba455b479a2b86cfbf09a130dd39000abbc2e0fdc7038109410cf44c97812489d410693a01
+DIST trurl-0.5.tar.gz 28792 BLAKE2B e552d04599628ea17e19627a1aa24871bf71fb100253f6eb945a9062ad0db98ea0a87125cc2c6a5f05f8c0296953c972b8fc9a6d5c01bdbc74d9ab9e28b9094c SHA512 1bf81030e8c904e551180b5c51f37ebe382345f397165695b47554e3c712c568351a53a7527891807f89127ea270b72632b24388db4c8efee3e9994cae1def47

diff --git a/net-misc/trurl/files/trurl-0.5-fix-makefile.patch b/net-misc/trurl/files/trurl-0.5-fix-makefile.patch
new file mode 100644
index 000000000000..66a152991ca4
--- /dev/null
+++ b/net-misc/trurl/files/trurl-0.5-fix-makefile.patch
@@ -0,0 +1,22 @@
+See https://github.com/curl/trurl/pull/158#issuecomment-1512397801.
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,6 @@
+ TARGET = trurl
+ OBJS = trurl.o
+-LDLIBS != curl-config --libs
+-CFLAGS != curl-config --cflags
+-CFLAGS += -W -Wall -pedantic -g
++LDLIBS = $(shell curl-config --libs)
+ MANUAL = trurl.1
+ 
+ PREFIX ?= /usr/local
+@@ -13,7 +11,7 @@ INSTALL ?= install
+ PYTHON3 ?= python3
+ 
+ $(TARGET): $(OBJS)
+-	$(CC) $(OBJS) -o $(TARGET) $(LDLIBS) $(LDFLAGS)
++	$(CC) $(CPPFLAGS) $(CFLAGS) -Wall $(shell curl-config --cflags) $(LDFLAGS) $(OBJS) -o $(TARGET) $(LDLIBS)
+ 
+ trurl.o:trurl.c version.h
+ 

diff --git a/net-misc/trurl/trurl-9999.ebuild b/net-misc/trurl/trurl-0.5.ebuild
similarity index 74%
copy from net-misc/trurl/trurl-9999.ebuild
copy to net-misc/trurl/trurl-0.5.ebuild
index 78443cfb2991..fe0c58e18fdd 100644
--- a/net-misc/trurl/trurl-9999.ebuild
+++ b/net-misc/trurl/trurl-0.5.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=8
 
-inherit toolchain-funcs
+PYTHON_COMPAT=( python3_{9..11} )
+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/"
@@ -26,12 +27,15 @@ 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? (
-		dev-lang/perl
-		virtual/perl-JSON-PP
-	)
-"
+BDEPEND="test? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.5-fix-makefile.patch
+)
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+}
 
 src_compile() {
 	tc-export CC
@@ -39,6 +43,10 @@ src_compile() {
 	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 78443cfb2991..fe0c58e18fdd 100644
--- a/net-misc/trurl/trurl-9999.ebuild
+++ b/net-misc/trurl/trurl-9999.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=8
 
-inherit toolchain-funcs
+PYTHON_COMPAT=( python3_{9..11} )
+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/"
@@ -26,12 +27,15 @@ 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? (
-		dev-lang/perl
-		virtual/perl-JSON-PP
-	)
-"
+BDEPEND="test? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.5-fix-makefile.patch
+)
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+}
 
 src_compile() {
 	tc-export CC
@@ -39,6 +43,10 @@ src_compile() {
 	default
 }
 
+src_test() {
+	emake PYTHON3="${EPYTHON}" test
+}
+
 src_install() {
 	emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
 }


             reply	other threads:[~2023-04-18  4:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  4:29 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-31  3:39 [gentoo-commits] repo/gentoo:master commit in: net-misc/trurl/, net-misc/trurl/files/ Sam James
2023-11-25  6:36 Sam James
2024-10-08  7:09 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1681790594.6aae086aadec1c30eb0186d54952548df1d7d41f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox