diff --git a/README.md b/README.md index b1f998420..a6ba8432c 100644 --- a/README.md +++ b/README.md @@ -1295,7 +1295,6 @@ Make a build subdirectory of `cppagent` cd cppagent conan export conan\mqtt_cpp conan export conan\mruby - conan export conan\nasm #### To build for 64 bit Windows diff --git a/conan/nasm/conandata.yml b/conan/nasm/conandata.yml deleted file mode 100644 index 6cd038086..000000000 --- a/conan/nasm/conandata.yml +++ /dev/null @@ -1,17 +0,0 @@ -sources: - "2.15.05": - sha256: "3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f" - url: "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz" - "2.14": - sha256: "97c615dbf02ef80e4e2b6c385f7e28368d51efc214daa98e600ca4572500eec0" - url: "https://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.xz" - "2.13.02": - sha256: "8ac3235f49a6838ff7a8d7ef7c19a4430d0deecc0c2d3e3e237b5e9f53291757" - url: "https://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.xz" - "2.13.01": - sha256: "aa0213008f0433ecbe07bb628506a5c4be8079be20fc3532a5031fd639db9a5e" - url: "https://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.xz" -patches: - "2.15.05": - - patch_file: "patches/2.15.05-0001-disable-newly-integrated-dependency-tracking.patch" - base_path: "source_subfolder" diff --git a/conan/nasm/conanfile.py b/conan/nasm/conanfile.py deleted file mode 100644 index 5fe28d351..000000000 --- a/conan/nasm/conanfile.py +++ /dev/null @@ -1,96 +0,0 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -import os -import shutil - -required_conan_version = ">=1.33.0" - - -class NASMConan(ConanFile): - name = "nasm" - version = "2.15.05" - url = "https://github.com/conan-io/conan-center-index" - homepage = "http://www.nasm.us" - description = "The Netwide Assembler, NASM, is an 80x86 and x86-64 assembler" - license = "BSD-2-Clause" - settings = "os", "arch", "compiler", "build_type" - topics = ("nasm", "installer", "assembler") - - exports_sources = "patches/*" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - - def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - - def build_requirements(self): - if self._settings_build.os == "Windows": - self.build_requires("strawberryperl/5.30.0.1") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def package_id(self): - del self.info.settings.compiler - - def _build_vs(self): - with tools.chdir(self._source_subfolder): - with tools.vcvars(self): - autotools = AutoToolsBuildEnvironment(self) - autotools.flags.append("-nologo") - self.run("nmake /f {} {}".format(os.path.join("Mkfiles", "msvc.mak"), " ".join("{}=\"{}\"".format(k, v) for k, v in autotools.vars.items()))) - shutil.copy("nasm.exe", "nasmw.exe") - shutil.copy("ndisasm.exe", "ndisasmw.exe") - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=(self._settings_build.os == "Windows")) - if self.settings.arch == "x86": - self._autotools.flags.append("-m32") - elif self.settings.arch == "x86_64": - self._autotools.flags.append("-m64") - self._autotools.configure(configure_dir=self._source_subfolder) - - # GCC9 - "pure" attribute on function returning "void" - tools.replace_in_file("Makefile", "-Werror=attributes", "") - - # Need "-arch" flag for the linker when cross-compiling. - # FIXME: Revisit after https://github.com/conan-io/conan/issues/9069, using new Autotools integration - if str(self.version).startswith("2.13"): - tools.replace_in_file("Makefile", "$(CC) $(LDFLAGS) -o", "$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o") - - return self._autotools - - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - if self.settings.compiler == "Visual Studio": - self._build_vs() - else: - autotools = self._configure_autotools() - autotools.make() - - def package(self): - self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") - if self.settings.compiler == "Visual Studio": - self.copy(pattern="*.exe", src=self._source_subfolder, dst="bin", keep_path=False) - else: - autotools = self._configure_autotools() - autotools.install() - tools.rmdir(os.path.join(self.package_folder, "share")) - - def package_info(self): - bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) - self.cpp_info.libdirs = [] - self.cpp_info.includedirs = [] diff --git a/conan/nasm/patches/2.15.05-0001-disable-newly-integrated-dependency-tracking.patch b/conan/nasm/patches/2.15.05-0001-disable-newly-integrated-dependency-tracking.patch deleted file mode 100644 index 3ad948872..000000000 --- a/conan/nasm/patches/2.15.05-0001-disable-newly-integrated-dependency-tracking.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- Mkfiles/msvc.mak -+++ Mkfiles/msvc.mak -@@ -218,7 +218,7 @@ - x86\regs.h: x86\regs.dat x86\regs.pl - $(RUNPERL) $(srcdir)\x86\regs.pl h \ - $(srcdir)\x86\regs.dat > x86\regs.h -- -+!IF 0 - # Extract warnings from source code. This is done automatically if any - # C files have changed; the script is fast enough that that is - # reasonable, but doesn't update the time stamp if the files aren't -@@ -242,7 +242,7 @@ include\warnings.h: asm\warnings.pl asm\warnings.time - - doc\warnings.src: asm\warnings.pl asm\warnings.time - $(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src $(srcdir) -- -+!ENDIF - # Assembler token hash - asm\tokhash.c: x86\insns.dat x86\regs.dat asm\tokens.dat asm\tokhash.pl \ - perllib\phash.ph -@@ -426,7 +426,7 @@ - # @exclude: "config/config.h" - # @external: "msvc.dep" - # @selfrule: "1" --#-- Everything below is generated by mkdep.pl - do not edit --# -+!IF 0 - asm\assemble.$(O): asm\assemble.c asm\assemble.h asm\directiv.h \ - asm\listing.h asm\pptok.h asm\preproc.h asm\srcfile.h asm\tokens.h \ - config\msvc.h config\unconfig.h config\unknown.h config\watcom.h \ -@@ -935,3 +935,4 @@ - x86\regvals.$(O): x86\regvals.c config\msvc.h config\unconfig.h \ - config\unknown.h config\watcom.h include\compiler.h include\nasmint.h \ - include\tables.h x86\insnsi.h -+!ENDIF diff --git a/conan/nasm/test_package/conanfile.py b/conan/nasm/test_package/conanfile.py deleted file mode 100644 index 116e500b7..000000000 --- a/conan/nasm/test_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -import os -from conans import ConanFile, tools - - -class TestPackageConan(ConanFile): - settings = "os", "arch", - - def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - self.run("nasm --version", run_environment=True) - asm_file = os.path.join(self.source_folder, "hello_linux.asm") - out_file = os.path.join(self.build_folder, "hello_linux.o") - bin_file = os.path.join(self.build_folder, "hello_linux") - self.run("nasm -felf64 {} -o {}".format(asm_file, out_file), run_environment=True) - if self.settings.os == "Linux" and self.settings.arch == "x86_64": - ld = tools.get_env("LD", "ld") - self.run("{} hello_linux.o -o {}".format(ld, bin_file), run_environment=True) - self.run(bin_file) diff --git a/conan/nasm/test_package/hello_linux.asm b/conan/nasm/test_package/hello_linux.asm deleted file mode 100644 index c219477df..000000000 --- a/conan/nasm/test_package/hello_linux.asm +++ /dev/null @@ -1,16 +0,0 @@ -; Print "Hello, Conan" - - global _start - - section .text -_start: mov rax, 1 ; system call for write - mov rdi, 1 ; file handle 1 is stdout - mov rsi, message ; address of string to output - mov rdx, 13 ; number of bytes - syscall ; invoke operating system to do the write - mov rax, 60 ; system call for exit - xor rdi, rdi ; exit code 0 - syscall ; invoke operating system to exit - - section .data -message: db "Hello, Conan", 10 ; note the newline at the end \ No newline at end of file