Repository: conan-io/conan-center-index

Issue:
[request] automake/1.16.4
### Package Details
  * Package Name/Version: **automake/1.16.4**
  * Changelog: **?**


The above mentioned version is newly released by the upstream project and not yet available as a recipe. Please add this version.



Discussion:

Resolving patch:
diff --git a/recipes/automake/all/conanfile.py b/recipes/automake/all/conanfile.py
--- a/recipes/automake/all/conanfile.py
+++ b/recipes/automake/all/conanfile.py
@@ -13,7 +13,7 @@ class AutomakeConan(ConanFile):
     license = ("GPL-2.0-or-later", "GPL-3.0-or-later")
     settings = "os", "arch", "compiler"
 
-    exports_sources = ["patches/**"]
+    exports_sources = "patches/*"
 
     _autotools = None
 
@@ -52,7 +52,7 @@ def source(self):
 
     @property
     def _datarootdir(self):
-        return os.path.join(self.package_folder, "bin", "share")
+        return os.path.join(self.package_folder, "res")
 
     @property
     def _automake_libdir(self):
@@ -89,9 +89,9 @@ def package(self):
         self.copy("COPYING*", src=self._source_subfolder, dst="licenses")
         autotools = self._configure_autotools()
         autotools.install()
-        tools.rmdir(os.path.join(self.package_folder, "bin", "share", "info"))
-        tools.rmdir(os.path.join(self.package_folder, "bin", "share", "man"))
-        tools.rmdir(os.path.join(self.package_folder, "bin", "share", "doc"))
+        tools.rmdir(os.path.join(self._datarootdir, "info"))
+        tools.rmdir(os.path.join(self._datarootdir, "man"))
+        tools.rmdir(os.path.join(self._datarootdir, "doc"))
 
         if self.settings.os == "Windows":
             binpath = os.path.join(self.package_folder, "bin")
@@ -102,15 +102,17 @@ def package(self):
                 os.rename(fullpath, fullpath + ".exe")
 
     def package_info(self):
+        self.cpp_info.libdirs = []
+
         bin_path = os.path.join(self.package_folder, "bin")
-        self.output.info("Appending PATH env var with : {}".format(bin_path))
+        self.output.info("Appending PATH environment variable:: {}".format(bin_path))
         self.env_info.PATH.append(bin_path)
 
         bin_ext = ".exe" if self.settings.os == "Windows" else ""
 
         aclocal = tools.unix_path(os.path.join(self.package_folder, "bin", "aclocal" + bin_ext))
-        self.output.info("Setting ACLOCAL to {}".format(aclocal))
-        self.env_info.ACLOCAL = aclocal
+        self.output.info("Appending ACLOCAL environment variable with: {}".format(aclocal))
+        self.env_info.ACLOCAL.append(aclocal)
 
         automake_datadir = tools.unix_path(self._datarootdir)
         self.output.info("Setting AUTOMAKE_DATADIR to {}".format(automake_datadir))


Test patch:
diff --git a/recipes/automake/all/test_package/conanfile.py b/recipes/automake/all/test_package/conanfile.py
--- a/recipes/automake/all/test_package/conanfile.py
+++ b/recipes/automake/all/test_package/conanfile.py
@@ -23,7 +23,7 @@ def build_requirements(self):
     @contextmanager
     def _build_context(self):
         if self.settings.compiler == "Visual Studio":
-            with tools.vcvars(self.settings):
+            with tools.vcvars(self):
                 with tools.environment_append({"CC": "cl -nologo", "CXX": "cl -nologo",}):
                     yield
         else:
@@ -51,7 +51,7 @@ def _build_scripts(self):
         assert os.path.isfile(compile_script)
 
         if self._system_cc:
-            with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op():
+            with tools.vcvars(self) if self.settings.compiler == "Visual Studio" else tools.no_op():
                 self.run("{} {} test_package_1.c -o script_test".format(tools.unix_path(compile_script), self._system_cc), win_bash=tools.os_info.is_windows)
 
     def _build_autotools(self):