aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-06-19 20:45:16 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-06-19 20:45:16 +0300
commit60a09132b62c3cae86f5e832830a4490ba5bf712 (patch)
treea893191d13b0bf294fb81439a27505822e1bac67
parentb65c64a200dac8194dacc90ae2150b683f64cd8a (diff)
downloadsciteco-60a09132b62c3cae86f5e832830a4490ba5bf712.tar.gz
the SciTECO data installation path is now configurable via --with-scitecodatadir
* This is also the base of $SCITECOPATH. * Changing it is useful for packaging where it is not possible to factor out the common files between Curses and Gtk builds into a "sciteco-common" package. As an alternative, you can now create disjunct sciteco-curses and sciteco-gtk packages. * You will most likely want to use this for Gtk builds as in: --with-interface=gtk --program-prefix=g --with-scitecodatadir=/usr/local/share/gsciteco.
-rw-r--r--Makefile.am6
-rw-r--r--bootstrap.am2
-rw-r--r--configure.ac23
-rw-r--r--doc/Makefile.am4
-rw-r--r--doc/grosciteco.tes.1.in4
-rw-r--r--doc/sciteco.1.in4
-rw-r--r--doc/sciteco.7.template2
-rw-r--r--src/interface-gtk/Makefile.am2
8 files changed, 26 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am
index 6cee9d6..3375ce8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,15 +7,15 @@ MAYBE_DLMALLOC = contrib/dlmalloc
endif
SUBDIRS = lib $(MAYBE_DLMALLOC) contrib/rb3ptr src doc tests
-dist_pkgdata_DATA = sample.teco_ini
+dist_scitecodata_DATA = sample.teco_ini
EXTRA_DIST = README TODO
# Only the lower resolution PNG icons are installed as they are
# required by the GTK UI.
# Other uses are left to the distro package manager.
-dist_pkgdata_DATA += ico/sciteco-16.png ico/sciteco-32.png \
- ico/sciteco-48.png
+dist_scitecodata_DATA += ico/sciteco-16.png ico/sciteco-32.png \
+ ico/sciteco-48.png
EXTRA_DIST += ico/sciteco-256.png ico/sciteco.ico
EXTRA_DIST += win32/loaders.cache
diff --git a/bootstrap.am b/bootstrap.am
index 9fbe814..a48df7a 100644
--- a/bootstrap.am
+++ b/bootstrap.am
@@ -32,7 +32,7 @@ SUBST_MACRO = EB$<\e \
<FS@PACKAGE_URL_DEV^Q@\e@PACKAGE_URL_DEV@\e;>J \
<FS@bindir^Q@\e$(bindir)\e;>J \
<FS@libexecdir^Q@\e$(libexecdir)\e;>J \
- <FS@pkgdatadir^Q@\e$(pkgdatadir)\e;>J \
+ <FS@scitecodatadir^Q@\e$(scitecodatadir)\e;>J \
<FS@scitecolibdir^Q@\e$(scitecolibdir)\e;>J \
<FS@TECO_INTEGER^Q@\e@TECO_INTEGER@\e;>J \
<FS@DATE^Q@\e$(shell LC_ALL=C @DATE@ "+%d %b %Y")\e;>J \
diff --git a/configure.ac b/configure.ac
index 18b878d..f672553 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,15 +36,6 @@ AC_SUBST(SCINTILLA_CXXFLAGS)
# Necessary so we can change their default values here
AC_SUBST(AM_CPPFLAGS)
-# SciTECO library macro directory
-scitecolibdir=$datadir/$PACKAGE/lib
-AC_SUBST(scitecolibdir)
-
-# These paths can be changed at install-time and
-# should not be written into config.h:
-AM_CPPFLAGS="$AM_CPPFLAGS -D'SCITECODATADIR=\"\$(pkgdatadir)\"' \
- -D'SCITECOLIBDIR=\"\$(scitecolibdir)\"'"
-
# Auxiliary functions
# expand $1 and print its absolute path
@@ -180,6 +171,20 @@ esac
# Config options
#
+AC_ARG_WITH(scitecodatadir,
+ AS_HELP_STRING([--with-scitecodatadir=PATH],
+ [Installation directory of data [default=DATADIR/sciteco]]),
+ [scitecodatadir=$withval], [scitecodatadir=$datadir/$PACKAGE])
+AC_SUBST(scitecodatadir)
+# SciTECO library macro directory
+scitecolibdir=$scitecodatadir/lib
+AC_SUBST(scitecolibdir)
+
+# These paths can be changed at install-time and
+# should not be written into config.h:
+AM_CPPFLAGS="$AM_CPPFLAGS -D'SCITECODATADIR=\"\$(scitecodatadir)\"' \
+ -D'SCITECOLIBDIR=\"\$(scitecolibdir)\"'"
+
# FIXME: It does not really make sense to have this configurable.
# It would make more sense to allow linking against an externally-provided
# Scintilla (some platforms ship with it).
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 1afe7ee..9e32c19 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -22,10 +22,10 @@ dist_bin_SCRIPTS += grosciteco.tes
# Unfortunately, there is no way to query the built-in
# Groff tmac path.
# Therefore, the "sciteco" macros are installed into
-# SciTECO's pkgdatadir. Users can copy this file, set up
+# SciTECO's scitecodatadir. Users can copy this file, set up
# environment variables like $GROFF_TMAC_PATH or pass
# the directory via `groff -M`.
-dist_pkgdata_DATA = sciteco.tmac
+dist_scitecodata_DATA = sciteco.tmac
# Fix up the hash-bang line of installed SciTECO scripts upon
# installation to refer to the installed sciteco binary.
diff --git a/doc/grosciteco.tes.1.in b/doc/grosciteco.tes.1.in
index 75af1e0..39941db 100644
--- a/doc/grosciteco.tes.1.in
+++ b/doc/grosciteco.tes.1.in
@@ -141,7 +141,7 @@ that are also installed into the system.
.LP
Note that \(lqsciteco.tmac\(rq is not installed into the
standard \fBGNU roff\fP macro search directories, but into
-\*(ST data directory at \(lq@pkgdatadir@\(rq.
+\*(ST data directory at \(lq@scitecodatadir@\(rq.
It must thus be moved or linked manually into one of the
search paths, or the data dir must be added to the search
paths.
@@ -158,7 +158,7 @@ a \*(ST macro package with a man page called
.RS
.SCITECO_TT
.EX
-groff -Z -Tascii -man -M@pkgdatadir@ -msciteco \\
+groff -Z -Tascii -man -M@scitecodatadir@ -msciteco \\
great-macro.tes.7sciteco >great-macro.tes.7sciteco.intermediate
grosciteco.tes great-macro.tes.7sciteco.woman great-macro.tes.7sciteco.woman.tec \\
great-macro.tes.7sciteco.intermediate
diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in
index c24858a..1ebb4de 100644
--- a/doc/sciteco.1.in
+++ b/doc/sciteco.1.in
@@ -345,7 +345,7 @@ program termination or user-programmed behaviour.
.B $SCITECOCONFIG/.teco_ini
Default profile macro.
.TP
-.B @pkgdatadir@/sample.teco_ini
+.B @scitecodatadir@/sample.teco_ini
Sample profile macro configuring commonly used run-time options,
syntax highlighting, session handling
and opening files specified on the command line.
@@ -377,7 +377,7 @@ CSS file that can be used to apply \*(ST color schemes
to the entire UI and to do other style customizations.
.TP
.SCITECO_TOPIC "fallback.css"
-.B @pkgdatadir@/fallback.css
+.B @scitecodatadir@/fallback.css
When using the Gtk UI, this is a fallback stylesheet
in case
.B $SCITECOCONFIG/.teco_css
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template
index 4c06770..2ad16d3 100644
--- a/doc/sciteco.7.template
+++ b/doc/sciteco.7.template
@@ -863,7 +863,7 @@ The CSS file is loaded from
.B $SCITECOCONFIG/.teco_css
if it is existing.
Else, \*(ST loads the fallback CSS at
-.BR @pkgdatadir@/fallback.css ,
+.BR @scitecodatadir@/fallback.css ,
which can also be used as a template when writing \fB.teco_css\fP.
The fallback CSS can also be consulted for additional documentation
on \*(ST's named widgets and special CSS classes.
diff --git a/src/interface-gtk/Makefile.am b/src/interface-gtk/Makefile.am
index d470f85..50e5311 100644
--- a/src/interface-gtk/Makefile.am
+++ b/src/interface-gtk/Makefile.am
@@ -8,4 +8,4 @@ libsciteco_interface_la_SOURCES = interface.c \
gtk-info-popup.c gtk-info-popup.h \
gtk-label.c gtk-label.h
-dist_pkgdata_DATA = fallback.css
+dist_scitecodata_DATA = fallback.css