-project('zck', 'c',
- version : '1.1.6',
- meson_version : '>=0.44.0',
- default_options : ['c_std=gnu99'])
+project(
+ 'zck', 'c',
+ version : '1.1.6',
+ meson_version : '>=0.44.0',
+ default_options : ['c_std=gnu99']
+)
so_version = '1'
common_cflags = [
- '-Wunused-result',
+ '-Wunused-result',
]
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments(common_cflags), language : 'c')
+if build_machine.system() == 'freebsd'
+ add_project_arguments('-DFREEBSD', language : 'c')
+endif
+
if get_option('with-zstd') == 'disabled'
zstd_dep = dependency('', required : false)
else
curl_dep = dependency('libcurl')
-if not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); }; void main() {}')
+if build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); }; void main() {}')
argplib = cc.find_library('argp')
else
argplib = dependency('', required : false)
endif
pkg_mod = import('pkgconfig')
-pkg_mod.generate(libraries : zcklib,
- version : meson.project_version(),
- name : 'libzck',
- filebase : 'zck',
- description : 'A library for generating easy-to-delta files.')
+pkg_mod.generate(
+ libraries : zcklib,
+ version : meson.project_version(),
+ name : 'libzck',
+ filebase : 'zck',
+ description : 'A library for generating easy-to-delta files.'
+)
install_man([
- 'doc/unzck.1',
- 'doc/zck.1',
- 'doc/zck_delta_size.1',
- 'doc/zck_gen_zdict.1',
- 'doc/zck_read_header.1',
- 'doc/zckdl.1',
+ 'doc/unzck.1',
+ 'doc/zck.1',
+ 'doc/zck_delta_size.1',
+ 'doc/zck_gen_zdict.1',
+ 'doc/zck_read_header.1',
+ 'doc/zckdl.1',
])
/*
- * Copyright 2018 Jonathan Dieter <jdieter@gmail.com>
+ * Copyright 2018, 2020 Jonathan Dieter <jdieter@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <libgen.h>
#include <unistd.h>
#include <argp.h>
#include <zck.h>
/*
- * Copyright 2018 Jonathan Dieter <jdieter@gmail.com>
+ * Copyright 2018, 2020 Jonathan Dieter <jdieter@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <libgen.h>
#include <unistd.h>
#include <argp.h>
#include <zck.h>
/*
- * Copyright 2018 Jonathan Dieter <jdieter@gmail.com>
+ * Copyright 2018, 2020 Jonathan Dieter <jdieter@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <libgen.h>
#include <unistd.h>
#include <errno.h>
#include <argp.h>
/*
- * Copyright 2018 Jonathan Dieter <jdieter@gmail.com>
+ * Copyright 2018, 2020 Jonathan Dieter <jdieter@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
#include <sys/stat.h>
#include <sys/wait.h>
#include <fcntl.h>
+#include <libgen.h>
#include <dirent.h>
#include <unistd.h>
#include <argp.h>
/*
- * Copyright 2018 Jonathan Dieter <jdieter@gmail.com>
+ * Copyright 2018, 2020 Jonathan Dieter <jdieter@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <libgen.h>
#include <errno.h>
#include <zck.h>
#include <libgen.h>