Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
0253f9c9
You need to sign in or sign up before continuing.
Commit
0253f9c9
authored
Aug 11, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repl: split hach_distr_requires
parent
b4644080
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
24 deletions
+32
-24
repl
share/eterbuild/functions/repl
+32
-24
No files found.
share/eterbuild/functions/repl
View file @
0253f9c9
...
...
@@ -56,6 +56,36 @@ add_32bit_requires()
fi
}
hack_distr_requires
()
{
GREP
=
"
$1
"
# Part of local hack
local
NEWRESULT
=
"
$GREP
"
if
[
"
$PKGFORMAT
"
=
"deb"
]
;
then
NEWRESULT
=
`
echo
$GREP
| filter_deb_pkgnames
`
fi
# Add hack for replace lib with lib64 on Mandriva
if
[
"
$DISTRNAME
"
=
"Mandriva"
]
&&
[
$BUILDARCH
=
"x86_64"
]
;
then
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^lib
\(
[^6]
\)
|lib64
\1
|g"
`
fi
if
[
"
$DISTRNAME
"
=
"ArchLinux"
]
;
then
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^ *
\(
.*
\)
-devel *
\$
|
\1
|g"
|
tr
"[A-Z]"
"[a-z]"
`
fi
if
[
"
$DISTRNAME
"
=
"FreeBSD"
]
;
then
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^ *
\(
.*
\)
-devel *
\$
|
\1
|g"
`
fi
if
[
"
$DISTRNAME
"
=
"Slackware"
]
||
[
"
$DISTRNAME
"
=
"Gentoo"
]
;
then
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^ *
\(
.*
\)
-devel *
\$
|
\1
|g"
`
fi
echo
"
$NEWRESULT
"
}
# Get replacement rule for ALT package to local in $1 (scan for files in $@)
# sets ALTPKGNAME, TARGETPKGNAME variable
# used for hack: PKGFORMAT, DISTRNAME, BUILDARCH
...
...
@@ -64,7 +94,6 @@ tolocal_anyrepl()
{
assert_var PKGFORMAT DISTRNAME BUILDNAME
local
i REPLRULE WARULES
local
NEWRESULT
local
GREP
=
$1
shift
# TODO: fix space removing
...
...
@@ -83,34 +112,13 @@ tolocal_anyrepl()
test
-n
"
$REPLRULE
"
&&
TARGETPKGNAME
=
$(
add_32bit_requires
"
$GREP
"
"
$TARGETPKGNAME
"
)
&&
return
0
done
# Part of local hack
NEWRESULT
=
"
$GREP
"
if
[
"
$PKGFORMAT
"
=
"deb"
]
;
then
local
NEWRESULT
=
`
echo
$GREP
| filter_deb_pkgnames
`
fi
# Add hack for replace lib with lib64 on Mandriva
if
[
"
$DISTRNAME
"
=
"Mandriva"
]
&&
[
$BUILDARCH
=
"x86_64"
]
;
then
local
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^lib
\(
[^6]
\)
|lib64
\1
|g"
`
fi
if
[
"
$DISTRNAME
"
=
"ArchLinux"
]
;
then
local
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^ *
\(
.*
\)
-devel *
\$
|
\1
|g"
|
tr
"[A-Z]"
"[a-z]"
`
fi
if
[
"
$DISTRNAME
"
=
"FreeBSD"
]
;
then
local
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^ *
\(
.*
\)
-devel *
\$
|
\1
|g"
`
fi
if
[
"
$DISTRNAME
"
=
"Slackware"
]
||
[
"
$DISTRNAME
"
=
"Gentoo"
]
;
then
local
NEWRESULT
=
`
echo
$GREP
|
sed
-e
"s|^ *
\(
.*
\)
-devel *
\$
|
\1
|g"
`
fi
local
NEWRESULT
=
$(
hack_distr_requires
"
$GREP
"
)
FIXNEWRESULT
=
$(
add_32bit_requires
"
$GREP
"
$NEWRESULT
)
ALTPKGNAME
=
"
$GREP
"
TARGETPKGNAME
=
"
$FIXNEWRESULT
"
# return if no chance to replace
[
"
$FIXNEWRESULT
"
=
"
$GREP
"
]
&&
return
1
# HACK: return if we get complex result
...
...
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