aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbrep/package.cxx4
-rw-r--r--libbrep/package.hxx4
-rw-r--r--libbrep/package.xml4
-rw-r--r--load/load.cxx2
-rw-r--r--manifest1
-rw-r--r--mod/mod-package-details.cxx11
-rw-r--r--mod/mod-package-version-details.cxx6
-rw-r--r--tests/load/1/math/libfoo-1.2.4+1.tar.gzbin866 -> 933 bytes
-rw-r--r--tests/load/1/math/packages10
-rw-r--r--tests/load/driver.cxx10
10 files changed, 43 insertions, 9 deletions
diff --git a/libbrep/package.cxx b/libbrep/package.cxx
index e14b15a..af63c82 100644
--- a/libbrep/package.cxx
+++ b/libbrep/package.cxx
@@ -56,6 +56,8 @@ namespace brep
optional<string> ds,
string ch,
url_type ur,
+ optional<url_type> du,
+ optional<url_type> su,
optional<url_type> pu,
email_type em,
optional<email_type> pe,
@@ -75,6 +77,8 @@ namespace brep
description (move (ds)),
changes (move (ch)),
url (move (ur)),
+ doc_url (move (du)),
+ src_url (move (su)),
package_url (move (pu)),
email (move (em)),
package_email (move (pe)),
diff --git a/libbrep/package.hxx b/libbrep/package.hxx
index d3e3e00..d59d633 100644
--- a/libbrep/package.hxx
+++ b/libbrep/package.hxx
@@ -307,6 +307,8 @@ namespace brep
optional<string> description,
string changes,
url_type,
+ optional<url_type> doc_url,
+ optional<url_type> src_url,
optional<url_type> package_url,
email_type,
optional<email_type> package_email,
@@ -341,6 +343,8 @@ namespace brep
optional<string> description;
string changes;
url_type url;
+ optional<url_type> doc_url;
+ optional<url_type> src_url;
optional<url_type> package_url;
email_type email;
optional<email_type> package_email;
diff --git a/libbrep/package.xml b/libbrep/package.xml
index 0947d6f..1c85e49 100644
--- a/libbrep/package.xml
+++ b/libbrep/package.xml
@@ -84,6 +84,10 @@
<column name="changes" type="TEXT" null="false"/>
<column name="url" type="TEXT" null="false"/>
<column name="url_comment" type="TEXT" null="false"/>
+ <column name="doc_url" type="TEXT" null="true"/>
+ <column name="doc_url_comment" type="TEXT" null="true"/>
+ <column name="src_url" type="TEXT" null="true"/>
+ <column name="src_url_comment" type="TEXT" null="true"/>
<column name="package_url" type="TEXT" null="true"/>
<column name="package_url_comment" type="TEXT" null="true"/>
<column name="email" type="TEXT" null="false"/>
diff --git a/load/load.cxx b/load/load.cxx
index 860aeb0..759dc61 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -404,6 +404,8 @@ load_packages (const shared_ptr<repository>& rp, database& db)
move (dsc),
move (chn),
move (pm.url),
+ move (pm.doc_url),
+ move (pm.src_url),
move (pm.package_url),
move (pm.email),
move (pm.package_email),
diff --git a/manifest b/manifest
index 04b5631..41dbdeb 100644
--- a/manifest
+++ b/manifest
@@ -8,6 +8,7 @@ description-file: README
changes-file: NEWS
url: https://build2.org
email: users@build2.org
+src-url: https://git.build2.org/cgit/brep/tree/
build-email: builds@build2.org
build-include: linux*
build-include: freebsd*
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx
index a241c23..605022d 100644
--- a/mod/mod-package-details.cxx
+++ b/mod/mod-package-details.cxx
@@ -180,8 +180,15 @@ handle (request& rq, response& rs)
<< TBODY
<< TR_LICENSE (licenses)
<< TR_URL (pkg->url)
- << TR_EMAIL (pkg->email)
- << TR_TAGS (pkg->tags, root)
+ << TR_EMAIL (pkg->email);
+
+ if (pkg->doc_url)
+ s << TR_URL (*pkg->doc_url, "doc-url");
+
+ if (pkg->src_url)
+ s << TR_URL (*pkg->src_url, "src-url");
+
+ s << TR_TAGS (pkg->tags, root)
<< ~TBODY
<< ~TABLE;
}
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx
index edab232..1186470 100644
--- a/mod/mod-package-version-details.cxx
+++ b/mod/mod-package-version-details.cxx
@@ -195,6 +195,12 @@ handle (request& rq, response& rs)
<< TR_URL (pkg->url)
<< TR_EMAIL (em);
+ if (pkg->doc_url)
+ s << TR_URL (*pkg->doc_url, "doc-url");
+
+ if (pkg->src_url)
+ s << TR_URL (*pkg->src_url, "src-url");
+
const auto& pu (pkg->package_url);
if (pu && *pu != pkg->url)
s << TR_URL (*pu, "package-url");
diff --git a/tests/load/1/math/libfoo-1.2.4+1.tar.gz b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
index 5210ced..20434bf 100644
--- a/tests/load/1/math/libfoo-1.2.4+1.tar.gz
+++ b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
Binary files differ
diff --git a/tests/load/1/math/packages b/tests/load/1/math/packages
index a796d31..c49b7bd 100644
--- a/tests/load/1/math/packages
+++ b/tests/load/1/math/packages
@@ -12,8 +12,8 @@ email: users@exp.com
build-email: builds@exp.com
depends: libmisc
depends: libpq >= 9.0.0
-build-include: linux*
build-exclude: *; Only supported on Linux.
+build-include: linux*
location: libexp-1~1.2+1.tar.gz
sha256sum: 0a7414d06ad26d49dad203deaf3841f3df97f1fe27c5bf190c1c20dfeb7f84e0
:
@@ -51,8 +51,10 @@ changes: \
* test suite extended significantly
\
url: http://www.example.com/foo/; Project home page.
-package-url: http://www.example.com/foo/pack; Package details.
email: foo-users@example.com; Public mailing list. Read FAQ before posting.
+doc-url: http://www.example.org/projects/libfoo/man.xhtml; documentation page
+src-url: https://git.example.org/cgit/libfoo/tree/; source tree url
+package-url: http://www.example.com/foo/pack; Package details.
package-email: pack@example.com; Current packager.
depends: libmisc < 1.1 | libmisc > 2.3.0; Crashes with 1.1.0-2.3.0.
depends: libexp >= 1.0
@@ -62,7 +64,7 @@ requires: c++11
requires: ? ; libc++ standard library if using Clang on Mac OS X.
requires: ? vc++ >= 12.0; Only if using VC++ on Windows.
location: libfoo-1.2.4+1.tar.gz
-sha256sum: 6bf9de8c4647a32dee79ad5e787c10311495e3f6b5727bfd03b2d9dcd6a16eed
+sha256sum: 2d912d510b42b1fa04028b0c6a31158ec14b225431b9c2ac0c953d46a7304225
:
name: libpq
version: 0
@@ -92,8 +94,8 @@ https://git.build2.org/cgit/packaging/postgresql/
\
url: https://www.postgresql.org/
-package-url: https://git.build2.org/cgit/packaging/postgresql/
email: pgsql-general@postgresql.org; Mailing list.
+package-url: https://git.build2.org/cgit/packaging/postgresql/
package-email: packaging@build2.org; Mailing list.
requires: build2 >= 0.4.0
location: libpq-0.tar.gz
diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx
index 2c8f4b6..79a7989 100644
--- a/tests/load/driver.cxx
+++ b/tests/load/driver.cxx
@@ -511,6 +511,10 @@ main (int argc, char* argv[])
"MATLAB.\n\nUseful for conversion of research code into "
"production environments.");
assert (fpv5->url == "http://www.example.com/foo/");
+ assert (fpv5->doc_url && *fpv5->doc_url ==
+ "http://www.example.org/projects/libfoo/man.xhtml");
+ assert (fpv5->src_url &&
+ *fpv5->src_url == "https://git.example.org/cgit/libfoo/tree/");
assert (fpv5->package_url &&
*fpv5->package_url == "http://www.example.com/foo/pack");
assert (fpv5->email == "foo-users@example.com");
@@ -602,7 +606,7 @@ main (int argc, char* argv[])
assert (check_location (fpv5));
assert (fpv5->sha256sum && *fpv5->sha256sum ==
- "6bf9de8c4647a32dee79ad5e787c10311495e3f6b5727bfd03b2d9dcd6a16eed");
+ "2d912d510b42b1fa04028b0c6a31158ec14b225431b9c2ac0c953d46a7304225");
// Verify libexp package version.
//
@@ -648,8 +652,8 @@ main (int argc, char* argv[])
assert (
epv->build_constraints ==
build_constraints ({
- build_constraint (false, "linux*", nullopt, ""),
- build_constraint (true, "*", nullopt, "Only supported on Linux.")}));
+ build_constraint (true, "*", nullopt, "Only supported on Linux."),
+ build_constraint (false, "linux*", nullopt, "")}));
assert (check_location (epv));
assert (epv->sha256sum && *epv->sha256sum ==