diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-11-28 10:32:44 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-11-28 10:32:44 +0000 |
commit | 2114fb2304f44b2756ad668d4d406a68c9574b8d (patch) | |
tree | 5f95f2907447027f031e05ea78eddf68e0922fd0 /finance | |
parent | 802c45816fe1e256bddcae81b99ed8e505affe02 (diff) |
Notes
Diffstat (limited to 'finance')
-rw-r--r-- | finance/Makefile | 1 | ||||
-rw-r--r-- | finance/gfp/Makefile | 77 | ||||
-rw-r--r-- | finance/gfp/distinfo | 2 | ||||
-rw-r--r-- | finance/gfp/files/Launcher.java | 311 | ||||
-rw-r--r-- | finance/gfp/files/wrapper.sh | 55 | ||||
-rw-r--r-- | finance/gfp/pkg-descr | 8 |
6 files changed, 0 insertions, 454 deletions
diff --git a/finance/Makefile b/finance/Makefile index fada1123460f..7686eac31b11 100644 --- a/finance/Makefile +++ b/finance/Makefile @@ -21,7 +21,6 @@ SUBDIR += eqonomize-kde3 SUBDIR += eqonomize-kde4 SUBDIR += expense - SUBDIR += gfp SUBDIR += gnofin SUBDIR += gnucash SUBDIR += gnucash-docs diff --git a/finance/gfp/Makefile b/finance/gfp/Makefile deleted file mode 100644 index 5b287e4e1960..000000000000 --- a/finance/gfp/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> -# $FreeBSD$ - -PORTNAME= gfp -PORTVERSION= 0.7.2 -PORTREVISION= 5 -CATEGORIES= finance java -MASTER_SITES= SF/gfd/1%20-%20GFP%20Stable/${PORTVERSION} -DISTNAME= ${PORTNAME}_${PORTVERSION} - -MAINTAINER= ports@FreeBSD.org -COMMENT= Personal finances administration software - -DEPRECATED= No more public distfiles -EXPIRATION_DATE= 2012-11-26 - -USE_ZIP= yes -USE_JAVA= yes -JAVA_EXTRACT= yes -JAVA_BUILD= jdk -JAVA_RUN= yes -JAVA_VERSION= 1.5+ -JAVA_OS= native -WRKSRC= ${WRKDIR}/GFP - -JAVAVM= ${LOCALBASE}/bin/java -JAR_FILE= gfd.jar - -PLIST_FILES+= \ - bin/${PORTNAME} - -.include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 800000 -BROKEN= fails during build -.endif - -post-extract: -# backup launcher - @${CP} -f ${WRKSRC}/${JAR_FILE} ${WRKDIR} -# prepare custom made extraction - @${MKDIR} ${WRKDIR}/extract.jar - @cd ${WRKDIR}/extract.jar && ${JAR} xf ${WRKSRC}/${JAR_FILE} - @${CP} -f ${FILESDIR}/Launcher.java ${WRKDIR}/extract.jar - -post-patch: - @${SED} -e "s|%%JAR_DIR%%|${JAR_DIR}|; \ - s|%%DATADIR%%|${DATADIR}|; \ - s|%%JAR_FILE%%|${JAR_FILE}|; \ - s|%%JAVA_OS%%|${JAVA_OS}|; \ - s|%%JAVA_VERSION%%|${JAVA_VERSION}|; \ - s|%%JAVAVM%%|${JAVAVM}|; \ - s|%%LN%%|${LN}|; \ - s|%%MKDIR%%|${MKDIR}|; \ - s|%%RM%%|${RM}|" \ - ${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh - -do-build: -# prepare custom made extraction jar - @${RM} -f ${WRKDIR}/extract.jar/Launcher.class - @cd ${WRKDIR}/extract.jar && ${JAVAC} Launcher.java && \ - ${JAR} -uf ${WRKSRC}/${JAR_FILE} Launcher.class && \ - cd ${WRKSRC} && ${JAVA} -jar ${WRKSRC}/${JAR_FILE} && \ - ${CP} -f ${WRKDIR}/${JAR_FILE} ${WRKSRC} - -do-install: - @${MKDIR} ${DATADIR} - @(cd ${WRKSRC}; ${FIND} * -type d -exec ${MKDIR} ${DATADIR}/{} \;) - @(cd ${WRKSRC}; ${FIND} * -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;) - @(cd ${WRKSRC}; ${FIND} -s * -not -type d) \ - | ${SED} -ne 's,^,${DATADIR:S,^${PREFIX}/,,}/,p' >> ${TMPPLIST} - @(cd ${WRKSRC}; ${FIND} -s -d * -type d) \ - | ${SED} -ne 's,^,@dirrm ${DATADIR:S,^${PREFIX}/,,}/,p' >> ${TMPPLIST} - @${ECHO_CMD} '@dirrm ${DATADIR_REL}' >> ${TMPPLIST} - @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/${PORTNAME} - -.include <bsd.port.post.mk> diff --git a/finance/gfp/distinfo b/finance/gfp/distinfo deleted file mode 100644 index 1e2ec57e1247..000000000000 --- a/finance/gfp/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (gfp_0.7.2.zip) = 1b570493ff87d4a792816c244370debbfe775c26471b2a49203fbfbb901398e4 -SIZE (gfp_0.7.2.zip) = 2335756 diff --git a/finance/gfp/files/Launcher.java b/finance/gfp/files/Launcher.java deleted file mode 100644 index 6918cc56cb2a..000000000000 --- a/finance/gfp/files/Launcher.java +++ /dev/null @@ -1,311 +0,0 @@ -import SevenZip.LzmaAlone; -import com.sun.java.util.jar.pack.PackerImpl; -import com.sun.java.util.jar.pack.UnpackerImpl; -import java.io.*; -import java.lang.reflect.Method; -import java.util.Enumeration; -import java.util.Map; -import java.util.jar.JarInputStream; -import java.util.jar.JarOutputStream; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -/* - * Created on 07/04/2003 - * - * Swing Components - visit http://sf.net/projects/gfd - * - * Copyright (C) 2004 Igor Regis da Silva Sim\xf5es - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -public final class Launcher -{ - - public Launcher(boolean flag, String s) - throws IOException - { - unpacker = new UnpackerImpl(); - packer = new PackerImpl(); - System.out.println((new StringBuilder()).append("pack= ").append(flag).append(" file= ").append(s).toString()); - BufferedReader bufferedreader = null; - try - { - bufferedreader = new BufferedReader(new FileReader(new File((new StringBuilder()).append(System.getProperty("user.dir")).append(File.separator).append("setup.dat").toString()))); - } - catch(FileNotFoundException filenotfoundexception) - { - if(s == null) - return; - } - if(flag) - { - if(s == null) - { - for(String s1 = ""; (s1 = bufferedreader.readLine()) != null;) - try - { - String as1[] = s1.split("@"); - compactarArquivo(as1[0], as1[1]); - } - catch(IOException ioexception1) - { - System.out.println("*************************************************"); - System.out.println((new StringBuilder()).append("Falha ao compactar: ").append(s1.substring(2)).toString()); - System.out.println(ioexception1.getMessage()); - System.out.println("*************************************************"); - } - - } else - { - s = s.replace('\\', File.separatorChar).replace('/', File.separatorChar); - System.out.println((new StringBuilder()).append("Vou compactar o arquivo: ").append(s).toString()); - try - { - String as[] = new String[2]; - if(s.indexOf(File.separator) != -1) - { - as[0] = s.substring(s.lastIndexOf(File.separator) - 1, s.length()); - as[1] = s.substring(0, s.lastIndexOf(File.separator) + 1); - } else - { - as[0] = s; - as[1] = ""; - } - if(!as[1].startsWith(File.separator)) - as[1] = (new StringBuilder()).append(File.separator).append(as[1]).toString(); - compactarArquivo(as[0], as[1]); - } - catch(IOException ioexception) - { - System.out.println("*************************************************"); - System.out.println((new StringBuilder()).append("Falha ao compactar: ").append(s).toString()); - System.out.println(ioexception.getMessage()); - System.out.println("*************************************************"); - } - } - } else - { - String s2 = ""; - do - { - String s3; - if((s3 = bufferedreader.readLine()) == null) - break; - try - { - String as2[] = s3.split("@"); - descompactarArquivo(as2[0], as2[1]); - if(as2[0].startsWith("z_")) - explodir(as2[0], as2[1]); - } - catch(IOException ioexception2) - { - System.out.println("*************************************************"); - System.out.println((new StringBuilder()).append("Fail on install file: ").append(s3.substring(2)).toString()); - System.out.println(ioexception2.getMessage()); - System.out.println("*************************************************"); - } - } while(true); - bufferedreader.close(); - (new File((new StringBuilder()).append(System.getProperty("user.dir")).append(File.separator).append("setup.dat").toString())).delete(); - } - if(bufferedreader != null) - bufferedreader.close(); - } - - private void descompactarArquivo(String s, String s1) - throws IOException - { - String s2 = (new StringBuilder()).append(System.getProperty("user.dir")).append(s1).toString(); - try - { - LzmaAlone.main(new String[] { - "d", (new StringBuilder()).append(s2).append(s).toString(), (new StringBuilder()).append(s2).append(s.substring(1)).toString() - }); - } - catch(Exception exception) - { - exception.printStackTrace(); - } - JarOutputStream jaroutputstream = new JarOutputStream(new FileOutputStream(new File((new StringBuilder()).append(s2).append(s.substring(2)).toString()))); - FileInputStream fileinputstream = new FileInputStream((new StringBuilder()).append(s2).append(s.substring(1)).toString()); - unpacker.unpack(fileinputstream, jaroutputstream); - jaroutputstream.flush(); - fileinputstream.close(); - jaroutputstream.close(); - for(File file = new File((new StringBuilder()).append(s2).append(s.substring(1)).toString()); !file.delete() && file.exists(); System.out.println((new StringBuilder()).append("Tentando deletar ").append(s2).append("_").append(s).toString())); - for(File file1 = new File((new StringBuilder()).append(s2).append(s).toString()); !file1.delete() && file1.exists(); System.out.println((new StringBuilder()).append("Tentando deletar ").append(s2).append(s).toString())); - } - - private void compactarArquivo(String s, String s1) - throws IOException - { - String s2 = s1; - if(!(new File(s2)).exists() || s2.equals(File.separator)) - s2 = (new StringBuilder()).append(System.getProperty("user.dir")).append(s1).toString(); - String s3 = s.substring(0, 1).toLowerCase(); - s = s.substring(2); - System.out.println((new StringBuilder()).append("Caminho completo ").append((new StringBuilder()).append(s2).append(s).toString().replace('\\', File.separatorChar).replace('/', File.separatorChar)).toString()); - java.util.SortedMap sortedmap = packer.properties(); - sortedmap.put("pack.deflate.hint", "false"); - sortedmap.put("pack.effort", "9"); - sortedmap.put("pack.keep.file.order", "false"); - sortedmap.put("pack.modification.time", "latest"); - sortedmap.put("pack.segment.limit", "1500000"); - sortedmap.put("pack.unknown.attribute", "strip"); - if(s.toLowerCase().indexOf("gf") != -1 || s.toLowerCase().indexOf("visa") != -1) - { - System.out.println("Pack COM debug info"); - sortedmap.put("pack.code.attribute.LineNumberTable", "pass"); - sortedmap.put("pack.code.attribute.LocalVariableTable", "pass"); - sortedmap.put("pack.class.attribute.SourceFile", "pass"); - } else - { - System.out.println("Pack SEM debug info"); - sortedmap.put("pack.code.attribute.LineNumberTable", "strip"); - sortedmap.put("pack.code.attribute.LocalVariableTable", "strip"); - sortedmap.put("pack.class.attribute.SourceFile", "strip"); - } - System.out.println((new StringBuilder()).append(s2).append(s).toString().replace('\\', File.separatorChar).replace('/', File.separatorChar)); - System.out.println((new StringBuilder()).append(s2).append("_").append(s).toString().replace('\\', File.separatorChar).replace('/', File.separatorChar)); - JarInputStream jarinputstream = new JarInputStream(new FileInputStream((new StringBuilder()).append(s2).append(s).toString().replace('\\', File.separatorChar).replace('/', File.separatorChar))); - FileOutputStream fileoutputstream = new FileOutputStream((new StringBuilder()).append(s2).append("_").append(s).toString().replace('\\', File.separatorChar).replace('/', File.separatorChar)); - packer.pack(jarinputstream, fileoutputstream); - jarinputstream.close(); - fileoutputstream.flush(); - fileoutputstream.close(); - try - { - LzmaAlone.main(new String[] { - "e", "-a9", (new StringBuilder()).append(s2).append("_").append(s).toString().replace('\\', File.separatorChar).replace('/', File.separatorChar), (new StringBuilder()).append(s2).append(s3.startsWith("z") ? "z_" : "__").append(s).toString().replace('\\', File.separatorChar).replace('/', File.separatorChar) - }); - } - catch(Exception exception) - { - exception.printStackTrace(); - System.exit(-1); - } - for(File file = new File((new StringBuilder()).append(s2).append("_").append(s).toString().replace("\\", File.separator).replace("/", File.separator)); !file.delete() && file.exists();) - { - System.out.println((new StringBuilder()).append("Tentando deletar ").append(file.getAbsolutePath()).toString()); - try - { - Thread.sleep(1000L); - } - catch(InterruptedException interruptedexception) - { - interruptedexception.printStackTrace(); - } - } - - for(File file1 = new File((new StringBuilder()).append(s2).append(s).toString().replace("\\", File.separator).replace("/", File.separator)); !file1.delete() && file1.exists();) - { - System.out.println((new StringBuilder()).append("Tentando deletar ").append(file1.getAbsolutePath()).toString()); - try - { - Thread.sleep(1000L); - } - catch(InterruptedException interruptedexception1) - { - interruptedexception1.printStackTrace(); - } - } - - } - - private void explodir(String s, String s1) - throws IOException - { - File file = new File((new StringBuilder()).append(System.getProperty("user.dir")).append(s1).append(s.substring(2)).toString()); - Object obj = null; - ZipFile zipfile = new ZipFile(file); - for(Enumeration enumeration = zipfile.entries(); enumeration.hasMoreElements();) - { - ZipEntry zipentry = (ZipEntry)enumeration.nextElement(); - if(zipentry.getSize() == 0L) - { - (new File((new StringBuilder()).append(System.getProperty("user.dir")).append(s1).append(File.separator).append(zipentry.getName().replace('/', '\\')).toString())).mkdirs(); - } else - { - DataInputStream datainputstream = new DataInputStream(zipfile.getInputStream(zipentry)); - byte abyte0[] = new byte[datainputstream.available()]; - datainputstream.readFully(abyte0); - datainputstream.close(); - File file1 = new File((new StringBuilder()).append(System.getProperty("user.dir")).append(s1).append(File.separator).append(zipentry.getName().replace('/', '\\')).toString()); - if(!file1.getParentFile().exists()) - file1.getParentFile().mkdirs(); - file1.createNewFile(); - FileOutputStream fileoutputstream = new FileOutputStream(file1); - fileoutputstream.write(abyte0); - fileoutputstream.flush(); - fileoutputstream.close(); - } - } - - zipfile.close(); - file.delete(); - } - - public static void main(String args[]) - { - File file = new File((new StringBuilder()).append(System.getProperty("user.dir")).append(File.separator).append("running.lck").toString()); - if(file.exists()) - return; - try - { - file.createNewFile(); - } - catch(IOException ioexception) - { - ioexception.printStackTrace(); - } - file.deleteOnExit(); - if(args == null || args.length == 0) - { - Launcher launcher = null; - try - { - launcher = new Launcher(false, null); - } - catch(IOException ioexception3) - { - ioexception3.printStackTrace(); - } - } else - if(!(new File(args[0])).exists() && !args[0].startsWith("__")) - try - { - new Launcher(true, null); - } - catch(IOException ioexception1) - { - ioexception1.printStackTrace(); - } - else - try - { - new Launcher(true, args[0]); - } - catch(IOException ioexception2) - { - ioexception2.printStackTrace(); - } - } - - private UnpackerImpl unpacker; - private PackerImpl packer; -} diff --git a/finance/gfp/files/wrapper.sh b/finance/gfp/files/wrapper.sh deleted file mode 100644 index b4f84d6de547..000000000000 --- a/finance/gfp/files/wrapper.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -export JAVA_OS -export JAVA_VERSION - -JAVA_OS="%%JAVA_OS%%" -JAVA_VERSION="%%JAVA_VERSION%%" - -APP_DIR=${HOME}/.gfp -DATA_DIR="%%DATADIR%%" -# -APP_FILES_LINK=" - db/ddl.sql - db/hsqldb.jar - gfd.jar - setup.dat - temp/license.txt -" -APP_DIR_LINK=" - ext - helpFiles - lookAndFeel - plugins - resources -" -APP_SUBDIR_MKDIR="db temp" -# -JAVA_CMD="%%JAVAVM%%" -LN_CMD="%%LN%%" -MKDIR_CMD="%%MKDIR%%" -RM_CMD="%%RM%%" -# -JAR_FILE="%%JAR_FILE%%" - -# create application home dir -${MKDIR_CMD} -p ${APP_DIR} - -# create subdirs -for dir in ${APP_SUBDIR_MKDIR} -do - ${MKDIR_CMD} -p ${APP_DIR}/${dir} -done - -# create links -for link in ${APP_FILES_LINK} -do - ${LN_CMD} -sf "${DATA_DIR}/${link}" "${APP_DIR}/${link}" -done -for link in ${APP_DIR_LINK} -do - ${RM_CMD} -f "${APP_DIR}/${link}" - ${LN_CMD} -sf "${DATA_DIR}/${link}" "${APP_DIR}/${link}" -done - -( cd ${APP_DIR} && exec ${JAVA_CMD} -jar ${JAR_FILE} ) diff --git a/finance/gfp/pkg-descr b/finance/gfp/pkg-descr deleted file mode 100644 index 2f53deaf301c..000000000000 --- a/finance/gfp/pkg-descr +++ /dev/null @@ -1,8 +0,0 @@ -[ excerpt from developer's web site ] - -GFP Personal Finance Manager is a software that aids on personal -finances administration offering a variety of reports, charts and -filtering data on screen making it possible to obtain important -information for your financial health. - -WWW: http://gfd.sourceforge.net/ |