diff options
-rw-r--r-- | ports-mgmt/pkg/Makefile | 1 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-https-mirrors | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile index 5bee207ee284..15e8ad91ac36 100644 --- a/ports-mgmt/pkg/Makefile +++ b/ports-mgmt/pkg/Makefile @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.8.4 +PORTREVISION= 1 _PKG_VERSION= ${DISTVERSION} CATEGORIES= ports-mgmt MASTER_SITES= \ diff --git a/ports-mgmt/pkg/files/patch-https-mirrors b/ports-mgmt/pkg/files/patch-https-mirrors new file mode 100644 index 000000000000..bf3f01c9f1af --- /dev/null +++ b/ports-mgmt/pkg/files/patch-https-mirrors @@ -0,0 +1,19 @@ +diff --git libpkg/fetch.c libpkg/fetch.c +index 4804ad0..16ab9c7 100644 +--- libpkg/fetch.c ++++ libpkg/fetch.c +@@ -549,8 +549,12 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, + srv_current = repo->srv; + } else if (repo != NULL && repo->mirror_type == HTTP && + strncmp(u->scheme, "http", 4) == 0) { +- if (u->port == 0) +- u->port = 80; ++ if (u->port == 0) { ++ if (strcmp(u->scheme, "https") == 0) ++ u->port = 443; ++ else ++ u->port = 80; ++ } + snprintf(zone, sizeof(zone), + "%s://%s:%d", u->scheme, u->host, u->port); + if (repo->http == NULL) |