source: trunk/dports/java/unicodeconverter-java/Portfile @ 79230

Last change on this file since 79230 was 79230, checked in by ryandesign@…, 9 years ago

unicodeconverter-java: use ${applications_dir}

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# $Id: Portfile 79230 2011-06-05 22:44:28Z ryandesign@macports.org $
2
3PortSystem                      1.0
4name                            unicodeconverter-java
5version                         1.1
6categories                      java textproc unicode
7maintainers                     nomaintainer
8description                     Convert various encodings to UTF-8
9long_description \
10        UnicodeConverter is a Java program that converts text and HTML files in \
11        VNI, VISCII, VPS, TCVN, or VIQR/Vietnet format to Unicode UTF-8. The \
12        program, executable in both graphic user interface (GUI) and command-line \
13        modes, is capable of converting multiple files in a directory, or an \
14        entire directory, including its subdirectories. In effect, this enhanced \
15        capability enables conversion of an entire website to Unicode UTF-8 \
16        format with one single command or a few mouse clicks.
17
18platforms                       darwin
19
20homepage                        http://unicodeconvert.sourceforge.net/
21master_sites            sourceforge:unicodeconvert
22distname                        UnicodeConverter-${version}
23use_zip                         yes
24
25worksrcdir                      UnicodeConverter
26
27checksums                       md5 4ed03336f2916de652137d8a14251e89
28
29depends_lib                     bin:java:kaffe
30
31post-patch {
32        reinplace "s|^PROGDIR=.*|PROGDIR=\"${prefix}/share/java\"|" \
33                ${worksrcpath}/Uni
34}
35
36use_configure           no
37
38build                           {}
39
40destroot {
41        xinstall -m 755 -d ${destroot}${prefix}/share/java \
42                ${destroot}${prefix}/share/doc/${name}
43        xinstall -m 755 -W ${worksrcpath} Uni ${destroot}${prefix}/bin
44        xinstall -m 644 -W ${worksrcpath} Uni.jar ${destroot}${prefix}/share/java
45        xinstall -m 644 -W ${worksrcpath} readme.html versionchanges.html \
46                ${destroot}${prefix}/share/doc/${name}
47}
48
49platform darwin {
50        # Build a nice .app
51        post-destroot {
52                set ucAppPath ${destroot}${applications_dir}/UnicodeConverter.app
53                # Build paths
54                xinstall -m 755 -d ${ucAppPath}/Contents/Resources/Java \
55                        ${ucAppPath}/Contents/MacOS
56                # Copy basic package information
57                xinstall -m 644 -W ${filespath} Info.plist PkgInfo \
58                        ${ucAppPath}/Contents
59                # Set version correctly in Info.plist
60                reinplace "s|@@VERSION@@|${version}|g" ${ucAppPath}/Contents/Info.plist
61                # Copy the jar into the right place
62                xinstall -m 644 -W ${worksrcpath} Uni.jar \
63                        ${ucAppPath}/Contents/Resources/Java
64                # Copy the stub app
65                xinstall -m 755 "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub" \
66                        ${ucAppPath}/Contents/MacOS
67                # If Jar Bundler is installed, we can grab the generic icon
68                set javaGenericIcon "/Developer/Applications/Java Tools/Jar Bundler.app/Contents/Resources/GenericJavaApp.icns"
69                if {[file exists ${javaGenericIcon}]} {
70                        xinstall -m 644 ${javaGenericIcon} ${ucAppPath}/Contents/Resources
71                }
72        }
73}
Note: See TracBrowser for help on using the repository browser.