Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] cgit: prepare for auto-create wrksrc, fix do_check
@ 2022-10-24  1:01 sgn
  2022-10-25 13:59 ` [PR PATCH] [Merged]: " sgn
  0 siblings, 1 reply; 2+ messages in thread
From: sgn @ 2022-10-24  1:01 UTC (permalink / raw)
  To: ml

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

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

https://github.com/sgn/void-packages cgit-fix-check
https://github.com/void-linux/void-packages/pull/40134

cgit: prepare for auto-create wrksrc, fix do_check
Also don't use vendored regex engine on glibc.

<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### 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/40134.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cgit-fix-check-40134.patch --]
[-- Type: text/x-diff, Size: 3036 bytes --]

From 3d4cf0d015755568ff7614d9f51c02a399091d5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 24 Oct 2022 07:53:21 +0700
Subject: [PATCH] cgit: prepare for auto-create wrksrc, fix do_check

Also don't use vendored regex engine on glibc.
---
 srcpkgs/cgit/template | 61 +++++++++++++++++++++++++++++++------------
 1 file changed, 44 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/cgit/template b/srcpkgs/cgit/template
index 8cca59ae1b7e..b991fe6f0caf 100644
--- a/srcpkgs/cgit/template
+++ b/srcpkgs/cgit/template
@@ -2,16 +2,11 @@
 _git_version=2.25.1
 pkgname=cgit
 version=1.2.3
-revision=2
-make_build_args="
- prefix=/usr
- NO_REGEX=NeedsStartEnd
- NO_OPENSSL=yes
- CGIT_DATA_PATH=/usr/share/webapps/cgit
- CGIT_SCRIPT_PATH=/usr/libexec/cgit"
+revision=3
+create_wrksrc=yes
 hostmakedepends="asciidoc"
 makedepends="zlib-devel"
-checkdepends="perl"
+checkdepends="perl tidy5 unzip lzip zstd xz tar which"
 short_desc="Hyperfast web frontend for git repositories written in C"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="GPL-2.0-only"
@@ -22,19 +17,52 @@ checksum="5a5f12d2f66bd3629c8bc103ec8ec2301b292e97155d30a9a61884ea414a6da4
  222796cc6e3bf2f9fd765f8f097daa3c3999bb7865ac88a8c974d98182e29f26"
 
 post_extract() {
-	rm -r git
-	mv ../git-$_git_version git
+	rmdir cgit-$version/git
+	mv git-$_git_version git
+	mv cgit-$version/* cgit-$version/.??* .
+	rmdir cgit-$version
 }
 
-pre_build() {
-	if ! grep -q "^GIT_VER = $_git_version\$" Makefile; then
-		msg_error "$pkgver: update _git_version to match upstream Makefile.\n"
+do_configure() {
+	cat <<-EOF >cgit.conf
+	prefix=/usr
+	NO_OPENSSL=Yes
+	CGIT_DATA_PATH=/usr/share/webapps/cgit
+	CGIT_SCRIPT_PATH=/usr/libexec/cgit
+	# cgit build git with NO_CURL for all but not tests,
+	# make the whole git rebuilt with different flags
+	NO_CURL=Yes
+	CC = $CC
+	AR = $AR
+	TAR = bsdtar
+	CFLAGS = $CFLAGS
+	LDFLAGS = $LDFLAGS
+	HOST_CPU = ${XBPS_TARGET_MACHINE%-musl}
+	DC_SHA1 = Yes
+	NO_GETTEXT = Yes
+	NO_PYTHON = Yes
+	NO_EXPAT = Yes
+	# Don't build git-perl script, test requires perl still run
+	NO_PERL = Yes
+	NO_TCLTK = Yes
+	EOF
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		# Copy settings from git
+		cat <<-EOF >>cgit.conf
+		ICONV_OMITS_BOM = Yes
+		# This option will use a vendored regex engine
+		NO_REGEX = NeedsStartEnd
+		EOF
 	fi
+	cp cgit.conf git/config.mak
 }
 
+
 do_build() {
-	make CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
-		 ${makejobs} ${make_build_args} all doc-man
+	if ! grep -q "^GIT_VER = $_git_version\$" Makefile; then
+		msg_error "$pkgver: update _git_version to match upstream Makefile.\n"
+	fi
+	make ${makejobs} all doc-man
 }
 
 do_check() {
@@ -42,8 +70,7 @@ do_check() {
 }
 
 do_install() {
-	make CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
-		DESTDIR=${DESTDIR} ${make_build_args} install install-man
+	make DESTDIR=${DESTDIR} install install-man
 
 	ln -s /usr/libexec/cgit/cgit.cgi ${DESTDIR}/usr/share/webapps/cgit/cgit.cgi
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: cgit: prepare for auto-create wrksrc, fix do_check
  2022-10-24  1:01 [PR PATCH] cgit: prepare for auto-create wrksrc, fix do_check sgn
@ 2022-10-25 13:59 ` sgn
  0 siblings, 0 replies; 2+ messages in thread
From: sgn @ 2022-10-25 13:59 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

cgit: prepare for auto-create wrksrc, fix do_check
https://github.com/void-linux/void-packages/pull/40134

Description:
Also don't use vendored regex engine on glibc.

<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### 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
-->


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-25 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24  1:01 [PR PATCH] cgit: prepare for auto-create wrksrc, fix do_check sgn
2022-10-25 13:59 ` [PR PATCH] [Merged]: " sgn

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).