Initial .bep and .patch files for libxdg-basedir

This commit is contained in:
Scott McCreary
2010-09-27 06:05:31 +00:00
parent 3a6ee21556
commit 9e75b9f395
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
DESCRIPTION="Small library to access XDG Base Directories Specification paths"
HOMEPAGE="http://standards.freedesktop.org/basedir-spec/"
SRC_URI="http://n.ethz.ch/student/nevillm/download/libxdg-basedir/libxdg-basedir-1.1.1.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="7c64a28b08c8fdf6c8a95b0d5f1497b0"
BUILD {
cd libxdg-basedir-1.1.1
./configure --prefix=/boot/common
make
}
INSTALL {
cd libxdg-basedir-1.1.1
make install
}
#LICENSE=""
#COPYRIGHT=""

View File

@@ -0,0 +1,31 @@
diff -urN libxdg-basedir-1.1.1/src/basedir.c libxdg-basedir-1.1.1-haiku/src/basedir.c
--- libxdg-basedir-1.1.1/src/basedir.c 2010-07-13 05:48:54.053739520 +0000
+++ libxdg-basedir-1.1.1-haiku/src/basedir.c 2010-09-27 04:14:36.000000000 +0000
@@ -567,9 +567,9 @@
char *relhome;
if (!(relhome = xdgEnvDup(envname)) && errno != ENOMEM)
{
- errno = 0;
const char *home;
unsigned int homelen;
+ errno = 0;
if (!(home = xdgGetEnv("HOME")))
return NULL;
if (!(relhome = (char*)malloc((homelen = strlen(home))+fallbacklength))) return NULL;
diff -urN libxdg-basedir-1.1.1/tests/testquery.c libxdg-basedir-1.1.1-haiku/tests/testquery.c
--- libxdg-basedir-1.1.1/tests/testquery.c 2010-07-13 05:48:54.050331648 +0000
+++ libxdg-basedir-1.1.1-haiku/tests/testquery.c 2010-09-27 04:17:53.000000000 +0000
@@ -49,6 +49,7 @@
{
if (argc < 3)
return 1;
+ {
char *datatype = argv[1];
char *querytype = argv[2];
if (strcmp(datatype, "data") == 0)
@@ -87,4 +88,5 @@
else
return 1;
return 0;
+ }
}