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

add ptz to header list and added new version (3.0.1) #5706

Merged
merged 4 commits into from
Jun 2, 2021
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
6 changes: 6 additions & 0 deletions recipes/date/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ sources:
"3.0.0":
sha256: 87bba2eaf0ebc7ec539e5e62fc317cb80671a337c1fb1b84cb9e4d42c6dbebe3
url: https://github.com/HowardHinnant/date/archive/v3.0.0.tar.gz
"3.0.1":
sha256: 7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538
url: https://github.com/HowardHinnant/date/archive/v3.0.1.tar.gz
patches:
"2.4.1":
- base_path: source_subfolder
Expand All @@ -16,3 +19,6 @@ patches:
"3.0.0":
- base_path: source_subfolder
patch_file: patches/cmake-3.0.0.patch
"3.0.1":
- base_path: source_subfolder
patch_file: patches/cmake-3.0.1.patch
3 changes: 3 additions & 0 deletions recipes/date/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def config_options(self):
del self.options.fPIC

def configure(self):
if self.options.shared:
del self.options.fPIC
if self.settings.compiler.cppstd:
tools.check_min_cppstd(self, "11")

Expand Down Expand Up @@ -87,6 +89,7 @@ def package(self):
dst = os.path.join("include", "date")
self.copy(pattern="date.h", dst=dst, src=src)
self.copy(pattern="tz.h", dst=dst, src=src)
self.copy(pattern="ptz.h", dst=dst, src=src)
self.copy(pattern="iso_week.h", dst=dst, src=src)
self.copy(pattern="julian.h", dst=dst, src=src)
self.copy(pattern="islamic.h", dst=dst, src=src)
Comment on lines 90 to 95
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is easier 🌮

Suggested change
self.copy(pattern="date.h", dst=dst, src=src)
self.copy(pattern="tz.h", dst=dst, src=src)
self.copy(pattern="ptz.h", dst=dst, src=src)
self.copy(pattern="iso_week.h", dst=dst, src=src)
self.copy(pattern="julian.h", dst=dst, src=src)
self.copy(pattern="islamic.h", dst=dst, src=src)
for file in ["date.h", "tz.h", "ptz.h", "iso_week.h", "julian.h", "islamic.h"]:
self.copy(pattern=file, dst=dst, src=src)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. This is required? Because will reset reviews, build etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add it after this PR, because this PR is required to use this library correctly. Can we do in this way?

Copy link
Contributor

@prince-chrismc prince-chrismc Jun 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required, I approved! hopefully next time this recipe gets updated ... there's a few out of date conventions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at university, on 1st semester, there was an exercise about for loop, the idea was print from 1 to 10 using C language. A colleague preferred to write printf 10 times, each line for a single number ... don't try it at home.

Expand Down
14 changes: 14 additions & 0 deletions recipes/date/all/patches/cmake-3.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad74900..ac390a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,6 +156,9 @@ if( BUILD_TZ_LIB )
target_include_directories( date-tz SYSTEM PRIVATE ${CURL_INCLUDE_DIRS} )
target_link_libraries( date-tz PRIVATE ${CURL_LIBRARIES} )
endif( )
+ if( DISABLE_STRING_VIEW )
+ target_compile_definitions( date-tz PRIVATE -DHAS_STRING_VIEW=0 -DHAS_DEDUCTION_GUIDES=0 )
+ endif( )
endif( )

#[===================================================================[
2 changes: 2 additions & 0 deletions recipes/date/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ versions:
folder: all
"3.0.0":
folder: all
"3.0.1":
folder: all