. Make this port run. Its always built correctly, but I've had problems

running it.  The changes include:
  . Pull in stubs for the MRJToolkit classes.  These are not used, but
    some are imported, so the app was failing with NoClassDef errors.
  . Eliminate the build dependency on Perl.
  . Use standard ways of depending on Java.
  . Don't install unnecessary stuff.
  . Install in appropriate directories and respect NOPORTDOCS.
  . Replace the relatively complicated and non-working launcher script
    supplied with a simple version that uses javavm(1).
This commit is contained in:
Greg Lewis 2008-02-06 17:11:43 +00:00
parent b0e87e6a66
commit 67b17690d2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=206792
5 changed files with 42 additions and 103 deletions

View file

@ -7,35 +7,29 @@
PORTNAME= acrobatviewer
PORTVERSION= 1.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= print java
MASTER_SITES= ftp://ftp.adobe.com/pub/adobe/magic/acrobatviewer/unix/1.x/
DISTNAME= viewer.bin
EXTRACT_SUFX=
DISTFILES= viewer.bin:1 MRJToolkitStubs.zip:2
MASTER_SITES= ftp://ftp.adobe.com/pub/adobe/magic/acrobatviewer/unix/1.x/:1 \
http://developer.apple.com/samplecode/MRJToolkitStubs/:2
MAINTAINER= ports@FreeBSD.org
COMMENT= Viewer for the PDF files written in Java(TM)
#RUN_DEPENDS= ${JAVAVM}:${PORTSDIR}/java/javavmwrapper \
# ${LOCALBASE}/etc/javavms:${PORTSDIR}/java/jre
RUN_DEPENDS= ${JAVAVM}:${PORTSDIR}/java/javavmwrapper
USE_ZIP= yes
USE_XLIB= yes
USE_PERL5_BUILD=yes
USE_JAVA= yes
JAVA_VERSION= 1.3+
NO_BUILD= yes
SUB_FILES+= AcrobatViewer
SUB_LIST+= PORTNAME=${PORTNAME}
JAVAVM= ${LOCALBASE}/bin/javavm
INSTSBDR= ${PREFIX}/share/java/AdobeAcrobatViewer
# For the end-users this "InstallAnywhere" whizard probably is a great step
# toward Windowze-like software installations comparing with traditional
# "make install" enviropment, but for *nix administrator it is a pain to deal
# with. Fortunately, Zero G (author of the InstallAnywhere) does not use
# propiertary format for archiving files, so it was possible for me to make
# following dirty hack. If they will provide better way to centralise
# installations in the next versions of InstallAnywhere than I'll be glad to
# For the end-users this "InstallAnywhere" wizard probably is a great step
# toward Windows-like software installations compared with the traditional
# "make install" paradigm, but for Unix administrators it is a pain to deal
# with. Fortunately, Zero G (author of the InstallAnywhere) does not use a
# proprietary format for archiving files, so it was possible for me to do the
# following dirty hack. If they will provide a better way to centralise
# installations in the next versions of InstallAnywhere then I'll be glad to
# remove all following crap.
BLOCKSIZE= 32768
@ -45,25 +39,27 @@ ARCHBLOCKS= 84
do-extract:
@${MKDIR} ${WRKSRC} && \
cd ${WRKSRC} && \
dd if=${DISTDIR}/${DISTNAME} of=archive.zip bs=${BLOCKSIZE} skip=${ARCHSTART} count=${ARCHBLOCKS} 2>/dev/null && \
${LOCALBASE}/bin/unzip -o -a -j -qq archive.zip && \
${PERL} -pi -e "s.\x0D.." ${WRKSRC}/AcrobatViewer.lax
cd ${WRKSRC} && \
dd if=${DISTDIR}/viewer.bin of=archive.zip bs=${BLOCKSIZE} skip=${ARCHSTART} count=${ARCHBLOCKS} 2>/dev/null && \
${LOCALBASE}/bin/unzip -o -a -j -qq archive.zip
@${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
${DISTDIR}/MRJToolkitStubs.zip ${EXTRACT_AFTER_ARGS}
do-configure:
@${PERL} -pi -e "s|%INSTDIR%|${INSTSBDR}|g" ${WRKSRC}/AcrobatViewer.lax && \
${PERL} -pi -e "s|%JAVAVM%|${JAVAVM}|g" ${WRKSRC}/AcrobatViewer.lax && \
${PERL} -pi -e "s|%JAVAJIT%|${JAVAJIT}|g" ${WRKSRC}/AcrobatViewer.lax
post-extract:
@cd ${WRKDIR}/MRJToolkitStubs/MRJToolkitStubs && \
${JAR} cmf META-INF/MANIFEST.MF MRJToolkitStubs.jar com && \
${MV} MRJToolkitStubs.jar ${WRKSRC}
do-install:
${MKDIR} ${INSTSBDR}
${INSTALL_SCRIPT} ${WRKSRC}/launixgc.sh ${INSTSBDR}/AcrobatViewer
${INSTALL_DATA} ${WRKSRC}/License.pdf ${INSTSBDR}/
${INSTALL_DATA} ${WRKSRC}/help.pdf ${INSTSBDR}/
${INSTALL_DATA} ${WRKSRC}/lax.jar ${INSTSBDR}/
${INSTALL_DATA} ${WRKSRC}/acrobat.jar ${INSTSBDR}/
${INSTALL_DATA} ${WRKSRC}/AcrobatViewer.lax ${INSTSBDR}/
${LN} -sf ${INSTSBDR}/AcrobatViewer ${PREFIX}/bin/AcrobatViewer
${MKDIR} ${JAVAJARDIR}/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/acrobat.jar ${JAVAJARDIR}/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/MRJToolkitStubs.jar ${JAVAJARDIR}/${PORTNAME}
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}/
${INSTALL_DATA} ${WRKSRC}/License.pdf ${DOCSDIR}/
${INSTALL_DATA} ${WRKSRC}/help.pdf ${DOCSDIR}/
.endif
${INSTALL_SCRIPT} ${WRKDIR}/AcrobatViewer ${PREFIX}/bin/AcrobatViewer
post-install:
@${CAT} ${PKGMESSAGE}

View file

@ -1,3 +1,6 @@
MD5 (viewer.bin) = 7cc85a3d8856de3bb1dc20eed8bfd466
SHA256 (viewer.bin) = beb9d32fca6f7411ef53f726e68172aeb21c2073f3a989bd16f4f6a6f298fcee
SIZE (viewer.bin) = 2782530
MD5 (MRJToolkitStubs.zip) = e527efeb54794f5f535ae2c3ac1c20c9
SHA256 (MRJToolkitStubs.zip) = da7fed3f58e740fdb588daf064439356181e498f07dfe1218ac21da801c6f59a
SIZE (MRJToolkitStubs.zip) = 19748

View file

@ -1,48 +0,0 @@
--- AcrobatViewer.lax.orig Fri Feb 11 18:02:57 2000
+++ AcrobatViewer.lax Fri Feb 11 18:04:07 2000
@@ -4,7 +4,7 @@
# --------------------
# name given the launcher in console windows
-lax.application.name=AcrobatViewer.exe
+lax.application.name=AcrobatViewer
# LAX.CLASS.PATH
@@ -12,7 +12,7 @@
# the Java classpath necessary to run this application
# Can be separated by colons or semicolons
-lax.class.path=acrobat.jar;lax.jar
+lax.class.path=acrobat.jar:lax.jar
# LAX.COMMAND.LINE.ARGS
@@ -26,7 +26,7 @@
# -------
# path to directory holding LaunchAnywhere's native launcher
-lax.dir=C:\\Program Files\\AdobeAcrobatViewer\\
+lax.dir=%INSTDIR%/
# LAX.MAIN.CLASS
@@ -47,7 +47,8 @@
# -----------------
# the VM to use for the next launch
-lax.nl.current.vm=C:\\Java\\jdk1.1.8\\bin\\jre.exe
+lax.nl.current.vm=%JAVAVM%
+lax.nl.java.compiler=%JAVAJIT%
# LAX.NL.JAVA.LAUNCHER.MAIN.CLASS
@@ -104,7 +105,7 @@
# --------------------
# path to the installdir magic folder
-lax.root.install.dir=C:\\Program Files\\AdobeAcrobatViewer
+lax.root.install.dir=%INSTDIR%
# LAX.STDERR.REDIRECT

View file

@ -1,11 +0,0 @@
--- launixgc.sh.orig Thu Dec 2 09:30:38 1999
+++ launixgc.sh Fri Feb 11 18:00:40 2000
@@ -421,6 +421,8 @@
if [ ${jittype:-""} = "off" ]
then
jitinvoc="-Djava.compiler="
+ else
+ jitinvoc="-Djava.compiler=$jittype"
fi
fi

View file

@ -1,8 +1,7 @@
bin/AcrobatViewer
share/java/AdobeAcrobatViewer/AcrobatViewer
share/java/AdobeAcrobatViewer/AcrobatViewer.lax
share/java/AdobeAcrobatViewer/License.pdf
share/java/AdobeAcrobatViewer/acrobat.jar
share/java/AdobeAcrobatViewer/help.pdf
share/java/AdobeAcrobatViewer/lax.jar
@dirrm share/java/AdobeAcrobatViewer
%%JAVAJARDIR%%/acrobatviewer/acrobat.jar
%%JAVAJARDIR%%/acrobatviewer/MRJToolkitStubs.jar
%%PORTDOCS%%%%DOCSDIR%%/License.pdf
%%PORTDOCS%%%%DOCSDIR%%/help.pdf
@dirrm %%JAVAJARDIR%%/acrobatviewer
@dirrm %%DOCSDIR%%