libxmp / xmp-cli

Command-line mod player using libxmp
GNU General Public License v2.0
75 stars 22 forks source link

xmp.conf path patch from redhat #27

Closed sezero closed 3 years ago

sezero commented 3 years ago

https://src.fedoraproject.org/rpms/xmp/blob/rawhide/f/xmp-path-to-xmp-conf.patch original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1365321

Should we apply? (Patch that applies to current git inlined below)


diff --git a/src/Makefile.am b/src/Makefile.am
index 15500d9..a150788 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
 # -*- Makefile -*-

-AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" ${LIBXMP_CFLAGS} \
+AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}/${PACKAGE_NAME}\" ${LIBXMP_CFLAGS} \
               ${alsa_CFLAGS} ${pulseaudio_CFLAGS}
 AM_CFLAGS   = -Wall
sezero commented 3 years ago

Yes, we should apply this: See https://github.com/libxmp/xmp-cli/blob/master/src/Makefile.am#L89 where /${PACKAGE_NAME} is appended to ${sysconfdir}

sezero commented 3 years ago

And we probably should do the following too, just in case:

diff --git a/src/read_config.c b/src/read_config.c
index 6e38c76..83c16be 100644
--- a/src/read_config.c
+++ b/src/read_config.c
@@ -17,6 +17,10 @@
 #include <sys/unistd.h>
 #endif

+#if !defined(SYSCONFDIR)
+#define SYSCONFDIR "."
+#endif
+
 static char driver[32];
 static char instrument_path[256];