> From: Christian Weisgerber <[email protected]>
> Date: Thu, Jan 9, 2014 at 11:45 PM
> Subject: Re: [heads-up] freetype update ?
> To: [email protected]
> 
> 
> Christian Weisgerber <[email protected]> wrote:
> 
> > > These are probably using a local FindFreetype.cmake module file.
> >
> > Indeed they are.
> 
> Add another one:
> 
> geo/mapserver
> graphics/darktable
> graphics/openscenegraph
> lang/io
> x11/ogre

Here's the diff to fix these ports.

For mapserver, lang/io, openscenegraph, and ogre I've just removed
the local FindFreetype.cmake module file, since these ports used
an obsolete or slightly different version of the system module with
identical defined variables.

graphics/darktable, instead, has diverged considerably from the
default FindFreetype.cmake module, so I've patched the local file
here.

You also have some assorted minor fixes, and a pair of
"#include <freetype/ftblah.h> -> #include FT_BLAH_H" dances...

All of these are already build-tested.

Oky?

ciao,
David

Index: geo/mapserver/Makefile
===================================================================
RCS file: /cvs/ports/geo/mapserver/Makefile,v
retrieving revision 1.31
diff -u -p -u -p -r1.31 Makefile
--- geo/mapserver/Makefile      30 Dec 2013 18:06:43 -0000      1.31
+++ geo/mapserver/Makefile      10 Jan 2014 12:14:48 -0000
@@ -63,7 +63,7 @@ PREFIX-main=  ${VARBASE}/www
 SUBST_VARS+=   PREFIX-main
 
 post-extract:
-       rm -f ${WRKSRC}/cmake/Find{PostgreSQL,ICONV}.cmake
+       rm -f ${WRKSRC}/cmake/Find{Freetype,PostgreSQL,ICONV}.cmake
 
 post-install:
        ${INSTALL_DATA_DIR} ${WRKINST}/${PREFIX-main}/cgi-bin
Index: geo/mapserver/patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/geo/mapserver/patches/patch-CMakeLists_txt,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-CMakeLists_txt
--- geo/mapserver/patches/patch-CMakeLists_txt  25 Dec 2013 21:55:57 -0000      
1.1
+++ geo/mapserver/patches/patch-CMakeLists_txt  10 Jan 2014 12:14:48 -0000
@@ -1,7 +1,16 @@
 $OpenBSD: patch-CMakeLists_txt,v 1.1 2013/12/25 21:55:57 landry Exp $
 Ensure it uses our FindIconv.cmake module
 --- CMakeLists.txt.orig        Tue Sep 17 15:47:04 2013
-+++ CMakeLists.txt     Wed Dec 25 22:07:23 2013
++++ CMakeLists.txt     Fri Jan 10 12:58:53 2014
+@@ -262,7 +262,7 @@ find_package(Freetype)
+ if(NOT FREETYPE_FOUND)
+   report_mandatory_not_found(FREETYPE)
+ endif(NOT FREETYPE_FOUND)
+-include_directories(${FREETYPE_INCLUDE_DIR})
++include_directories(${FREETYPE_INCLUDE_DIRS})
+ ms_link_libraries( ${FREETYPE_LIBRARY})
+ 
+ 
 @@ -324,7 +324,7 @@ if(WITH_FRIBIDI)
  endif (WITH_FRIBIDI)
  
Index: geo/mapserver/patches/patch-cmake_FindCairo_cmake
===================================================================
RCS file: geo/mapserver/patches/patch-cmake_FindCairo_cmake
diff -N geo/mapserver/patches/patch-cmake_FindCairo_cmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ geo/mapserver/patches/patch-cmake_FindCairo_cmake   10 Jan 2014 12:14:48 
-0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+--- cmake/FindCairo.cmake.orig Fri Jan 10 13:06:02 2014
++++ cmake/FindCairo.cmake      Fri Jan 10 13:06:48 2014
+@@ -38,14 +38,14 @@ FIND_PATH(CAIRO_INCLUDE_DIR
+     PATH_SUFFIXES cairo
+ )
+ 
+-IF(APPLE)
++IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+    #On Mountain Lion we need this for the XQuartz supplied version of cairo
+     PKG_CHECK_MODULES(PC_FONTCONFIG fontconfig) # FIXME: After we require 
CMake 2.8.2 we can pass QUIET to this call.
+     FIND_PATH(FC_INCLUDE_DIR
+        NAMES fontconfig/fontconfig.h
+        HINTS ${PC_FONTCONFIG_INCLUDEDIR}
+     )
+-ENDIF(APPLE)
++ENDIF()
+ 
+ FIND_LIBRARY(CAIRO_LIBRARY
+     NAMES cairo
Index: graphics/darktable/patches/patch-cmake_modules_FindFreetype_cmake
===================================================================
RCS file: graphics/darktable/patches/patch-cmake_modules_FindFreetype_cmake
diff -N graphics/darktable/patches/patch-cmake_modules_FindFreetype_cmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ graphics/darktable/patches/patch-cmake_modules_FindFreetype_cmake   10 Jan 
2014 12:14:52 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix build with newer FreeType
+
+--- cmake/modules/FindFreetype.cmake.orig      Fri Jan 10 11:54:46 2014
++++ cmake/modules/FindFreetype.cmake   Fri Jan 10 11:55:26 2014
+@@ -12,7 +12,9 @@ libfind_pkg_check_modules(Freetype_PKGCONF freetype2)
+ 
+ # Include dir
+ find_path(Freetype_INCLUDE_DIR
+-  NAMES freetype/freetype.h
++  NAMES
++    freetype/freetype.h
++    freetype.h
+   PATHS ${Freetype_PKGCONF_INCLUDE_DIRS}
+   PATH_SUFFIXES freetype2
+ )
Index: graphics/openscenegraph/patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/graphics/openscenegraph/patches/patch-CMakeLists_txt,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-CMakeLists_txt
--- graphics/openscenegraph/patches/patch-CMakeLists_txt        14 Dec 2013 
17:17:13 -0000      1.2
+++ graphics/openscenegraph/patches/patch-CMakeLists_txt        10 Jan 2014 
12:15:12 -0000
@@ -1,7 +1,15 @@
 $OpenBSD: patch-CMakeLists_txt,v 1.2 2013/12/14 17:17:13 espie Exp $
 --- CMakeLists.txt.orig        Wed Jul 24 16:11:55 2013
-+++ CMakeLists.txt     Sat Dec 14 16:14:31 2013
-@@ -519,7 +519,8 @@ ELSE()
++++ CMakeLists.txt     Fri Jan 10 11:23:40 2014
+@@ -512,14 +512,15 @@ IF(ANDROID)
+     ANDROID_3RD_PARTY()
+ ELSE()
+ # Common to all platforms except android:
+-    FIND_PACKAGE(FreeType)
++    FIND_PACKAGE(Freetype)
+     FIND_PACKAGE(Inventor)
+     FIND_PACKAGE(Jasper)
+     FIND_PACKAGE(OpenEXR)
      FIND_PACKAGE(COLLADA)
      FIND_PACKAGE(FBX)
      FIND_PACKAGE(ZLIB)
Index: 
graphics/openscenegraph/patches/patch-src_osgPlugins_freetype_FreeTypeFont_cpp
===================================================================
RCS file: 
graphics/openscenegraph/patches/patch-src_osgPlugins_freetype_FreeTypeFont_cpp
diff -N 
graphics/openscenegraph/patches/patch-src_osgPlugins_freetype_FreeTypeFont_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 
graphics/openscenegraph/patches/patch-src_osgPlugins_freetype_FreeTypeFont_cpp  
    10 Jan 2014 12:15:12 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix build with newer FreeType
+
+--- src/osgPlugins/freetype/FreeTypeFont.cpp.orig      Fri Jan 10 11:57:06 2014
++++ src/osgPlugins/freetype/FreeTypeFont.cpp   Fri Jan 10 11:58:30 2014
+@@ -14,8 +14,8 @@
+ #include "FreeTypeFont.h"
+ #include "FreeTypeLibrary.h"
+ 
+-#include <freetype/ftoutln.h>
+-#include <freetype/ftbbox.h>
++#include FT_OUTLINE_H
++#include FT_BBOX_H
+ 
+ #include <osg/Notify>
+ #include <osg/io_utils>
Index: lang/io/Makefile
===================================================================
RCS file: /cvs/ports/lang/io/Makefile,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 Makefile
--- lang/io/Makefile    5 Jan 2014 19:51:45 -0000       1.13
+++ lang/io/Makefile    10 Jan 2014 12:15:38 -0000
@@ -77,11 +77,18 @@ pre-configure:
        perl -pi -e 's/\#include \<event\.h\>/#include <event.h>\n#include 
<event_struct.h>\n#include <buffer_compat.h>/' \
                ${WRKSRC}/addons/Socket/source/Io*.h
        ${SUBST_CMD} ${WRKSRC}/addons/Clutter/CMakeLists.txt
+# Remove obsolete local FindFreetype.cmake module which is not
+# compatible with Freetype 2.5
+       rm ${WRKSRC}/modules/FindFreetype.cmake
 
 pre-install:
        cp -R ${WRKBUILD}/_build/headers ${PREFIX}/include/io
        find ${WRKDIST} -name '*.orig' -or -name '*.beforesubst' -print0 | \
                xargs -r0 rm
+
+post-install:
+       rm ${WRKINST}/${LOCALBASE}/lib/io/addons/*/*.orig
+       rm ${WRKINST}/${LOCALBASE}/lib/io/addons/*/source/*.orig
 
 do-test:
        cd ${WRKBUILD} && _build/binaries/io \
Index: lang/io/patches/patch-addons_Font_CMakeLists_txt
===================================================================
RCS file: lang/io/patches/patch-addons_Font_CMakeLists_txt
diff -N lang/io/patches/patch-addons_Font_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lang/io/patches/patch-addons_Font_CMakeLists_txt    10 Jan 2014 12:15:38 
-0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Add missing include directory for OpenGL
+
+--- addons/Font/CMakeLists.txt.orig    Fri Jan 10 10:45:04 2014
++++ addons/Font/CMakeLists.txt Fri Jan 10 10:45:31 2014
+@@ -19,6 +19,7 @@ if(OPENGL_FOUND AND GLUT_FOUND AND FREETYPE_FOUND AND 
+ 
+       # Additional include directories
+       include_directories(
++              ${OPENGL_INCLUDE_DIR}
+               ${GLUT_INCLUDE_DIR}
+               ${FREETYPE_INCLUDE_DIRS}
+       )
Index: lang/io/patches/patch-addons_Font_source_IoFont_c
===================================================================
RCS file: lang/io/patches/patch-addons_Font_source_IoFont_c
diff -N lang/io/patches/patch-addons_Font_source_IoFont_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lang/io/patches/patch-addons_Font_source_IoFont_c   10 Jan 2014 12:15:38 
-0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix build with newer FreeType
+
+--- addons/Font/source/IoFont.c.orig   Fri Jan 10 10:47:25 2014
++++ addons/Font/source/IoFont.c        Fri Jan 10 10:47:37 2014
+@@ -29,7 +29,7 @@ Smaller fonts (those having a point size around 30 or 
+ 
+ 
+ #include "FreeTypeErrorCodes.h"
+-#include <freetype/ftglyph.h>
++#include FT_GLYPH_H
+ #include <math.h>
+ 
+ #define DATA(self) ((IoFontData *)IoObject_dataPointer(self))
Index: x11/ogre/Makefile
===================================================================
RCS file: /cvs/ports/x11/ogre/Makefile,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 Makefile
--- x11/ogre/Makefile   25 Nov 2013 14:16:24 -0000      1.10
+++ x11/ogre/Makefile   10 Jan 2014 12:21:54 -0000
@@ -57,4 +57,9 @@ LIB_DEPENDS-samples = ${LIB_DEPENDS} \
 
 NO_TEST =              Yes
 
+pre-configure:
+# Remove obsolete local FindFreetype.cmake module which is not
+# compatible with Freetype 2.5
+       rm ${WRKSRC}/CMake/Packages/FindFreetype.cmake
+
 .include <bsd.port.mk>

Reply via email to