Skip to content

Commit ba27a3b

Browse files
committed
store author, maintainer, copyright metadata
1 parent 170070b commit ba27a3b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/fpm/manifest/package.f90

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ module fpm_manifest_package
8282
!> License meta data
8383
character(len=:), allocatable :: license
8484

85+
!> Author meta data
86+
character(len=:), allocatable :: author
87+
88+
!> Maintainer meta data
89+
character(len=:), allocatable :: maintainer
90+
91+
!> Copyright meta data
92+
character(len=:), allocatable :: copyright
93+
8594
!> Library meta data
8695
type(library_config_t), allocatable :: library
8796

@@ -161,6 +170,9 @@ subroutine new_package(self, table, root, error)
161170
endif
162171

163172
call get_value(table, "license", self%license)
173+
call get_value(table, "author", self%author)
174+
call get_value(table, "maintainer", self%maintainer)
175+
call get_value(table, "copyright", self%copyright)
164176

165177
if (len(self%name) <= 0) then
166178
call syntax_error(error, "Package name must be a non-empty string")
@@ -532,6 +544,9 @@ logical function manifest_is_same(this,that)
532544
if (.not.this%install==other%install) return
533545
if (.not.this%fortran==other%fortran) return
534546
if (.not.this%license==other%license) return
547+
if (.not.this%author==other%author) return
548+
if (.not.this%maintainer==other%maintainer) return
549+
if (.not.this%copyright==other%copyright) return
535550
if (allocated(this%library).neqv.allocated(other%library)) return
536551
if (allocated(this%library)) then
537552
if (.not.this%library==other%library) return
@@ -619,6 +634,12 @@ subroutine dump_to_toml(self, table, error)
619634
if (allocated(error)) return
620635
call set_string(table, "license", self%license, error, class_name)
621636
if (allocated(error)) return
637+
call set_string(table, "author", self%author, error, class_name)
638+
if (allocated(error)) return
639+
call set_string(table, "maintainer", self%maintainer, error, class_name)
640+
if (allocated(error)) return
641+
call set_string(table, "copyright", self%copyright, error, class_name)
642+
if (allocated(error)) return
622643

623644
call add_table(table, "build", ptr, error, class_name)
624645
if (allocated(error)) return
@@ -867,6 +888,9 @@ subroutine load_from_toml(self, table, error)
867888

868889
call get_value(table, "name", self%name)
869890
call get_value(table, "license", self%license)
891+
call get_value(table, "author", self%author)
892+
call get_value(table, "maintainer", self%maintainer)
893+
call get_value(table, "copyright", self%copyright)
870894
call get_value(table, "version", flag)
871895
call new_version(self%version, flag, error)
872896
if (allocated(error)) then

0 commit comments

Comments
 (0)