public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin-apps@cygwin.com
Subject: Re: autotools fails to find /lib/liblz.a
Date: Fri, 30 Oct 2020 15:51:37 -0600	[thread overview]
Message-ID: <f7630783-cda4-62af-f582-b21125765197@SystematicSw.ab.ca> (raw)
In-Reply-To: <87h7qbxw8j.fsf@Rainer.invalid>

[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]

On 2020-10-30 15:03, Achim Gratz wrote:
> Brian Inglis writes:
>> That confirms I should push that back upstream.
>> I'm still working on ITP wget2 sub-packages to upgrade from wget.
> 
> Do you have a cygport file?  From looking at the configure.ac I don't
> understand how it ever gets to where you've been seeing the error.

Upstream supplied the attached patch which broke the build (cygport attached)!
I since applied my own (attached) patch to fix only the bashisms ('[+=]=' which
are not caught by checkbashisms[.pl]!), which builds with gnutls, and passes the
tests.

$ wc {wget2-1.99.2-1.x86_64/src/wget2-1.99.2/,}configure*
  57890  159645 1495103 1495153     711
wget2-1.99.2-1.x86_64/src/wget2-1.99.2/configure
    884    2930   32928   32940     206
wget2-1.99.2-1.x86_64/src/wget2-1.99.2/configure.ac
    884    2930   32928   32940     206 configure.ac
     69     297    2966    2966     182 configure-ac.patch
    369    1403   14197   14197     182 configure-ac.upstream.patch
  60096  167205 1578122 1578196     711 total

Building with OpenSSL works but does not appear activated in -V output, although
https works, but strange internal error messages are generated.
I have passed on the info and my feedback upstream:

	https://github.com/rockdaboot/wget2/issues/232#issue-730750694

I have now put the packages up on Google Drive for review in another post.

Thanks very much for your help, and others who assisted!

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

[-- Attachment #2: configure-ac.upstream.patch --]
[-- Type: text/plain, Size: 14197 bytes --]

--- origsrc/wget2-1.99.2/configure.ac	2019-08-30 06:55:43.000000000 -0600
+++ src/wget2-1.99.2/configure.ac	2020-10-29 20:35:32.829971400 -0600
@@ -1,10 +1,26 @@
-#                                               -*- Autoconf -*-
+dnl Template file for GNU Autoconf
+dnl Copyright (C) 2015-2020 Free Software Foundation, Inc.
+
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 # Process this file with autoconf to produce a configure script.
+
 CFLAGS=$CFLAGS
 LDFLAGS=$LDFLAGS
 
-AC_PREREQ([2.67])
-AC_INIT([wget2], [1.99.2], [bug-wget@gnu.org], [wget2], [https://savannah.gnu.org/projects/wget])
+AC_PREREQ([2.69])
+AC_INIT([wget2],[1.99.2],[bug-wget@gnu.org],[wget2],[https://savannah.gnu.org/projects/wget])
 
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
@@ -13,7 +29,6 @@ AM_INIT_AUTOMAKE([subdir-objects paralle
 
 CFLAGS=$CFLAGS
 AC_USE_SYSTEM_EXTENSIONS
-AC_GNU_SOURCE
 
 AC_CANONICAL_HOST
 case $host_os in
@@ -49,7 +64,7 @@ AC_PROG_CC_STDC
 #
 AC_PROG_CC_C99
 if test "$ac_cv_prog_cc_c99" = "no"; then
-  AC_ERROR([Compiler does not support C99. Aborting.])
+  AC_MSG_ERROR(Compiler does not support C99. Aborting.)
 fi
 
 gl_EARLY
@@ -213,6 +228,11 @@ if test -n "$WARN_CFLAGS"; then
   AC_SUBST([GNULIB_WARN_CFLAGS])
 fi
 
+AC_ARG_ENABLE([manylibs],
+  [AS_HELP_STRING([--disable-manylibs], [Generate small libraries of libwget functionality groups])],
+  [enable_manylibs=$enableval], [enable_manylibs=yes])
+AM_CONDITIONAL([ENABLE_MANYLIBS], [test "x$enable_manylibs" = xyes])
+
 AC_ARG_ENABLE([fuzzing],
   [AS_HELP_STRING([--enable-fuzzing], [Turn on fuzzing build (for developers)])],
   [enable_fuzzing=yes; AC_SUBST([LIB_FUZZING_ENGINE])], [enable_fuzzing=no; LIB_FUZZING_ENGINE=""])
@@ -253,23 +273,45 @@ fi
 
 if test "$gl_cc_sanitize_ubsan" = yes; then
   gl_WARN_ADD([-fsanitize=undefined])
-  gl_WARN_ADD([-fno-sanitize-recover=undefined])
+  gl_WARN_ADD([-fsanitize=bool])
+  gl_WARN_ADD([-fsanitize=alignment])
+  gl_WARN_ADD([-fsanitize=null])
+  gl_WARN_ADD([-fsanitize=enum])
+  gl_WARN_ADD([-fsanitize=bounds-strict])
 
-  # additional clang options
+  # additional clang options, from OSS-Fuzz (20.12.2019)
   gl_WARN_ADD([-fsanitize=integer])
-  gl_WARN_ADD([-fsanitize=nullability])
-  gl_WARN_ADD([-fno-sanitize-recover=integer])
-  gl_WARN_ADD([-fno-sanitize-recover=nullability])
+  gl_WARN_ADD([-fsanitize=array-bounds])
+  gl_WARN_ADD([-fsanitize=builtin])
+  gl_WARN_ADD([-fsanitize=float-divide-by-zero])
+  gl_WARN_ADD([-fsanitize=function])
+  gl_WARN_ADD([-fsanitize=integer-divide-by-zero])
+  gl_WARN_ADD([-fsanitize=object-size])
+  gl_WARN_ADD([-fsanitize=return])
+  gl_WARN_ADD([-fsanitize=returns-nonnull-attribute])
+  gl_WARN_ADD([-fsanitize=shift])
+  gl_WARN_ADD([-fsanitize=signed-integer-overflow])
+  gl_WARN_ADD([-fsanitize=unsigned-integer-overflow])
+  gl_WARN_ADD([-fsanitize=unreachable])
+  gl_WARN_ADD([-fsanitize=vla-bound])
+  gl_WARN_ADD([-fsanitize=vptr])
 fi
 
 if test "$gl_cc_sanitize_asan" = yes; then
   gl_WARN_ADD([-fsanitize=address])
+  gl_WARN_ADD([-fsanitize=leak])
+  gl_WARN_ADD([-fsanitize=nonnull-attribute])
   gl_WARN_ADD([-fno-omit-frame-pointer])
 
   # additional clang option
   gl_WARN_ADD([-fsanitize-address-use-after-scope])
 fi
 
+if test "$gl_cc_sanitize_ubsan" = yes || test "$gl_cc_sanitize_asan" = yes; then
+  gl_WARN_ADD([-fno-sanitize-recover=all])
+  gl_WARN_ADD([-fsanitize-recover=unsigned-integer-overflow])
+fi
+
 if test "$gl_cc_sanitize_msan" = yes; then
   # clang options
   gl_WARN_ADD([-fsanitize=memory])
@@ -350,13 +392,13 @@ if test "$enable_doc" = yes; then
   if test -n "$DOXYGEN" || test -n "$PANDOC"; then
     LIBWGET_DOCS_INFO="yes (found:"
     if test -n "$DOXYGEN"; then
-      LIBWGET_DOCS_INFO+=" Doxygen)"
+      LIBWGET_DOCS_INFO="$LIBWGET_DOCS_INFO Doxygen)"
 	else
 	  LIBWGET_DOCS_INFO="no"
     fi
     WGET2_DOCS_INFO="yes (found:"
     if test -n "$PANDOC"; then
-      WGET2_DOCS_INFO+=" Pandoc)"
+      WGET2_DOCS_INFO="$WGET2_DOCS_INFO Pandoc)"
 	else
 	  WGET2_DOCS_INFO="no"
     fi
@@ -373,7 +415,7 @@ AM_CONDITIONAL([WITH_PANDOC], [ test -n
 #
 # enable creation of man pages
 #
-#AC_ARG_ENABLE(man,[AC_HELP_STRING([--enable-man],
+#AC_ARG_ENABLE(man,[AS_HELP_STRING([--enable-man],
 #                                  [generate man pages [default=auto]])],enable_man=yes,enable_man=no)
 
 #AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
@@ -440,28 +482,30 @@ PKG_PROG_PKG_CONFIG
 
 AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl], [Use SSL/TLS with specified library. Options: 'gnutls' (default), 'openssl', 'wolfssl' or 'none']), with_ssl=$withval, with_ssl=gnutls)
 
-AS_IF([test "x$with_ssl" == "xgnutls"], [
-  PKG_CHECK_MODULES([GNUTLS], [gnutls], [
-    with_gnutls=yes
+AS_IF([test "x$with_ssl" = xyes], [with_ssl=gnutls])
+
+PKG_CHECK_MODULES([GNUTLS], [gnutls], [
+  with_gnutls=yes
+], [
+  AC_SEARCH_LIBS(gnutls_global_init, gnutls,
+    [with_gnutls=yes],
+    [with_gnutls=no;  AC_MSG_WARN(*** GNUTLS was not found. You will not be able to use HTTPS, nor run the OCSP tests. Fallback to libnettle for hashing and checksumming.)])
+])
+
+AS_IF([test "x$with_ssl" = "xgnutls"], [
+  AS_IF([test "x$with_gnutls" = xyes], [
     LIBS="$GNUTLS_LIBS $LIBS"
     CFLAGS="$GNUTLS_CFLAGS $CFLAGS"
     AC_DEFINE([WITH_GNUTLS], [1], [Use GnuTLS])
-  ], [
-    AC_SEARCH_LIBS(gnutls_global_init, gnutls,
-      [with_gnutls=yes; AC_DEFINE([WITH_GNUTLS], [1], [Use GnuTLS])],
-      [with_gnutls=no;  AC_MSG_WARN(*** GNUTLS was not found. You will not be able to use HTTPS. Fallback to libnettle for hashing and checksumming.)])
-  ])
-
-  AS_IF([test "x$with_gnutls" == xyes], [
     AC_SEARCH_LIBS(gnutls_hash, gnutls, [with_gnutls_hash=yes])
-    AS_IF([test "x$with_gnutls_hash" == xyes],
+    AS_IF([test "x$with_gnutls_hash" = xyes],
       [AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [#include <gnutls/gnutls.h>])])
-    AC_CHECK_HEADERS([gnutls/ocsp.h])
+    AC_CHECK_HEADERS([gnutls/ocsp.h],
+      [AC_DEFINE([WITH_OCSP], [1], [OCSP is supported])],
+      [AC_MSG_WARN(*** Header file gnutls/ocsp.h was not found. OCSP will be disabled.)])
     AC_CHECK_FUNCS(gnutls_srp_server_get_username gnutls_transport_get_int)
   ])
-])
-
-AS_IF([test "x$with_ssl" == "xopenssl"], [
+], [test "x$with_ssl" = "xopenssl"], [
   PKG_CHECK_MODULES([OPENSSL], [openssl], [
     with_openssl=yes
     LIBS="$OPENSSL_LIBS $LIBS"
@@ -474,9 +518,13 @@ AS_IF([test "x$with_ssl" == "xopenssl"],
     ])
   ])
 
-  AS_IF([test "x$with_openssl" == xyes], [
+  AS_IF([test "x$with_openssl" = xyes], [
     AC_CHECK_HEADERS([openssl/ssl.h])
     AC_CHECK_HEADERS([openssl/x509_vfy.h])
+    AC_CHECK_HEADERS([openssl/ocsp.h],
+      [AC_DEFINE([WITH_OCSP], [1], [OCSP is supported])],
+      [AC_MSG_WARN(*** Header file openssl/ocsp.h was not found. OCSP will be disabled.)])
+
     AC_CHECK_FUNCS(SSL_new X509_STORE_add_lookup)
 
     AC_SEARCH_LIBS(EVP_MD_CTX_new, crypto,
@@ -484,9 +532,7 @@ AS_IF([test "x$with_ssl" == "xopenssl"],
       [with_libcrypto=no; AC_MSG_WARN(*** LIBCRYPTO was not found. Fallback to libwolfcrypt for hashing and checksumming.)
     ])
   ])
-])
-
-AS_IF([test "x$with_ssl" = "xwolfssl"], [
+], [test "x$with_ssl" = "xwolfssl"], [
   PKG_CHECK_MODULES([WOLFSSL], [wolfssl], [
     with_wolfssl=yes
     LIBS="$WOLFSSL_LIBS $LIBS"
@@ -502,16 +548,20 @@ AS_IF([test "x$with_ssl" = "xwolfssl"],
     with_libwolfcrypt=yes
     AC_DEFINE([WITH_LIBWOLFCRYPT], [1], [Use wolfcrypt])
   ])
+], [test "x$with_ssl" != "xnone"], [
+  AC_MSG_ERROR([*** Unsupported value for --with-ssl. Use 'gnutls' (default), 'openssl', 'wolfssl' or 'none'])
 ])
 
-AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_gnutls" = xyes])
-AM_CONDITIONAL([WITH_OPENSSL], [test "x$with_openssl" = xyes])
-AM_CONDITIONAL([WITH_WOLFSSL], [test "x$with_wolfssl" = xyes])
+AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_ssl" = xgnutls && test "x$with_gnutls" = xyes])
+AM_CONDITIONAL([WITH_OPENSSL], [test "x$with_ssl" = xopenssl && test "x$with_openssl" = xyes])
+AM_CONDITIONAL([WITH_WOLFSSL], [test "x$with_ssl" = xwolfssl && test "x$with_wolfssl" = xyes])
 
 AM_CONDITIONAL([WITH_TLS], [test "x$with_gnutls" = xyes || test "x$with_wolfssl" = xyes || test "x$with_openssl" = xyes])
 AS_IF([test "x$with_gnutls" = xyes || test "x$with_wolfssl" = xyes || test "x$with_openssl" = xyes], [
   AC_DEFINE([WITH_TLS], [1], [Built with TLS support])
-], [AC_DEFINE([WITH_TLS], [0], [No TLS support])])
+], [
+  AC_DEFINE([WITH_TLS], [0], [No TLS support])
+])
 
 AS_IF([(test "x$with_gnutls" != xyes || test "x$with_gnutls_hash" != xyes) && test "x$with_libwolfcrypt" != xyes && test "x$with_libcrypto" != xyes], [
   PKG_CHECK_MODULES([NETTLE], nettle, [
@@ -591,17 +641,25 @@ AM_CONDITIONAL([WITH_BZIP2], [test "x$wi
 
 AC_ARG_WITH(gpgme, AS_HELP_STRING([--without-gpgme], [support signature verification with gpgme]), with_gpgme=$withval, with_gpgme=yes)
 AS_IF([test "x$with_gpgme" != xno], [
-  m4_ifdef([AM_PATH_GPGME],[
-	AM_PATH_GPGME([], [
-	  with_gpgme=yes
-	  LIBS="$GPGME_LIBS $LIBS"
-	  CFLAGS="$GPGME_CFLAGS $CFLAGS"
-	  AC_DEFINE([WITH_GPGME], [1], [Use gpgme])
-	  ],[
-		 with_gpgme=no; AC_MSG_WARN(*** GPGME not found.)
-	  ])
-	],
-	[with_gpgme=no; AC_MSG_WARN(*** GPGME not found. Signature verification is not possible)])
+  PKG_CHECK_MODULES([GPGME], gpgme, [
+    with_gpgme=yes
+    LIBS="$GPGME_LIBS $LIBS"
+    CFLAGS="$GPGME_CFLAGS $CFLAGS"
+    AC_DEFINE([WITH_GPGME], [1], [Use gpgme])
+  ], [
+    m4_ifdef([AM_PATH_GPGME],[
+      AM_PATH_GPGME([], [
+        with_gpgme=yes
+        LIBS="$GPGME_LIBS $LIBS"
+        CFLAGS="$GPGME_CFLAGS $CFLAGS"
+        AC_DEFINE([WITH_GPGME], [1], [Use gpgme])
+      ],[
+        with_gpgme=no; AC_MSG_WARN(*** GPGME not found.)
+      ])
+    ], [
+      with_gpgme=no; AC_MSG_WARN(*** GPGME not found. Signature verification is not possible)
+    ])
+  ])
 ])
 AM_CONDITIONAL([WITH_GPGME], [test "x$with_gpgme" = xyes])
 
@@ -665,6 +723,24 @@ AS_IF([test "x$with_zstd" != xno], [
 ])
 AM_CONDITIONAL([WITH_ZSTD], [test "x$with_zstd" = xyes])
 
+AC_ARG_WITH(lz, AS_HELP_STRING([--without-lzip], [disable lzip compression support]), with_lzip=$withval, with_lzip=yes)
+AS_IF([test "x$with_lzip" != xno], [
+  PKG_CHECK_MODULES([LZIP], liblz, [
+    with_lz=yes
+    LIBS="$LZIP_LIBS $LIBS"
+    CFLAGS="$LZIP_CFLAGS $CFLAGS"
+    AC_DEFINE([WITH_LZIP], [1], [Use liblz (lzip)])
+  ], [
+    old_LIBS="$LIBS"
+    LIBS=
+    AC_SEARCH_LIBS(LZ_decompress_open, lz,
+      [with_lzip=yes; LZIP_LIBS="$LIBS"; AC_DEFINE([WITH_LZIP], [1], [Use liblz (lzip)])],
+      [with_lzip=no;  AC_MSG_WARN(*** liblz was not found. You will not be able to use lzip decompression)])
+    LIBS="$old_LIBS $LZIP_LIBS"
+  ])
+])
+AM_CONDITIONAL([WITH_LZIP], [test "x$with_lzip" = xyes])
+
 # Support for internationalized domain names.
 # IDN support in Wget2 is provided in multiple ways:
 #   1. libidn2 >= 0.14.0 (IDNA 2008)
@@ -766,6 +842,13 @@ AS_IF([test "x$with_libmicrohttpd" != xn
   LIBS=$old_LIBS
   CFLAGS=$old_CFLAGS
 ])
+
+AS_IF([test "x$with_gnutls" = xyes], [
+  TEST_LIBS="$TEST_LIBS $GNUTLS_LIBS"
+  TEST_CFLAGS="$TEST_CFLAGS $GNUTLS_CFLAGS"
+  AC_DEFINE([WITH_GNUTLS_IN_TESTSUITE], [1], [GnuTLS is available for test suite])],
+  [AC_MSG_WARN(*** GnuTLS is not available. Some tests will not run.)])
+
 AM_CONDITIONAL([WITH_MICROHTTPD], [test "x$with_libmicrohttpd" = xyes])
 
 # Check for plugin support
@@ -813,6 +896,7 @@ AM_CONDITIONAL([PLUGIN_SUPPORT], [test "
 
 AC_SUBST([TEST_CFLAGS])
 AC_SUBST([TEST_LIBS])
+AC_SUBST([ALL_LIBS], $LIBS)
 
 # Checks for header files.
 AC_CHECK_HEADERS([\
@@ -824,17 +908,12 @@ AC_FUNC_MMAP
 AC_CHECK_FUNCS([\
  strlcpy getuid fmemopen])
 
-# needed for src/version-text.h
-YEAR=`date +%Y`
-AC_SUBST([YEAR], $YEAR)
-
 AC_CONFIG_FILES([Makefile
                  lib/Makefile
                  include/Makefile
                  include/wget/Makefile
                  libwget/Makefile
                  src/Makefile
-                 src/version-text.h
                  examples/Makefile
                  unit-tests/Makefile
                  tests/Makefile
@@ -846,11 +925,14 @@ AC_CONFIG_FILES([Makefile
 AC_OUTPUT
 
 # Check if expected TLS library was found and print it
-AS_IF([test "x$with_ssl" == xwolfssl && test "x$with_wolfssl" == xno], [ssl_enabled="(not found)"],
-  [test "x$with_ssl" == xopenssl && test "x$with_openssl" == xno], [ssl_enabled="(not found)"],
-  [test "x$with_ssl" == xgnutls && test "x$with_gnutls" == xno], [ssl_enabled="(not found)"],
+AS_IF([test "x$with_ssl" = xwolfssl && test "x$with_wolfssl" = xno], [ssl_enabled="(not found)"],
+  [test "x$with_ssl" = xopenssl && test "x$with_openssl" = xno], [ssl_enabled="(not found)"],
+  [test "x$with_ssl" = xgnutls && test "x$with_gnutls" = xno], [ssl_enabled="(not found)"],
   [])
 
+# patching libtool, generated when coming here
+patch libtool contrib/libtool.patch
+
 AC_MSG_NOTICE([Summary of build options:
 
   Version:            ${PACKAGE_VERSION}
@@ -861,12 +943,14 @@ AC_MSG_NOTICE([Summary of build options:
   LDFlags:            ${LDFLAGS}
   Libs:               ${LIBS}
   Library types:      shared=${enable_shared}, static=${enable_static}
+  Small libraries:    $enable_manylibs
   SSL/TLS support:    $with_ssl $ssl_enabled
   GZIP compression:   $with_zlib
   BZIP2 compression:  $with_bzip2
   LZMA compression:   $with_lzma
   Brotli compression: $with_brotlidec
   Zstd compression:   $with_zstd
+  Lzip compression:   $with_lzip
   IDNA support:       $IDNA_INFO
   PSL support:        $with_libpsl
   HSTS support:       $with_libhsts

[-- Attachment #3: wget2.cygport --]
[-- Type: text/plain, Size: 4100 bytes --]

#|/usr/bin/cygport
# wget2.cygport - wget2 Cygwin packages build control script

NAME=wget2
VERSION=1.99.2
RELEASE=1

CATEGORY=Net
SUMMARY="fast multithreaded file and recursive website downloader"
DESCRIPTION="fast multithreaded file and recursive website downloader using HTTP2,
HTTP compression, parallel connections, and If-Modified-Since HTTP headers.
The library libwget provides the basic functions needed by a modern web client."

HOMEPAGE=https://gitlab.com/gnuwget/wget2
SRC_URI=mirror://gnu/wget/$NAME-$VERSION.tar.gz
PATCH_URI=configure-ac.patch

REF_DOCS=https://gnuwget.gitlab.io/wget2/reference/
MAILING_LIST=https://savannah.gnu.org/mail/?group=wget
BUG_TRACKER=https://gitlab.com/gnuwget/wget2/issues
FUZZ_COVERAGE=https://gnuwget.gitlab.io/wget2/fuzz-coverage/

CYGCONF_ARGS="
	 --enable-shared
	--disable-static
	--without-gpgme-prefix
	--without-libiconv-prefix
	--without-libintl-prefix
	   --with-brotlidec
	   --with-bzip2
	   --with-gpgme
	--without-libhsts
	   --with-libidn2
	--without-libmicrohttpd
	   --with-libnghttp2
	   --with-libpcre2
	   --with-libpsl
	--without-lzip
	   --with-lzma
	--without-openssl
	   --with-ssl=gnutls
	   --with-zlib
	   --with-zstd
"

DEPEND="gettext-devel libbrotli-devel libbz2-devel libgettextpo-devel"
DEPEND+=" libgnutls-devel libgpgme-devel libiconv-devel libidn2-devel"
DEPEND+=" libmetalink-devel libnettle-devel libnghttp2-devel"
DEPEND+=" libpcre2-devel libpsl-devel liblzma-devel"
DEPEND+=" libzstd-devel zlib-devel"
DEPEND+=" gcc-core binutils autoconf autogen automake coreutils"
DEPEND+=" doxygen flex pkg-config python rsync tar texinfo"
#	libntlm does not get included
#	libssl build does no work
#	lcov libhsts libmicrohttpd libwolfssl pandoc N/A
BUILD_REQUIRES="$DEPEND"

PKG_NAMES="$NAME libwget0 libwget-devel"

libwget0_CATEGORY="$CATEGORY Libs"
libwget0_SUMMARY="modern web client library (runtime)"
libwget0_CONTENTS="
	usr/bin/cygwget-0.dll
	usr/share/doc/libwget/COPYING.LESSER
	usr/share/doc/wget2/AUTHORS
	usr/share/doc/wget2/ChangeLog
	usr/share/doc/wget2/NEWS
	usr/share/doc/wget2/README
	usr/share/doc/wget2/readme.md
"

#libwget0_REQUIRES="libbrotlidec1 libbz2_1 libgettextpo libgnutls libgpgme"
#libwget0_REQUIRES+=" libiconv2 libidn2_0 libintl8 liblzma5 libmetalink"
#libwget0_REQUIRES+=" libnettle6 libnghttp2_14 libpcre2 libpsl5 libzstd1 zlib0"
#	libhsts libmicrohttpd libwolfssl	N/A

libwget_devel_CATEGORY="$CATEGORY Devel Libs"
libwget_devel_SUMMARY="modern web client library (development)"
libwget_devel_CONTENTS="
	usr/include/wget*.h
	usr/lib/libwget.dll.a
	usr/lib/pkgconfig/libwget.pc
	usr/share/man/man3/*.3*
	usr/share/doc/libwget/ABOUT-NLS
	usr/share/doc/libwget/examples/*.c
	usr/share/doc/libwget/examples/Makefile
	usr/share/doc/libwget/html/
"

wget2_CONTENTS="
	usr/bin/wget2.exe
	usr/share/doc/wget2/COPYING
	usr/share/doc/wget2/wget2.md
	usr/share/info/*.info*
	usr/share/locale/
	usr/share/man/man1/*.1*
"
PKG_IGNORE=usr/bin/wget2_noinstall.exe

src_install () {
    cd $B
    dodoc   $S/docs/wget2.md
    doinfo  $S/docs/wget2.info
    doman   $S/docs/man/man1/*.1*
    docinto /libwget
    dodoc   $S/ABOUT-NLS
    dodoc   $S/COPYING.LESSER
    docinto /libwget/html
    dodoc   docs/html/*
    docinto /libwget/examples
    dodoc   $S/examples/*.c examples/Makefile
    cyginstall
}

# SPDX-License-Identifier: L/GPL-3.0-or-later
libwget_LICENSE="LGPLv3+"
libwget_LICENSE_SPDX="SPDX-License-Identifier: LGPL-3.0-or-later"
libwget_LICENSE_URI="COPYING.LESSER"

wget2_LICENSE="GPLv3+"
wget2_LICENSE_SPDX="SPDX-License-Identifier: GPL-3.0-or-later"
wget2_LICENSE_URI="COPYING"

CYGWIN_MAINTAINER=Brian%20Inglis
CYGWIN_MAINTAINER_EMAIL=Brian.Inglis@SystematicSW.ab.ca
GNU_MAINTAINER="GNU Wget2 List"
GNU_MAINTAINER_EMAIL=bug-wget@gnu.org
UPSTREAM_EMAIL=wget-dev@gnu.org
SUBJECT="${OSTYPE^}%20Package%20$NAME%20$VERSION"
MAILTO="mailto:$GNU_MAINTAINER_EMAIL,$UPSTREAM_EMAIL\
?to=$GNU_MAINTAINER%20%3C$GNU_MAINTAINER_EMAIL%3E\
&to=$GNU_MAINTAINER%20%3C$UPSTREAM_EMAIL%3E\
&from=$CYGWIN_MAINTAINER%20%3C$CYGWIN_MAINTAINER_EMAIL%3E\
&subject=$SUBJECT&body=Hi%20$GNU_MAINTAINER,%20$SUBJECT"


[-- Attachment #4: configure-ac.patch --]
[-- Type: text/plain, Size: 2966 bytes --]

--- origsrc/wget2-1.99.2/configure.ac	2019-08-30 06:55:43.000000000 -0600
+++ src/wget2-1.99.2/configure.ac	2020-10-30 12:43:55.010341600 -0600
@@ -350,13 +350,13 @@ if test "$enable_doc" = yes; then
   if test -n "$DOXYGEN" || test -n "$PANDOC"; then
     LIBWGET_DOCS_INFO="yes (found:"
     if test -n "$DOXYGEN"; then
-      LIBWGET_DOCS_INFO+=" Doxygen)"
+      LIBWGET_DOCS_INFO="$LIBWGET_DOCS_INFO Doxygen)"
 	else
 	  LIBWGET_DOCS_INFO="no"
     fi
     WGET2_DOCS_INFO="yes (found:"
     if test -n "$PANDOC"; then
-      WGET2_DOCS_INFO+=" Pandoc)"
+      WGET2_DOCS_INFO="$WGET2_DOCS_INFO Pandoc)"
 	else
 	  WGET2_DOCS_INFO="no"
     fi
@@ -440,7 +440,7 @@ PKG_PROG_PKG_CONFIG
 
 AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl], [Use SSL/TLS with specified library. Options: 'gnutls' (default), 'openssl', 'wolfssl' or 'none']), with_ssl=$withval, with_ssl=gnutls)
 
-AS_IF([test "x$with_ssl" == "xgnutls"], [
+AS_IF([test "x$with_ssl" = "xgnutls"], [
   PKG_CHECK_MODULES([GNUTLS], [gnutls], [
     with_gnutls=yes
     LIBS="$GNUTLS_LIBS $LIBS"
@@ -452,16 +452,16 @@ AS_IF([test "x$with_ssl" == "xgnutls"],
       [with_gnutls=no;  AC_MSG_WARN(*** GNUTLS was not found. You will not be able to use HTTPS. Fallback to libnettle for hashing and checksumming.)])
   ])
 
-  AS_IF([test "x$with_gnutls" == xyes], [
+  AS_IF([test "x$with_gnutls" = xyes], [
     AC_SEARCH_LIBS(gnutls_hash, gnutls, [with_gnutls_hash=yes])
-    AS_IF([test "x$with_gnutls_hash" == xyes],
+    AS_IF([test "x$with_gnutls_hash" = xyes],
       [AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [#include <gnutls/gnutls.h>])])
     AC_CHECK_HEADERS([gnutls/ocsp.h])
     AC_CHECK_FUNCS(gnutls_srp_server_get_username gnutls_transport_get_int)
   ])
 ])
 
-AS_IF([test "x$with_ssl" == "xopenssl"], [
+AS_IF([test "x$with_ssl" = "xopenssl"], [
   PKG_CHECK_MODULES([OPENSSL], [openssl], [
     with_openssl=yes
     LIBS="$OPENSSL_LIBS $LIBS"
@@ -474,7 +474,7 @@ AS_IF([test "x$with_ssl" == "xopenssl"],
     ])
   ])
 
-  AS_IF([test "x$with_openssl" == xyes], [
+  AS_IF([test "x$with_openssl" = xyes], [
     AC_CHECK_HEADERS([openssl/ssl.h])
     AC_CHECK_HEADERS([openssl/x509_vfy.h])
     AC_CHECK_FUNCS(SSL_new X509_STORE_add_lookup)
@@ -846,9 +846,9 @@ AC_CONFIG_FILES([Makefile
 AC_OUTPUT
 
 # Check if expected TLS library was found and print it
-AS_IF([test "x$with_ssl" == xwolfssl && test "x$with_wolfssl" == xno], [ssl_enabled="(not found)"],
-  [test "x$with_ssl" == xopenssl && test "x$with_openssl" == xno], [ssl_enabled="(not found)"],
-  [test "x$with_ssl" == xgnutls && test "x$with_gnutls" == xno], [ssl_enabled="(not found)"],
+AS_IF([test "x$with_ssl" = xwolfssl && test "x$with_wolfssl" = xno], [ssl_enabled="(not found)"],
+  [test "x$with_ssl" = xopenssl && test "x$with_openssl" = xno], [ssl_enabled="(not found)"],
+  [test "x$with_ssl" = xgnutls && test "x$with_gnutls" = xno], [ssl_enabled="(not found)"],
   [])
 
 AC_MSG_NOTICE([Summary of build options:

  reply	other threads:[~2020-10-30 21:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 18:24 Brian Inglis
2020-10-30 19:32 ` Achim Gratz
2020-10-30 19:42   ` Ken Brown
2020-10-30 20:05     ` Brian Inglis
2020-10-30 19:57   ` Brian Inglis
2020-10-30 21:03     ` Achim Gratz
2020-10-30 21:51       ` Brian Inglis [this message]
2020-10-31  7:43         ` ASSI
2020-10-31 19:27           ` Brian Inglis
2020-10-31 21:52             ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7630783-cda4-62af-f582-b21125765197@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).