Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

innoextract: add package_type, bump deps #25382

Merged
merged 6 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions recipes/innoextract/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ patches:
"1.9.0":
- patch_file: "patches/0001-cmake-fix-module.patch"
- patch_file: "patches/0002-remove-custom-cmake-find-modules.patch"
- patch_file: "patches/0003-fix-boost-1_85-usage.patch"
patch_description: "Fix Boost 1.85 usage"
patch_type: "backport"
patch_source: "https://github.com/dscharrer/innoextract/pull/169"
32 changes: 16 additions & 16 deletions recipes/innoextract/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import os

from conan import ConanFile
from conan.tools.files import get, rmdir, copy, apply_conandata_patches, export_conandata_patches
from conan.tools.build import check_max_cppstd
from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain
from conan.tools.env import VirtualBuildEnv
import os
from conan.tools.files import get, rmdir, copy, apply_conandata_patches, export_conandata_patches, rm


required_conan_version = ">=1.52.0"
required_conan_version = ">=2.0"


class InnoextractConan(ConanFile):
name = "innoextract"
description = "Extract contents of Inno Setup installers"
license = "LicenseRef-LICENSE"
license = "Zlib"
topics = ("inno-setup", "decompression")
homepage = "https://constexpr.org/innoextract"
url = "https://github.com/conan-io/conan-center-index"
package_type = "application"
settings = "os", "arch", "compiler", "build_type"

def export_sources(self):
Expand All @@ -24,17 +26,18 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
self.requires("boost/1.80.0")
self.requires("xz_utils/5.2.5")
self.requires("boost/1.85.0")
AbrilRBS marked this conversation as resolved.
Show resolved Hide resolved
self.requires("xz_utils/[>=5.4.5 <6]")
self.requires("libiconv/1.17")

def validate(self):
check_max_cppstd(self, "14")

def package_id(self):
del self.info.settings.compiler
self.info.requires.clear()

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True,
destination=self.source_folder)
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def generate(self):
env = VirtualBuildEnv(self)
Expand All @@ -51,21 +54,18 @@ def generate(self):

def build(self):
apply_conandata_patches(self)
os.remove(os.path.join(self.source_folder, 'cmake', 'FindLZMA.cmake'))
os.remove(os.path.join(self.source_folder, 'cmake', 'Findiconv.cmake'))
rm(self, "FindLZMA.cmake", os.path.join(self.source_folder, "cmake"))
rm(self, "Findiconv.cmake", os.path.join(self.source_folder, "cmake"))
cmake = CMake(self)
cmake.configure()
cmake.build()

def package(self):
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
cmake = CMake(self)
cmake.install()
rmdir(self, os.path.join(self.package_folder, "share"))

def package_info(self):
self.cpp_info.includedirs = []
self.cpp_info.libdirs = []
bindir = os.path.join(self.package_folder, "bin")
self.output.info(f"Appending PATH environment variable: {bindir}")
self.env_info.PATH.append(bindir)
24 changes: 24 additions & 0 deletions recipes/innoextract/all/patches/0003-fix-boost-1_85-usage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 264c2fe6b84f90f6290c670e5f676660ec7b2387 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bero@lindev.ch>
Date: Thu, 28 Mar 2024 15:11:40 +0100
Subject: [PATCH] Fix build with boost 1.85

As of boost 1.85-beta1, boost/filesystem/directory.hpp is no longer
implicitly included by boost/filesystem/operations.hpp. Include it
explicitly.
---
src/stream/slice.cpp | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/stream/slice.cpp b/src/stream/slice.cpp
index 12468a38..f7ebe0e5 100644
--- a/src/stream/slice.cpp
+++ b/src/stream/slice.cpp
@@ -27,6 +27,7 @@
#include <boost/cstdint.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/directory.hpp>
#include <boost/range/size.hpp>

#include "util/console.hpp"
19 changes: 0 additions & 19 deletions recipes/innoextract/all/test_v1_package/conanfile.py

This file was deleted.