275 lines
9 KiB
Diff
275 lines
9 KiB
Diff
|
diff --no-dereference -Naur -- libfontconfig.normalized/fc-blanks/Makefile.in libfontconfig.srctix/fc-blanks/Makefile.in
|
||
|
--- libfontconfig.normalized/fc-blanks/Makefile.in 2017-09-21 10:08:10.000000000 +0200
|
||
|
+++ libfontconfig.srctix/fc-blanks/Makefile.in 2017-09-21 10:08:10.000000000 +0200
|
||
|
@@ -350,7 +350,8 @@
|
||
|
$(TMPL) \
|
||
|
$(NULL)
|
||
|
|
||
|
-DISTCLEANFILES = $(BLANKS_H)
|
||
|
+# PATCH: fc-blanks.py doesn't work on Sortix (python2 urllib issues).
|
||
|
+DISTCLEANFILES =
|
||
|
all: all-am
|
||
|
|
||
|
.SUFFIXES:
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/fontconfig.pc.in libfontconfig.srctix/fontconfig.pc.in
|
||
|
--- libfontconfig.normalized/fontconfig.pc.in 2016-12-02 04:22:19.000000000 +0100
|
||
|
+++ libfontconfig.srctix/fontconfig.pc.in 2016-12-02 04:22:19.000000000 +0100
|
||
|
@@ -14,5 +14,6 @@
|
||
|
Requires: @PKGCONFIG_REQUIRES@
|
||
|
Requires.private: @PKGCONFIG_REQUIRES_PRIVATELY@
|
||
|
Libs: -L${libdir} -lfontconfig
|
||
|
-Libs.private: @EXPAT_LIBS@ @FREETYPE_LIBS@ @ICONV_LIBS@ @LIBXML2_LIBS@
|
||
|
-Cflags: -I${includedir} @EXPAT_CFLAGS@ @FREETYPE_CFLAGS@ @ICONV_CFLAGS@ @LIBXML2_CFLAGS@
|
||
|
+Libs.private: @ICONV_LIBS@
|
||
|
+# PATCH: These were provided by the above Requires and were not cross safe.
|
||
|
+Cflags: -I${includedir} @ICONV_CFLAGS@
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/Makefile.in libfontconfig.srctix/Makefile.in
|
||
|
--- libfontconfig.normalized/Makefile.in 2017-09-21 10:08:10.000000000 +0200
|
||
|
+++ libfontconfig.srctix/Makefile.in 2017-09-21 10:08:10.000000000 +0200
|
||
|
@@ -434,7 +434,8 @@
|
||
|
top_build_prefix = @top_build_prefix@
|
||
|
top_builddir = @top_builddir@
|
||
|
top_srcdir = @top_srcdir@
|
||
|
-SUBDIRS = fontconfig fc-blanks fc-case fc-lang fc-glyphname src \
|
||
|
+# PATCH: fc-blanks is a python script that doesn't run on Sortix right now.
|
||
|
+SUBDIRS = fontconfig fc-case fc-lang fc-glyphname src \
|
||
|
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
|
||
|
fc-validate conf.d test $(am__append_1)
|
||
|
ACLOCAL_AMFLAGS = -I m4
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/src/fccache.c libfontconfig.srctix/src/fccache.c
|
||
|
--- libfontconfig.normalized/src/fccache.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
+++ libfontconfig.srctix/src/fccache.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
@@ -38,6 +38,9 @@
|
||
|
#if defined(_WIN32)
|
||
|
#include <sys/locking.h>
|
||
|
#endif
|
||
|
+#if defined(__has_include) && __has_include(<sys/file.h>)
|
||
|
+#include <sys/file.h>
|
||
|
+#endif
|
||
|
|
||
|
#ifndef O_BINARY
|
||
|
#define O_BINARY 0
|
||
|
@@ -1266,7 +1269,11 @@
|
||
|
#if defined(_WIN32)
|
||
|
if (_locking (fd, _LK_LOCK, 1) == -1)
|
||
|
goto bail;
|
||
|
-#else
|
||
|
+/* PATCH: Sortix refuses to implement crap file locking. */
|
||
|
+#elif defined(LOCK_EX)
|
||
|
+ if (flock(fd, LOCK_EX) == -1)
|
||
|
+ goto bail;
|
||
|
+#elif !defined(__sortix__)
|
||
|
struct flock fl;
|
||
|
|
||
|
fl.l_type = F_WRLCK;
|
||
|
@@ -1276,17 +1283,21 @@
|
||
|
fl.l_pid = getpid ();
|
||
|
if (fcntl (fd, F_SETLKW, &fl) == -1)
|
||
|
goto bail;
|
||
|
+#else
|
||
|
+#define FcDirCacheLock_NOBAIL
|
||
|
#endif
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
FcStrListDone (list);
|
||
|
return fd;
|
||
|
+#ifndef FcDirCacheLock_NOBAIL
|
||
|
bail:
|
||
|
FcStrListDone (list);
|
||
|
if (fd != -1)
|
||
|
close (fd);
|
||
|
return -1;
|
||
|
+#endif
|
||
|
}
|
||
|
|
||
|
void
|
||
|
@@ -1296,7 +1307,10 @@
|
||
|
{
|
||
|
#if defined(_WIN32)
|
||
|
_locking (fd, _LK_UNLCK, 1);
|
||
|
-#else
|
||
|
+/* PATCH: Sortix refuses to implement crap file locking. */
|
||
|
+#elif defined(LOCK_EX)
|
||
|
+ flock(fd, LOCK_UN);
|
||
|
+#elif !defined(__sortix__)
|
||
|
struct flock fl;
|
||
|
|
||
|
fl.l_type = F_UNLCK;
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/src/fccompat.c libfontconfig.srctix/src/fccompat.c
|
||
|
--- libfontconfig.normalized/src/fccompat.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
+++ libfontconfig.srctix/src/fccompat.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
@@ -164,69 +164,8 @@
|
||
|
int32_t
|
||
|
FcRandom(void)
|
||
|
{
|
||
|
- int32_t result;
|
||
|
-
|
||
|
-#if HAVE_RANDOM_R
|
||
|
- static struct random_data fcrandbuf;
|
||
|
- static char statebuf[256];
|
||
|
- static FcBool initialized = FcFalse;
|
||
|
-#ifdef _AIX
|
||
|
- static char *retval;
|
||
|
- long res;
|
||
|
-#endif
|
||
|
-
|
||
|
- if (initialized != FcTrue)
|
||
|
- {
|
||
|
-#ifdef _AIX
|
||
|
- initstate_r (time (NULL), statebuf, 256, &retval, &fcrandbuf);
|
||
|
-#else
|
||
|
- initstate_r (time (NULL), statebuf, 256, &fcrandbuf);
|
||
|
-#endif
|
||
|
- initialized = FcTrue;
|
||
|
- }
|
||
|
-
|
||
|
-#ifdef _AIX
|
||
|
- random_r (&res, &fcrandbuf);
|
||
|
- result = (int32_t)res;
|
||
|
-#else
|
||
|
- random_r (&fcrandbuf, &result);
|
||
|
-#endif
|
||
|
-#elif HAVE_RANDOM
|
||
|
- static char statebuf[256];
|
||
|
- char *state;
|
||
|
- static FcBool initialized = FcFalse;
|
||
|
-
|
||
|
- if (initialized != FcTrue)
|
||
|
- {
|
||
|
- state = initstate (time (NULL), statebuf, 256);
|
||
|
- initialized = FcTrue;
|
||
|
- }
|
||
|
- else
|
||
|
- state = setstate (statebuf);
|
||
|
-
|
||
|
- result = random ();
|
||
|
-
|
||
|
- setstate (state);
|
||
|
-#elif HAVE_LRAND48
|
||
|
- result = lrand48 ();
|
||
|
-#elif HAVE_RAND_R
|
||
|
- static unsigned int seed = time (NULL);
|
||
|
-
|
||
|
- result = rand_r (&seed);
|
||
|
-#elif HAVE_RAND
|
||
|
- static FcBool initialized = FcFalse;
|
||
|
-
|
||
|
- if (initialized != FcTrue)
|
||
|
- {
|
||
|
- srand (time (NULL));
|
||
|
- initialized = FcTrue;
|
||
|
- }
|
||
|
- result = rand ();
|
||
|
-#else
|
||
|
-# error no random number generator function available.
|
||
|
-#endif
|
||
|
-
|
||
|
- return result;
|
||
|
+ /* PATCH: Use good random. */
|
||
|
+ return arc4random_uniform (INT32_MAX);
|
||
|
}
|
||
|
|
||
|
#ifdef _WIN32
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/src/fcname.c libfontconfig.srctix/src/fcname.c
|
||
|
--- libfontconfig.normalized/src/fcname.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
+++ libfontconfig.srctix/src/fcname.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
@@ -506,17 +506,17 @@
|
||
|
case FcTypeVoid:
|
||
|
return FcTrue;
|
||
|
case FcTypeInteger:
|
||
|
- sprintf ((char *) temp, "%d", v.u.i);
|
||
|
+ snprintf ((char *) temp, sizeof (temp), "%d", v.u.i);
|
||
|
return FcNameUnparseString (buf, temp, 0);
|
||
|
case FcTypeDouble:
|
||
|
- sprintf ((char *) temp, "%g", v.u.d);
|
||
|
+ snprintf ((char *) temp, sizeof (temp), "%g", v.u.d);
|
||
|
return FcNameUnparseString (buf, temp, 0);
|
||
|
case FcTypeString:
|
||
|
return FcNameUnparseString (buf, v.u.s, escape);
|
||
|
case FcTypeBool:
|
||
|
return FcNameUnparseString (buf, v.u.b ? (FcChar8 *) "True" : (FcChar8 *) "False", 0);
|
||
|
case FcTypeMatrix:
|
||
|
- sprintf ((char *) temp, "%g %g %g %g",
|
||
|
+ snprintf ((char *) temp, sizeof (temp), "%g %g %g %g",
|
||
|
v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
|
||
|
return FcNameUnparseString (buf, temp, 0);
|
||
|
case FcTypeCharSet:
|
||
|
@@ -526,7 +526,7 @@
|
||
|
case FcTypeFTFace:
|
||
|
return FcTrue;
|
||
|
case FcTypeRange:
|
||
|
- sprintf ((char *) temp, "[%g %g)", v.u.r->begin, v.u.r->end);
|
||
|
+ snprintf ((char *) temp, sizeof (temp), "[%g %g)", v.u.r->begin, v.u.r->end);
|
||
|
return FcNameUnparseString (buf, temp, 0);
|
||
|
}
|
||
|
return FcFalse;
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/src/fcobjs.c libfontconfig.srctix/src/fcobjs.c
|
||
|
--- libfontconfig.normalized/src/fcobjs.c 2017-02-23 13:17:53.000000000 +0100
|
||
|
+++ libfontconfig.srctix/src/fcobjs.c 2017-02-23 13:17:53.000000000 +0100
|
||
|
@@ -24,11 +24,12 @@
|
||
|
|
||
|
#include "fcint.h"
|
||
|
|
||
|
+/* TODO: Stick with existing fcobjshash.h regardless of system gperf. */
|
||
|
static unsigned int
|
||
|
-FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len);
|
||
|
+FcObjectTypeHash (register const char *str, register size_t len);
|
||
|
|
||
|
static const struct FcObjectTypeInfo *
|
||
|
-FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len);
|
||
|
+FcObjectTypeLookup (register const char *str, register size_t len);
|
||
|
|
||
|
#include "fcobjshash.h"
|
||
|
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/src/Makefile.in libfontconfig.srctix/src/Makefile.in
|
||
|
--- libfontconfig.normalized/src/Makefile.in 2017-09-21 10:08:10.000000000 +0200
|
||
|
+++ libfontconfig.srctix/src/Makefile.in 2017-09-21 10:08:10.000000000 +0200
|
||
|
@@ -496,7 +496,6 @@
|
||
|
stamp-fcstdint \
|
||
|
fcstdint.h \
|
||
|
stamp-fcobjshash.gperf \
|
||
|
- fcobjshash.h \
|
||
|
fcobjshash.gperf
|
||
|
|
||
|
all: $(BUILT_SOURCES)
|
||
|
@@ -912,9 +911,10 @@
|
||
|
' - > $@.tmp && \
|
||
|
mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false )
|
||
|
|
||
|
-fcobjshash.h: Makefile fcobjshash.gperf
|
||
|
- $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \
|
||
|
- mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
|
||
|
+# PATCH: Sortix doesn't have gperf at the moment.
|
||
|
+#fcobjshash.h: Makefile fcobjshash.gperf
|
||
|
+# $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \
|
||
|
+# mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
|
||
|
|
||
|
@ENABLE_SHARED_TRUE@install-data-local: install-ms-import-lib install-libtool-import-lib
|
||
|
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/test/test-migration.c libfontconfig.srctix/test/test-migration.c
|
||
|
--- libfontconfig.normalized/test/test-migration.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
+++ libfontconfig.srctix/test/test-migration.c 2016-12-02 04:22:19.000000000 +0100
|
||
|
@@ -22,6 +22,8 @@
|
||
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||
|
*/
|
||
|
+/* PATCH: Need HAVE_FOO macros.. */
|
||
|
+#include "../config.h"
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
diff --no-dereference -Naur -- libfontconfig.normalized/tixbuildinfo libfontconfig.srctix/tixbuildinfo
|
||
|
--- libfontconfig.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
|
||
|
+++ libfontconfig.srctix/tixbuildinfo 2017-10-24 20:04:50.552936797 +0200
|
||
|
@@ -0,0 +1,9 @@
|
||
|
+tix.version=1
|
||
|
+tix.class=srctix
|
||
|
+pkg.name=libfontconfig
|
||
|
+pkg.build-libraries=libiconv libexpat libfreetype
|
||
|
+pkg.build-system=configure
|
||
|
+# Documentation requires SGMLSpm and texline, doesn't seem to work?
|
||
|
+pkg.configure.args=--disable-docs
|
||
|
+pkg.post-install.cmd=tix-eradicate-libtool-la
|
||
|
+pkg.make.vars=V=1
|