net-vpn/riseup-vpn: respect user setting for AR

Closes: https://bugs.gentoo.org/814017
Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
This commit is contained in:
Andrew Ammerlaan
2021-09-23 12:00:07 +02:00
parent 391cc2807a
commit dcc8efa65d
2 changed files with 44 additions and 2 deletions
@@ -0,0 +1,38 @@
diff --git a/gui/build.sh b/gui/build.sh
index 56e3d66..9e519a6 100755
--- a/gui/build.sh
+++ b/gui/build.sh
@@ -63,13 +63,13 @@ function buildGoLib {
if [ "$XBUILD" == "no" ]
then
echo "[+] Building Go library with standard Go compiler"
- CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB
+ CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
fi
if [ "$XBUILD" == "$WIN64" ]
then
echo "[+] Building Go library with mxe"
echo "[+] Using cc:" $CC
- CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB
+ CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
fi
}
@@ -77,7 +77,7 @@ function buildQmake {
echo "[+] Now building Qml app with Qt qmake"
echo "[+] Using qmake in:" $QMAKE
mkdir -p $QTBUILD
- $QMAKE -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT
+ $QMAKE -early QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT
#CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release
}
@@ -115,7 +115,7 @@ function buildDefault {
buildQmake
make -C $QTBUILD clean
- make -C $QTBUILD -j4 all
+ make -C $QTBUILD $MAKEFLAGS all
renameOutput
echo "[+] Done."
@@ -9,7 +9,7 @@ DOCS_DEPEND="dev-python/alabaster"
PYTHON_COMPAT=( python3_{8..10} )
inherit desktop python-single-r1 docs go-module virtualx xdg
inherit desktop python-single-r1 docs go-module virtualx toolchain-funcs xdg
EGO_SUM=(
"0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2"
@@ -91,7 +91,10 @@ RDEPEND="${DEPEND}
"
# ip command is in bin instead of sbin on Gentoo
PATCHES=( "${FILESDIR}/${PN}-ip-location.patch" )
PATCHES=(
"${FILESDIR}/${PN}-ip-location.patch"
"${FILESDIR}/${PN}-respect-AR.patch"
)
S="${WORKDIR}/bitmask-vpn-${PV}"
@@ -108,6 +111,7 @@ src_prepare() {
src_compile() {
# does not build with j>1
tc-export AR LD CC CXX
emake -j1 build
docs_compile
}