[dia: 14/105] #19: Fix DATADIR erroneously set as pkgdatadir in lib/Makefile.am.



commit 80aa4038101d982b10c537021ced3a9076a58fa5
Author: Eduard Nicodei <eddnicodei gmail com>
Date:   Tue Dec 18 20:13:55 2018 +0000

    #19: Fix DATADIR erroneously set as pkgdatadir in lib/Makefile.am.
    
      - Renamed DATADIR to PKGDATADIR in lib/.

 app/Makefile.am |  5 +----
 lib/Makefile.am |  9 +++------
 lib/dia_dirs.c  |  8 ++++----
 meson.build     | 10 +++++++---
 4 files changed, 15 insertions(+), 17 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 6f208eb2..0107882d 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -11,11 +11,8 @@ AM_CPPFLAGS = \
        $(GTK_MAC_CFLAGS) \
        $(LIBART_CFLAGS) \
        -DPREFIX=\""$(prefix)"\" \
-       -DSYSCONFDIR=\""$(sysconfdir)"\" \
        -DDATADIR=\""$(datadir)"\" \
-       -DLIBDIR=\""$(libdir)"\" \
-       -DLOCALEDIR=\"$(localedir)\" \
-       -DUIDATADIR=\"$(uidatadir)\"
+       -DLOCALEDIR=\"$(localedir)\"
 
 
 
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9e8a2cd9..ecab9b8c 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -85,8 +85,8 @@ libdia_la_SOURCES =  \
                textline.h \
                font.c \
                font.h \
-               group.c \
-               group.h \
+               group.c \
+               group.h \
                utils.c \
                utils.h \
                arrows.c \
@@ -236,15 +236,12 @@ AM_CPPFLAGS = \
        $(LIBART_CFLAGS) \
        -DLIBDIA_COMPILATION \
        -DLIBDIR=\"$(libdir)\" \
-       -DDATADIR=\"$(pkgdatadir)\" \
+       -DPKGDATADIR=\"$(pkgdatadir)\" \
        -DLOCALEDIR=\"$(localedir)\" \
        -DPREFIX=\"$(prefix)\"
 
-sheetdir = $(pkgdatadir)/sheets
-
 AM_CPPFLAGS += -I$(top_srcdir)/intl $(DEBUG_FLAGS) $(GDK_PIXBUF_CFLAGS) \
   $(XML_CFLAGS) $(GTK_CFLAGS) \
-  -DDIA_SHEETDIR=\"$(sheetdir)\" \
   $(PANGOFT2_CFLAGS) $(LIBART_CFLAGS) $(UNICODE_CFLAGS)
 
 libdia_la_extra_sources = diamarshal.list
diff --git a/lib/dia_dirs.c b/lib/dia_dirs.c
index 99e8590c..c721f497 100644
--- a/lib/dia_dirs.c
+++ b/lib/dia_dirs.c
@@ -90,8 +90,8 @@ dia_get_data_directory(const gchar* subdir)
    * Calculate from executable path
    */
   gchar *sLoc = _dia_get_module_directory ();
-#  if defined(PREFIX) && defined(DATADIR)
-  tmpPath = replace_prefix(sLoc, DATADIR);
+#  if defined(PREFIX) && defined(PKGDATADIR)
+  tmpPath = replace_prefix(sLoc, PKGDATADIR);
   if (strlen (subdir) == 0)
     returnPath = g_strdup(tmpPath);
   else
@@ -104,9 +104,9 @@ dia_get_data_directory(const gchar* subdir)
   return returnPath;
 #else
   if (strlen (subdir) == 0)
-    return g_strconcat (DATADIR, NULL);
+    return g_strconcat (PKGDATADIR, NULL);
   else
-    return g_strconcat (DATADIR, G_DIR_SEPARATOR_S, subdir, NULL);
+    return g_strconcat (PKGDATADIR, G_DIR_SEPARATOR_S, subdir, NULL);
 #endif
 }
 
diff --git a/meson.build b/meson.build
index 9bc891de..d1639568 100644
--- a/meson.build
+++ b/meson.build
@@ -31,14 +31,18 @@ gdk_pixbuf_csource = find_program('gdk-pixbuf-csource')
 #AC_PROG_MAKE_SET
 #AC_ISC_POSIX
 
-
 # Specify a header configuration file
 conf = configuration_data()
 
-prefix = get_option('prefix')
+datadir = join_paths(get_option('prefix'),
+                     get_option('datadir'))
+
+pkgdatadir = join_paths(datadir, 'dia')
+
 conf.set_quoted('VERSION', meson.project_version())
 conf.set_quoted('GETTEXT_PACKAGE', 'dia')
-conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
+conf.set_quoted('DATADIR', datadir)
+conf.set_quoted('PKGDATADIR', pkgdatadir)
 conf.set_quoted('LIBDIR',  join_paths(get_option('prefix'), get_option('libdir')))
 conf.set_quoted('LOCALEDIR', get_option('localedir'))
 conf.set('ENABLE_NLS', 1)


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