r18496 by jghali - remove private cairo copy, 1.12 has been released for long enough

scribus-commit scribus-commit at lists.scribus.net
Tue Sep 24 21:04:25 UTC 2013


Author: jghali
Date: Tue Sep 24 21:04:25 2013
New Revision: 18496

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18496
Log:
remove private cairo copy, 1.12 has been released for long enough

Modified:
    trunk/Scribus/CMakeLists.txt
    trunk/Scribus/config.h.cmake
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/scpainter.cpp
    trunk/Scribus/scribus/third_party/CMakeLists.txt
    trunk/Scribus/scribus/third_party/cairo/
    trunk/Scribus/scribus/ui/about.cpp

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18496&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Tue Sep 24 21:04:25 2013
@@ -557,63 +557,24 @@
 #>> FreeType2
 
 #<<Render Library
-# Select our rendering library
-# As of Scribus 1.5.0, we can use cairo installed on system or cairo private branch
-# If we have a RENDER_LIB selected from a previous cmake run, then use it
-# otherwise, we should be defaulting to cairo private branch
-IF(WANT_PRIVATE_CAIRO)
+IF (WANT_PRIVATE_CAIRO)
   MESSAGE("We no longer support the private cairo library as the latest public release is more up to date, setting WANT_SYSTEM_CAIRO=1")
-  SET(WANT_SYSTEM_CAIRO 1)
-  SET(WANT_PRIVATE_CAIRO 0)
-  #MESSAGE("Using private CAIRO Library")
-  #SET(RENDER_LIB "CAIRO_PRIVATE" CACHE TYPE STRING)
-  #SET(HAVE_CAIRO 1)
-  #SET(HAVE_PRIVATE_CAIRO 1)
-  #SET( CAIRO_FOUND "YES" )
 ENDIF(WANT_PRIVATE_CAIRO)
-IF(NOT WANT_PRIVATE_CAIRO)
-  IF(RENDER_LIB)
-	MESSAGE(STATUS "Previously selected rendering system: ${RENDER_LIB}")
-	IF (RENDER_LIB STREQUAL "QTARTHUR")
-	  MESSAGE("Qt4's Arthur as renderer is not supported anymore, performing renderer detection again")
-	  SET(OLDRENDERLIBLOST TRUE)
-	ENDIF (RENDER_LIB STREQUAL "QTARTHUR")
-  ELSE(RENDER_LIB)
-	SET(WANT_SYSTEM_CAIRO 1)
-	SET(WANT_PRIVATE_CAIRO 0)
-  ENDIF(RENDER_LIB)
-
- IF (WANT_SYSTEM_CAIRO OR RENDER_LIB STREQUAL "CAIRO_SYSTEM")
-  SET(OLDRENDERLIBLOST FALSE)
-  SET(CAIRO_DIR ${CMAKE_MODULE_PATH})
-  FIND_PACKAGE(CAIRO)
-  IF(CAIRO_FOUND)
-   MESSAGE("CAIRO Library Found OK")
-   SET(RENDER_LIB "CAIRO_SYSTEM" CACHE TYPE STRING)
-  ELSE(CAIRO_FOUND)
-   SET(OLDRENDERLIBLOST TRUE)
-  ENDIF(CAIRO_FOUND)
- ENDIF (WANT_SYSTEM_CAIRO OR RENDER_LIB STREQUAL "CAIRO_SYSTEM")
-
- IF (OLDRENDERLIBLOST OR NOT RENDER_LIB OR RENDER_LIB STREQUAL "CAIRO_PRIVATE")
-  SET(RENDER_LIB "CAIRO_PRIVATE" CACHE TYPE STRING)
-  SET(HAVE_CAIRO 1)
-  SET(HAVE_PRIVATE_CAIRO 1)
-  SET(WANT_PRIVATE_CAIRO 1)
-  SET( CAIRO_FOUND "YES" )
-  MESSAGE("Cairo private branch selected for renderer")
-  IF (OLDRENDERLIBLOST)
-   MESSAGE("Old render lib could no longer be found, replaced by cairo private branch")
-  ENDIF (OLDRENDERLIBLOST)
- ENDIF (OLDRENDERLIBLOST OR NOT RENDER_LIB OR RENDER_LIB STREQUAL "CAIRO_PRIVATE")
- 
- #Cairo is required on Windows for printing system
- IF (WIN32)
-  IF (NOT HAVE_CAIRO)
-   MESSAGE(FATAL_ERROR "Cairo >= 1.5.16 is required for Windows build")  
-  ENDIF (NOT HAVE_CAIRO)
- ENDIF (WIN32)
-ENDIF(NOT WANT_PRIVATE_CAIRO)
+
+IF (RENDER_LIB)
+  IF (RENDER_LIB STREQUAL "QTARTHUR")
+    MESSAGE("Qt4's Arthur as renderer is not supported anymore, performing renderer detection again")
+  ENDIF (RENDER_LIB STREQUAL "QTARTHUR")
+ENDIF(RENDER_LIB)
+
+SET(CAIRO_DIR ${CMAKE_MODULE_PATH})
+FIND_PACKAGE(CAIRO REQUIRED)
+IF(CAIRO_FOUND)
+  MESSAGE("CAIRO Library Found OK")
+  SET(RENDER_LIB "CAIRO_SYSTEM" CACHE TYPE STRING)
+ELSE(CAIRO_FOUND)
+  MESSAGE(FATAL_ERROR "No Cairo Found")
+ENDIF(CAIRO_FOUND)
 #>>Render Library
 
 #<<CUPS

Modified: trunk/Scribus/config.h.cmake
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18496&path=/trunk/Scribus/config.h.cmake
==============================================================================
--- trunk/Scribus/config.h.cmake (original)
+++ trunk/Scribus/config.h.cmake Tue Sep 24 21:04:25 2013
@@ -19,7 +19,6 @@
 #cmakedefine CMS_INC @CMS_INC@
 #cmakedefine HAVE_XML 1
 #cmakedefine HAVE_CAIRO 1
-#cmakedefine HAVE_PRIVATE_CAIRO 1
 #cmakedefine HAVE_CUPS 1
 #cmakedefine HAVE_TIFF 1
 #cmakedefine HAVE_LIBZ 1

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18496&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Tue Sep 24 21:04:25 2013
@@ -1126,19 +1126,10 @@
 
 
 #Set up libraries to link with all found packages
-
-IF(WANT_PRIVATE_CAIRO)
-	SET(SCRIBUS_CAIRO_LIB "scribus_cairo_lib")
-	INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/third_party/cairo)
-	LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/third_party/cairo)
-	TARGET_LINK_LIBRARIES(${EXE_NAME} ${PIXMAN_LIBRARIES} ${SCRIBUS_CAIRO_LIB})
-ELSE(WANT_PRIVATE_CAIRO)
-	#Select system Cairo
-	INCLUDE_DIRECTORIES(${CAIRO_INCLUDE_DIR})
-	TARGET_LINK_LIBRARIES(${EXE_NAME} ${CAIRO_LIBRARIES})
-	LINK_DIRECTORIES(${PREFIX_CAIRO_LIB})
-	SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${PREFIX_CAIRO_LIB}")
-ENDIF(WANT_PRIVATE_CAIRO)
+INCLUDE_DIRECTORIES(${CAIRO_INCLUDE_DIR})
+TARGET_LINK_LIBRARIES(${EXE_NAME} ${CAIRO_LIBRARIES})
+LINK_DIRECTORIES(${PREFIX_CAIRO_LIB})
+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${PREFIX_CAIRO_LIB}")
 
 MESSAGE("RPATH: ${CMAKE_INSTALL_RPATH}")
 

Modified: trunk/Scribus/scribus/scpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18496&path=/trunk/Scribus/scribus/scpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainter.cpp (original)
+++ trunk/Scribus/scribus/scpainter.cpp Tue Sep 24 21:04:25 2013
@@ -685,14 +685,12 @@
 		cairo_pattern_t *pat = NULL;
 		cairo_surface_t *img = NULL;
 		cairo_t *cr = NULL;
-// #ifdef HAVE_PRIVATE_CAIRO
-#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)  || HAVE_PRIVATE_CAIRO)
+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2))
 		cairo_pattern_t *mpat = NULL;
 #endif
 		if (fill_gradient.type() == VGradient::fourcolor)
 		{
-//#ifdef HAVE_PRIVATE_CAIRO
-#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) || HAVE_PRIVATE_CAIRO)
+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2))
 			double p1x = gradPatchP1.x();
 			double p1y = gradPatchP1.y();
 			double p2x = gradPatchP2.x();
@@ -786,8 +784,7 @@
 		}
 		else if (fill_gradient.type() == VGradient::diamond)
 		{
-// #ifdef HAVE_PRIVATE_CAIRO
-#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) || HAVE_PRIVATE_CAIRO)
+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2))
 			double p1x = gradControlP1.x();
 			double p1y = gradControlP1.y();
 			double p2x = gradControlP2.x();
@@ -1083,8 +1080,7 @@
 		}
 		else if (fill_gradient.type() == VGradient::mesh)
 		{
-// #ifdef HAVE_PRIVATE_CAIRO
-#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) || HAVE_PRIVATE_CAIRO)
+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2))
 			double p3x = gradPatchP3.x();
 			double p3y = gradPatchP3.y();
 			img = cairo_surface_create_similar(cairo_get_target(m_cr), CAIRO_CONTENT_COLOR_ALPHA, p3x, p3y);
@@ -1210,8 +1206,7 @@
 		}
 		else if (fill_gradient.type() == VGradient::freemesh)
 		{
-// #ifdef HAVE_PRIVATE_CAIRO
-#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) || HAVE_PRIVATE_CAIRO)
+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2))
 			double p3x = gradPatchP3.x();
 			double p3y = gradPatchP3.y();
 			img = cairo_surface_create_similar(cairo_get_target(m_cr), CAIRO_CONTENT_COLOR_ALPHA, p3x, p3y);
@@ -1399,8 +1394,7 @@
 			cairo_paint_with_alpha (m_cr, fill_trans);
 		}
 		cairo_pattern_destroy (pat);
-// #ifdef HAVE_PRIVATE_CAIRO
-#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)  || HAVE_PRIVATE_CAIRO)
+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2))
 		if ((fill_gradient.type() == VGradient::fourcolor) || (fill_gradient.type() == VGradient::diamond) || (fill_gradient.type() == VGradient::mesh) || (fill_gradient.type() == VGradient::freemesh))
 		{
 			cairo_surface_destroy(img);

Modified: trunk/Scribus/scribus/third_party/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18496&path=/trunk/Scribus/scribus/third_party/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/third_party/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/third_party/CMakeLists.txt Tue Sep 24 21:04:25 2013
@@ -1,7 +1,3 @@
-IF(WANT_PRIVATE_CAIRO)
-  ADD_SUBDIRECTORY(cairo)
-ENDIF(WANT_PRIVATE_CAIRO)
-
 IF(HAVE_OSG)
   ADD_SUBDIRECTORY(prc)
 ENDIF (HAVE_OSG)

Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18496&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Tue Sep 24 21:04:25 2013
@@ -147,13 +147,8 @@
 	bu += "*";
 #endif
 	bu += "-";
-#ifdef HAVE_PRIVATE_CAIRO
-	bu += "PC";
-	bu += cairo_version_string();
-#else
 	bu += "C";
 	bu += cairo_version_string();
-#endif
 
 // Some more information if we are not on a 32bit little endian Unix machine
 #if defined(Q_OS_WIN)




More information about the scribus-commit mailing list