Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 489722
Collapse All | Expand All

(-)a/app-office/mdbtools/files/gmdb.bash-completion (+12 lines)
Line 0 Link Here
1
#-*- mode: shell-script;-*-
2
have gmdb2 &&
3
_gmdb2()
4
{
5
	local cur
6
	COMPREPLY=()
7
	cur=${COMP_WORDS[COMP_CWORD]}
8
9
	_filedir '@(mdb|mdw|accdb)'
10
	return 0
11
} &&
12
complete -F _gmdb2 gmdb2
(-)a/app-office/mdbtools/files/gmdb.desktop (+13 lines)
Line 0 Link Here
1
[Desktop Entry]
2
Type=Application
3
Version=1.0
4
Name=MDB Viewer
5
Comment=View and export Microsoft Access databases
6
Keywords=Microsoft;Access;database;SQL;Jet;schema;query;mdb;accdb;
7
Icon=gmdb2
8
TryExec=gmdb2
9
Exec=gmdb2 %f
10
Terminal=false
11
MimeType=application/vnd.ms-access;application/x-msaccess;application/msaccess;application/vnd.msaccess;application/mdb;application/x-mdb;
12
Categories=Office;
13
StartupNotify=true
(-)a/app-office/mdbtools/files/mdbtools.bash-completion (+170 lines)
Line 0 Link Here
1
#-*- mode: shell-script;-*-
2
have mdb-export &&
3
_mdb_export()
4
{
5
	local cur prev
6
	COMPREPLY=()
7
	cur=${COMP_WORDS[COMP_CWORD]}
8
	prev=${COMP_WORDS[COMP_CWORD-1]}
9
10
	if [[ "$prev" == -@(d|R|q|X|D|N) ]] ; then
11
		return 0
12
	elif [[ "$prev" == -I ]] ; then
13
		COMPREPLY=( $( compgen -W 'access sybase oracle postgres mysql' -- $cur ) )
14
	elif [[ "$cur" == -* ]]; then
15
		COMPREPLY=( $( compgen -W '-T -H -d -R -Q -q -X -I -D -N' -- $cur ) )
16
	elif [[ "$prev" == *@(mdb|mdw|accdb) ]] ; then
17
		local dbname
18
		local tablenames
19
		dbname=$prev
20
		__expand_tilde_by_ref dbname
21
		tablenames=$(eval mdb-tables -S -d / "${dbname}" 2>/dev/null)
22
		COMPREPLY=( $( IFS=/ compgen -W "${tablenames}" -- $cur ) )
23
	else
24
		_filedir '@(mdb|mdw|accdb)'
25
	fi
26
	return 0
27
} &&
28
complete -F _mdb_export mdb-export
29
30
have mdb-hexdump &&
31
_mdb_hexdump()
32
{
33
	local cur
34
	COMPREPLY=()
35
	cur=${COMP_WORDS[COMP_CWORD]}
36
37
	if (( COMP_CWORD == 1 )); then
38
		_filedir '@(mdb|mdw|accdb)'
39
	fi
40
	return 0
41
} &&
42
complete -F _mdb_hexdump mdb-hexdump
43
44
have mdb-parsecsv &&
45
_mdb_parsecsv()
46
{
47
	local cur
48
	COMPREPLY=()
49
	cur=${COMP_WORDS[COMP_CWORD]}
50
51
	if (( COMP_CWORD == 1 )); then
52
		_filedir '@(txt|csv)'
53
	fi
54
	return 0
55
} &&
56
complete -F _mdb_parsecsv mdb-parsecsv
57
58
have mdb-prop &&
59
_mdb_prop()
60
{
61
	local cur
62
        
63
	COMPREPLY=()
64
	cur=${COMP_WORDS[COMP_CWORD]}
65
66
	if (( COMP_CWORD == 1 )); then
67
		_filedir '@(mdb|mdw|accdb)'
68
	elif (( COMP_CWORD == 2 )); then
69
		local dbname
70
		local tablenames
71
		dbname=${COMP_WORDS[1]}
72
		__expand_tilde_by_ref dbname
73
		tablenames=$(eval mdb-tables -S -d / "${dbname}" 2>/dev/null)
74
		COMPREPLY=( $( IFS=/ compgen -W "${tablenames}" -- $cur ) )
75
	elif (( COMP_CWORD == 3 )); then
76
		COMPREPLY=( $( compgen -W 'Lv LvProp LvModule LvExtra' -- $cur ) )
77
	fi
78
	return 0
79
} &&
80
complete -F _mdb_prop mdb-prop
81
82
have mdb-schema &&
83
_mdb_schema()
84
{
85
	local cur prev
86
        
87
	COMPREPLY=()
88
	cur=${COMP_WORDS[COMP_CWORD]}
89
	prev=${COMP_WORDS[COMP_CWORD-1]}
90
91
	if [[ "$prev" == -@(T|table|N) ]] ; then
92
		return 0
93
	elif [[ "$cur" == -* ]]; then
94
		COMPREPLY=( $( compgen -W '-T --table -N \
95
		            --drop-table --no-drop-table \
96
		            --not-null --no-not-null \
97
		            --default-values --no-default-values \
98
		            --not-empty --no-not-empty \
99
		            --indexes --no-indexes \
100
		            --relations --no-relations' -- $cur ) )
101
	elif [[ "$prev" == @(*mdb|*mdw|*accdb) ]]; then
102
		COMPREPLY=( $( compgen -W 'access sybase oracle postgres mysql' -- $cur ) )
103
	else
104
		_filedir '@(mdb|mdw|accdb)'
105
	fi
106
	return 0
107
} &&
108
complete -F _mdb_schema mdb-schema
109
110
have mdb-sql &&
111
_mdb_sql()
112
{
113
	local cur prev
114
        
115
	COMPREPLY=()
116
	cur=${COMP_WORDS[COMP_CWORD]}
117
	prev=${COMP_WORDS[COMP_CWORD-1]}
118
119
	if [[ "$prev" == -d ]] ; then
120
		return 0
121
	elif [[ "$prev" == -@(i|o) ]] ; then
122
		_filedir
123
	elif [[ "$cur" == -* ]]; then
124
		COMPREPLY=( $( compgen -W '-H -f -p -d -i -o' -- $cur ) )
125
	else
126
		_filedir '@(mdb|mdw|accdb)'
127
	fi
128
	return 0
129
} &&
130
complete -F _mdb_sql mdb-sql
131
132
have mdb-tables &&
133
_mdb_tables()
134
{
135
	local cur prev
136
        
137
	COMPREPLY=()
138
	cur=${COMP_WORDS[COMP_CWORD]}
139
	prev=${COMP_WORDS[COMP_CWORD-1]}
140
141
	if [[ "$prev" == -d ]]; then
142
		return 0
143
	elif [[ "$prev" == -t ]]; then
144
		COMPREPLY=( $( compgen -W 'form table macro systable report query linkedtable module relationship dbprop any all' -- $cur ) )
145
		return 0
146
	elif [[ "$cur" == -* ]]; then
147
		COMPREPLY=( $( compgen -W '-S -1 -d -t' -- $cur ) )
148
	else
149
		_filedir '@(mdb|mdw|accdb)'
150
	fi
151
	return 0
152
} &&
153
complete -F _mdb_tables mdb-tables
154
155
have mdb-ver &&
156
_mdb_ver()
157
{
158
	local cur
159
        
160
	COMPREPLY=()
161
	cur=${COMP_WORDS[COMP_CWORD]}
162
163
	if [[ "$cur" == -* ]]; then
164
		COMPREPLY=( $( compgen -W '-M' -- $cur ) )
165
	else
166
		_filedir '@(mdb|mdw|accdb)'
167
	fi
168
	return 0
169
} &&
170
complete -F _mdb_ver mdb-ver
(-)a/app-office/mdbtools/mdbtools-0.7.1-r1.ebuild (+55 lines)
Line 0 Link Here
1
# Copyright 1999-2013 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/app-office/mdbtools/mdbtools-0.7.1.ebuild,v 1.1 2013/10/14 13:30:15 pinkbyte Exp $
4
5
EAPI="5"
6
7
AUTOTOOLS_AUTORECONF=1
8
AUTOTOOLS_IN_SOURCE_BUILD=1 # needed for proper man generation
9
inherit autotools-utils bash-completion-r1
10
11
DESCRIPTION="A set of libraries and utilities for reading Microsoft Access database (MDB) files"
12
HOMEPAGE="http://mdbtools.sourceforge.net"
13
SRC_URI="https://github.com/brianb/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15
LICENSE="GPL-2 LGPL-2.1"
16
SLOT="0"
17
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
18
19
IUSE="gnome odbc static-libs"
20
21
RDEPEND="dev-libs/glib:2
22
	sys-libs/ncurses
23
	sys-libs/readline
24
	gnome? (
25
		gnome-base/libglade:2.0
26
		gnome-base/libgnomeui
27
	)
28
	odbc? ( >=dev-db/unixODBC-2.0 )"
29
DEPEND="${RDEPEND}
30
	app-text/txt2man
31
	sys-devel/flex
32
	virtual/pkgconfig
33
	virtual/yacc"
34
35
DOCS=( AUTHORS ChangeLog HACKING NEWS README TODO )
36
37
PATCHES=( "${FILESDIR}/${P}-parallel-make.patch" )
38
39
src_configure() {
40
	local myeconfargs=(
41
		--disable-gtk-doc
42
		$(use_enable gnome gmdb2)
43
		$(use odbc && echo "--with-unixodbc=${EPREFIX}/usr")
44
	)
45
	autotools-utils_src_configure
46
}
47
48
src_install() {
49
	autotools-utils_src_install
50
51
	use gnome && domenu "${FILESDIR}/gmdb.desktop"
52
53
	newbashcomp "${FILESDIR}/${PN}.bash-completion" ${PN}
54
	use gnome && newbashcomp "${FILESDIR}/gmdb.bash-completion" gmdb
55
}

Return to bug 489722