2004-01-11 10:53:07 +00:00
# New ports collection makefile for: JAI Image I/O Tools
# Date created: 2004-01-10
# Whom: OISHI Masakuni <yamasa@bsdhouse.org>
#
# $FreeBSD$
#
PORTNAME = jai-imageio
PORTVERSION = 1.0
CATEGORIES = java graphics
MASTER_SITES = #
DISTNAME = ${ PORTNAME : S /-/_/ } -${ PORTVERSION : S /./_/g } -lib-linux-i586
MAINTAINER = java@FreeBSD.org
COMMENT = Plug-ins for the Java Image I/O Framework
USE_JAVA = 1.4+
NO_WRKSUBDIR = yes
NO_BUILD = yes
ONLY_FOR_ARCHS = i386
RESTRICTED = "Redistribution is not permitted"
DOWNLOAD_URL = http://java.sun.com/products/java-media/jai/downloads/download-iio.html
TARGET_DIR = ${ JAVASHAREDIR } /${ PORTNAME }
PLIST_SUB += T = ${ TARGET_DIR : S /^ ${ PREFIX } \/ // } JAVA_HOME = ${ JAVA_HOME : S /^ ${ PREFIX } \/ // }
PKGMESSAGE = ${ WRKDIR } /pkg-message
. i n c l u d e < b s d . p o r t . p r e . m k >
. i f ! e x i s t s ( $ { D I S T D I R } / $ { D I S T N A M E } $ { E X T R A C T _ S U F X } ) & & ! d e f i n e d ( P A C K A G E _ B U I L D I N G )
IGNORE = " You must manually fetch the \"Linux Install\" distribution \( ${ DISTNAME } ${ EXTRACT_SUFX } \) from ${ DOWNLOAD_URL } , place it in ${ DISTDIR } and then run make again "
. e n d i f
2004-04-03 06:26:11 +00:00
. i f ${JAVA_PORT_OS} = = "native"
2004-01-11 10:53:07 +00:00
WITH_PLUGINWRAPPER = yes
RUN_DEPENDS += ${ LOCALBASE } /lib/pluginwrapper/jai.so:${ PORTSDIR } /www/linuxpluginwrapper
. e n d i f
. i f d e f i n e d ( N O I N S T A L L _ I N _ J R E )
PLIST_SUB += INSTALL_IN_JRE = "@comment "
. e l s e
PLIST_SUB += INSTALL_IN_JRE = ""
. e n d i f
pre-install :
. i f d e f i n e d ( N O I N S T A L L _ I N _ J R E )
@${ SED } -e " s:%%TARGET_DIR%%: ${ TARGET_DIR } :g " ${ MASTERDIR } /pkg-message-jre > ${ PKGMESSAGE }
. e n d i f
. i f d e f i n e d ( W I T H _ P L U G I N W R A P P E R )
. i f d e f i n e d ( N O I N S T A L L _ I N _ J R E )
@${ ECHO_CMD } >> ${ PKGMESSAGE }
@${ SED } -e " s:%%LIBDIR%%: ${ TARGET_DIR } /lib:g " ${ MASTERDIR } /pkg-message-libmap >> ${ PKGMESSAGE }
. e l s e
@${ SED } -e " s:%%LIBDIR%%: ${ JAVA_HOME } /jre/lib/i386:g " ${ MASTERDIR } /pkg-message-libmap > ${ PKGMESSAGE }
. e n d i f
. e n d i f
do-install :
@${ ECHO_CMD } -n ">> Creating destination directory..."
@${ MKDIR } ${ TARGET_DIR }
@${ ECHO_CMD } " [DONE]"
@${ ECHO_CMD } -n ">> Installing libraries..."
@${ INSTALL_DATA } ${ WRKSRC } /COPYRIGHT-jai_imageio.txt ${ TARGET_DIR }
@${ INSTALL_DATA } ${ WRKSRC } /LICENSE-jai_imageio.txt ${ TARGET_DIR }
@${ INSTALL_DATA } ${ WRKSRC } /README-jai_imageio.html ${ TARGET_DIR }
@${ MKDIR } ${ TARGET_DIR } /jar
@${ INSTALL_DATA } ${ WRKSRC } /clibwrapper_jiio.jar ${ TARGET_DIR } /jar
@${ INSTALL_DATA } ${ WRKSRC } /jai_imageio.jar ${ TARGET_DIR } /jar
@${ INSTALL_DATA } ${ WRKSRC } /mlibwrapper_jai.jar ${ TARGET_DIR } /jar
@${ MKDIR } ${ TARGET_DIR } /lib
@${ INSTALL_DATA } ${ WRKSRC } /libclib_jiio.so ${ TARGET_DIR } /lib
. i f ! d e f i n e d ( N O I N S T A L L _ I N _ J R E )
@${ LN } -sf ${ TARGET_DIR } /jar/clibwrapper_jiio.jar ${ JAVA_HOME } /jre/lib/ext
@${ LN } -sf ${ TARGET_DIR } /jar/jai_imageio.jar ${ JAVA_HOME } /jre/lib/ext
@${ TEST } -e ${ JAVA_HOME } /jre/lib/ext/mlibwrapper_jai.jar || ${ LN } -sf ${ TARGET_DIR } /jar/mlibwrapper_jai.jar ${ JAVA_HOME } /jre/lib/ext
@${ LN } -sf ${ TARGET_DIR } /lib/libclib_jiio.so ${ JAVA_HOME } /jre/lib/i386
. e n d i f
@${ ECHO_CMD } " [DONE]"
post-install :
. i f d e f i n e d ( N O I N S T A L L _ I N _ J R E ) | | d e f i n e d ( W I T H _ P L U G I N W R A P P E R )
@${ CAT } ${ PKGMESSAGE }
. e n d i f
. i n c l u d e < b s d . p o r t . p o s t . m k >