1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-22 20:41:26 +00:00

liblangtag is an interface library to access/deal with tags for identifying

languages, which is described in RFC 5646.

WWW: http://tagoh.bitbucket.org/liblangtag/
This commit is contained in:
Jung-uk Kim 2013-02-20 07:27:18 +00:00
parent b452328822
commit 22d92b7cd6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=312613
11 changed files with 239 additions and 0 deletions

View File

@ -1011,6 +1011,7 @@
SUBDIR += libk8055
SUBDIR += libkgapi
SUBDIR += libkolab
SUBDIR += liblangtag
SUBDIR += liblas
SUBDIR += liblcfg
SUBDIR += libleaftag

24
devel/liblangtag/Makefile Normal file
View File

@ -0,0 +1,24 @@
# $FreeBSD$
PORTNAME= liblangtag
PORTVERSION= 0.4.0
CATEGORIES= devel textproc
MASTER_SITES= https://cdn.bitbucket.org/tagoh/liblangtag/downloads/
MAINTAINER= office@FreeBSD.org
COMMENT= An interface library to access tags for identifying languages
LICENSE= LGPL3 MPL
LICENSE_COMB= dual
LIB_DEPENDS= xml2:${PORTSDIR}/textproc/libxml2
GNU_CONFIGURE= yes
USE_AUTOTOOLS= libtool
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gnomehack
USE_LDCONFIG= yes
USE_PKGCONFIG= build
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (liblangtag-0.4.0.tar.bz2) = cbb71d5d1af345c3bd9ceebbc78ddfbe70e3747c3cf95532a4fdef2abb034bae
SIZE (liblangtag-0.4.0.tar.bz2) = 613182

View File

@ -0,0 +1,13 @@
--- data/reg2xml.c 2012-11-06 09:15:59.000000000 -0600
+++ data/reg2xml.c 2012-11-06 09:33:59.000000000 -0600
@@ -111,7 +111,9 @@
fsetpos(fp, &pos);
}
token = strstr(buffer, ": ");
- tag = strndup(buffer, token - buffer);
+ tag = malloc((token-buffer) + 1);
+ strncpy(tag, buffer, token-buffer);
+ tag[token-buffer] = 0;
token += 2;
xmlNewChild(ent, NULL,
(const xmlChar *)lt_strlower(tag),

View File

@ -0,0 +1,11 @@
--- liblangtag/lt-atomic.h 2012-11-06 09:15:59.000000000 -0600
+++ liblangtag/lt-atomic.h 2012-11-06 09:24:15.000000000 -0600
@@ -93,7 +93,7 @@
{
lt_bool_t retval;
- lt_return_if_fail (v != NULL, FALSE);
+ lt_return_val_if_fail (v != NULL, FALSE);
pthread_mutex_lock(&__lt_atomic_lock);
retval = --(*v) == 0;

View File

@ -0,0 +1,35 @@
--- liblangtag/lt-error.c 2012-11-06 09:15:59.000000000 -0600
+++ liblangtag/lt-error.c 2012-11-06 09:18:23.000000000 -0600
@@ -14,7 +14,6 @@
#include "config.h"
#endif
-#include <execinfo.h>
#include <stdlib.h>
#include "lt-list.h"
#include "lt-mem.h"
@@ -98,9 +97,7 @@
...)
{
va_list ap;
- void *traces[1024];
lt_error_data_t *d = lt_mem_alloc_object(sizeof (lt_error_data_t));
- int size;
lt_bool_t allocated;
lt_return_val_if_fail (error != NULL, NULL);
@@ -117,13 +114,9 @@
d->message = lt_strdup_vprintf(message, ap);
va_end(ap);
- size = backtrace(traces, 1024);
- if (size > 0)
- d->traces = backtrace_symbols(traces, size);
- d->stack_size = size;
+ d->stack_size = 0;
lt_mem_add_ref(&d->parent, d->message, free);
- lt_mem_add_ref(&d->parent, d->traces, free);
allocated = (*error)->data == NULL;
(*error)->data = lt_list_append((*error)->data, d, (lt_destroy_func_t)lt_mem_unref);

View File

@ -0,0 +1,12 @@
--- liblangtag/lt-ext-module.c 2012-11-06 09:15:59.000000000 -0600
+++ liblangtag/lt-ext-module.c 2012-11-06 09:30:31.000000000 -0600
@@ -399,7 +399,8 @@
if (len > suffix_len &&
lt_strcmp0(&filename[prefix_len + len - suffix_len], "." LT_MODULE_SUFFIX) == 0) {
- module = strndup(&filename[prefix_len], len - suffix_len);
+ module = malloc((len-suffix_len) + 1);
+ strncpy(module, &filename[prefix_len], len-suffix_len);
module[len - suffix_len] = 0;
}
}

View File

@ -0,0 +1,38 @@
--- liblangtag/lt-messages.c 2012-11-06 09:15:59.000000000 -0600
+++ liblangtag/lt-messages.c 2012-11-06 09:20:58.000000000 -0600
@@ -17,7 +17,6 @@
#include "config.h"
#endif
-#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -98,27 +97,6 @@
static void
_lt_message_stacktrace(void)
{
- void *traces[1024];
- char **strings;
- int size, i;
-
- size = backtrace(traces, 1024);
- if (size > 0) {
- strings = backtrace_symbols(traces, size);
- lt_debug(LT_MSGCAT_TRACE, "Stacktrace:");
- /*
- * XXX:
- * 0.. here.
- * 1.. _lt_message_default_handler
- * 2.. lt_message_vprintf
- * 3.. lt_message_printf
- * 4.. lt_* macros
- */
- for (i = 4; i < size; i++) {
- lt_debug(LT_MSGCAT_TRACE, " %d. %s", i - 3, strings[i]);
- }
- free(strings);
- }
}
static void

View File

@ -0,0 +1,10 @@
--- liblangtag/lt-utils.c 2012-11-06 09:15:59.000000000 -0600
+++ liblangtag/lt-utils.c 2012-11-06 09:23:36.000000000 -0600
@@ -14,6 +14,7 @@
#include "config.h"
#endif
+#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>

View File

@ -0,0 +1,4 @@
liblangtag is an interface library to access/deal with tags for identifying
languages, which is described in RFC 5646.
WWW: http://tagoh.bitbucket.org/liblangtag/

View File

@ -0,0 +1,89 @@
include/liblangtag/langtag.h
include/liblangtag/lt-database.h
include/liblangtag/lt-error.h
include/liblangtag/lt-ext-module-data.h
include/liblangtag/lt-ext-module.h
include/liblangtag/lt-extension.h
include/liblangtag/lt-extlang-db.h
include/liblangtag/lt-extlang.h
include/liblangtag/lt-grandfathered-db.h
include/liblangtag/lt-grandfathered.h
include/liblangtag/lt-lang-db.h
include/liblangtag/lt-lang.h
include/liblangtag/lt-list.h
include/liblangtag/lt-macros.h
include/liblangtag/lt-redundant-db.h
include/liblangtag/lt-redundant.h
include/liblangtag/lt-region-db.h
include/liblangtag/lt-region.h
include/liblangtag/lt-script-db.h
include/liblangtag/lt-script.h
include/liblangtag/lt-string.h
include/liblangtag/lt-tag.h
include/liblangtag/lt-variant-db.h
include/liblangtag/lt-variant.h
lib/liblangtag.a
lib/liblangtag.la
lib/liblangtag.so
lib/liblangtag.so.1
libdata/pkgconfig/liblangtag.pc
%%DATADIR%%/language-subtag-registry.xml
%%DATADIR%%/common/bcp47/calendar.xml
%%DATADIR%%/common/bcp47/collation.xml
%%DATADIR%%/common/bcp47/currency.xml
%%DATADIR%%/common/bcp47/number.xml
%%DATADIR%%/common/bcp47/timezone.xml
%%DATADIR%%/common/bcp47/transform.xml
%%DATADIR%%/common/bcp47/transform_ime.xml
%%DATADIR%%/common/bcp47/transform_keyboard.xml
%%DATADIR%%/common/bcp47/transform_mt.xml
%%DATADIR%%/common/bcp47/transform_private_use.xml
%%DATADIR%%/common/bcp47/variant.xml
%%DATADIR%%/common/supplemental/likelySubtags.xml
share/gtk-doc/html/liblangtag/Container.html
share/gtk-doc/html/liblangtag/Module.html
share/gtk-doc/html/liblangtag/Utilities.html
share/gtk-doc/html/liblangtag/annotation-glossary.html
share/gtk-doc/html/liblangtag/api-index-full.html
share/gtk-doc/html/liblangtag/ch01.html
share/gtk-doc/html/liblangtag/deprecated-api-index.html
share/gtk-doc/html/liblangtag/home.png
share/gtk-doc/html/liblangtag/index.html
share/gtk-doc/html/liblangtag/index.sgml
share/gtk-doc/html/liblangtag/left.png
share/gtk-doc/html/liblangtag/liblangtag-Container---Extension.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Extlang.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Grandfathered.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Language.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Redundant.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Region.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Script.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Tag.html
share/gtk-doc/html/liblangtag/liblangtag-Container---Variant.html
share/gtk-doc/html/liblangtag/liblangtag-Database---Extlang.html
share/gtk-doc/html/liblangtag/liblangtag-Database---Grandfathered.html
share/gtk-doc/html/liblangtag/liblangtag-Database---Language.html
share/gtk-doc/html/liblangtag/liblangtag-Database---Redundant.html
share/gtk-doc/html/liblangtag/liblangtag-Database---Region.html
share/gtk-doc/html/liblangtag/liblangtag-Database---Script.html
share/gtk-doc/html/liblangtag/liblangtag-Database---Variant.html
share/gtk-doc/html/liblangtag/liblangtag-Database.html
share/gtk-doc/html/liblangtag/liblangtag-Doubly-Linked-Lists.html
share/gtk-doc/html/liblangtag/liblangtag-Error.html
share/gtk-doc/html/liblangtag/liblangtag-Miscellaneous-Macros.html
share/gtk-doc/html/liblangtag/liblangtag-Module---Accessor.html
share/gtk-doc/html/liblangtag/liblangtag-Module---Data.html
share/gtk-doc/html/liblangtag/liblangtag-Strings.html
share/gtk-doc/html/liblangtag/liblangtag.devhelp2
share/gtk-doc/html/liblangtag/object-tree.html
share/gtk-doc/html/liblangtag/right.png
share/gtk-doc/html/liblangtag/style.css
share/gtk-doc/html/liblangtag/up.png
@dirrm share/gtk-doc/html/liblangtag
@dirrmtry share/gtk-doc/html
@dirrmtry share/gtk-doc
@dirrm %%DATADIR%%/common/supplemental
@dirrm %%DATADIR%%/common/bcp47
@dirrm %%DATADIR%%/common
@dirrm %%DATADIR%%
@dirrm include/liblangtag