Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
4b2401e4
Commit
4b2401e4
authored
Apr 23, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm restore: add meson.build support
parent
e9942b2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
1 deletion
+56
-1
epm-restore
bin/epm-restore
+56
-1
No files found.
bin/epm-restore
View file @
4b2401e4
...
...
@@ -365,6 +365,58 @@ __epm_restore_nupkg()
docmd epm
install
$ilist
}
__epm_print_meson_list
()
{
local
reqmacro
=
"
$1
"
local
req_file
=
"
$2
"
local
l
while
read
name sign ver other
;
do
# gtk4-wayland
# gtk4 >= 4.6
[
-n
"
$other
"
]
&&
continue
if
[
-n
"
$dryrun
"
]
;
then
local
pi
=
''
pi
=
"
$reqmacro
pkgconfig(
$name
)"
[
-n
"
$sign
"
]
&&
pi
=
"
$pi
$sign
$ver
"
echo
"
$pi
"
continue
else
local
pi
=
"pkgconfig(
$name
)"
fi
[
-n
"
$name
"
]
||
continue
ilist
=
"
$ilist
$pi
"
done
<
$req_file
[
-n
"
$dryrun
"
]
||
echo
"
$ilist
"
}
__epm_restore_meson
()
{
local
req_file
=
"
$1
"
# gtk_dep = dependency('gtk4', version: '>= 4.6')
# gtk_wayland_dep = dependency('gtk4-wayland', required: false)
# packagekit_dep = dependency('packagekit-glib2', version: '>= 1.2', required: get_option('packagekit'))
if
[
-n
"
$dryrun
"
]
;
then
local
lt
=
$(
mktemp
)
echo
__epm_restore_print_comment
"
$req_file
"
" dependency"
grep
"dependency("
$req_file
|
sed
-e
's|.*dependency(||'
-e
's|).*||'
-e
's|, required.*||'
-e
's|, version:||'
-e
"s|'||g"
>
$lt
__epm_print_meson_list
"BuildRequires:"
$lt
rm
-f
$lt
return
fi
info
"Install requirements from
$req_file
..."
local
lt
=
$(
mktemp
)
grep
"dependency("
$req_file
|
sed
-e
's|.*dependency(||'
-e
's|).*||'
-e
's|, required.*||'
-e
's|, version:||'
-e
"s|'||g"
>
$lt
ilist
=
"
$ilist
$(
__epm_print_meson_list
""
$lt
)
"
rm
-f
$lt
docmd epm
install
$ilist
}
__epm_restore_npm
()
{
local
req_file
=
"
$1
"
...
...
@@ -487,6 +539,9 @@ __epm_restore_by()
package.json
)
[
-s
"
$req_file
"
]
&&
__epm_restore_npm
"
$req_file
"
;;
meson.build
)
[
-s
"
$req_file
"
]
&&
__epm_restore_meson
"
$req_file
"
;;
# META.yml)
# [ -s "$req_file" ] && __epm_restore_perl "$req_file"
# ;;
...
...
@@ -525,7 +580,7 @@ epm_restore()
# if run with empty args
for
i
in
requirements.txt requirements/default.txt requirements_dev.txt requirements-dev.txt requirements/dev.txt dev-requirements.txt
\
requirements-test.txt requirements_test.txt requirements/test.txt test-requirements.txt requirements/coverage.txt
\
Gemfile requires.txt package.json setup.py python_dependencies.py Makefile.PL
\
Gemfile requires.txt package.json setup.py python_dependencies.py Makefile.PL
meson.build
\
*
.sln
*
.csproj
;
do
__epm_restore_by
$i
done
...
...
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