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

Last change on this file since 10878 was 9042, checked in by blb, 15 years ago

Port: unicodeconverter-java
Version: 1.1

Update port java/unicodeconverter-java

Version bump to 1.1, add unicode category, use pre-built jars, move patching
of shell script into Portfile.

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1# $Id: Portfile,v 1.2 2004/11/01 00:36:56 blb Exp $
2
3PortSystem                      1.0
4name                            unicodeconverter-java
5version                         1.1
6categories                      java textproc unicode
7maintainers                     blb@pobox.com
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        # Build a nice .app
48        if {[variant_isset darwin]} {
49                set ucAppPath ${destroot}/Applications/DarwinPorts/UnicodeConverter.app
50                # Build paths
51                xinstall -m 755 -d ${ucAppPath}/Contents/Resources/Java \
52                        ${ucAppPath}/Contents/MacOS
53                # Copy basic package information
54                xinstall -m 644 -W ${filespath} Info.plist PkgInfo \
55                        ${ucAppPath}/Contents
56                # Set version correctly in Info.plist
57                reinplace "s|@@VERSION@@|${version}|g" ${ucAppPath}/Contents/Info.plist
58                # Copy the jar into the right place
59                xinstall -m 644 -W ${worksrcpath} Uni.jar \
60                        ${ucAppPath}/Contents/Resources/Java
61                # Copy the stub app
62                xinstall -m 755 "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub" \
63                        ${ucAppPath}/Contents/MacOS
64                # If Jar Bundler is installed, we can grab the generic icon
65                set javaGenericIcon "/Developer/Applications/Java Tools/Jar Bundler.app/Contents/Resources/GenericJavaApp.icns"
66                if {[file exists ${javaGenericIcon}]} {
67                        xinstall -m 644 ${javaGenericIcon} ${ucAppPath}/Contents/Resources
68                }
69        }
70}
71
72# So it gets set, when applicable
73variant darwin {
74}
75
Note: See TracBrowser for help on using the repository browser.