emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Location of OpenDocument style files should be configurable


From: Jambunathan K
Subject: Re: [O] Location of OpenDocument style files should be configurable
Date: Sat, 31 Dec 2011 01:23:58 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (windows-nt)

Ulrich

I have pushed a fix so that "make install" will do the right
thing. Package maintainers have to modify just the $(lispdir) and
$(datadir) vars in the Makefile. (Hopefully) They don't have to do
anything special at all. You may also want to read the comments under
DATAFILES to have an idea of what is available for packaging.

You can download a snapshot from the current HEAD:
http://orgmode.org/w/?p=org-mode.git;a=summary

Let know how things go.

Thanks,
Jambunathan K.


Here is a summary of change:

--8<---------------cut here---------------start------------->8---

>From 07f006e4fd9a7b66643cd7b404c8994665ba8300 Mon Sep 17 00:00:00 2001
From: Jambunathan K <address@hidden>
Date: Sat, 31 Dec 2011 01:00:56 +0530
Subject: [PATCH 1/2] Fix packaging of ODT exporter (org-7.8.02) in Gentoo

* org-odt.el (org-odt-lib-dir): Add docstring.
(org-odt-data-dir): New variable.  Use this variable to
control the locations from which the ODT exporter picks the
OpenDocument styles and schema files from.  Set this variable
explicitly only if the in-built heuristics for locating the
above files fails.
(org-odt-styles-dir-list, org-odt-schema-dir-list): New
variables.  Pay specific attention to (eval-when-compile ...)
form through which Makefile's $(datadir) - contained in
`org-odt-data-dir' - gets compiled in as a "hard coded"
constant.
(org-odt-styles-dir, org-export-odt-schema-dir): Add messages
to aid debugging.

* Makefile (etcdir): Remove this.
(stylesdir): Rename to datadir.
(datadir): Was stylesdir.
(STYLESFILES): Rename to DATAFILES.
(DATAFILES): Was STYLESFILES.  Offer a menu of files that is
available.  Package maintainers can use this list and their
own discretion to cherry-pick what they are willing to install
in their distribution.
(CP): Add recursive flag so that directories listed in
DATAFILES can be copied enbloc.
(install-lisp): Use conditional flag BATCH_EXTRA
(BATCH_EXTRA): "Target-specific variable value" that plumbs
the value of $(datadir) in to org-odt.el via
`org-odt-data-dir'.  See ChangeLog entries for
`org-odt-styles-dir-list' and `org-odt-schema-dir-list'.
(BATCH): Add BATCH_EXTRA.
(lisp/org-odt.elc): Force re-generation of this target every
time so that $(datadir) gets plumbed in to org-odt.el through
`org-odt-data-dir'.
(org-odt-data-dir): "FORCE" target.  Also a variable defined
in org-odt.el.
(install-etc): Rename this target to install-data.
(install-data): Was install-etc.
--8<---------------cut here---------------end--------------->8---

Ulrich Mueller <address@hidden> writes:

> Hi,
> In Gentoo we have an issue with the location of the OpenDocument style
> files, reported to us in bug 396269 [1].
>
> When org-mode is installed as a separate Gentoo package, its lisp
> files are installed in /usr/share/emacs/site-lisp/org-mode/.
> According to our policy, non-lisp files would go to
> /usr/share/emacs/etc/org-mode/. We would pass this as the "etcdir"
> parameter to "make install", so the odt style files would be installed
> in stylesdir = /usr/share/emacs/etc/org-mode/styles/. 
>
> Now org-odt.el currently defines org-odt-styles-dir in a defconst,
> and it searches only in ../etc/styles/, ./etc/styles/, and ./etc/org/
> relative to lispdir. Obviously it cannot find the files in the Gentoo
> location.
>
> Now my question, could the defconst be changed to a defvar, so that we
> can specify the location in our site-start file? Or, preferably, could
> the etcdir specified in "make" command be honoured in the lisp code?
>
> Ulrich
>
> [1] <https://bugs.gentoo.org/show_bug.cgi?id=396269>
>
>

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]