Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
23c760b4
Commit
23c760b4
authored
Sep 05, 2013
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: add a cross_compiling helper function
to detect if we cross compile
parent
7bda0cea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
abuild.in
abuild.in
+11
-5
No files found.
abuild.in
View file @
23c760b4
...
...
@@ -104,6 +104,10 @@ set_xterm_title() {
fi
}
cross_compiling
()
{
test
"
$CBUILD
"
!=
"
$CHOST
"
-a
-n
"
$CBUILDROOT
"
}
cleanup
()
{
local
i
=
set_xterm_title
""
...
...
@@ -118,7 +122,7 @@ cleanup() {
if
[
-z
"
$install_after
"
]
&&
[
-n
"
$uninstall_after
"
]
;
then
msg
"Uninstalling dependencies..."
$SUDO_APK
del
--quiet
$apk_opt_wait
$uninstall_after
if
[
"
$CBUILD
"
!=
"
$CHOST
"
-a
-n
"
$CBUILDROOT
"
]
;
then
if
cross_compiling
;
then
$SUDO_APK
del
--root
"
$CBUILDROOT
"
\
--quiet
$apk_opt_wait
\
$uninstall_after
...
...
@@ -996,7 +1000,7 @@ trace_apk_deps() {
# first check if its provided by same apkbuild
grep
-q
-w
"^
$i
"
"
$dir
"
/.provides-so 2>/dev/null
&&
continue
if
subpkg_provides
"
$i
"
||
[
"
$CBUILD
"
!=
"
$CHOST
"
]
\
if
subpkg_provides
"
$i
"
||
cross_compiling
\
||
$APK
info
--quiet
--installed
"so:
$i
"
;
then
autodeps
=
"
$autodeps
so:
$i
"
else
...
...
@@ -1531,7 +1535,7 @@ builddeps() {
msg
"Analyzing dependencies..."
# add depends unless it is a subpackage or package itself
if
[
"
$CBUILD
"
!=
"
$CHOST
"
-a
-n
"
$CBUILDROOT
"
]
&&
[
-n
"
$makedepends_build
"
-o
-n
"
$makedepends_host
"
]
;
then
if
cross_compiling
&&
[
-n
"
$makedepends_build
"
-o
-n
"
$makedepends_host
"
]
;
then
for
i
in
$BUILD_BASE
$makedepends_build
;
do
[
"
$pkgname
"
=
"
${
i
%%[<>=]*
}
"
]
&&
continue
subpackages_has
${
i
%%[<>=]*
}
||
builddeps
=
"
$builddeps
$i
"
...
...
@@ -1774,8 +1778,10 @@ deps() {
undeps
(){
$SUDO_APK
del
$apk_opt_wait
.makedepends-
$pkgname
[
"
$CBUILD
"
!=
"
$CHOST
"
-a
-n
"
$CBUILDROOT
"
]
&&
$SUDO_APK
del
--root
"
$CBUILDROOT
"
$apk_opt_wait
.makedepends-
$pkgname
if
cross_compiling
;
then
$SUDO_APK
del
--root
"
$CBUILDROOT
"
$apk_opt_wait
\
.makedepends-
$pkgname
fi
}
# compat
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment