Author: fireball
Date: Sun Jul 19 14:27:58 2009
New Revision: 42082

URL: http://svn.reactos.org/svn/reactos?rev=42082&view=rev
Log:
- Build freetype as a usual win32 dll.

Added:
    branches/arwinss/reactos/dll/3rdparty/freetype/
      - copied from r42002, branches/arwinss/reactos/lib/3rdparty/freetype/
    branches/arwinss/reactos/dll/3rdparty/freetype/rosglue.c   (with props)
Removed:
    branches/arwinss/reactos/lib/3rdparty/freetype/
Modified:
    branches/arwinss/reactos/dll/3rdparty/3rdparty.rbuild
    branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild
    branches/arwinss/reactos/lib/3rdparty/3rdparty.rbuild

Modified: branches/arwinss/reactos/dll/3rdparty/3rdparty.rbuild
URL: 
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/3rdparty/3rdparty.rbuild?rev=42082&r1=42081&r2=42082&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/3rdparty/3rdparty.rbuild [iso-8859-1] 
(original)
+++ branches/arwinss/reactos/dll/3rdparty/3rdparty.rbuild [iso-8859-1] Sun Jul 
19 14:27:58 2009
@@ -1,6 +1,9 @@
 <?xml version="1.0"?>
 <!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd">
 <group xmlns:xi="http://www.w3.org/2001/XInclude";>
+       <directory name="freetype">
+               <xi:include href="freetype/freetype.rbuild" />
+       </directory>
        <directory name="mesa32">
                <xi:include href="mesa32/mesa32.rbuild" />
        </directory>

Modified: branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild
URL: 
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild?rev=42082&r1=42002&r2=42082&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] 
(original)
+++ branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] 
Sun Jul 19 14:27:58 2009
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="freetype" type="staticlibrary" allowwarnings="true">
+<module name="freetype" type="win32dll" entrypoint="0" 
baseaddress="${BASEADDRESS_FREETYPE}" installbase="system32" 
installname="freetype.dll" allowwarnings="true" crt="msvcrt">
+       <importlibrary definition="freetype.def" />
        <include base="freetype">include</include>
        <define name="_DISABLE_TIDENTS" />
        <define name="__NTDRIVER__" />
@@ -12,6 +13,7 @@
        <if property="NSWPAT" value="1">
                <define name="TT_CONFIG_OPTION_BYTECODE_INTERPRETER" />
        </if>
+       <library>kernel32</library>
        <if property="ARCH" value="i386">
                <directory name="i386">
                        <file>setjmplongjmp.s</file>
@@ -101,4 +103,6 @@
                        <file>winfnt.c</file>
                </directory>
        </directory>
+       <file>rosglue.c</file>
+       <file>freetype.rc</file>
 </module>

Added: branches/arwinss/reactos/dll/3rdparty/freetype/rosglue.c
URL: 
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/3rdparty/freetype/rosglue.c?rev=42082&view=auto
==============================================================================
--- branches/arwinss/reactos/dll/3rdparty/freetype/rosglue.c (added)
+++ branches/arwinss/reactos/dll/3rdparty/freetype/rosglue.c [iso-8859-1] Sun 
Jul 19 14:27:58 2009
@@ -1,0 +1,131 @@
+/* $Id: rosglue.c 29690 2007-10-19 23:21:45Z dreimer $
+ *
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           FreeType implementation for ReactOS
+ * PURPOSE:           Glue functions between FreeType
+ * FILE:              thirdparty/freetype/rosglue.c
+ * PROGRAMMER:        Ge van Geldorp ([email protected])
+ * NOTES:
+ */
+
+#include <ntddk.h>
+#include <ctype.h>
+#include <errno.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
+#define TAG_FREETYPE  TAG('F', 'T', 'Y', 'P')
+
+/*
+ * First some generic routines
+ */
+
+
+
+/*
+ * Memory allocation
+ *
+ * Because of realloc, we need to keep track of the size of the allocated
+ * buffer (need to copy the old contents to the new buffer). So, allocate
+ * extra space for a size_t, store the allocated size in there and return
+ * the address just past it as the allocated buffer.
+ */
+#if 0
+void *
+malloc(size_t Size)
+{
+  void *Object;
+
+  Object = ExAllocatePoolWithTag(PagedPool, sizeof(size_t) + Size, 
TAG_FREETYPE);
+  if (NULL != Object)
+    {
+    *((size_t *) Object) = Size;
+    Object = (void *)((size_t *) Object + 1);
+    }
+
+  return Object;
+}
+
+void *
+realloc(void *Object, size_t Size)
+{
+  void *NewObject;
+  size_t CopySize;
+
+  NewObject = ExAllocatePoolWithTag(PagedPool, sizeof(size_t) + Size, 
TAG_FREETYPE);
+  if (NULL != NewObject)
+    {
+    *((size_t *) NewObject) = Size;
+    NewObject = (void *)((size_t *) NewObject + 1);
+    CopySize = *((size_t *) Object - 1);
+    if (Size < CopySize)
+      {
+      CopySize = Size;
+      }
+    memcpy(NewObject, Object, CopySize);
+    ExFreePool((size_t *) Object - 1);
+    }
+
+  return NewObject;
+}
+
+void
+free(void *Object)
+{
+  ExFreePool((size_t *) Object - 1);
+}
+
+/*
+ * File I/O
+ *
+ * This is easy, we don't want FreeType to do any I/O. So return an
+ * error on each I/O attempt. Note that errno is not being set, it is
+ * not used by FreeType.
+ */
+
+FILE *
+fopen(const char *FileName, const char *Mode)
+{
+  DPRINT1("Freetype tries to open file %s\n", FileName);
+
+  return NULL;
+}
+
+int
+fseek(FILE *Stream, long Offset, int Origin)
+{
+  DPRINT1("Doubleplus ungood: freetype shouldn't fseek!\n");
+
+  return -1;
+}
+
+long
+ftell(FILE *Stream)
+{
+  DPRINT1("Doubleplus ungood: freetype shouldn't ftell!\n");
+
+  return -1;
+}
+
+size_t
+fread(void *Buffer, size_t Size, size_t Count, FILE *Stream)
+{
+  DPRINT1("Doubleplus ungood: freetype shouldn't fread!\n");
+
+  return 0;
+}
+
+int
+fclose(FILE *Stream)
+{
+  DPRINT1("Doubleplus ungood: freetype shouldn't fclose!\n");
+
+  return EOF;
+}
+#endif

Propchange: branches/arwinss/reactos/dll/3rdparty/freetype/rosglue.c
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: branches/arwinss/reactos/lib/3rdparty/3rdparty.rbuild
URL: 
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/3rdparty/3rdparty.rbuild?rev=42082&r1=42081&r2=42082&view=diff
==============================================================================
--- branches/arwinss/reactos/lib/3rdparty/3rdparty.rbuild [iso-8859-1] 
(original)
+++ branches/arwinss/reactos/lib/3rdparty/3rdparty.rbuild [iso-8859-1] Sun Jul 
19 14:27:58 2009
@@ -9,9 +9,6 @@
        </directory>
        <directory name="expat">
                <xi:include href="expat/expat.rbuild" />
-       </directory>
-       <directory name="freetype">
-               <xi:include href="freetype/freetype.rbuild" />
        </directory>
        <directory name="icu4ros">
                <xi:include href="icu4ros/icu4ros.rbuild" />

Reply via email to