Github messages for voidlinux
 help / color / mirror / Atom feed
From: mtboehlke <mtboehlke@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] docbook2mdoc: fix build and extract license file
Date: Tue, 20 Sep 2022 23:07:03 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39395@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is a new pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages docbook2mdoc
https://github.com/void-linux/void-packages/pull/39395

docbook2mdoc: fix build and extract license file
<!-- Uncomment relevant sections and delete options which are not applicable -->

Use pkg-config to set flags for libbsd, add missing libmd depend, and install a license file

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39395.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-docbook2mdoc-39395.patch --]
[-- Type: text/x-diff, Size: 1826 bytes --]

From 4532202db97281a8b7f5946693334635e2cb7ff2 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 20 Sep 2022 16:01:49 -0500
Subject: [PATCH] docbook2mdoc: fix build and extract license file

---
 srcpkgs/docbook2mdoc/template | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/docbook2mdoc/template b/srcpkgs/docbook2mdoc/template
index 24f1bee61836..0c8729a51afe 100644
--- a/srcpkgs/docbook2mdoc/template
+++ b/srcpkgs/docbook2mdoc/template
@@ -1,19 +1,29 @@
 # Template file for 'docbook2mdoc'
 pkgname=docbook2mdoc
 version=1.1.0
-revision=1
+revision=2
 build_style=gnu-makefile
-makedepends="libbsd-devel"
+hostmakedepends="pkg-config"
+makedepends="libbsd-devel libmd-devel"
 short_desc="Converter from DocBook V4.x and v5.x XML into mdoc"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="ISC"
-homepage="http://mdocml.bsd.lv/docbook2mdoc"
-distfiles="http://mdocml.bsd.lv/docbook2mdoc/snapshots/${pkgname}-${version}.tgz"
+homepage="https://mandoc.bsd.lv/docbook2mdoc"
+distfiles="https://mandoc.bsd.lv/docbook2mdoc/snapshots/${pkgname}-${version}.tgz"
 checksum=9fc6411cf041ff10e76f19a50a142075a8df9d343f248e20d8fc98bf8e547c71
 
-LDFLAGS="-lbsd"
+CFLAGS="-D_GNU_SOURCE"
+
 post_extract() {
-	sed -i '/CC.*-o/s/$/ $(LDFLAGS)/' Makefile
-	sed -i 's,/man/man1,/share/man/man1,g' Makefile
-	vsed -e 's:sys/queue.h:bsd/sys/queue.h:' -i node.h
+	# Use pkg-config to set libbsd flags
+	vsed -e '/^CFLAGS/c override CFLAGS += $(shell pkg-config --cflags libbsd-overlay)\
+override LDFLAGS += $(shell pkg-config --libs libbsd-overlay)' \
+		-e '/CC.*-o/s/$/ $(LDFLAGS)/; s,/man/man1,/share/man/man1,g' -i Makefile
+
+	# Create License file
+	sed -E '3,16 !d;s/^ [*] ?//' docbook2mdoc.c > LICENSE
+}
+
+post_install() {
+	vlicense LICENSE
 }

             reply	other threads:[~2022-09-20 21:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 21:07 mtboehlke [this message]
2022-09-21  0:51 ` [PR REVIEW] " sgn
2022-09-21  1:35 ` [PR PATCH] [Updated] " mtboehlke
2022-09-21  1:36 ` [PR REVIEW] " mtboehlke
2022-09-21  8:37 ` [PR PATCH] [Merged]: " sgn

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39395@inbox.vuxu.org \
    --to=mtboehlke@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).