Re: cygport cygautoreconf failure with AC_CONFIG_MACRO_DIRS

2023-09-17 Thread Jon Turney via Cygwin-apps

On 09/08/2023 23:44, Brian Inglis via Cygwin-apps wrote:

On 2023-08-09 15:55, Jon Turney via Cygwin-apps wrote:

[...]


That leaves the second part of your patch.  I'm not sure if you're 
claiming this is the same problem, a similar problem, or a different 
problem.


That adds cygport cygautoreconf support for a newer AC_CONFIG_MACRO_DIRS 
macro to existing support for the older AC_CONFIG_MACRO_DIR macro.


Thanks.

I applied this part.

I also adjusted the similar uses of AC_CONFIG_MACRO_DIR in gnome2, mate 
and xfce4 cygclasses.


To be hyper-correct, I guess that perhaps the regex expression to use 
here is 'S?' rather than 'S*', but that doesn't seem important.




Re: cygport cygautoreconf failure with AC_CONFIG_MACRO_DIRS

2023-08-09 Thread Brian Inglis via Cygwin-apps

On 2023-08-09 15:55, Jon Turney via Cygwin-apps wrote:

On 08/08/2023 19:40, Brian Inglis via Cygwin-apps wrote:

On 2023-08-08 12:14, Jon Turney via Cygwin-apps wrote:

On 03/08/2023 17:21, Brian Inglis via Cygwin-apps wrote:
Trying to build updated jq package, get cygautoreconf directory creation and 
existence bugs.
Cygport dies processing AC_CONFIG_SUBDIRS([modules/oniguruma]) under two 
levels of AS_IF (which handle existence of oniguruma library module or 
libonig-devel at default or custom locations with or without configure 
scripts in configure.ac) with:


Could not find modules/oniguruma/configure.ac or modules/oniguruma/configure.in



I'm not able to reproduce this problem.

Can you provide the jq.cygport you are using.

Also, can you be clear as to whether you have libonig-devel installed or not?



Attached jq.cygport.

As the cygport debug prep make log shows, libonig-devel is in 
DEPEND/BUILD_REQUIRES and installed.


Installed cygport is latest available 0.36.6-1.

With the attached cygautoreconf patch applied, it builds.



Thanks.

So, I think the ultimate cause of the error is that you changed the SRC_URI from 
that for "a file uploaded for this release" (an archive presumably generated by 
'make dist' or equivalent) to "an archive automatic generated from git at the tag".


The later is (for obvious reasons) missing the files for git submodules, in this 
case modules/oniguruma.


Your proposed fix is effectively making the existence of the directories named 
in AC_CONFIG_SUBDIRS optional.  I'm not sure that's correct or warranted.


Hi Jon,

The previous maintainers have been inactive for 5 years, so they have started a 
new org, working on a new release, and announced rc1, so I am working with them 
to resolve a test failure, prior to posting a Cygwin ITA.


https://github.com/jqlang/jq/releases

I just noticed that they have now posted a newer prerelease "rc1"!

I can look at those contents later to see if they include the module, and that 
issue is resolved.


That leaves the second part of your patch.  I'm not sure if you're claiming this 
is the same problem, a similar problem, or a different problem.


That adds cygport cygautoreconf support for a newer AC_CONFIG_MACRO_DIRS macro 
to existing support for the older AC_CONFIG_MACRO_DIR macro.


Anyhow, out of time for staring at the wall of words for today, I'll have to 
look at that again later...


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

La perfection est atteinte   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry



Re: cygport cygautoreconf failure with AC_CONFIG_MACRO_DIRS

2023-08-09 Thread Jon Turney via Cygwin-apps

On 08/08/2023 19:40, Brian Inglis via Cygwin-apps wrote:

On 2023-08-08 12:14, Jon Turney via Cygwin-apps wrote:

On 03/08/2023 17:21, Brian Inglis via Cygwin-apps wrote:

Hi folks,

Trying to build updated jq package, get cygautoreconf directory 
creation and existence bugs.

[...]


Cygport dies processing AC_CONFIG_SUBDIRS([modules/oniguruma]) under 
two levels of AS_IF (which handle existence of oniguruma library 
module or libonig-devel at default or custom locations with or 
without configure scripts in configure.ac) with:


Could not find modules/oniguruma/configure.ac or 
modules/oniguruma/configure.in


I'm not able to reproduce this problem.

Can you provide the jq.cygport you are using.

Also, can you be clear as to whether you have libonig-devel installed 
or not?


Hi Jon,

Attached jq.cygport.

As the cygport debug prep make log shows, libonig-devel is in 
DEPEND/BUILD_REQUIRES and installed.


Installed cygport is latest available 0.36.6-1.

With the attached cygautoreconf patch applied, it builds.


Thanks.

So, I think the ultimate cause of the error is that you changed the 
SRC_URI from that for "a file uploaded for this release" (an archive 
presumably generated by 'make dist' or equivalent) to "an archive 
automatic generated from git at the tag".


The later is (for obvious reasons) missing the files for git submodules, 
in this case modules/oniguruma.


Your proposed fix is effectively making the existence of the directories 
named in AC_CONFIG_SUBDIRS optional.  I'm not sure that's correct or 
warranted.



That leaves the second part of your patch.  I'm not sure if you're 
claiming this is the same problem, a similar problem, or a different 
problem.


Anyhow, out of time for staring at the wall of words for today, I'll 
have to look at that again later...




Re: cygport cygautoreconf failure with AC_CONFIG_MACRO_DIRS

2023-08-08 Thread Brian Inglis via Cygwin-apps

On 2023-08-08 12:14, Jon Turney via Cygwin-apps wrote:

On 03/08/2023 17:21, Brian Inglis via Cygwin-apps wrote:

Hi folks,

Trying to build updated jq package, get cygautoreconf directory creation and 
existence bugs.

[...]


Cygport dies processing AC_CONFIG_SUBDIRS([modules/oniguruma]) under two 
levels of AS_IF (which handle existence of oniguruma library module or 
libonig-devel at default or custom locations with or without configure scripts 
in configure.ac) with:


Could not find modules/oniguruma/configure.ac or modules/oniguruma/configure.in


I'm not able to reproduce this problem.

Can you provide the jq.cygport you are using.

Also, can you be clear as to whether you have libonig-devel installed or not?


Hi Jon,

Attached jq.cygport.

As the cygport debug prep make log shows, libonig-devel is in 
DEPEND/BUILD_REQUIRES and installed.


Installed cygport is latest available 0.36.6-1.

With the attached cygautoreconf patch applied, it builds.

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

La perfection est atteinte   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
NAME=jq
VERSION=1.6
RELEASE=1
VERSION=1.7
RELEASE=0.rc1

CATEGORY="Text"
SUMMARY="Lightweight and flexible JSON processor"
DESCRIPTION="jq is like sed for JSON data - you can use it to slice and
filter and map and transform structured data with the same ease
that sed, awk, grep and friends let you play with text."

HOMEPAGE=https://stedolan.github.io/$NAME/
SRC_URI=https://github.com/stedolan/$NAME/releases/download/$NAME-$VERSION/$NAME-$VERSION.tar.gz
HOMEPAGE=https://jqlang.github.io/$NAME/
SRC_URI=https://github.com/jqlang/$NAME/archive/refs/tags/$NAME-$VERSION${RELEASE#*.}.tar.gz
SRC_DIR=$NAME-$NAME-$VERSION${RELEASE#*.}
PATCH_URI=1.4-no-undefined.patch

DEPEND="libonig-devel"
DEPEND=" autoconf automake bison flex gcc-core"
DEPEND+=" libtool pkg-config python3 rubygems"  # should have pipenv if packaged
BUILD_REQUIRES="$DEPEND"

LDFLAGS="$LDFLAGS -Wl,--no-allow-shlib-undefined -Wl,--no-undefined"

CYGCONF_ARGS="
lt_no_undefined_flag=-no-undefined
no_undefined_flag=-no-undefined
"
#--enable-all-staticlink jq with static libraries only
#--enable-asan  enable address sanitizer
#--enable-dependency-tracking   do not reject slow dependency extractors
#   --disable-dependency-tracking   speeds up one-time build
#   --disable-docs  don't build docs
#--enable-error-injection   build and test with error injection
#--enable-fast-install[=PKGS]   optimize for fast installation 
[default=yes]
#--enable-gcov  enable gcov code coverage tool
#   --disable-libtool-lock  avoid locking (might break parallel 
builds)
#   --disable-maintainer-mode   disable make rules and dependencies not 
useful (and sometimes confusing) to the casual installer
#   --disable-option-checking   ignore unrecognized --enable/--with 
options
#--enable-pthread-tls   Enable use of pthread thread local 
storage
#--enable-shared[=PKGS] build shared libraries [default=yes]
#--enable-silent-rules  less verbose build output (undo: "make 
V=1")
#   --disable-silent-rules  verbose build output (undo: "make V=0")
#--enable-static[=PKGS] build static libraries [default=yes]
#--enable-ubsan enable undefined behavior sanitizer
#   --disable-valgrind  do not run tests under Valgrind
#  --with-aix-soname=aix|svr4|both  shared library versioning (aka 
"SONAME") variant to provide on AIX, [default=aix].
#  --with-gnu-ldassume the C compiler uses GNU ld 
[default=no]
#  --with-oniguruma=prefix  try this for a non-standard install 
prefix of the oniguruma library
#  --with-pic[=PKGS]try to use only PIC/non-PIC objects 
[default=use both]
#  --with-sysroot[=DIR] Search for dependent libraries within 
DIR (or the compiler's sysroot if not specified).

PKG_NAMES="lib${NAME}1 lib${NAME}-devel $NAME"


libjq1_CATEGORY="Libs"
libjq1_CONTENTS="usr/bin/cyg${NAME}-1.dll"


libjq_devel_CATEGORY="Devel"
libjq_devel_CONTENTS="
usr/include/
usr/lib/lib${NAME}.dll.a
usr/lib/pkgconfig/libjq.pc
"


jq_CONTENTS="usr/bin/${NAME}.exe usr/share/doc/ usr/share/man/"


src_test() {
cd $B/
# did something change in libtool-2.4.5+?
PATH="$B/.libs:$PATH" cygmake check
}


# SPDX-License-Identifier: MIT AND CC-BY-3.0 AND dtoa AND ICU
LICENSE_SPDX="SPDX-License-Identifier: MIT AND CC-BY-3.0 AND dtoa AND ICU"
LICENSE="MIT AND CC-BY-3.0 AND dtoa AND ICU"
LICENSE_URI=COPYING

--- /us

Re: cygport cygautoreconf failure with AC_CONFIG_MACRO_DIRS

2023-08-08 Thread Jon Turney via Cygwin-apps

On 03/08/2023 17:21, Brian Inglis via Cygwin-apps wrote:

Hi folks,

Trying to build updated jq package, get cygautoreconf directory creation 
and existence bugs.

[...]


Cygport dies processing AC_CONFIG_SUBDIRS([modules/oniguruma]) under two 
levels of AS_IF (which handle existence of oniguruma library module or 
libonig-devel at default or custom locations with or without configure 
scripts in configure.ac) with:


Could not find modules/oniguruma/configure.ac or 
modules/oniguruma/configure.in


I'm not able to reproduce this problem.

Can you provide the jq.cygport you are using.

Also, can you be clear as to whether you have libonig-devel installed or 
not?




cygport cygautoreconf failure with AC_CONFIG_MACRO_DIRS

2023-08-03 Thread Brian Inglis via Cygwin-apps

Hi folks,

Trying to build updated jq package, get cygautoreconf directory creation and 
existence bugs.


When configure.ac uses AC_CONFIG_MACRO_DIRS([config/m4 m4]) - see `info autoconf 
Input` - perhaps added only in AC 2.70, then each of those "arguments" are 
created as directories becuuse AC_CONFIG_MACRO_DIR is searched for (as opposed 
to e.g. ac_subdirs use of '^[^\#]*AC_CONFIG_SUBDIRS*'), incorrectly matched and 
split at the space by sed because of that omission, and two directories 
'AC_CONFIG_MACRO_DIRS(config/m4' and 'm4)' are created.


See relevant lines in attached short logs.

Large log contains cygport --debug output and complete configure.ac attached.

Change line to use DIRS* like ac_subdirs as in second hunk of attached patch?

Cygport dies processing AC_CONFIG_SUBDIRS([modules/oniguruma]) under two levels 
of AS_IF (which handle existence of oniguruma library module or libonig-devel at 
default or custom locations with or without configure scripts in configure.ac) with:


Could not find modules/oniguruma/configure.ac or modules/oniguruma/configure.in

Those AC commands and directories may be conditional and optional as documented 
in `info autoconf Subdirectories`, and only generate an AC warning.


Uncertain what best to do here, perhaps change cygautoreconf to also just 
generate a warning if sub_configure_ac has already been set previously, as in 
the first hunk in the attached patch?


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

La perfection est atteinte   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
 -- Antoine de Saint-ExupéryAC_CONFIG_MACRO_DIRS([config/m4 m4])
+ shift
+ true
+ case ${1} in
+ break
+ argv=('/usr/bin/cygport' 'jq.cygport' 'prep' 'make')
+ declare -ar argv
+ declare -ir argc=4
+ defined 'argv[1]'
+ ((  1 != 1  ))
+ '[' -n jq.cygport ']'
+ return 0
+ defined 'argv[2]'
+ ((  1 != 1  ))
+ '[' -n prep ']'
+ return 0
+ source /usr/share/cygport/lib/check_funcs.cygpart
++ readonly -f check_prog check_prog_req check_tool check_target_tool 
check_pkg_config check_girepository_module check_lua_module check_ocaml_module 
check_perl_module check_php_module check_python_module check_python2_module 
check_python3_module check_pypy_module check_R_module check_ruby_module 
check_tcl_module check_tex_module check_vala_module __check_depends 
__check_function __check_function_ro __check_unstable __version_at_least
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog bzip2
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v bzip2
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog cat
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v cat
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog chmod
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v chmod
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog cp
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v cp
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog diff
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v diff
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog diffstat
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v diffstat
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog dos2unix
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v dos2unix
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog file
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v file
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog find
+ local _prog
+ ((  1 < 1  ))
+ for _prog in "$@"
+ command -v find
+ return 0
+ for _myprog in bzip2 cat chmod cp diff diffstat dos2unix file find gawk grep 
gzip install ln mkdir mv patch rm rsync sed sort tar xargs which xz
+ check_prog gawk
+ local _prog
+ (