# $Id: Portfile,v 1.1 2004/04/27 23:46:18 blb Exp $ PortSystem 1.0 name unicodeconverter-java version 1.0.9 categories java textproc maintainers blb@pobox.com description Convert various encodings to UTF-8 long_description \ UnicodeConverter is a Java program that converts text and HTML files in \ VNI, VISCII, VPS, TCVN, or VIQR/Vietnet format to Unicode UTF-8. The \ program, executable in both graphic user interface (GUI) and command-line \ modes, is capable of converting multiple files in a directory, or an \ entire directory, including its subdirectories. In effect, this enhanced \ capability enables conversion of an entire website to Unicode UTF-8 \ format with one single command or a few mouse clicks. platforms darwin homepage http://unicodeconvert.sourceforge.net/ master_sites sourceforge:unicodeconvert distname UnicodeConverter-${version}-src use_zip yes worksrcdir UnicodeConverter checksums md5 d155fea7292b008c351d8fabf041bda0 depends_build bin:ant:apache-ant depends_lib bin:java:kaffe patchfiles patch-Uni post-patch { reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Uni } use_configure no build.cmd ant build.target jar destroot { xinstall -m 755 -d ${destroot}/${prefix}/share/java \ ${destroot}/${prefix}/share/doc/${name} xinstall -m 755 -W ${worksrcpath} Uni ${destroot}/${prefix}/bin xinstall -m 644 -W ${worksrcpath} Uni.jar ${destroot}/${prefix}/share/java xinstall -m 644 -W ${worksrcpath} readme.html \ ${destroot}/${prefix}/share/doc/${name} # Build a nice .app if {[variant_isset darwin]} { set ucAppPath ${destroot}/Applications/DarwinPorts/UnicodeConverter.app # Build paths xinstall -m 755 -d ${ucAppPath}/Contents/Resources/Java \ ${ucAppPath}/Contents/MacOS # Copy basic package information xinstall -m 644 -W ${filespath} Info.plist PkgInfo \ ${ucAppPath}/Contents # Set version correctly in Info.plist reinplace "s|@@VERSION@@|${version}|g" ${ucAppPath}/Contents/Info.plist # Copy the jar into the right place xinstall -m 644 -W ${worksrcpath} Uni.jar \ ${ucAppPath}/Contents/Resources/Java # Copy the stub app xinstall -m 755 "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub" \ ${ucAppPath}/Contents/MacOS # If Jar Bundler is installed, we can grab the generic icon set javaGenericIcon "/Developer/Applications/Java Tools/Jar Bundler.app/Contents/Resources/GenericJavaApp.icns" if {[file exists ${javaGenericIcon}]} { xinstall -m 644 ${javaGenericIcon} ${ucAppPath}/Contents/Resources } } }