-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Werror is dropped, because Meson's werror is more strict than configure one. This implementation does not support running tests. The Kyua testsuite heavily relies on in-source builds. Tests would have to be rewritten (at least the Kyuafile files, but probably more) to support Meson. Meson does not support retrieving git info and providing it as a compiler flag. Meson's vcs_tag() mechanism supports outputting to a (header or source) file only. This would mean that xbps.h.in would have to be modified. No substitution is done on xbps.h.in. See #598 for explanation. _DEFAULT_SOURCE is dropped, because _GNU_SOURCE implies _DEFAULT_SOURCE. -D_FILE_OFFSET_BITS=64 is set automatically by Meson. Work in progress!
- Loading branch information
Showing
31 changed files
with
726 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
subdir('xbps-alternatives') | ||
subdir('xbps-create') | ||
subdir('xbps-dgraph') | ||
subdir('xbps-install') | ||
subdir('xbps-pkgdb') | ||
subdir('xbps-query') | ||
subdir('xbps-reconfigure') | ||
subdir('xbps-remove') | ||
subdir('xbps-rindex') | ||
subdir('xbps-uhelper') | ||
subdir('xbps-checkvers') | ||
subdir('xbps-fbulk') | ||
subdir('xbps-digest') | ||
subdir('xbps-fetch') | ||
|
||
if host_machine.system() == 'linux' | ||
subdir('xbps-uchroot') | ||
subdir('xbps-uunshare') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-alternatives.1') | ||
executable('xbps-alternatives', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-checkvers.1') | ||
executable( | ||
'xbps-checkvers', | ||
src, | ||
c_args: '-Wno-deprecated-declarations', | ||
dependencies: libxbps_dep, | ||
install: true, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-create.1') | ||
executable('xbps-create', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-dgraph.1') | ||
executable('xbps-dgraph', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-digest.1') | ||
executable('xbps-digest', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-fbulk.1') | ||
executable('xbps-fbulk', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c', '../xbps-install/fetch_cb.c'] | ||
|
||
install_man('xbps-fetch.1') | ||
executable('xbps-fetch', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
src = [ | ||
'main.c', | ||
'transaction.c', | ||
'question.c', | ||
'fetch_cb.c', | ||
'state_cb.c', | ||
'util.c', | ||
] | ||
|
||
clock_gettime_code = ''' | ||
#include <time.h> | ||
int main(void) { | ||
struct timespec ts; | ||
clock_gettime(CLOCK_MONOTONIC, &ts); | ||
return 0; | ||
} | ||
''' | ||
|
||
CC = meson.get_compiler('c') | ||
|
||
rt = CC.find_library('rt', required: false) | ||
extra_flags = [] | ||
|
||
if rt.found() | ||
if CC.compiles( | ||
clock_gettime_code, | ||
name: 'clock_gettime() available', | ||
args: '-D_GNU_SOURCE', | ||
dependencies: rt, | ||
) | ||
extra_flags = '-DHAVE_CLOCK_GETTIME' | ||
endif | ||
else | ||
if CC.compiles( | ||
clock_gettime_code, | ||
name: 'clock_gettime() available', | ||
args: '-D_GNU_SOURCE', | ||
) | ||
extra_flags = '-DHAVE_CLOCK_GETTIME' | ||
endif | ||
endif | ||
|
||
install_man('xbps-install.1') | ||
executable( | ||
'xbps-install', | ||
src, | ||
c_args: extra_flags, | ||
dependencies: libxbps_dep, | ||
install: true, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
src = [ | ||
'main.c', | ||
'check.c', | ||
'check_pkg_files.c', | ||
'check_pkg_alternatives.c', | ||
'check_pkg_rundeps.c', | ||
'check_pkg_symlinks.c', | ||
'check_pkg_unneeded.c', | ||
] | ||
|
||
install_man('xbps-pkgdb.1') | ||
executable('xbps-pkgdb', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
src = [ | ||
'main.c', | ||
'list.c', | ||
'show-deps.c', | ||
'show-info-files.c', | ||
'ownedby.c', | ||
'search.c', | ||
'../xbps-install/util.c', | ||
] | ||
|
||
install_man('xbps-query.1') | ||
executable('xbps-query', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c', 'find-deps.c'] | ||
|
||
install_man('xbps-reconfigure.1') | ||
executable('xbps-reconfigure', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
src = [ | ||
'main.c', | ||
'clean-cache.c', | ||
'../xbps-install/question.c', | ||
'../xbps-install/util.c', | ||
'../xbps-install/transaction.c', | ||
] | ||
|
||
install_man('xbps-remove.1') | ||
executable('xbps-remove', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
src = [ | ||
'main.c', | ||
'index-add.c', | ||
'index-clean.c', | ||
'remove-obsoletes.c', | ||
'repoflush.c', | ||
'sign.c', | ||
] | ||
|
||
install_man('xbps-rindex.1') | ||
executable('xbps-rindex', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-uchroot.1') | ||
executable('xbps-uchroot', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c', '../xbps-install/fetch_cb.c'] | ||
|
||
install_man('xbps-uhelper.1') | ||
executable('xbps-uhelper', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src = ['main.c'] | ||
|
||
install_man('xbps-uunshare.1') | ||
executable('xbps-uunshare', src, dependencies: libxbps_dep, install: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
install_man('xbps.d.5') | ||
install_data( | ||
'60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d.plist', | ||
install_dir: dbdir, | ||
) | ||
install_data( | ||
'repod-main.conf', | ||
'xbps.conf', | ||
install_dir: get_option('datadir') / 'xbps.d', | ||
rename: ['00-repository-main.conf', 'xbps.conf'], | ||
) | ||
install_data( | ||
'_xbps', | ||
'_xbps_src', | ||
install_dir: get_option('datadir') / 'zsh/site-functions', | ||
) | ||
install_data( | ||
'xbps.bash', | ||
install_dir: get_option('datadir') / 'bash-completion/completions', | ||
rename: 'xbps', | ||
) | ||
|
||
foreach file : [ | ||
'xbps-checkvers', | ||
'xbps-create', | ||
'xbps-dgraph', | ||
'xbps-install', | ||
'xbps-pkgdb', | ||
'xbps-query', | ||
'xbps-reconfigure', | ||
'xbps-remove', | ||
'xbps-rindex', | ||
] | ||
install_symlink( | ||
file, | ||
pointing_to: 'xbps', | ||
install_dir: get_option('datadir') / 'bash-completion/completions', | ||
) | ||
endforeach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
doxygen = find_program('doxygen', required: true) | ||
graphviz_dot = find_program('dot', required: true) | ||
|
||
dot_format = get_option('api-docs-format') | ||
|
||
foreach dotfile : [ | ||
'xbps_transaction_dictionary', | ||
'xbps_pkgdb_dictionary', | ||
'xbps_pkg_props_dictionary', | ||
'xbps_pkg_files_dictionary', | ||
'xbps_binary_pkg_content', | ||
] | ||
custom_target( | ||
command: [graphviz_dot, '-T' + dot_format, '@INPUT@', '-o', '@OUTPUT@'], | ||
input: dotfile + '.dot', | ||
output: dotfile + '.' + dot_format, | ||
build_by_default: true, | ||
) | ||
endforeach | ||
|
||
sed = find_program('sed', required: true) | ||
distver = get_option('api-docs-distver') | ||
if distver == '' | ||
command = [ | ||
'sh', | ||
'-c', | ||
sed.full_path() + ' -e \'s|@@PROJECT_NUMBER@@|$(date +%Y%m%d)|\' @INPUT@', | ||
] | ||
else | ||
command = [sed, '-e', 's|@@PROJECT_NUMBER@@|' + distver + '|', '@INPUT@'] | ||
endif | ||
xbps_api_doxyfile = custom_target( | ||
command: command, | ||
input: 'xbps_api_doxyfile.in', | ||
capture: true, | ||
output: 'xbps_api_doxyfile', | ||
) | ||
|
||
run_target('doxygen', command: [doxygen, xbps_api_doxyfile]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
configure_file( | ||
input: 'xbps.h.in', | ||
output: 'xbps.h', | ||
copy: true, | ||
install: true, | ||
install_dir: get_option('includedir'), | ||
) | ||
|
||
install_subdir('xbps', install_dir: get_option('includedir')) | ||
|
||
xbps_include = include_directories('.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
compat_functions = [] | ||
|
||
if not compatibility_functions['vasprintf'] | ||
compat_functions += 'vasprintf.c' | ||
endif | ||
if not compatibility_functions['strcasestr'] | ||
compat_functions += 'strcasestr.c' | ||
endif | ||
if not compatibility_functions['strlcpy'] | ||
compat_functions += 'strlcpy.c' | ||
endif | ||
if not compatibility_functions['strlcat'] | ||
compat_functions += 'strlcat.c' | ||
endif | ||
if not compatibility_functions['humanize_number'] | ||
compat_functions += 'humanize_number.c' | ||
endif | ||
|
||
compat_files = files(compat_functions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
external_files = files('dewey.c', 'fexec.c', 'mkpath.c') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
src = ['common.c', 'fetch.c', 'file.c', 'ftp.c', 'http.c'] | ||
|
||
ftperr = custom_target( | ||
'ftperr', | ||
command: [files('errlist.sh'), 'ftp_errlist', 'FTP', '@INPUT@'], | ||
capture: true, | ||
input: 'ftp.errors', | ||
output: 'ftperr.h', | ||
) | ||
|
||
httperr = custom_target( | ||
'httperr', | ||
command: [files('errlist.sh'), 'http_errlist', 'HTTP', '@INPUT@'], | ||
capture: true, | ||
input: 'http.errors', | ||
output: 'httperr.h', | ||
) | ||
|
||
libfetch = static_library( | ||
'fetch', | ||
src, | ||
ftperr, | ||
httperr, | ||
c_args: ['-DFTP_COMBINE_CWDS', '-DINET6', '-DWITH_SSL'], | ||
gnu_symbol_visibility: 'hidden', | ||
include_directories: [xbps_include, '.'], | ||
) |
Oops, something went wrong.