Initial ebuild submission
authorStuart Bouyer <stubear@gentoo.org>
Thu, 7 Nov 2002 16:14:07 +0000 (16:14 +0000)
committerStuart Bouyer <stubear@gentoo.org>
Thu, 7 Nov 2002 16:14:07 +0000 (16:14 +0000)
app-text/stardict/ChangeLog [new file with mode: 0644]
app-text/stardict/files/digest-stardict-1.3 [new file with mode: 0644]
app-text/stardict/files/stardict-config.sh [new file with mode: 0644]
app-text/stardict/files/stardict-gentoo.patch [new file with mode: 0644]
app-text/stardict/stardict-1.3.ebuild [new file with mode: 0644]

diff --git a/app-text/stardict/ChangeLog b/app-text/stardict/ChangeLog
new file mode 100644 (file)
index 0000000..abab238
--- /dev/null
@@ -0,0 +1,12 @@
+# ChangeLog for app-text/stardict
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/ChangeLog,v 1.1 2002/11/07 16:14:07 stubear Exp $
+
+*stardict-1.3 (08 Nov 2002)
+
+  08 Nov 2002; Stuart Bouyer <stubear@gentoo.org> stardict-1.3.ebuild,
+  ChangeLog, files/digest-stardict-1.3, files/stardict-config.sh,
+  files/stardict-gentoo.patch :
+
+  Initial ebuild submitted and created by Lloyd Huang (Huang YU HSIN)
+  <lloyd@coventive.com>.
diff --git a/app-text/stardict/files/digest-stardict-1.3 b/app-text/stardict/files/digest-stardict-1.3
new file mode 100644 (file)
index 0000000..8803ffe
--- /dev/null
@@ -0,0 +1 @@
+MD5 72baeb85da0506aa8ce48db04953a64a stardict-1.3.tar.gz 1430862
diff --git a/app-text/stardict/files/stardict-config.sh b/app-text/stardict/files/stardict-config.sh
new file mode 100644 (file)
index 0000000..51bf8ee
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+Big5 () {
+
+    cat /usr/X11R6/share/stardict/hzfont/fonts.dir | \
+    sed "s/hz16.pcf/hz16ft.pcf/" > /tmp/fonts.dir
+    cp /tmp/fonts.dir /usr/X11R6/share/stardict/hzfont/fonts.dir
+    xset fp rehash
+}
+
+GB () {
+    xset fp rehash
+}
+
+echo 
+echo 
+echo "This is a Chinese / Englist dict for Big5 or GB"
+echo 
+echo
+
+echo -n "Please chose character-set big5 or gb [big5/gb] : "
+read code
+
+case $code in
+    big5 )
+    echo "Seting for big5"
+    Big5
+    ;;
+    
+    gb )
+    echo "Seting for gb"
+    GB
+    ;;
+    
+    *)
+    echo "Seting for big5"
+    Big5
+    ;;
+esac
diff --git a/app-text/stardict/files/stardict-gentoo.patch b/app-text/stardict/files/stardict-gentoo.patch
new file mode 100644 (file)
index 0000000..3a94d96
--- /dev/null
@@ -0,0 +1,21 @@
+diff -p -r zh-stardict-1.3/src/image.h zh-stardict-1.3.fix/src/image.h
+*** zh-stardict-1.3/src/image.h        2000-05-26 09:33:16.000000000 +0800
+--- zh-stardict-1.3.fix/src/image.h    2002-10-12 06:34:04.000000000 +0800
+***************
+*** 17,23 ****
+  #ifndef IMAGE_H
+  #define IMAGE_H
+  
+! #include <stdiostream.h>
+  #include <stdlib.h>
+  #include <memory.h>
+  #include <string.h>
+--- 17,24 ----
+  #ifndef IMAGE_H
+  #define IMAGE_H
+  
+! //#include <stdiostream.h>
+! #include <iostream.h>
+  #include <stdlib.h>
+  #include <memory.h>
+  #include <string.h>
diff --git a/app-text/stardict/stardict-1.3.ebuild b/app-text/stardict/stardict-1.3.ebuild
new file mode 100644 (file)
index 0000000..16f7314
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/stardict-1.3.ebuild,v 1.1 2002/11/07 16:14:07 stubear Exp $
+
+IUSE=""
+DESCRIPTION="stardict - English-Chinese dictionary."
+HOMEPAGE=""    # No known homepage - FIXME
+SRC_URI="ftp://ftp.cn.FreeBSD.org/pub/ported/${P}.tar.gz"
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS="~x86"
+DEPEND="x11-libs/openmotif"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/zh-${P}
+
+src_unpack () {
+       unpack ${A}
+       cd ${S}
+       patch -p1 < ${FILESDIR}/stardict-gentoo.patch || die
+}
+
+src_compile() {
+       ./configure --prefix=/usr
+       make all || die
+}
+
+src_install () {
+       make prefix=${D}/usr install || die
+       insinto /usr/share/stardict
+       doins ${FILESDIR}/stardict-config.sh
+       dodoc doc/faq doc/readme.txt doc/readme_en.txt
+}
+
+pkg_postinst () {
+       einfo
+       einfo ' To set up stardict with the correct'
+       einfo ' font for Big5 or GB run'
+       einfo '     "bash /usr/share/stardict/stardict-config.sh"'
+       einfo
+}