Browse Source

xap/linphone: Upgraded to linphone-3.5.2.

slackware-14.2
Damien Goutte-Gattat 10 years ago
parent
commit
864b847a04
  1. 107
      xap/linphone/linphone-3.5.0-xdg-basedir.diff
  2. 1
      xap/linphone/linphone-3.5.0.tar.gz.sha1
  3. 3470
      xap/linphone/linphone-3.5.2-xdg-basedir.diff
  4. 1
      xap/linphone/linphone-3.5.2.tar.gz.sha1
  5. 6
      xap/linphone/linphone.SlackBuild

107
xap/linphone/linphone-3.5.0-xdg-basedir.diff

@ -1,107 +0,0 @@
diff --git a/console/linphonec.c b/console/linphonec.c
index e032108..63cc7fa 100644
--- a/console/linphonec.c
+++ b/console/linphonec.c
@@ -666,10 +666,15 @@ linphonec_init(int argc, char **argv)
#ifndef _WIN32
- snprintf(configfile_name, PATH_MAX, "%s/.linphonerc",
- getenv("HOME"));
- snprintf(zrtpsecrets, PATH_MAX, "%s/.linphone-zidcache",
- getenv("HOME"));
+ char config_dir[PATH_MAX];
+ const char *xdg_config_home = getenv("XDG_CONFIG_HOME");
+ if (xdg_config_home==NULL){
+ snprintf(config_dir, PATH_MAX, "%s/.config/linphone", getenv("HOME"));
+ }else{
+ snprintf(config_dir, PATH_MAX, "%s/linphone", xdg_config_home);
+ }
+ snprintf(configfile_name, PATH_MAX, "%s/linphonerc", config_dir);
+ snprintf(zrtpsecrets, PATH_MAX, "%s/linphone-zidcache", config_dir);
#elif defined(_WIN32_WCE)
strncpy(configfile_name,PACKAGE_DIR "\\linphonerc",PATH_MAX);
mylogfile=fopen(PACKAGE_DIR "\\" "linphonec.log","w");
@@ -1051,6 +1056,9 @@ linphonec_idle_call ()
static int
linphonec_initialize_readline()
{
+ char cache_dir[PATH_MAX];
+ char *xdg_cache_home;
+
/*rl_bind_key('\t', rl_insert);*/
/* Allow conditional parsing of ~/.inputrc */
@@ -1061,8 +1069,12 @@ linphonec_initialize_readline()
rl_event_hook=linphonec_idle_call;
/* Set history file and read it */
- histfile_name = ms_strdup_printf ("%s/.linphonec_history",
- getenv("HOME"));
+ if ((xdg_cache_home=getenv("XDG_CACHE_HOME"))){
+ snprintf(cache_dir, PATH_MAX, "%s/linphone", xdg_cache_home);
+ }else{
+ snprintf(cache_dir, PATH_MAX, "%s/.cache/linphone", getenv("HOME"));
+ }
+ histfile_name = ms_strdup_printf ("%s/linphonec_history", cache_dir);
read_history(histfile_name);
/* Initialized last_in_history cache*/
diff --git a/gtk/main.c b/gtk/main.c
index 73e99cc..a52b706 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -124,13 +124,8 @@ static GOptionEntry linphone_options[]={
#define RELATIVE_XML_DIR
#define BUILD_TREE_XML_DIR "gtk"
-#ifndef WIN32
-#define CONFIG_FILE ".linphonerc"
-#define SECRETS_FILE ".linphone-zidcache"
-#else
#define CONFIG_FILE "linphonerc"
#define SECRETS_FILE "linphone-zidcache"
-#endif
char *linphone_gtk_get_config_file(const char *filename){
@@ -149,9 +144,10 @@ char *linphone_gtk_get_config_file(const char *filename){
snprintf(config_file,path_max,"%s\\%s\\%s",appdata,LINPHONE_CONFIG_DIR,filename);
}
#else
- const char *home=getenv("HOME");
- if (home==NULL) home=".";
- snprintf(config_file,path_max,"%s/%s",home,filename);
+ const char *config_dir=g_get_user_config_dir();
+ snprintf(config_file,path_max,"%s/linphone",config_dir);
+ g_mkdir_with_parents(config_file, 0700);
+ snprintf(config_file,path_max,"%s/linphone/%s",config_dir,filename);
#endif
}
return config_file;
diff --git a/oRTP/src/port.c b/oRTP/src/port.c
index 0f94e16..dd6a600 100644
--- a/oRTP/src/port.c
+++ b/oRTP/src/port.c
@@ -371,13 +371,20 @@ char * WSAAPI gai_strerror(int errnum){
#ifndef WIN32
+#include <stdlib.h>
#include <sys/socket.h>
#include <netdb.h>
#include <sys/un.h>
#include <sys/stat.h>
static char *make_pipe_name(const char *name){
- return ortp_strdup_printf("/tmp/%s",name);
+ char *runtime_dir=getenv("XDG_RUNTIME_DIR");
+ if (runtime_dir==NULL){
+ /* XDG Base Directory Specification mandates this warning. */
+ ortp_warning("XDG_RUNTIME_DIR not set, fallback to /tmp");
+ runtime_dir="/tmp";
+ }
+ return ortp_strdup_printf("%s/%s",runtime_dir,name);
}
/* portable named pipes */

1
xap/linphone/linphone-3.5.0.tar.gz.sha1

@ -1 +0,0 @@
63941049fdd822b6da3ec8c5e0c310190cac2106 linphone-3.5.0.tar.gz

3470
xap/linphone/linphone-3.5.2-xdg-basedir.diff

File diff suppressed because it is too large

1
xap/linphone/linphone-3.5.2.tar.gz.sha1

@ -0,0 +1 @@
d0dde9d421b7cf6893c8e5acb969d5bd4a04a231 linphone-3.5.2.tar.gz

6
xap/linphone/linphone.SlackBuild

@ -30,13 +30,13 @@
# Source package infos
NAMESRC=${NAMESRC:-linphone}
VERSION=${VERSION:-3.5.0}
VERSION=${VERSION:-3.5.2}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://download.savannah.gnu.org/releases/linphone/3.5.x/sources/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-linphone}
BUILD=${BUILD:-2GGD}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -88,7 +88,7 @@ echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Support for XDG Base Directory Specification
patch -p 1 < $CWD/linphone-3.5.0-xdg-basedir.diff
patch -p 1 < $CWD/linphone-3.5.2-xdg-basedir.diff
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \

Loading…
Cancel
Save