From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Fix scons build style
Date: Fri, 02 Sep 2022 18:15:56 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39064@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages fix-scons-build-style
https://github.com/void-linux/void-packages/pull/39064
Fix scons build style
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**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/39064.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix-scons-build-style-39064.patch --]
[-- Type: text/x-diff, Size: 3751 bytes --]
From 02f092fb86f89cecb91f6f3e53aee96b6237f4a1 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: Fri, 2 Sep 2022 22:49:18 +0700
Subject: [PATCH 1/2] build-style/scons: use --install-sandbox for $DESTDIR
See https://scons.org/doc/production/HTML/scons-user.html#b-Install
Some projects uses --prefix=$DESTDIR/usr must be fixed.
---
common/build-style/scons.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/build-style/scons.sh b/common/build-style/scons.sh
index 17527d7ac652..87c5b976dc2f 100644
--- a/common/build-style/scons.sh
+++ b/common/build-style/scons.sh
@@ -9,7 +9,7 @@ do_build() {
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
RANLIB="$RANLIB" ranlib="$RANLIB" \
- prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR} \
+ prefix=/usr \
${make_build_args} ${make_build_target}
}
do_install() {
@@ -21,6 +21,6 @@ do_install() {
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
RANLIB="$RANLIB" ranlib="$RANLIB" \
- prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR} \
+ prefix=/usr --install-sandbox="$DESTDIR" \
${make_install_args} ${make_install_target}
}
From 83bb98909aa1e8e1dd07a4025066175d30d21336 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: Fri, 2 Sep 2022 22:52:47 +0700
Subject: [PATCH 2/2] cbang: rebuild for correct prefix
---
srcpkgs/cbang/template | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/srcpkgs/cbang/template b/srcpkgs/cbang/template
index 63388b2aa828..ae55f253b38d 100644
--- a/srcpkgs/cbang/template
+++ b/srcpkgs/cbang/template
@@ -1,13 +1,14 @@
# Template file for 'cbang'
pkgname=cbang
version=1.6.0
-revision=3
+revision=4
build_style=scons
make_build_args="sharedlib=1 staticlib=1"
make_install_args="${make_build_args}"
hostmakedepends="pkg-config"
makedepends="boost-devel bzip2-devel expat-devel leveldb-devel libevent-devel
openssl-devel libyaml-devel re2-devel snappy-devel sqlite-devel zlib-devel"
+checkdepends="python"
short_desc="C! (a.k.a. C-Bang) collection of C++ utility libraries"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-only"
@@ -15,31 +16,25 @@ homepage="https://github.com/CauldronDevelopmentLLC/cbang"
distfiles="https://github.com/CauldronDevelopmentLLC/cbang/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=8aa5efacf419b712b5bd0172c9d56301bdcbd477cb590ceec25c3595a192e9c0
-pre_build() {
- make_build_args+=" prefix=$DESTDIR/usr"
+post_extract() {
+ touch tests/iostreamTests/{C,Dec}ompressTest/disable
}
-do_check() {
+post_build() {
cd tests
- touch iostreamTests/{C,Dec}ompressTest/disable
- scons ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \
- cc=$CC cxx=$CXX ccflags="$CFLAGS" \
- CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
- cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
- RANLIB="$RANLIB" ranlib="$RANLIB" \
- prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR}
- ./testHarness
+ do_build
}
-pre_install() {
- make_install_args+=" prefix=$DESTDIR/usr"
+do_check() {
+ cd tests
+ ./testHarness
}
post_install() {
# Create missing symbolic links for the shared library
- ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0.0
- ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0
- ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so
+ ln -s libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0.0
+ ln -s libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0
+ ln -s libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so
}
cbang-devel_package() {
next reply other threads:[~2022-09-02 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 16:15 sgn [this message]
2022-09-03 6:07 ` [PR PATCH] [Updated] " sgn
2022-09-05 13:00 ` [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-39064@inbox.vuxu.org \
--to=sgn@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).