Browse Source

Download and unpack source

DarkMorford 5 years ago
parent
commit
38fc252bc0
1 changed files with 18 additions and 16 deletions
  1. 18 16
      conanfile.py

+ 18 - 16
conanfile.py

@@ -1,28 +1,33 @@
 from conans import ConanFile, CMake, tools
+import os
 
 
 class LibTiffConan(ConanFile):
     name = "libtiff"
     version = "4.0.3"
-    license = "<Put the package license here>"
-    author = "<Put your name here> <And your email here>"
-    url = "<Package recipe repository url here, for issues about the package>"
-    description = "<Description of Libtiff here>"
-    topics = ("<Put some tag here>", "<here>", "<and here>")
+    license = "libtiff"
+    author = "Shawn Morford <DarkMorford@Gmail.com>"
+    url = "https://code.darkmorford.net/conan-pkg/libtiff"
+    description = ("This software provides support for the Tag Image File Format (TIFF), "
+                   "a widely used format for storing image data.")
+    homepage = "http://simplesystems.org/libtiff/"
+    topics = ("image", "graphic")
     settings = "os", "compiler", "build_type", "arch"
     options = {"shared": [True, False]}
     default_options = {"shared": False}
     generators = "cmake"
 
+    @property
+    def subfolder(self):
+        return os.path.join(self.source_folder, f"tiff-{self.version}")
+
     def source(self):
-        self.run("git clone https://github.com/conan-io/hello.git")
-        # This small hack might be useful to guarantee proper /MT /MD linkage
-        # in MSVC if the packaged project doesn't have variables to set it
-        # properly
-        tools.replace_in_file("hello/CMakeLists.txt", "PROJECT(HelloWorld)",
-                              '''PROJECT(HelloWorld)
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-conan_basic_setup()''')
+        self.output.info(f"Downloading source for version {self.version}")
+        tools.get(**self.conan_data["sources"][self.version])
+
+    def configure(self):
+        del self.settings.compiler.cppstd
+        del self.settings.compiler.libcxx
 
     def build(self):
         cmake = CMake(self)
@@ -44,6 +49,3 @@ conan_basic_setup()''')
 
     def package_info(self):
         self.cpp_info.libs = ["hello"]
-
-    def configure(self):
-        del self.settings.compiler.libcxx