From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Location of OpenDocument style files should be configurable Date: Sat, 31 Dec 2011 01:23:58 +0530 Message-ID: <81k45du97t.fsf@gmail.com> References: <20220.19946.360761.625682@a1i15.kph.uni-mainz.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgiWq-0002UM-E9 for emacs-orgmode@gnu.org; Fri, 30 Dec 2011 14:54:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgiWp-0003zS-5e for emacs-orgmode@gnu.org; Fri, 30 Dec 2011 14:54:12 -0500 Received: from mail-tul01m020-f169.google.com ([209.85.214.169]:51206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgiWp-0003zN-1Z for emacs-orgmode@gnu.org; Fri, 30 Dec 2011 14:54:11 -0500 Received: by obcwo8 with SMTP id wo8so12769130obc.0 for ; Fri, 30 Dec 2011 11:54:10 -0800 (PST) In-Reply-To: <20220.19946.360761.625682@a1i15.kph.uni-mainz.de> (Ulrich Mueller's message of "Thu, 29 Dec 2011 12:24:26 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ulrich Mueller Cc: emacs-orgmode@gnu.org 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 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 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] > > --