Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101096 - Ebuild for Ledger - a command-line accounting tool
Summary: Ebuild for Ledger - a command-line accounting tool
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Default Assignee for New Packages
URL: http://www.newartisans.com/software.html
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-02 07:42 UTC by Gunnar Wrobel (RETIRED)
Modified: 2006-11-18 09:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild for ledger-2.3 (ledger-2.3.ebuild,2.19 KB, text/plain)
2005-08-02 07:43 UTC, Gunnar Wrobel (RETIRED)
Details
Patch to correct the dependancies on expat (gentoo-expat.patch,3.13 KB, text/plain)
2005-08-02 07:43 UTC, Gunnar Wrobel (RETIRED)
Details
Site lisp file if you want to use emacs with this (50ledger-mode-gentoo.el,140 bytes, text/plain)
2005-08-02 07:44 UTC, Gunnar Wrobel (RETIRED)
Details
Special Licence from NewArtisans (LICENSE,1.46 KB, text/plain)
2005-08-02 07:45 UTC, Gunnar Wrobel (RETIRED)
Details
Ebuild for ledger-2.3 (ledger-2.3.ebuild,2.23 KB, text/plain)
2005-08-03 12:25 UTC, Gunnar Wrobel (RETIRED)
Details
Ebuild for ledger-2.4 (ledger-2.4.ebuild,2.23 KB, text/plain)
2005-10-25 10:43 UTC, Gunnar Wrobel (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wrobel (RETIRED) gentoo-dev 2005-08-02 07:42:53 UTC
From the website:

Ledger is an command-line accounting tool that provides double-entry accounting
with a minimum of frills, and yet with a maximum of expressiveness and flexibility.

Additional comments:

This tool provides an emacs major mode and python bindings. Python as well as
gnuplot can be used to provide graphics.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Gunnar Wrobel (RETIRED) gentoo-dev 2005-08-02 07:43:31 UTC
Created attachment 64935 [details]
Ebuild for ledger-2.3
Comment 2 Gunnar Wrobel (RETIRED) gentoo-dev 2005-08-02 07:43:58 UTC
Created attachment 64936 [details]
Patch to correct the dependancies on expat
Comment 3 Gunnar Wrobel (RETIRED) gentoo-dev 2005-08-02 07:44:21 UTC
Created attachment 64937 [details]
Site lisp file if you want to use emacs with this
Comment 4 Gunnar Wrobel (RETIRED) gentoo-dev 2005-08-02 07:45:11 UTC
Created attachment 64938 [details]
Special Licence from NewArtisans
Comment 5 Gunnar Wrobel (RETIRED) gentoo-dev 2005-08-02 07:46:32 UTC
You can also import gnucash (or any ofx compliant files for that matter) into
the tool.
Comment 6 Gunnar Wrobel (RETIRED) gentoo-dev 2005-08-03 12:25:17 UTC
Created attachment 65008 [details]
Ebuild for ledger-2.3

Realised that python support was not recognized by configure. Fixed by adding
the python include directory. In addition timeclock scripts are now installed
independant of the emacs use flag.
Comment 7 Gunnar Wrobel (RETIRED) gentoo-dev 2005-10-25 10:43:05 UTC
Created attachment 71435 [details]
Ebuild for ledger-2.4

Version bump. Python support is still problematic though.
Comment 8 Sebastian Spaeth 2006-11-14 05:52:02 UTC
2.5 is out. The 'problematic python pieces' can be removed from the ebuild, as the Changelog says: 
"2006-02-15 13:10 Summary: Python integration support has been removed 
Due to that fact that it was under-documented, poorly supported, and effectively used by no one (myself included), I have completely removed Python integration support from Ledger. Emphasis will now be placed on using the "xml" and "csv" reports for manipulating Ledger's output data, rather than embedded scripting."

I'll attach a diff for the 2.4 ebuild which removes the python support, but splits the ofx in seperate ofx and xml USE flags. (it also removes some of the previously commented out lines, skip that if you still want these).
Comment 9 Sebastian Spaeth 2006-11-14 05:57:17 UTC
2.5 is out. The 'problematic python pieces' can be removed from the ebuild, as the Changelog says: 
"2006-02-15 13:10 Summary: Python integration support has been removed 
Due to that fact that it was under-documented, poorly supported, and effectively used by no one (myself included), I have completely removed Python integration support from Ledger. Emphasis will now be placed on using the "xml" and "csv" reports for manipulating Ledger's output data, rather than embedded scripting."

I'll attach a diff from the 2.4 to the 2.5 ebuild which removes the python support. I additionally splits the ofx in seperate ofx and xml USE flags. (it also removes some of the previously commented out lines, skip that if you still want these).
Comment 10 Sebastian Spaeth 2006-11-14 06:02:12 UTC
Note, that this patch does not install two python scripts anymore which 2.4 installed. I did not find them particularly interesting, but some might still want them...

--- ledger-2.4.ebuild   2006-11-14 13:26:44.000000000 +0000
+++ ledger-2.5.ebuild   2006-11-14 13:32:59.000000000 +0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-inherit eutils distutils elisp
+inherit eutils elisp
 
 DESCRIPTION="Ledger is an command-line accounting tool that provides double-entry accounting with a minimum of frills, and yet with a maximum of expressiveness and flexibility."
 HOMEPAGE="http://www.newartisans.com/software.html"
@@ -10,18 +10,16 @@
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 
 LICENSE="NewArtisans"
 KEYWORDS="~x86"
 SLOT="0"
-IUSE="emacs debug gnuplot ofx python "
+IUSE="emacs debug gnuplot ofx xml"
 
 DEPEND="         dev-libs/gmp
                  dev-libs/libpcre
         ofx?    (>=dev-libs/libofx-0.7
-                 dev-libs/expat
-                 )
-        python? (dev-lang/python
-                 dev-libs/boost
                  )
+       xml?    (dev-libs/expat
+                )
         emacs?  (app-editors/emacs
                  )
         gnuplot?(media-gfx/gnuplot
@@ -29,43 +27,20 @@
 
 SITEFILE=50ledger-mode-gentoo.el
 
-#src_unpack() {
-
-#      unpack ${A} && cd ${S}
-
-#      if use ofx; then
-               ## Make configure recognize expat as xml parser
-               #epatch ${FILESDIR}/gentoo-expat.patch
-
-               ## Somehow missing from source package
-#              touch AUTHORS COPYING
-
-#              autoconf || die "Autoconf failed to rebuild configure!"
-#      fi
-#}
-
 src_compile() {
 
-       local myconf
-       use ofx    && myconf="${myconf} --enable-xml"
-       use ofx    && myconf="${myconf} --enable-ofx"
-       use python && myconf="${myconf} --enable-python"
-       use debug  && myconf="${myconf} --enable-debug"
-
-       distutils_python_version
-       CPPFLAGS="-I /usr/include/python${PYVER}" econf ${myconf} || die "Configure failed!"
-
+       econf \
+         $(use_enable xml) \
+         $(use_enable ofx) \
+         $(use_enable debug) \
+         || die "Configure failed!"
        emake || die "Make failed!"
-
        use emacs  && elisp_src_compile
-
-       use python && distutils_src_compile
 }
-        
 
 src_install() {
 
-       dodoc sample.dat README ledger.pdf
+       dodoc sample.dat README NEWS ledger.pdf
 
        mv scripts/bal ledger-bal
        mv scripts/bal-huquq ledger-bal-huquq
@@ -86,13 +61,5 @@
                mv scripts/report ledger-report
                dobin ledger-report
        fi
-
-       if use python; then
-               distutils_src_install
-               mv scripts/trend ledger-trend
-               dobin ledger-trend
-               dobin timeclock
-               dobin scripts/to scripts/ti scripts/tc
-       fi
 }
Comment 11 Gunnar Wrobel (RETIRED) gentoo-dev 2006-11-18 02:54:20 UTC
Hi Sebastian,

thanks for the updated ebuild! Was about time that I add this to the tree. In portage now.