diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 194 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 52 | ||||
-rw-r--r-- | art_config.h | 16 | ||||
-rw-r--r-- | art_config.h.in | 14 | ||||
-rw-r--r-- | art_render_svp.c | 2 | ||||
m--------- | cmake | 0 | ||||
-rw-r--r-- | config.h.cmake | 8 | ||||
-rw-r--r-- | doc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/man/CMakeLists.txt | 5 | ||||
-rw-r--r-- | doc/man/libart2-config.1 | 52 | ||||
-rw-r--r-- | libart-features.h | 24 |
12 files changed, 330 insertions, 41 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..69dd7b2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "cmake"] + path = cmake + url = https://[email protected]/scm/git/tde-common-cmake diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..aaf1a8d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,194 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 2.8 ) + + +#### general package setup + +project( libart-lgpl ) +set( VERSION R14.0.7 ) +set( LIBART_VERSION 2.3.21 ) + +string( REPLACE "." ";" LIBART_VERSION_LIST ${LIBART_VERSION} ) +list( GET LIBART_VERSION_LIST 0 LIBART_MAJOR_VERSION ) +list( GET LIBART_VERSION_LIST 1 LIBART_MINOR_VERSION ) +list( GET LIBART_VERSION_LIST 2 LIBART_MICRO_VERSION ) + + +#### include essential cmake modules + +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H -DLIBART_COMPILATION ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) +configure_file( art_config.h.in art_config.h @ONLY ) +configure_file( libart-features.h.in libart-features.h @ONLY ) + + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +##### art_lgpl_2 + +set( _SRCS art_affine.c art_alphagamma.c + art_bpath.c art_gray_svp.c + art_misc.c art_pixbuf.c + art_rect.c art_rect_svp.c + art_rect_uta.c art_render.c + art_render_gradient.c art_render_mask.c + art_render_svp.c art_rgb.c + art_rgb_affine.c art_rgb_affine_private.c + art_rgb_bitmap_affine.c art_rgb_pixbuf_affine.c + art_rgb_rgba_affine.c art_rgb_a_affine.c + art_rgba.c art_rgb_svp.c + art_svp.c art_svp_intersect.c + art_svp_ops.c art_svp_point.c + art_svp_render_aa.c art_svp_vpath.c + art_svp_vpath_stroke.c art_svp_wind.c + art_uta.c art_uta_ops.c + art_uta_rect.c art_uta_vpath.c + art_uta_svp.c art_vpath.c + art_vpath_bpath.c art_vpath_dash.c + art_vpath_svp.c libart-features.c +) + +## shared + +tde_add_library( art_lgpl_2 SHARED + + SOURCES + ${_SRCS} + LINK + m + + VERSION ${LIBART_VERSION} + + DESTINATION ${LIB_INSTALL_DIR} +) + +## static + +tde_add_library( art_lgpl_2 STATIC_PIC + + SOURCES + ${_SRCS} + LINK + m + + VERSION ${LIBART_VERSION} + + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### Headers + +set( _headers art_affine.h art_alphagamma.h + art_bpath.h + art_filterlevel.h art_gray_svp.h + art_misc.h art_pathcode.h art_pixbuf.h + art_point.h art_rect.h art_rect_svp.h + art_rect_uta.h art_render.h + art_render_gradient.h art_render_mask.h + art_render_svp.h art_rgb.h + art_rgb_affine.h art_rgb_bitmap_affine.h + art_rgb_pixbuf_affine.h art_rgb_rgba_affine.h + art_rgb_a_affine.h art_rgb_svp.h + art_rgba.h art_svp.h + art_svp_intersect.h art_svp_ops.h + art_svp_point.h art_svp_render_aa.h + art_svp_vpath.h art_svp_vpath_stroke.h + art_svp_wind.h art_uta.h + art_uta_ops.h art_uta_rect.h + art_uta_vpath.h art_uta_svp.h + art_vpath.h art_vpath_bpath.h + art_vpath_dash.h art_vpath_svp.h + libart.h + ${CMAKE_CURRENT_BINARY_DIR}/art_config.h + ${CMAKE_CURRENT_BINARY_DIR}/libart-features.h +) + +install( + FILES ${_headers} + DESTINATION ${INCLUDE_INSTALL_DIR}/libart-2.0/libart_lgpl +) + + +#### pkg-config + +set( prefix ${CMAKE_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" exec_prefix ${EXEC_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" includedir ${INCLUDE_INSTALL_DIR} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" libdir ${LIB_INSTALL_DIR} ) + +configure_file( libart-2.0.pc.in libart-2.0.pc @ONLY ) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libart-2.0.pc + DESTINATION ${PKGCONFIG_INSTALL_DIR} +) + +install( + PROGRAMS libart2-config + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### man page + +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..11daccd --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,52 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + +# required stuff +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +##### check of type size + +check_type_size( char ART_SIZEOF_CHAR ) +check_type_size( short ART_SIZEOF_SHORT ) +check_type_size( int ART_SIZEOF_INT ) +check_type_size( long ART_SIZEOF_LONG ) + +if( ${ART_SIZEOF_CHAR} EQUAL 1 ) + set( ART_U8_TYPE "unsigned char" ) +else( ) + tde_message_fatal( "sizeof(char) != 1" ) +endif( ) + +if( ${ART_SIZEOF_SHORT} EQUAL 2 ) + set( ART_U16_TYPE "unsigned short" ) +else( ) + tde_message_fatal( "sizeof(short) != 2" ) +endif( ) + +if( ${ART_SIZEOF_INT} EQUAL 4 ) + set( ART_U32_TYPE "unsigned int" ) +else( ) + if( ${ART_SIZEOF_LONG} EQUAL 4 ) + set( ART_U32_TYPE "unsigned long" ) + else( ) + tde_message_fatal( "sizeof(int) != 4 and sizeof(long) != 4" ) + endif( ) +endif( ) diff --git a/art_config.h b/art_config.h deleted file mode 100644 index 0e4c948..0000000 --- a/art_config.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Automatically generated by gen_art_config */ - -#ifndef _ART_CONFIG_H_ -#define _ART_CONFIG_H_ - -#define ART_SIZEOF_CHAR 1 -#define ART_SIZEOF_SHORT 2 -#define ART_SIZEOF_INT 4 -#define ART_SIZEOF_LONG 4 - -typedef unsigned char art_u8; -typedef unsigned short art_u16; -typedef unsigned int art_u32; - -#endif /* _ART_CONFIG_H_ */ - diff --git a/art_config.h.in b/art_config.h.in new file mode 100644 index 0000000..4d42ed9 --- /dev/null +++ b/art_config.h.in @@ -0,0 +1,14 @@ + +#ifndef _ART_CONFIG_H_ +#define _ART_CONFIG_H_ + +#define ART_SIZEOF_CHAR @ART_SIZEOF_CHAR@ +#define ART_SIZEOF_SHORT @ART_SIZEOF_SHORT@ +#define ART_SIZEOF_INT @ART_SIZEOF_INT@ +#define ART_SIZEOF_LONG @ART_SIZEOF_LONG@ + +typedef @ART_U8_TYPE@ art_u8; +typedef @ART_U16_TYPE@ art_u16; +typedef @ART_U32_TYPE@ art_u32; + +#endif /* _ART_CONFIG_H_ */ diff --git a/art_render_svp.c b/art_render_svp.c index 895e3cc..c91b52b 100644 --- a/art_render_svp.c +++ b/art_render_svp.c @@ -21,7 +21,7 @@ * * Authors: Raph Levien <[email protected]> */ - +#include "config.h" #include "art_render_svp.h" #include "art_svp_render_aa.h" diff --git a/cmake b/cmake new file mode 160000 +Subproject 47eede594abc7947a83cfb777b5e3c8c0b443d5 diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..61ede3a --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,8 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..6d0aa9f --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1 @@ +tde_auto_add_subdirectories( ) diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt new file mode 100644 index 0000000..0cf1b67 --- /dev/null +++ b/doc/man/CMakeLists.txt @@ -0,0 +1,5 @@ +INSTALL( + FILES libart2-config.1 + DESTINATION ${MAN_INSTALL_DIR}/man1 + COMPONENT doc +) diff --git a/doc/man/libart2-config.1 b/doc/man/libart2-config.1 new file mode 100644 index 0000000..7439b29 --- /dev/null +++ b/doc/man/libart2-config.1 @@ -0,0 +1,52 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng <[email protected]>. +.TH "LIBART2-CONFIG" "1" "08 August 2003" "" "" +.SH NAME +libart2-config \- script to get information about the installed version of libart 2.x +.SH SYNOPSIS + +\fBlibart2-config\fR [ \fB --prefix\fI[=DIR]\fB \fR ] [ \fB --exec-prefix\fI[=DIR]\fB \fR ] [ \fB --libs \fR ] [ \fB --cflags \fR ] [ \fB --version \fR ] + +.SH "DESCRIPTION" +.PP +\fBlibart2-config\fR is a tool that is used to determine +the compiler and linker flags that should be used to compile and +link programs that use \fIlibart\fR library. +.SH "OPTIONS" +.TP +\fB--prefix=PREFIX\fR +If specified, use \fIPREFIX\fR instead +of the installation prefix that +\fIlibart\fR was built with when computing +the output for the \fB--cflags\fR and +\fB--libs\fR options. This option is also used for +the exec prefix if \fB--exec-prefix\fR was +not specified. This option must be specified before any +\fB--libs\fR or \fB--cflags\fR options. +.TP +\fB--exec-prefix=PREFIX\fR +If specified, use \fIPREFIX\fR instead +of the installation exec prefix that +\fIlibart\fR was built with when computing +the output for the \fB--cflags\fR and +\fB--libs\fR options. This option must be specified +before any \fB--libs\fR or \fB--cflags\fR options. +.TP +\fB--libs\fR +Print the linker flags that are necessary to link a +\fIlibart\fR program. +.TP +\fB--cflags\fR +Print the compiler flags that are necessary to compile a +\fIlibart\fR program. +.TP +\fB--version\fR +Print the currently installed version of +\fIlibart\fR on the standard output. +.SH "AUTHOR" +.PP +This manual page was written by Christian Marillat <[email protected]> for +the Debian GNU/Linux system (but may be used by others). diff --git a/libart-features.h b/libart-features.h deleted file mode 100644 index cff970a..0000000 --- a/libart-features.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef LIBART_FEATURES_H -#define LIBART_FEATURES_H 1 - -#define LIBART_MAJOR_VERSION (2) -#define LIBART_MINOR_VERSION (3) -#define LIBART_MICRO_VERSION (21) -#define LIBART_VERSION "2.3.21" - -#ifdef _WIN32 -# ifdef LIBART_COMPILATION -# define LIBART_VAR __declspec(dllexport) -# else -# define LIBART_VAR extern __declspec(dllimport) -# endif -#else -# define LIBART_VAR extern -#endif - -LIBART_VAR const unsigned int libart_major_version, libart_minor_version, libart_micro_version; -LIBART_VAR const char *libart_version; - -void libart_preinit(void *app, void *modinfo); -void libart_postinit(void *app, void *modinfo); -#endif |