mirror of
				https://github.com/Minres/conan-recipes.git
				synced 2025-10-31 06:01:53 +00:00 
			
		
		
		
	Updated conanfiles to work with release 1.0 of conan.io.
This commit is contained in:
		| @@ -2,13 +2,10 @@ from conan.packager import ConanMultiPackager | ||||
|  | ||||
| if __name__ == "__main__": | ||||
|     builder = ConanMultiPackager() | ||||
|     cxxstds = ['98','11','14'] | ||||
|     archs = ['x86', 'x86_64'] | ||||
|     types = ['Debug','Release'] | ||||
|     #configs = [[i,j,k] for i in cxxstds for j in archs for k in types] | ||||
|     #for triple in configs: | ||||
|     #    builder.add(settings={"arch": triple[1], "build_type":triple[2]}, options={"SystemCVerification:stdcxx" : triple[0]}, env_vars={}, build_requires={}) | ||||
|     cxxstds = ['98','11','14'] | ||||
|     configs = [[i,k] for i in cxxstds for k in types] | ||||
|     for triple in configs: | ||||
|         builder.add(settings={"build_type":triple[1]}, options={"SystemCVerification:stdcxx" : triple[0]}, env_vars={}, build_requires={}) | ||||
|         builder.add(settings={"build_type":triple[1]}, options={"stdcxx" : triple[0]}, env_vars={}, build_requires={}) | ||||
|     builder.run() | ||||
|   | ||||
| @@ -1,59 +1,57 @@ | ||||
| from conans import ConanFile, tools, AutoToolsBuildEnvironment | ||||
|  | ||||
| import os | ||||
|  | ||||
| class SystemcverificationConan(ConanFile): | ||||
|     name = "SystemCVerification" | ||||
|     version = "2.0.0a" | ||||
|     folder = "scv-2.0.0a-20161019" | ||||
|     version = "2.0.1" | ||||
|     license = "Apache 2.0 License" | ||||
|     url = "https://github.com/Minres/conan-recipes/blob/master/SystemCVerification" | ||||
|     description = "The SystemC Verification (SCV) library provides a common set of APIs that are used as a basis to verification activities with SystemC" | ||||
|     settings = "os", "compiler", "build_type", "arch" | ||||
|     options = {"stdcxx":[98,11,14]} | ||||
|     default_options = "stdcxx=98" | ||||
|     generators = "txt" | ||||
|     exports_sources = "scv-2.0.0a-20161019/*" | ||||
|     generators = "gcc" | ||||
|     source_subfolder = "scv-2.0.1" | ||||
|     exports_sources = "scv-2.0.1/*" | ||||
|     requires = "SystemC/2.3.2@minres/stable" | ||||
|  | ||||
|     def configure(self): | ||||
|         self.options["SystemC"].stdcxx = self.options.stdcxx | ||||
|                  | ||||
|         # Maybe in windows we know that OpenSSL works better as shared (false) | ||||
|         #if self.settings.os == "Windows": | ||||
|         #    self.options["OpenSSL"].shared = True | ||||
|                                | ||||
|         # Or adjust any other available option | ||||
|         #    self.options["Poco"].other_option = "foo" | ||||
|                                                   | ||||
|     def build(self): | ||||
|         env_build = AutoToolsBuildEnvironment(self) | ||||
|         if self.options.stdcxx == "14": | ||||
|             env_build.cxx_flags = "-std=c++14" | ||||
|             env_build.cxx_flags = "-std=gnu++14" | ||||
|         elif self.options.stdcxx == "11": | ||||
|             env_build.cxx_flags = "-std=c++11" | ||||
|             env_build.cxx_flags = "-std=gnu++11" | ||||
|         elif self.options.stdcxx == "98": | ||||
|             env_build.cxx_flags = "-std=c++98" | ||||
|         #env_build.libs.append("pthread") | ||||
|         #env_build.defines.append("NEW_DEFINE=23") | ||||
|  | ||||
|         self.output.info(env_build.vars) | ||||
|         with tools.environment_append(env_build.vars): | ||||
|             self.run("cd %s &&  mkdir _build" % self.folder) | ||||
|             configure_command = 'cd %s/_build && env && ../configure --prefix=%s/_install --with-systemc=%s --disable-debug --disable-opt'  | ||||
|             self.output.info(configure_command % (self.folder, self.build_folder, self.deps_cpp_info["SystemC"].rootpath)) | ||||
|             self.run(configure_command % (self.folder, self.build_folder, self.deps_cpp_info["SystemC"].rootpath)) | ||||
|             self.run("cd %s/_build && make -j && make install" % self.folder) | ||||
|             env_build.cxx_flags = "-std=gnu++98" | ||||
|         env_build.fpic = True | ||||
|         tools.mkdir("build") | ||||
|         with tools.chdir("build"): | ||||
|             env_build.configure( | ||||
|                 configure_dir=os.path.join(self.source_folder, self.source_subfolder),     | ||||
|                 args=[ | ||||
|                     '--prefix=%s' % os.path.join(self.source_folder, 'install'), | ||||
|                     '--with-systemc=%s' % self.deps_cpp_info["SystemC"].rootpath, | ||||
|                     '--disable-debug', | ||||
|                     '--disable-opt' | ||||
|                     ] | ||||
|                 ) | ||||
|             env_build.make() | ||||
|             env_build.make(args=["install"]) | ||||
|             #env_build.make(args=["check"]) | ||||
|  | ||||
|     def package(self): | ||||
|         # Headers | ||||
|         self.copy(pattern="*.h", dst="include", src="_install/include", keep_path=True) | ||||
|         self.copy(pattern="*.h", dst="include", src="install/include", keep_path=True) | ||||
|         # Libs | ||||
|         self.copy(pattern="*", dst="lib", src="_install/lib-linux", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="_install/lib-linux64", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="_install/lib-macosx", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="_install/lib-macosx64", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="_install/lib-cygwin", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="_install/lib-mingw", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="install/lib-linux", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="install/lib-linux64", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="install/lib-macosx", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="install/lib-macosx64", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="install/lib-cygwin", keep_path=False) | ||||
|         self.copy(pattern="*", dst="lib", src="install/lib-mingw", keep_path=False) | ||||
|  | ||||
|     def package_info(self): | ||||
|         self.cpp_info.libs = ["scv"] | ||||
|   | ||||
							
								
								
									
										95
									
								
								SystemCVerification/scv-2.0.1_systemc-2.3.2.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										95
									
								
								SystemCVerification/scv-2.0.1_systemc-2.3.2.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,95 @@ | ||||
| diff -rupN scv-2.0.0a-20161019/configure scv-2.0.0a-20161019-patched/configure | ||||
| --- scv-2.0.0a-20161019/configure	2016-10-19 23:25:31.000000000 +0200 | ||||
| +++ scv-2.0.0a-20161019-patched/configure	2017-10-28 17:00:36.367027496 +0200 | ||||
| @@ -16136,7 +16136,7 @@ sparc) | ||||
|  	case "$GXX" in | ||||
|  	yes) echo 'setting compiler flags for g++' | ||||
|  	     AM_CXXFLAGS="$SPARC_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$SPARC_GNU_CFLAGS" | ||||
| @@ -16152,8 +16152,8 @@ sparc) | ||||
|  	     echo 'setting library options for g++ on Solaris' | ||||
|  	     ;; | ||||
|  	'')  echo 'setting compiler flags for NOT g++' | ||||
| -	     	     	     	     	     	     	     AM_CXXFLAGS="$SPARC_CC_CXXFLAGS" | ||||
| -	     CXXFLAGS="$SUN_CC_OPT $SUN_CC_DBG" | ||||
| +	     AM_CXXFLAGS="$SPARC_CC_CXXFLAGS" | ||||
| +	     CXXFLAGS="$CXXFLAGS $SUN_CC_OPT $SUN_CC_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_SUN_CC_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_SUN_CC_OPT" | ||||
|  	     AM_CFLAGS="$SPARC_CC_CFLAGS" | ||||
| @@ -16173,7 +16173,7 @@ hppa*) | ||||
|  	case "$GXX" in | ||||
|          yes) echo 'setting compiler flags for g++' | ||||
|  	     AM_CXXFLAGS="$HPPA_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$HPPA_GNU_CFLAGS" | ||||
| @@ -16192,7 +16192,7 @@ hppa*) | ||||
|  	     ;; | ||||
|          '')  echo 'setting compiler flags and defines for HP aCC' | ||||
|  	     AM_CXXFLAGS="$HPPA_ACC_CXXFLAGS" | ||||
| -	     CXXFLAGS="$HP_ACC_OPT $HP_ACC_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $HP_ACC_OPT $HP_ACC_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_HP_ACC_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_HP_ACC_OPT" | ||||
|  	     AM_CFLAGS="$HPPA_ACC_XFLAGS" | ||||
| @@ -16216,7 +16216,7 @@ powerpc*) | ||||
|  	case "$GXX" in | ||||
|          yes) echo 'setting compiler flags for g++' | ||||
|  	     AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$LINUX_GNU_CFLAGS" | ||||
| @@ -16235,7 +16235,7 @@ powerpc*) | ||||
|  	     ;; | ||||
|          '')  echo 'setting compiler flags for NOT g++' | ||||
|  	     AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$LINUX_GNU_CFLAGS" | ||||
| @@ -16256,7 +16256,7 @@ i[3456]86*) | ||||
|  	case "$GXX" in | ||||
|          yes) echo 'setting compiler flags for g++' | ||||
|  	     AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$LINUX_GNU_CFLAGS" | ||||
| @@ -16275,7 +16275,7 @@ i[3456]86*) | ||||
|  	     ;; | ||||
|          '')  echo 'setting compiler flags for NOT g++' | ||||
|  	     AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$LINUX_GNU_CFLAGS" | ||||
| @@ -16296,7 +16296,7 @@ x86_64*) | ||||
|  	case "$GXX" in | ||||
|          yes) echo 'setting compiler flags for g++' | ||||
|  	     AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$LINUX_GNU_CFLAGS" | ||||
| @@ -16315,7 +16315,7 @@ x86_64*) | ||||
|  	     ;; | ||||
|          '')  echo 'setting compiler flags for NOT g++' | ||||
|  	     AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS" | ||||
| -	     CXXFLAGS="$GNU_OPT $GNU_DBG" | ||||
| +	     CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG" | ||||
|  	     CXXFLAGS_DEBUG="$DEF_GNU_DBG" | ||||
|  	     CXXFLAGS_OPT="$DEF_GNU_OPT" | ||||
|  	     AM_CFLAGS="$LINUX_GNU_CFLAGS" | ||||
| @@ -1,18 +1,28 @@ | ||||
| from conans import ConanFile, CMake | ||||
| import os | ||||
| import pprint | ||||
|  | ||||
| class SystemcverificationTestConan(ConanFile): | ||||
|     settings = "os", "compiler", "build_type", "arch" | ||||
|     options = {"stdcxx":[98,11,14]} | ||||
|     default_options = "stdcxx=98" | ||||
|     generators = "cmake" | ||||
|     requires = "SystemC/2.3.2@minres/stable" | ||||
|  | ||||
|     def configure(self): | ||||
|         self.options["SystemCVerification"].stdcxx = self.options.stdcxx | ||||
|         if self.settings.compiler == 'gcc' and self.settings.compiler.version > 5: | ||||
|             self.output.info("Forcing use of libstdc++11") | ||||
|             self.settings.compiler.libcxx='libstdc++11' | ||||
|  | ||||
|     def build(self): | ||||
|         cxxstd = self.options["SystemC"].stdcxx | ||||
|         cmake = CMake(self) | ||||
|         # Current dir is "test_package/build/<build_id>" and CMakeLists.txt is in "test_package" | ||||
|         cmake.configure(source_dir=self.conanfile_directory, build_dir="./") | ||||
|         #cmake.build() | ||||
|         self.run('cmake %s %s -DCMAKE_CXX_STANDARD=%s' % (self.conanfile_directory, cmake.command_line, cxxstd)) | ||||
|         self.run("cmake --build . %s" % cmake.build_config) | ||||
|         cmake.configure( | ||||
|                 args=[ | ||||
|                     '-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx | ||||
|                 ]) | ||||
|         cmake.build() | ||||
|  | ||||
|     def imports(self): | ||||
|         self.copy("*.dll", dst="bin", src="bin") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user