libevent: always autogen.sh (#40945)

The libevent release tarballs ship with a `configure` script generated by an old `libtool`. The `libtool` generated by `configure` is not compatible with `MACOSX_DEPLOYMENT_VERSION` > 10. Regeneration of the `configure` scripts fixes build on macOS. 

Original configure contains:
```
    case $host_os in
    rhapsody* | darwin1.[012])
      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
    darwin1.*)
      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
    darwin*) # darwin 5.x on
      # if running on 10.5 or later, the deployment target defaults
      # to the OS version, if on x86, and 10.4, the deployment
      # target defaults to 10.4. Don't you love it?
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
        10.0,*86*-darwin8*|10.0,*-darwin[91]*)
          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
        10.[012][,.]*)
          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
        10.*)
          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
      esac
```

After re-running `autogen.sh`:
```
    case $host_os in
    rhapsody* | darwin1.[012])
      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
    darwin1.*)
      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
    darwin*)
      case $MACOSX_DEPLOYMENT_TARGET,$host in
        10.[012],*|,*powerpc*-darwin[5-8]*)
          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
        *)
          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
      esac
```
This commit is contained in:
Tom Vander Aa 2023-11-08 22:33:09 +01:00 committed by GitHub
parent e114853115
commit c35250b313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,6 +41,10 @@ class Libevent(AutotoolsPackage):
depends_on("openssl@:1.0", when="@:2.0+openssl") depends_on("openssl@:1.0", when="@:2.0+openssl")
depends_on("openssl", when="+openssl") depends_on("openssl", when="+openssl")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
def url_for_version(self, version): def url_for_version(self, version):
if version >= Version("2.0.22"): if version >= Version("2.0.22"):
url = "https://github.com/libevent/libevent/releases/download/release-{0}-stable/libevent-{0}-stable.tar.gz" url = "https://github.com/libevent/libevent/releases/download/release-{0}-stable/libevent-{0}-stable.tar.gz"
@ -54,6 +58,9 @@ def libs(self):
libs = find_libraries("libevent", root=self.prefix, shared=True, recursive=True) libs = find_libraries("libevent", root=self.prefix, shared=True, recursive=True)
return LibraryList(libs) return LibraryList(libs)
def autoreconf(self, spec, prefix):
Executable("./autogen.sh")()
def configure_args(self): def configure_args(self):
spec = self.spec spec = self.spec
configure_args = [] configure_args = []