Skip to content

Commit 682aef9

Browse files
committed
fixup! add scdoc documentation tool
1 parent 9a564aa commit 682aef9

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

recipes/scdoc/all/conanfile.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,25 @@
22
from conans.errors import ConanInvalidConfiguration
33
import os
44

5-
required_conan_version = ">=1.43.0"
5+
required_conan_version = ">=1.33.0"
66

77

88
class ScdocInstallerConan(ConanFile):
99
name = "scdoc"
1010
description = "scdoc is a simple man page generator for POSIX systems written in C99."
11-
topics = ("scdoc", "documentation")
11+
topics = ("manpage", "documentation", "posix")
1212
url = "https://github.com/conan-io/conan-center-index"
1313
homepage = "https://git.sr.ht/~sircmpwn/scdoc"
14-
license = "Unknown"
14+
license = "MIT"
1515
settings = "os", "arch", "compiler", "build_type"
1616
_autotools = None
17-
no_copy_source = True
1817

1918
@property
2019
def _source_subfolder(self):
2120
return "source_subfolder"
2221

2322
def build_requirements(self):
24-
self.build_requires("make/[>=4.3.0]")
23+
self.build_requires("make/4.3")
2524

2625
def configure(self):
2726
del self.settings.compiler.libcxx
@@ -47,13 +46,12 @@ def _configure_autotools(self):
4746

4847
def build(self):
4948
autotools = self._configure_autotools()
50-
with tools.chdir(os.path.join(self.source_folder, self._source_subfolder)):
49+
with tools.chdir(self._source_subfolder):
5150
autotools.make()
52-
autotools.make(target="check")
5351

5452
def package(self):
5553
autotools = self._configure_autotools()
56-
with tools.chdir(os.path.join(self.source_folder, self._source_subfolder)):
54+
with tools.chdir(self._source_subfolder):
5755
autotools.install(args=[f"PREFIX={self.package_folder}"])
5856
self.copy(pattern="COPYING", dst="licenses",
5957
src=self._source_subfolder)
@@ -69,9 +67,6 @@ def package_info(self):
6967
self._chmod_plus_x(os.path.join(scdoc_root, "scdoc"))
7068

7169
def validate(self):
72-
if self.settings.os == "Macos":
70+
if self.settings.os in ["Macos", "Windows"]:
7371
raise ConanInvalidConfiguration(
74-
"Builds aren't supported on Macos")
75-
if self.settings.os == "Windows":
76-
raise ConanInvalidConfiguration(
77-
"Builds aren't supported on Windows")
72+
f"Builds aren't supported on {self.settings.os}")
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from conans import ConanFile, Meson, tools
1+
from conans import ConanFile, tools
22
import os
33

44

55
class TestPackageConan(ConanFile):
66

77
def test(self):
8-
self.run(
9-
f"scdoc < {os.path.join(self.source_folder,'test_package.1.scd')}", run_environment=True)
8+
if not tools.cross_building(self):
9+
self.run(
10+
f"scdoc < {os.path.join(self.source_folder,'test_package.1.scd')}", run_environment=True)

0 commit comments

Comments
 (0)