PortSystem 1.0
PortGroup xcode 1.0

name		GPGAppKit
version		A1
revision	3
categories	aqua devel security
license		GPL-2+
maintainers	nomaintainer
description	A framework that provides GPG-type panels
long_description	\
	A framework that provides GPG-type panels for key selection 	\
	(single or multiple) and passphrase entry.			\
									\
	All panels can be used as modal windows, relative windows 	\
	(pseudo-sheets), or sheets.
homepage	http://macgpg.sourceforge.net
master_sites	sourceforge:macgpg
dist_subdir	macgpg
worksrcdir	${name}
checksums	md5 bdf8de6fee79e1e6ffe0b8374b283e35			\
		sha1 3b09b07e864b2600894f7eafafe2f537e0b6ce0d
depends_lib	port:gpgme-objc
xcode.build.settings	FRAMEWORK_SEARCH_PATHS=${frameworks_dir}
xcode.destroot.type     framework
xcode.destroot.settings	FRAMEWORK_SEARCH_PATHS=${frameworks_dir}

post-patch {
    if {${os.major} >= 10} {
        file copy -force ${filespath}/project.pbxproj ${worksrcpath}/${name}.pbproj/
        file copy -force ${filespath}/Info-GPGAppKit.plist ${worksrcpath}/
        system "cd ${worksrcpath}/Swedish.lproj && iconv -f MACROMAN -t UTF-16 Localizable.strings > Localizable.strings.converted"
        file rename -force ${worksrcpath}/Swedish.lproj/Localizable.strings.converted \
                           ${worksrcpath}/Swedish.lproj/Localizable.strings
    }
}
