diff --git a/NEWS b/NEWS index aabf0979..f42cbf18 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ xbps-0.22 (???): + * xbps-create(8): a new option --build-options has been added to add a string + with the build options that were used in package. It's expected to be filled + by xbps-src automatically. + * xbps-query(8): make -o (ownedby) follow symlinks. Fix issue #4 from github. This works in local and repository mode. diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c index 22e0e346..af55e549 100644 --- a/bin/xbps-create/main.c +++ b/bin/xbps-create/main.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Juan Romero Pardines. + * Copyright (c) 2012-2013 Juan Romero Pardines. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -90,6 +90,7 @@ usage(void) " -S --long-desc Long description (80 cols per line).\n" " -s --desc Short description (max 80 characters).\n" " -V --version Prints XBPS release version.\n" + " --build-options A string with the used build options.\n" " --shlib-provides List of provided shared libraries (blank separated list,\n" " e.g 'libfoo.so.1 libblah.so.2').\n" " --shlib-requires List of required shared libraries (blank separated list,\n" @@ -576,6 +577,7 @@ main(int argc, char **argv) { "version", no_argument, NULL, 'V' }, { "shlib-provides", required_argument, NULL, '0' }, { "shlib-requires", required_argument, NULL, '1' }, + { "build-options", required_argument, NULL, '2' }, { NULL, 0, NULL, 0 } }; struct archive *ar; @@ -585,7 +587,7 @@ main(int argc, char **argv) const char *conflicts, *deps, *homepage, *license, *maint, *bwith; const char *provides, *pkgver, *replaces, *desc, *ldesc; const char *arch, *config_files, *mutable_files, *version; - const char *shlib_provides, *shlib_requires; + const char *buildopts, *shlib_provides, *shlib_requires; const char *srcrevs = NULL; char *pkgname, *binpkg, *tname, *p, cwd[PATH_MAX-1]; bool quiet = false, preserve = false; @@ -593,7 +595,7 @@ main(int argc, char **argv) mode_t myumask; arch = conflicts = deps = homepage = license = maint = NULL; - provides = pkgver = replaces = desc = ldesc = bwith = NULL; + provides = pkgver = replaces = desc = ldesc = bwith = buildopts = NULL; config_files = mutable_files = shlib_provides = shlib_requires = NULL; while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) { @@ -664,6 +666,9 @@ main(int argc, char **argv) case '1': shlib_requires = optarg; break; + case '2': + buildopts = optarg; + break; case '?': default: usage(); @@ -729,6 +734,9 @@ main(int argc, char **argv) "source-revisions", srcrevs); if (preserve) prop_dictionary_set_bool(pkg_propsd, "preserve", true); + if (buildopts) + prop_dictionary_set_cstring_nocopy(pkg_propsd, + "build-options", buildopts); /* Optional arrays */ process_array("run_depends", deps); diff --git a/bin/xbps-create/xbps-create.8 b/bin/xbps-create/xbps-create.8 index 3f07e5c0..47fed1a6 100644 --- a/bin/xbps-create/xbps-create.8 +++ b/bin/xbps-create/xbps-create.8 @@ -1,4 +1,4 @@ -.Dd January 31, 2013 +.Dd March 23, 2013 .Os Void Linux .Dt xbps-create 8 .Sh NAME @@ -66,6 +66,8 @@ A long description for this package. A short description for this package, one line with less than 80 characters. .It Fl V, Fl -version Shows the XBPS version. +.It Fl -build-options Ar string +A string containing the build options used in package. .It Fl -shlib-provides Ar list A list of provided shared libraries, separated by a single blank. Example: .Ar 'libfoo.so.2 libblah.so.1' .