[MPlayer-dev-eng] Patches to make packagers' lives easier

Dominik Mierzejewski dominik at rangers.eu.org
Sat Jun 22 15:32:11 CEST 2002


The first one makes CONFDIR work correctly at last
and the second adds DESTDIR to ./configure, so that it generates
a relocateable Makefile and then a packager needs only to do
make DESTDIR=$RPM_BUILD_ROOT install
 
-- 
MPlayer RPMs: http://msp-190.man.olsztyn.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
Dominik 'Rathann' Mierzejewski <rathann(at)rangers.eu.org>
-------------- next part --------------
--- MPlayer-20020321/input/input.c.confpath	Thu Mar 21 00:23:48 2002
+++ MPlayer-20020321/input/input.c	Thu Mar 21 00:29:24 2002
@@ -276,7 +276,7 @@
 static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0;
 
 static int use_joystick = 1, use_lirc = 1;
-static char* config_file = "input.conf";
+static char* config_file = CONFDIR"/input.conf";
 
 static int mp_input_print_key_list(config_t* cfg);
 static int mp_input_print_cmd_list(config_t* cfg);
--- MPlayer-20020321/mplayer.c.confpath	Thu Mar 21 00:23:47 2002
+++ MPlayer-20020321/mplayer.c	Thu Mar 21 00:31:28 2002
@@ -398,7 +398,7 @@
 {
 char *conffile;
 int conffile_fd;
-if (m_config_parse_config_file(conf, "/etc/mplayer.conf") < 0)
+if (m_config_parse_config_file(conf, CONFDIR"/mplayer.conf") < 0)
   exit(1);
 if ((conffile = get_path("")) == NULL) {
   mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir);
-------------- next part --------------
--- MPlayer-20020531/configure.r	Fri May 31 20:16:44 2002
+++ MPlayer-20020531/configure	Fri May 31 20:19:00 2002
@@ -3788,10 +3787,11 @@
 
 LANG = C
 TARGET_OS = $system_name
-prefix = $_prefix
-DATADIR = $_datadir
-CONFDIR = $_confdir
-LIBDIR = $_libdir
+DESTDIR =
+prefix = \$(DESTDIR)$_prefix
+DATADIR = \$(DESTDIR)$_datadir
+CONFDIR = \$(DESTDIR)$_confdir
+LIBDIR = \$(DESTDIR)$_libdir
 #AR = ar
 CC = $_cc
 AWK = $_awk


More information about the MPlayer-dev-eng mailing list